Tuesday, 6 August 2013

JavaCV: How to cvCalcBackProject() without color reduction to 32?

JavaCV: How to cvCalcBackProject() without color reduction to 32?

I read the JavaCV documentation for how to use cvCalcBackProject().
I however need to keep my image at 256 colors; when i don't reduce the
color to 32, and cvNormalizeHist(hist, 1), then my cvCalcBackProject()
image is completely black.
I saw that the OpenCV answer to the question is to use:
"cvNormalize(CvMatND, CvMatND, 0, 255, NORM_MINMAX);"
I tried to do that in JavaCV by inputing: "cvNormalize(hist.mat(),
hist.mat(), 0, 255, NORM_MINMAX);" but as expected it didn't work.
And you can't input CvMatND into cvCalcBackProject(), and there is no
method for the C++ calcBackProject().
How can i use this solution in JavaCV, or how can I solve this in any
other way without having to reduce the colors of the image?
All help is appreciated!!! Thanks!!!

No comments:

Post a Comment