Matrix inversion

The invert function can be used to calculate the inverse of a matrix. This should not to be confused with the bitwise_not function, which inverts each and every bit in the pixels of an image. The invert function is not an element-wise function, and the inversion method needs to be provided as a parameter to this function. Here's an example:

DecompTypes dt = DECOMP_LU; 
invert(image, result, dt); 

The DecompTypes enum contains all possible entries that can be used in the invert function as the decomposition type. Here they are:

  • DECOMP_LU
  • DECOMP_SVD
  • DECOMP_EIG
  • DECOMP_CHOLESKY
  • DECOMP_QR

Refer to the OpenCV documentation for the DecompTypes enum if you're interested in a detailed description of each and every decomposition method.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.4.174