Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

try a `>>> help(cvtColor) and you get:

cvtColor(...)
    cvtColor(src, code[, dst[, dstCn]]) -> dst
    .   @brief Converts an image from one color space to another.

so you have to use it like:

img_plane_hsi = cv2.cvtColor(img_plane_rgb, cv2.COLOR_BGR2HSV)

try a `>>> help(cvtColor)help(cv2.cvtColor) and you get:

cvtColor(...)
    cvtColor(src, code[, dst[, dstCn]]) -> dst
    .   @brief Converts an image from one color space to another.

so you have to use it like:

img_plane_hsi = cv2.cvtColor(img_plane_rgb, cv2.COLOR_BGR2HSV)

try a `>>> help(cv2.cvtColor) and you get:

cvtColor(...)
    cvtColor(src, code[, dst[, dstCn]]) -> dst
    .   @brief Converts an image from one color space to another.

so you have to use it like:

img_plane_hsi = cv2.cvtColor(img_plane_rgb, cv2.COLOR_BGR2HSV)