Featured post
image processing - Hough Circle in c# , dynamic memory -
i have problem in dynamic memory allocation getting data matrix
image image_gray = new image("im1.jpg"); matrix circles = new matrix(100, 1, 3);
question 1: how can locate dynamic memory because don't know number of circles?
emgu.cv.cvinvoke.cvhoughcircles(image_gray, circles, hough_type.cv_hough_gradient, 2, 100, 200, 100, 10, 500);
question 2: circle matrix [100 ,3], how can get
point center= round (circle[i][1], circle[i][1])
how can
int radius= circle[i][2];
what should loop data matrix , casting should point , int.
i tried (not working / error)
for (int i=0; < circles.rows; i++) { matrix entry = circles.getrow(i); float x = entry[0]; float y = entry[1]; float r = entry[2];} // not working
because instead of copying (required) (i) row copies whole matrix( circles) , float x=......gives errors
no overload method 'this' takes '1' arguments
please me in regard
regards
sorry answer question. please give hint dynamic memory allocation , matrix data
the documentation suggests grow matrix fit, contradicts that, honestly, try 1 row 1 col matrix on image more circles , see gives you. see you're using matrix type - don't know how convert intptr needed cvhoughcircles, should straight forward iterate on each row , pull out results, 3 floats: (x, y, r) -
for (int i=0; < circles.cols; i++) { matrix<float> entry = circles.getrow(i); float x = entry[0]; // guessing here - doc'n awful float y = entry[1]; float r = entry[2]; }
- Get link
- X
- Other Apps
Comments
Post a Comment