inverting image in Python with OpenCV

后端 未结 3 433
无人及你
无人及你 2020-12-07 21:44

I want to load a color image, convert it to grayscale, and then invert the data in the file.

What I need: to iterate over the array in OpenCV and change every singl

3条回答
  •  独厮守ぢ
    2020-12-07 22:34

    Alternatively, you could invert the image using the bitwise_not function of OpenCV:

    imagem = cv2.bitwise_not(imagem)
    

    I liked this example.

提交回复
热议问题