Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to draw a rectangle in cv2

cv2.rectangle(image, start_point, end_point, color, thickness)
cv2.rectangle(Face, (x, y), (x+w, y+h), (255, 255, 255), thickness)


x,y-----------x+w
|
|
|
y+h

and the rest cv2.rectangle() will draw for you.

#P.S the x and y are coordinates and the w and h are width and height
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #draw #rectangle
ADD COMMENT
Topic
Name
5+8 =