Under VC++.net environment Use calcHist function

asked 2015-01-14 23:51:35 -0600

Eva Li gravatar image

updated 2015-01-15 06:12:12 -0600

codingTornado gravatar image

My development environment is as follows:

VisualStudio 2008

.NET framework

c++

OpenCV3.0.0

================================================================

I use the calcHist function to bulid a histogram.

//**************//

cvtColor(src, src_gray, COLOR_BGR2GRAY);

float range[2] = { 0, 255 };

const float *ranges[1] = { range };

MatND hist;(or Mat hist )

calcHist( &src_gray, 1, 0, Mat(), hist, 1, 256, Ranges, true, false );

//***************//

when I coding in console ,compiler successfully,and is normal execution. But I conding in windowsform is appear error C2665: 'cv::calcHist' : none of the 3 overloads could convert all the argument types, compiler fails.

I don't know which side my code out of the question

edit retag flag offensive close merge delete

Comments

just saying, mixing managed c++ (winforms) and opencv might not be a good idea, if you're more a beginner..

(that's a total different language / world there)

berak gravatar imageberak ( 2015-01-15 02:44:12 -0600 )edit

Thanks for your advice. Unfortunately my situation here is the system already built in that way,. Therefore, I have to continue the rest of the work and complete the task within short period. Rebuilding the system is not a good idea to me. Maybe put it as future proposal.

So, according to my situation mentioned above, may I know is there any solution to resolve this issue?

Eva Li gravatar imageEva Li ( 2015-01-15 18:49:39 -0600 )edit