[OpenCV3] Detailed use of cv::convertScaleAbs()

cv::convertScaleAbs() is used to implement the following operations for each element in the entire image array:

This operation can realize the fast calculation of image enhancement and other related operations. The specific usage is as follows:

void cv::convertScaleAbs(
	cv::InputArray src, // input array
	 cv::OutputArray dst, // output array
	 double alpha = 1.0, // multiplier factor
	 double beta = 0.0 // offset
);

The following uses a specific example to demonstrate the magical use of this function:

	cv::Mat src = cv::imread("img0.jpg", -1);
	cv::Mat dst;

	cv::convertScaleAbs(src, dst, 1.5, 10);

	cv::imshow("src", src);
	cv::imshow("dst", dst);

	cv::waitKey(0);

	return;

The results are as follows:

 

2018.08.12 

 

Intelligent Recommendation

[Batch read the path of pictures in the folder] Use dirt.h in c++ or cv::glob in opencv3

The pictures stored in the folder test in the upper layer of the source code   Results read using two different methods   The total code references C++ using opencv to traverse a folder Util...

In cv :: ml :: opencv3 experience StatModel :: predict function

The first parameter is the test sample, each data row as a test, i.e. To each sample is processed into the same line of data introduced dimensional model size, can be placed in multiple rows at the sa...

OpenCV3 color space conversion-cv :: cvtColor ()

cv :: cvtColor () is used to convert the image from one color space to another (Currently common color spaces are supported), And in the process of conversion can ensure that the data type remains unc...

[OpenCV3] Video reading and writing-cv::VideoCapture and cv::VideoWriter in detail

OpenCV3 is similar to OpenCV2. The video read and write operations are implemented through two classes of cv::VideoCapture and cv::VideoWriter. 1、Video read operationcv::VideoCapture cv::VideoCapture ...

[OpenCV3] Video reading and writing cv::VideoCapture and cv::VideoWriter

OpenCV3 is similar to OpenCV2. The video read and write operations are implemented through two classes, cv::VideoCapture and cv::VideoWriter, respectively. 1、Video read operation cv::VideoCapture cv::...

More Recommendation

Use OpenCV3 cascade classifier to make your own classifier detailed process

I’m currently working on a small project to train my own classifier. I found a lot of information on the Internet, but there is no detailed information. Here I will summarize the process I did i...

Detailed HOGDescriptor parameters in OpenCV3

Recently doing digital recognition, you need to use some feature detection methods, so I studied the hog feature and the implementation in opencv3. First of all, we enter the header file "objdete...

OpenCV3 - the use of copyTo () function

Reference link:   Definition and usage: The copyTo function has two definitions, namely: with   That is, the parameter can be an output image, or an output image and a mask map. Then: Just c...

Use OpenCV3 in Qt5

To use OpenCV3 in Qt5, simply add the following path information at the end of the .pro file:...

Use OpenCV3 to process files

Article Directory 1. Read/write image files 2. Conversion between image and raw bytes 3. Use numpy.array to access image data 4. Display the image in the window 5. Display the camera frame in the wind...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top