How to create a Rhombus using openCV

asked 2013-09-23 15:00:54 -0600

123ezone gravatar image

updated 2013-09-23 15:02:39 -0600

berak gravatar image

When we want to crop a section from an image what we normally use is cvSetImageROI() method and pass a rectangle as a parameter. In my case, I want to crop a rhombus from an image so that I have to pass a rhombus as the parameter. So I need to know how to draw a rhombus in opencv. Can someone help me with this problem. Thank You !

edit retag flag offensive close merge delete

Comments

3

whether you want to crop a circle, a rhombus, or the outline of an elephant - you'll have to start with cropping the bounding rect. apply a mask with your actual shape later.

and please move to the c++ api, the old c-one will go away soon !

berak gravatar imageberak ( 2013-09-23 15:13:24 -0600 )edit