c++ - How to find height and width of a rectangle in OpenCV? -
how can find width , height of rectangle drawn function cvrectangle
following parameters?
cvrectangle( input1, cvpoint(200,178), cvpoint(190,110),color ,1, 8 );
you set parameters, calculating width , height should trivial, shouldn't it? width = (200-190)
, height = (178-110)
. but, @bubble suggests, since you're dealing pixels, don't forget add 1, resulting in (200 - 190) + 1
width , (178 - 110) + 1
height.
or expect cvrectangle
give rectangle "object" can these values from? doesn't.
Comments
Post a Comment