How to convert images from one color-space to another (BGR, HSV)

Syntax for color coversion

cv2.cvtColor(img, conversion_type)

img: Any input image

conversion_type: COLOR_BGR2GRAY, COLOR_BGR2HSV etc.

How to convert BGR to Gray?

cv2.cvtColor(img, COLOR_BGR2GRAY)

How to convert BGR to HSV?

cv2.cvtColor(img, COLOR_BGR2HSV)

Leave a Comment

Your email address will not be published. Required fields are marked *