123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef _NICE_OBJREC_IMAGETOOLS
- #define _NICE_OBJREC_IMAGETOOLS
- #include "core/image/ImageT.h"
- #include "core/image/ColorImageT.h"
- #include <utility>
- namespace OBJREC {
- class Image_tools
- {
- protected:
- public:
-
- Image_tools();
-
- ~Image_tools();
-
- void calculateGradients(const NICE::Image & origImage, NICE::ImageT<float> & grad_x_Image, NICE::ImageT<float> & grad_y_Image );
-
- void calculateGradients(NICE::ColorImage origColorImage, NICE::ImageT<float> & grad_x_Image, NICE::ImageT<float> & grad_y_Image );
-
- void calculateGradientOrientations(const NICE::ImageT<float> & grad_x_Image, const NICE::ImageT<float> & grad_y_Image , const int & number_Of_Bins, NICE::Image & gradient_orientations, const bool unsignedBins=true);
- void calculateGradientOrientations(const NICE::GrayImage16s & grad_x_Image, const NICE::GrayImage16s & grad_y_Image , const int & number_Of_Bins, NICE::Image & gradient_orientations, const bool unsignedBins=true);
-
- void calculateGradientMagnitudes(const NICE::ImageT<float> & grad_x_Image, const NICE::ImageT<float> & grad_y_Image, NICE::ImageT<float> & gradient_magnitudes);
-
- std::vector<float> normalizeBlockDescriptor(const std::vector<float> & orig_Block_Descriptor, const float epsilon = 0.01);
-
- std::vector< std::vector<float> > calculateResultingHogFeatures(const NICE::Image & gradient_orientations, const NICE::ImageT<float> & gradient_magnitudes, const int & blocksize = 2, const int & cellsize = 8);
- };
- }
- #endif
|