Converting an OpenCV Image to Black and White

后端 未结 7 1520
逝去的感伤
逝去的感伤 2020-11-29 17:38

How do you convert a grayscale OpenCV image to black and white? I see a similar question has already been asked, but I\'m using OpenCV 2.3, and the proposed solution no long

7条回答
  •  無奈伤痛
    2020-11-29 18:04

    Here's a two line code I found online that might be helpful for a beginner

    # Absolute value of the 32/64
    abs_image_in32_64 = np.absolute(image_in32_64)
    
    image_8U = np.uint8(abs_image_in32_64)
    

提交回复
热议问题