Operation of matrices and images
(1) Cvand function
Its structure
void Cvand ( //Src1 and SRC2 by Pixel point "bitwise AND operation" Const cvarr* src1,//First Matrix const cvarr* src2,//second matrix cvarr* dst,//result Matrix Const Cvarr * Mask = null;//matrix by the line pixel point and the "switch");
Program Examples
#include <cv.h> #include
Output Results
(2) cvands functionits structure
void Cvands (//Make SRC1 and value bitwise AND Operation const cvarr* src1,//first matrix cvscalar value,//operation scalar cvarr* dst,//result Matrix Const cvarr* mask = NULL ;//operation switch);
Instance Program
#include <cv.h> #include
Output Results
(3) cvavg functionits structure
Cvscalar Cvavg (//Calculate SRC's average pixel value const cvarr* src,//target Matrix const cvarr* mark = null//pixel switch);
Example code: I use the image of the machine cat above
#include <cv.h> #include
Output Results
(4) CVAVGSDV functionits structure
Cvscalar cvavg (//pixel mean and standard deviation const cvarr* arr,//target matrix cvscalar* mean,//average cvscalar* std_dev,//standard deviation const cvarr* mark = null// Pixel switch);
Example of a program: a picture of a machine cat still in use
#include <cv.h> #include
Output Results
To be continued
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
"Learning OpenCV" notes--matrix and image processing--cvand, Cvands, Cvavg and CVAVGSDV