How to invert black and white with scikit-image?

后端 未结 5 1239
梦毁少年i
梦毁少年i 2021-01-01 23:30

I read an image with ndimage, which results in a binary image like this:

\"enter

5条回答
  •  温柔的废话
    2021-01-01 23:49

    Here's another method using OpenCV

    import cv2
    
    image = cv2.imread('2.png')
    invert = cv2.bitwise_not(image) # OR
    # invert = 255 - image
    

提交回复
热议问题