123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- /**
- * @file ICETools.h
- * @brief simple ICE GUI tools
- * @author Erik Rodner
- * @date 03/13/2008
- */
- #ifndef ICETOOLSINCLUDE
- #define ICETOOLSINCLUDE
- #include <vislearning/nice.h>
- #include <vector>
-
- namespace OBJREC {
- /** @brief simple ICE tools */
- class ICETools
- {
- protected:
- public:
-
- /** simple constructor */
- ICETools();
-
- /** simple destructor */
- virtual ~ICETools();
- /** select a set of rectangles (selection of top-left and bottom-right
- @param panel image which is displayed
- @param overlay overlay image which will be used to mark points
- @param x returned list of rectangles (top-left-x,top-left-y,width,height)
- @param color color which is used to mark points
- */
- static void selectRectangles ( const NICE::Image & panel, NICE::Image & overlay,
- std::vector<NICE::Vector> & x, int color );
- /** select a set of points
- @param panel image which is displayed
- @param overlay overlay image which will be used to mark points
- @param x returned list of image points
- @param color color which is used to mark points
- */
- static void selectPoints ( const NICE::Image & panel, NICE::Image & overlay,
- std::vector<NICE::Vector> & x, int color );
- /** convert a double image to a pseudocolor rgb image
- @param m input double image
- @param img resulting pseudocolor rgb image
- */
- static void convertToRGB ( const NICE::FloatImage & m, NICE::ColorImage & img );
- /** convert a matrix to a pseudocolor rgb image
- @param m input double image
- @param img resulting pseudocolor rgb image
- */
- static void convertToRGB ( const NICE::Matrix & m, NICE::ColorImage & img );
- /** convert a single double value to a pseudocolor
- @param x input double value
- @param r resulting red value
- @param g resulting green value
- @param b resulting blue value
- */
- static void toColor ( double x, double & r, double & g, double & b );
- /** calc grayscale image from a rgb image
- @param img color image
- @param imgg resulting grayscale image
- */
- static void calcGrayImage ( const NICE::ColorImage & img, NICE::Image & imgg );
- /** convert a c buffer to a matrix
- @param M resulting matrix
- @param raw input c buffer
- */
- static void convertM2ICE ( NICE::Matrix & M, double *raw );
- /** convert a matrix to a c buffer
- @param M input matrix
- @return resulting c buffer
- */
- static double *convertICE2M ( const NICE::Matrix & M );
- /** show a collection of images
- @param imagelist collection of images
- @return ...
- */
- static int showImages ( std::vector<NICE::Image> & imagelist );
- #ifndef NOVISUAL
- static int markImage (const NICE::Image & img, NICE::Image & mark, int marksize, int maxColor);
- #endif
-
- };
- } // namespace
- #endif
|