Skip to content

AttributeError: module 'cv2' has no attribute 'cvtColor' #456

@LeiChangxin

Description

@LeiChangxin

"x = cv2.cvtColor(np.array(image,np.float32)/255, cv2.COLOR_RGB2HSV)"

When I run the code to the line above,the AttributeError occur.I have checked the package of cv2,but I don't find the module "cvtColor".But according to the introduction of cv2,it contains the module "cvtColor".I want to know what I can do to solve the problem.Thank you for your instruction

opencv-python version:opencv-python-4.5.1.48
opencv-contrib-python version:opencv-contrib-python-4.5.1.48

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions