summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-09-02 17:15:22 +0100
committerTim Redfern <tim@eclectronics.org>2013-09-02 17:15:22 +0100
commit2469ddabe2b6e7746984339db84dbe0e7b069255 (patch)
treed43205fd842e7bc5d6b2f0785f6603dd5f19bc14
parent7e543cdaff89e99a9940624b949d684d4aed69c0 (diff)
working on transform algorithm
-rw-r--r--rotord/src/nodes_transform.h30
-rwxr-xr-xrotord/src/tinyxml.cpp2
2 files changed, 16 insertions, 16 deletions
diff --git a/rotord/src/nodes_transform.h b/rotord/src/nodes_transform.h
index 8baf1fa..8b94d33 100644
--- a/rotord/src/nodes_transform.h
+++ b/rotord/src/nodes_transform.h
@@ -68,16 +68,16 @@ namespace Rotor {
//it should be that a scale of 1 places it at width w
//how to scale around the centre
cv::Mat inter;
- if (s<1){
- if (s<.01) s=.01;
- float scalefac=((float)image.w/in->w)*s;
- cv::resize(in->rgb,inter,cv::Size(in->w*scalefac,in->h*scalefac),s,s); //double fx=0, double fy=0, int interpolation=INTER_LINEAR )¶
- s=1.0f;
- }
- else {
+ //if (s<1){
+ // if (s<.01) s=.01;
+ // float scalefac=((float)image.w/in->w)*s;
+ // cv::resize(in->rgb,inter,cv::Size(in->w*scalefac,in->h*scalefac),s,s); //double fx=0, double fy=0, int interpolation=INTER_LINEAR )¶
+ // s=1.0f;
+ //}
+ //else {
inter=in->rgb;
s=((float)image.w/in->w)*s;
- }
+ //}
// Compute matrix by creating triangle and transforming
//is there a better way - combine the 2? Just a bit of geometry
@@ -105,14 +105,14 @@ namespace Rotor {
//warpAffine( inter.rgb, image.rgb, rot_mat, image.rgb.size(), filtmode, cv::BORDER_WRAP);
//BORDER_WRAP
- //trans_mat.resize(3);
- //rot_mat.resize(3);
- //trans_mat.data[8]=1.0f;
- //rot_mat.data[8]=1.0f;
- //out_mat=rot_mat*trans_mat;
- //out_mat.resize(2);
+ trans_mat.resize(3);
+ rot_mat.resize(3);
+ trans_mat.data[8]=1.0f;
+ rot_mat.data[8]=1.0f;
+ out_mat=rot_mat*trans_mat;
+ out_mat.resize(2);
- warpAffine( inter, image.rgb, rot_mat, image.rgb.size(), filtmode, cv::BORDER_WRAP);
+ warpAffine( inter, image.rgb, out_mat, image.rgb.size(), filtmode, cv::BORDER_WRAP);
return &image;
}
diff --git a/rotord/src/tinyxml.cpp b/rotord/src/tinyxml.cpp
index 9b26b96..ef91984 100755
--- a/rotord/src/tinyxml.cpp
+++ b/rotord/src/tinyxml.cpp
@@ -1794,7 +1794,7 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
}
else
{
- //DoLineBreak(); //removed TJR 080813 as it makes prettier output
+ DoLineBreak(); //removed TJR 080813 as it makes prettier output
}
}
++depth;