Ginni has Published 1580 Articles

How can we change the resolution of a video in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:31:10

3K+ Views

We used 'set()' class of OpenCV. Using 'set()' class, we can set the height and width of the frames. The following lines are setting the height and width of the video in our program.set(CAP_PROP_FRAME_WIDTH, 320);set(CAP_PROP_FRAME_HEIGHT, 240);The first line is setting the width of the frames into 320 pixel and the ... Read More

How to load video from your computer in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:30:26

635 Views

In this topic, we will know how to load a video file and play it using OpenCV, and we have to use a similar method that we have learned in the previous topic. The only difference is instead of putting the number as arguments of the object of 'VideoCapture' class, ... Read More

How to capture video from other cameras in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:26:48

2K+ Views

In this topic, we will determine how to use OpenCV to capture videos from the other cameras. The accessing of cameras other than the default camera is similar to accessing the default camera. There is only one difference that is instead of using 'VideoCapture cap(0)', we have to assign the ... Read More

How to capture video from default camera in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:24:55

5K+ Views

Here, we will understand how to access the default camera and show the video stream from that camera. In a laptop, the fixed webcam is the default camera. In desktops, the default camera depends on the serial port's sequence where the camera is connected. When we want to capture the ... Read More

What is equalizeHist() function in OpenCV?

Ginni

Ginni

Updated on 10-Mar-2021 08:23:35

1K+ Views

The histogram of an image shows the frequency of pixels' intensity values. In an image histogram, the X-axis shows the gray level intensities and the Y-axis shows the frequency of these intensities.Histogram equalization improves the contrast of an image, in order to stretch out the intensty range. You can equalize ... Read More

How to apply Histogram Equalizer in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:20:34

454 Views

The histogram represents the depth intensity of an image. For example, consider an image with a color depth of 8 bit. It means every pixel can have color depth from 0 to  Means from 0 to 255. If the image is an RGB image, it has a red, green, and ... Read More

How to Change Contrast in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:20:19

1K+ Views

Changing brightness and contrast are frequent editing effect in image processing.Here, we will learn how to change the contrast of images. Contrast controls the sharpness of the image. Higher the contrast the sharper the image, lower the contrast the smother the image.Changing the contrast means increasing the weight of the ... Read More

How to decrease the Brightness of an image in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:17:55

332 Views

The way of decreasing brightness is very similar to increasing brightness. The only difference is subtracting the 'Scalar (B, G, R)' from the image. Here, we are subtracting the scalar value to decrease the brightness.The following program shows how to decrease the brightness of an image in OpenCV.Example#include #include using ... Read More

How to change the brightness of an image in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:17:36

2K+ Views

Changing the brightness means changing the value of pixels. It means adding or subtracting value some integer value with the current value of each pixel. When you add some integer value with every pixel, it means you are making the image brighter. When you subtract some constant value from all ... Read More

How to reduce the color using Iterator Method in OpenCV?

Ginni

Ginni

Updated on 10-Mar-2021 08:15:47

183 Views

OpenCV has C++ STL compatible 'Mat iterator' class. Using this 'Mat iterator' class, we can access pixels very easily. We have to create an object of 'Mat iterator' class. We can do it as 'Mat_: : iterator example'. We have to use an underscore after 'Mat' like 'Mat_' because it ... Read More

Advertisements