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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -