Sunday, October 29, 2023

OpenCV and Image Processing - Bitwise Operation

The last section introduced image blending by implementing the algorithm introduced by the OpenCV document. As you can see from the result in Figure from previous post, the image looks a little bit faded out, and both original images become transparent to some extent. It depends on what effects you...
Share:

Thursday, October 26, 2023

OpenCV and Image Processing - Blend Image

Blending images refers to the process of combining two images to create a single image that has the characteristics of both original images. The result is a combination of the corresponding pixel values of the two original images with weights.The blending process involves specifying a weight for each...
Share:

Monday, October 23, 2023

Friday, October 20, 2023

OpenCV and Image Processing - Adjust Contrast and Brightness of an Image

We already saw how to adjust the brightness and contrast for a webcam, however unfortunately OpenCV doesn’t provide functions to adjust the brightness and contrast for an image. But OpenCV official document recommends an alternative way to do it, see the link at:https://docs.opencv.org/4.7.0/d3/dc1/tutorial_basic_linear_transform.htmlWe...
Share:

Monday, October 16, 2023

Friday, October 13, 2023

Monday, October 9, 2023

OpenCV and Image Processing - Conversion of Color Spaces (Convert BGR to HSV and vice versa)

As explained earlier, an image can be represented not only in BGR but also in HSV color spaces, OpenCV can easily convert the image between BGR and HSV. Like converting it to grayscale, the same function cv2.cvtColor() is used but the second parameter is different, cv2.COLOR_BGR2HSV in this case.The...
Share:

Friday, October 6, 2023

OpenCV and Image Processing - Conversion of Color Spaces (Convert Grayscale to BGR)

A grayscale image can also be converted to BGR color space, in this case the source is a grayscale image which only has one channel and does not have any color information, therefore the result BGR image looks the same as the original grayscale one. But the difference is the BGR image has three channels...
Share:

Monday, October 2, 2023