ios - No Matching function for call to cvGet2D -
its opencv question. love stuff, can drive bonkers.
the problem: working on project with, yes opencv, in ios iphone. don't know if have bad framework or what.
this works:
cv::canney() cv::adaptivethreshold() but, when try
"cvget2d()" (without previous "cv::") i error: no matching function call 'cvget2d'
when type "cvget2d()" shows in code hinting, suggesting least finding headers? when try type "cv::get2d" or "cv::cvget2d", nothing shows up. i'm frustrated because opencv framework installed still feels blackbox don't understand.
specifically, think have development vs. not , linking of proper libraries? throwing things out there.
thank much. appreciate , can't wait until smart enough give some.
edit:
so, latest attempt clarity.
cv::cvget2d(results,0,0); new error : "no member named "cvget2d" in namespace 'cv';
any ideas here?
more edits:
thanks again responses... 4 hours later, , several cups of coffee, i'm still perplexed. if i'm screwing namespace, why cv::adaptivethreshold work cv::get2d not show up? it's causing brain bleed.
so, looks should go either c or c++ version of solution. tips suggested. add have in interface: #import <opencv/opencv2/opencv.hpp>. imports core library can see cvget2d's structure. again.
progress!!
these new thoughts.
cv::mat tempmat = [self.imageview.image cvmat]; cv::mat testmat = tempmat(cv::rect(0,0,2591, 1)); cv::mat templatemat = tempmat(cv::rect(0,0,100,1)); cv::mat results; cv::matchtemplate(testmat, templatemat, results, cv_tm_ccoeff_normed); typedef vec<float, 2> vec2f; vec2f& elem = results.at<vec2f>( 0 , 35 ); float value1 = elem[0]; float value2 = elem[1]; so, perhaps .at should using? tangent? maybe, seems doing something. new questions, wtf matchtemplate output? 1 row , in case 2492 columns. guess question is, should value @ (0,35) more 1 number? elem[0] , elem[1] represent? might able tell, i'm taking 1 row picture, , using small chunk of template. photo contains vertical lines hoping determine distance lines each other. yes, convoluted. but, purposes of discussion, there should 1 row, , series of columns outputs correlation coefficient each comparison shifted correct?
thanks again blokes, mates, lads, lasses, , smart masses!
you're using c++ api of opencv 2.0.
functions moved cv namespace.
you can use them preceeding cv:: or adding using namespace cv; beggining of file use them.
reference: http://www.aishack.in/2010/07/opencvs-c-interface/
edit:
also make sure have capital letters correct:
it should compile if use cv::cvget2d(img,i,j) or (if include namespace) cvget2d(img,i,j)
Comments
Post a Comment