Ask Your Question
0

How to find the convex hull using opencv

asked 2013-05-24 12:00:32 -0600

hayden gravatar image

Hello, I know that I can access pixels using "image.at<char>(i,j)" where i, j are columns and rows of an image. Now I have a set of pixels i.e. a set of (i,j) values of an image. I would like to extract the convex hull of the image using those (i, j) values. Could any one give me some tips how that can be done using opencv?

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-24 12:16:03 -0600

berak gravatar image

opencv comes with a built-in convexhull , but that requires an outline of points like from findContours

alternatively, you want to do your own graham-scan

edit flag offensive delete link more

Comments

Thanks for the answer. How can I get the coordinate values at [i][j] pixel of an image using opencv? I would also like to display the portion of the image in the convex hull. How can that be done?

hayden gravatar imagehayden ( 2013-05-24 14:36:26 -0600 )edit

Question Tools

Stats

Asked: 2013-05-24 12:00:32 -0600

Seen: 1,705 times

Last updated: May 24 '13