"Learning OpenCV" notes--matrix and image processing--cvgemm,cvgetcol,cvgetcols and Cvgetdiag

Source: Internet
Author: User


Matrix and image Manipulation


(1) Cvgemm function

Its structure


Double Cvgemm (//matrix generalized multiplication Operation const cvarr* src1,//multiplier Matrix const cvarr* src2,//multiplier matrix double alpha,//1 number matrix coefficient const cvarr* src3,// Weighted matrix double beta,//2 number matrix coefficient cvarr* dst,//result matrix int tabc = 0//transform tag);

TABC transformation markers and their corresponding meanings

cv_gemm_a_t
Transpose SRC1
cv_gemm_b_t
Transpose SRC2
cv_gemm_c_t
Transpose SRC3

the corresponding multiplication formula for the function is: DST = (ALPHA*SRC1) xsrc2+ (BETA*SRC3)


Instance Code


#include <cv.h> #include 

Output results




(2) Cvgetcol function

Its structure


cvmat* Cvgetcol (//Take out a column in the Matrix  const cvarr* arr,//target matrix  cvmat* submat,//matrix pointer  int col//The number of columns to be fetched);


Instance Code


#include <cv.h> #include 

Output results




(3) Cvgetcols function

Its structure


cvmat* cvgetcols (//Remove some columns in the matrix const cvarr* arr,//target matrix cvmat* submat,//matrix pointer int start_col,//start column. Includes the int end_col//end column. not included);

Instance Code


#include <cv.h> #include 

Output results




(4) Cvgetdiag function

Its structure


cvmat* Cvgetdiag (///Take out a specific diagonal const cvarr* arr,//target matrix cvmat* submat,//matrix pointer int diag = 0//control scalar, 0 main diagonal, 1 or-1 for 0 adjacent diagonal. And so on

);


Instance Code


#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--cvgemm,cvgetcol,cvgetcols and Cvgetdiag

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.