Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

cv2.rectangle

import cv2

cv2.rectangle(img, (x1, y1), (x2, y2), (255,0,0), 2)


x1,y1 ------
|          |
|          |
|          |
--------x2,y2
Comment

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
Comment

cv2 rectang;le

:                +------------------+
:                |                  |
:              height               |
:                |                  |
:               (xy)---- width -----+
Comment

PREVIOUS NEXT
Code Example
Python :: select rows which have nan values python 
Python :: python - prime number generator 
Python :: pandas dropna specific column 
Python :: dotenv error pip python 
Python :: save plot as pdf python 
Python :: object to int64 pandas 
Python :: python reload module without restarting 
Python :: python read string between two substrings 
Python :: how to sort by length python 
Python :: pyspark date to week number 
Python :: get all environment variables python 
Python :: python line chart 
Python :: Installing python cryptography 
Python :: show a video cv2 
Python :: python time.strptime milliseconds 
Python :: convert column string to int pandas 
Python :: database default code in settings django 
Python :: copy image from one folder to another in python 
Python :: difference between w+ and r+ in python 
Python :: dataframe get list of index vlaues 
Python :: import mean absolute error 
Python :: python get time of day 
Python :: create pandas dataframe with random numbers 
Python :: 2 list difference python 
Python :: tkinter entry default value 
Python :: how to create dataframe in python 
Python :: tk table python 
Python :: heat map correlation seaborn 
Python :: check string similarity python 
Python :: open chrome in pyhton 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =