Hey guys, I have a little problem, and I think it will be easy for you to understand. But still I'm not a good programmer. Anyway, the problem is that I need to access the matrix element (20 * 2), this matrix represents x, y locations for 20 functions in the image. I need to have a parameter that can give me the value of all of them as x and one more for y; for example, P = (all x values) and q = (all y values) to use them for drawing on the image.
The function to create the matrix is ββan opencv function.
CvMat* mat = cvCreateMat(20,2,CV_32FC1);
for which this matrix has the values ββof the frame functions in x, y. I used this code to print it:
float t[20][2]; for (int k1=0; k1<20; k1++) { for (int k2=0; k2<2; k2++) { t[k1][k2] = cvmGet(mat,k1,k2); std::cout<< t[k1][k2]<<"\t"; } } std::cout <<" "<< std::endl; std::cout <<" "<< std::endl; std::cout <<" "<< std::endl; }
This code works well, but as I said above, guys, I want to sign values ββto parameters in order to use them?
Thanks.
source share