Convert an image to a black and white image in python

Опубликовано: 28 Сентябрь 2024
на канале: Dwink
2,018
66

#blackandwhiteimage #openCV #python
Hello, Dwinkers!!!
Convert an image to black and white image using python and OpenCV Library.
IDE used: Anaconda - SPYDER

Method used:
Binary threshold Operation:
1. Convert an image to grayscale image and we define a threshold value.
2. Then, for each pixel of the grayscale image, if its value is lesser than the threshold, we assign to it the value 0 (black).
3. Otherwise, we assign to it the value 255 (white).

For code and more info check:
https://github.com/dwinkwink123/Conve...

LEARNING IS FUN

Instagram:   / __dwink_  
GitHub: https://github.com/dwinkwink123
Telegram : https://t.me/dwinkwink123