Matrix and image Manipulation
(1) CV Add function
Its structure
void Cvadd (//Image Plus and const cvarr* src1,//first original matrix const cvarr* src2,//second original matrix cvarr* DST, //Storage Matrix const cvarr* mask = NULL: //control points);
is simply to add two images plus. The mask variable controls the element point of the sums. Equivalent to "the function of the switch";
Program examples
#include <cv.h> #include
Output Result:
(2) Cvadds function
Its structure
void Cvadds (//image plus const cvarr* src1,//first original matrix cvscalar value, //sums constant cvarr* DST, //Storage Matrix const cvarr* Mask = null:< c7/>//control point);
The function is to add a value to the image as the other and Cvadd, where value is a cvscalar amount so his four variables correspond to the RGB space.Program examples
#include <cv.h> #include
Output Result:
(3) cvaddweighted function
Its structure
void cvaddweighted ( //image Fusion Const cvarr* src1,//first original matrix. Double alpha,//The weight value of the first matrix element is const cvarr* src2,//the second original matrix. Double beta,//the weighted value of the second matrix element double gamma,//The constant entry that is added. cvarr* DST//output matrix);
This function is a formula plus and the formula is: DST = src1*alpha + Src2*beta + gamma. So two weights and try to be greater than 0 less than one. Instance Program
#include <cv.h> #include
Output Results
To be Continued
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
"Learn OpenCV" considerations--matrix and image processing--cvadd, Cvadds and cvaddweighted