OpenCV  4.9.0
Open Source Computer Vision
Public Member Functions | Protected Attributes | List of all members
cv::GraphicalCodeDetector Class Reference

#include <opencv2/objdetect/graphical_code_detector.hpp>

Inheritance diagram for cv::GraphicalCodeDetector:
cv::barcode::BarcodeDetector cv::QRCodeDetector cv::QRCodeDetectorAruco

Public Member Functions

 GraphicalCodeDetector ()
 
 GraphicalCodeDetector (const GraphicalCodeDetector &)=default
 
 GraphicalCodeDetector (GraphicalCodeDetector &&)=default
 
std::string decode (InputArray img, InputArray points, OutputArray straight_code=noArray()) const
 Decodes graphical code in image once it's found by the detect() method. More...
 
bool decodeMulti (InputArray img, InputArray points, std::vector< std::string > &decoded_info, OutputArrayOfArrays straight_code=noArray()) const
 Decodes graphical codes in image once it's found by the detect() method. More...
 
bool detect (InputArray img, OutputArray points) const
 Detects graphical code in image and returns the quadrangle containing the code. More...
 
std::string detectAndDecode (InputArray img, OutputArray points=noArray(), OutputArray straight_code=noArray()) const
 Both detects and decodes graphical code. More...
 
bool detectAndDecodeMulti (InputArray img, std::vector< std::string > &decoded_info, OutputArray points=noArray(), OutputArrayOfArrays straight_code=noArray()) const
 Both detects and decodes graphical codes. More...
 
bool detectMulti (InputArray img, OutputArray points) const
 Detects graphical codes in image and returns the vector of the quadrangles containing the codes. More...
 
GraphicalCodeDetectoroperator= (const GraphicalCodeDetector &)=default
 
GraphicalCodeDetectoroperator= (GraphicalCodeDetector &&)=default
 

Protected Attributes

Ptr< Impl > p
 

Constructor & Destructor Documentation

◆ GraphicalCodeDetector() [1/3]

cv::GraphicalCodeDetector::GraphicalCodeDetector ( )

◆ GraphicalCodeDetector() [2/3]

cv::GraphicalCodeDetector::GraphicalCodeDetector ( const GraphicalCodeDetector )
default

◆ GraphicalCodeDetector() [3/3]

cv::GraphicalCodeDetector::GraphicalCodeDetector ( GraphicalCodeDetector &&  )
default

Member Function Documentation

◆ decode()

std::string cv::GraphicalCodeDetector::decode ( InputArray  img,
InputArray  points,
OutputArray  straight_code = noArray() 
) const
Python:
cv.GraphicalCodeDetector.decode(img, points[, straight_code]) -> retval, straight_code

Decodes graphical code in image once it's found by the detect() method.

Returns UTF8-encoded output string or empty string if the code cannot be decoded.

Parameters
imggrayscale or color (BGR) image containing graphical code.
pointsQuadrangle vertices found by detect() method (or some other algorithm).
straight_codeThe optional output image containing binarized code, will be empty if not found.

◆ decodeMulti()

bool cv::GraphicalCodeDetector::decodeMulti ( InputArray  img,
InputArray  points,
std::vector< std::string > &  decoded_info,
OutputArrayOfArrays  straight_code = noArray() 
) const
Python:
cv.GraphicalCodeDetector.decodeMulti(img, points[, straight_code]) -> retval, decoded_info, straight_code

Decodes graphical codes in image once it's found by the detect() method.

Parameters
imggrayscale or color (BGR) image containing graphical codes.
decoded_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
pointsvector of Quadrangle vertices found by detect() method (or some other algorithm).
straight_codeThe optional output vector of images containing binarized codes

◆ detect()

bool cv::GraphicalCodeDetector::detect ( InputArray  img,
OutputArray  points 
) const
Python:
cv.GraphicalCodeDetector.detect(img[, points]) -> retval, points

Detects graphical code in image and returns the quadrangle containing the code.

Parameters
imggrayscale or color (BGR) image containing (or not) graphical code.
pointsOutput vector of vertices of the minimum-area quadrangle containing the code.

◆ detectAndDecode()

std::string cv::GraphicalCodeDetector::detectAndDecode ( InputArray  img,
OutputArray  points = noArray(),
OutputArray  straight_code = noArray() 
) const
Python:
cv.GraphicalCodeDetector.detectAndDecode(img[, points[, straight_code]]) -> retval, points, straight_code

Both detects and decodes graphical code.

Parameters
imggrayscale or color (BGR) image containing graphical code.
pointsoptional output array of vertices of the found graphical code quadrangle, will be empty if not found.
straight_codeThe optional output image containing binarized code

◆ detectAndDecodeMulti()

bool cv::GraphicalCodeDetector::detectAndDecodeMulti ( InputArray  img,
std::vector< std::string > &  decoded_info,
OutputArray  points = noArray(),
OutputArrayOfArrays  straight_code = noArray() 
) const
Python:
cv.GraphicalCodeDetector.detectAndDecodeMulti(img[, points[, straight_code]]) -> retval, decoded_info, points, straight_code

Both detects and decodes graphical codes.

Parameters
imggrayscale or color (BGR) image containing graphical codes.
decoded_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
pointsoptional output vector of vertices of the found graphical code quadrangles. Will be empty if not found.
straight_codeThe optional vector of images containing binarized codes

◆ detectMulti()

bool cv::GraphicalCodeDetector::detectMulti ( InputArray  img,
OutputArray  points 
) const
Python:
cv.GraphicalCodeDetector.detectMulti(img[, points]) -> retval, points

Detects graphical codes in image and returns the vector of the quadrangles containing the codes.

Parameters
imggrayscale or color (BGR) image containing (or not) graphical codes.
pointsOutput vector of vector of vertices of the minimum-area quadrangle containing the codes.

◆ operator=() [1/2]

GraphicalCodeDetector& cv::GraphicalCodeDetector::operator= ( const GraphicalCodeDetector )
default

◆ operator=() [2/2]

GraphicalCodeDetector& cv::GraphicalCodeDetector::operator= ( GraphicalCodeDetector &&  )
default

Member Data Documentation

◆ p

Ptr<Impl> cv::GraphicalCodeDetector::p
protected

The documentation for this class was generated from the following file: