|
@@ -4,9 +4,9 @@
|
|
|
* @author Erik Rodner
|
|
|
* @date 02/05/2008
|
|
|
*/
|
|
|
-#ifdef NICE_USELIB_ICE
|
|
|
- #include <image_nonvis.h>
|
|
|
-#endif
|
|
|
+// #ifdef NICE_USELIB_ICE
|
|
|
+// #include <image_nonvis.h>
|
|
|
+// #endif
|
|
|
#include <iostream>
|
|
|
|
|
|
#include "vislearning/features/localfeatures/sift.h"
|
|
@@ -171,46 +171,47 @@ void LocalFeatureSift::visualizeFeatures ( NICE::Image & mark,
|
|
|
const VVector & positions,
|
|
|
size_t color ) const
|
|
|
{
|
|
|
-#ifdef NICE_USELIB_ICE
|
|
|
- ice::Image mark_ice = ice::NewImg ( mark.width(),
|
|
|
- mark.height(), 255 );
|
|
|
- for ( size_t k = 0 ; k < positions.size() ; k++ )
|
|
|
- {
|
|
|
- const NICE::Vector & pos = positions[k];
|
|
|
- ice::Matrix points ( 0, 2 );
|
|
|
- const int size = 6;
|
|
|
- points.Append ( ice::Vector(-size, -size) );
|
|
|
- points.Append ( ice::Vector(-size, size) );
|
|
|
- points.Append ( ice::Vector(size, size) );
|
|
|
- points.Append ( ice::Vector(size, -size) );
|
|
|
-
|
|
|
- ice::Trafo tr;
|
|
|
-
|
|
|
- tr.Scale ( 0, 0, pos[2] );
|
|
|
- tr.Rotate ( 0, 0, pos[3] );
|
|
|
- tr.Shift ( pos[0], pos[1] );
|
|
|
-
|
|
|
- ice::TransformList(tr, points);
|
|
|
-
|
|
|
- for ( int j = 0 ; j < points.rows(); j++ )
|
|
|
- {
|
|
|
- if (points[j][0] < 0 )
|
|
|
- points[j][0] = 0;
|
|
|
- if (points[j][0] >= mark_ice->xsize)
|
|
|
- points[j][0] = mark_ice->xsize - 1;
|
|
|
- if (points[j][1] < 0 )
|
|
|
- points[j][1] = 0;
|
|
|
- if (points[j][1] >= mark_ice->ysize)
|
|
|
- points[j][1] = mark_ice->ysize - 1;
|
|
|
- }
|
|
|
- ice::DrawPolygon ( points, color, mark_ice );
|
|
|
- }
|
|
|
-
|
|
|
- for ( unsigned int y = 0 ; y < mark.height(); y++ )
|
|
|
- for ( unsigned int x = 0 ; x < mark.width(); x++ )
|
|
|
- mark.setPixel(x,y, GetVal(mark_ice,x,y));
|
|
|
-#else
|
|
|
- cerr << "uses ice visualization, please install ice or change to NICE visualization" << endl;
|
|
|
-#endif
|
|
|
+// #ifdef NICE_USELIB_ICE
|
|
|
+// ice::Image mark_ice = ice::NewImg ( mark.width(),
|
|
|
+// mark.height(), 255 );
|
|
|
+// for ( size_t k = 0 ; k < positions.size() ; k++ )
|
|
|
+// {
|
|
|
+// const NICE::Vector & pos = positions[k];
|
|
|
+// ice::Matrix points ( 0, 2 );
|
|
|
+// const int size = 6;
|
|
|
+// points.Append ( ice::Vector(-size, -size) );
|
|
|
+// points.Append ( ice::Vector(-size, size) );
|
|
|
+// points.Append ( ice::Vector(size, size) );
|
|
|
+// points.Append ( ice::Vector(size, -size) );
|
|
|
+//
|
|
|
+// ice::Trafo tr;
|
|
|
+//
|
|
|
+// tr.Scale ( 0, 0, pos[2] );
|
|
|
+// tr.Rotate ( 0, 0, pos[3] );
|
|
|
+// tr.Shift ( pos[0], pos[1] );
|
|
|
+//
|
|
|
+// ice::TransformList(tr, points);
|
|
|
+//
|
|
|
+// for ( int j = 0 ; j < points.rows(); j++ )
|
|
|
+// {
|
|
|
+// if (points[j][0] < 0 )
|
|
|
+// points[j][0] = 0;
|
|
|
+// if (points[j][0] >= mark_ice->xsize)
|
|
|
+// points[j][0] = mark_ice->xsize - 1;
|
|
|
+// if (points[j][1] < 0 )
|
|
|
+// points[j][1] = 0;
|
|
|
+// if (points[j][1] >= mark_ice->ysize)
|
|
|
+// points[j][1] = mark_ice->ysize - 1;
|
|
|
+// }
|
|
|
+// ice::DrawPolygon ( points, color, mark_ice );
|
|
|
+// }
|
|
|
+//
|
|
|
+// for ( unsigned int y = 0 ; y < mark.height(); y++ )
|
|
|
+// for ( unsigned int x = 0 ; x < mark.width(); x++ )
|
|
|
+// mark.setPixel(x,y, GetVal(mark_ice,x,y));
|
|
|
+// #else
|
|
|
+// cerr << "uses ice visualization, please install ice or change to NICE visualization" << endl;
|
|
|
+// #endif
|
|
|
+//TODO check this!
|
|
|
}
|
|
|
|