OpenCV
4.5.1
Open Source Computer Vision
|
Functions | |
GOpaque< Rect > | cv::gapi::boundingRect (const GMat &src) |
Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image. More... | |
GOpaque< Rect > | cv::gapi::boundingRect (const GArray< Point2i > &src) |
GOpaque< Rect > | cv::gapi::boundingRect (const GArray< Point2f > &src) |
GArray< GArray< Point > > | cv::gapi::findContours (const GMat &src, const RetrievalModes mode, const ContourApproximationModes method, const GOpaque< Point > &offset) |
Finds contours in a binary image. More... | |
GArray< GArray< Point > > | cv::gapi::findContours (const GMat &src, const RetrievalModes mode, const ContourApproximationModes method) |
std::tuple< GArray< GArray< Point > >, GArray< Vec4i > > | cv::gapi::findContoursH (const GMat &src, const RetrievalModes mode, const ContourApproximationModes method, const GOpaque< Point > &offset) |
Finds contours and their hierarchy in a binary image. More... | |
std::tuple< GArray< GArray< Point > >, GArray< Vec4i > > | cv::gapi::findContoursH (const GMat &src, const RetrievalModes mode, const ContourApproximationModes method) |
GOpaque< Vec4f > | cv::gapi::fitLine2D (const GMat &src, const DistanceTypes distType, const double param=0., const double reps=0., const double aeps=0.) |
Fits a line to a 2D point set. More... | |
GOpaque< Vec4f > | cv::gapi::fitLine2D (const GArray< Point2i > &src, const DistanceTypes distType, const double param=0., const double reps=0., const double aeps=0.) |
GOpaque< Vec4f > | cv::gapi::fitLine2D (const GArray< Point2f > &src, const DistanceTypes distType, const double param=0., const double reps=0., const double aeps=0.) |
GOpaque< Vec4f > | cv::gapi::fitLine2D (const GArray< Point2d > &src, const DistanceTypes distType, const double param=0., const double reps=0., const double aeps=0.) |
GOpaque< Vec6f > | cv::gapi::fitLine3D (const GMat &src, const DistanceTypes distType, const double param=0., const double reps=0., const double aeps=0.) |
Fits a line to a 3D point set. More... | |
GOpaque< Vec6f > | cv::gapi::fitLine3D (const GArray< Point3i > &src, const DistanceTypes distType, const double param=0., const double reps=0., const double aeps=0.) |
GOpaque< Vec6f > | cv::gapi::fitLine3D (const GArray< Point3f > &src, const DistanceTypes distType, const double param=0., const double reps=0., const double aeps=0.) |
GOpaque< Vec6f > | cv::gapi::fitLine3D (const GArray< Point3d > &src, const DistanceTypes distType, const double param=0., const double reps=0., const double aeps=0.) |
#include <opencv2/gapi/imgproc.hpp>
Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.
The function calculates and returns the minimal up-right bounding rectangle for the specified point set or non-zero pixels of gray-scale image.
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Calculates the up-right bounding rectangle of a point set.
src | Input 2D point set, stored in std::vector<cv::Point2i>. |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Calculates the up-right bounding rectangle of a point set.
src | Input 2D point set, stored in std::vector<cv::Point2f>. |
GArray<GArray<Point> > cv::gapi::findContours | ( | const GMat & | src, |
const RetrievalModes | mode, | ||
const ContourApproximationModes | method, | ||
const GOpaque< Point > & | offset | ||
) |
#include <opencv2/gapi/imgproc.hpp>
Finds contours in a binary image.
The function retrieves contours from the binary image using the algorithm [227] . The contours are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the OpenCV sample directory.
src | Input gray-scale image CV_8UC1. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as binary . You can use compare, inRange, threshold , adaptiveThreshold, Canny, and others to create a binary image out of a grayscale or color one. If mode equals to RETR_CCOMP, the input can also be a 32-bit integer image of labels ( CV_32SC1 ). If RETR_FLOODFILL then CV_32SC1 is supported only. |
mode | Contour retrieval mode, see RetrievalModes |
method | Contour approximation method, see ContourApproximationModes |
offset | Optional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context. |
GArray<GArray<Point> > cv::gapi::findContours | ( | const GMat & | src, |
const RetrievalModes | mode, | ||
const ContourApproximationModes | method | ||
) |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std::tuple<GArray<GArray<Point> >,GArray<Vec4i> > cv::gapi::findContoursH | ( | const GMat & | src, |
const RetrievalModes | mode, | ||
const ContourApproximationModes | method, | ||
const GOpaque< Point > & | offset | ||
) |
#include <opencv2/gapi/imgproc.hpp>
Finds contours and their hierarchy in a binary image.
The function retrieves contours from the binary image using the algorithm [227] and calculates their hierarchy. The contours are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the OpenCV sample directory.
src | Input gray-scale image CV_8UC1. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as binary . You can use compare, inRange, threshold , adaptiveThreshold, Canny, and others to create a binary image out of a grayscale or color one. If mode equals to RETR_CCOMP, the input can also be a 32-bit integer image of labels ( CV_32SC1 ). If RETR_FLOODFILL – CV_32SC1 supports only. |
mode | Contour retrieval mode, see RetrievalModes |
method | Contour approximation method, see ContourApproximationModes |
offset | Optional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context. |
std::tuple<GArray<GArray<Point> >,GArray<Vec4i> > cv::gapi::findContoursH | ( | const GMat & | src, |
const RetrievalModes | mode, | ||
const ContourApproximationModes | method | ||
) |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
GOpaque<Vec4f> cv::gapi::fitLine2D | ( | const GMat & | src, |
const DistanceTypes | distType, | ||
const double | param = 0. , |
||
const double | reps = 0. , |
||
const double | aeps = 0. |
||
) |
#include <opencv2/gapi/imgproc.hpp>
Fits a line to a 2D point set.
The function fits a line to a 2D point set by minimizing \(\sum_i \rho(r_i)\) where \(r_i\) is a distance between the \(i^{th}\) point, the line and \(\rho(r)\) is a distance function, one of the following:
\[\rho (r) = r^2/2 \quad \text{(the simplest and the fastest least-squares method)}\]
\[\rho (r) = r\]
\[\rho (r) = 2 \cdot ( \sqrt{1 + \frac{r^2}{2}} - 1)\]
\[\rho \left (r \right ) = C^2 \cdot \left ( \frac{r}{C} - \log{\left(1 + \frac{r}{C}\right)} \right ) \quad \text{where} \quad C=1.3998\]
\[\rho \left (r \right ) = \frac{C^2}{2} \cdot \left ( 1 - \exp{\left(-\left(\frac{r}{C}\right)^2\right)} \right ) \quad \text{where} \quad C=2.9846\]
\[\rho (r) = \fork{r^2/2}{if \(r < C\)}{C \cdot (r-C/2)}{otherwise} \quad \text{where} \quad C=1.345\]
The algorithm is based on the M-estimator ( http://en.wikipedia.org/wiki/M-estimator ) technique that iteratively fits the line using the weighted least-squares algorithm. After each iteration the weights \(w_i\) are adjusted to be inversely proportional to \(\rho(r_i)\) .
src | Input set of 2D points stored in one of possible containers: Mat, std::vector<cv::Point2i>, std::vector<cv::Point2f>, std::vector<cv::Point2d>. |
distType | Distance used by the M-estimator, see DistanceTypes. DIST_USER and DIST_C are not suppored. |
param | Numerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen. |
reps | Sufficient accuracy for the radius (distance between the coordinate origin and the line). 1.0 would be a good default value for reps. If it is 0, a default value is chosen. |
aeps | Sufficient accuracy for the angle. 0.01 would be a good default value for aeps. If it is 0, a default value is chosen. |
GOpaque<Vec4f> cv::gapi::fitLine2D | ( | const GArray< Point2i > & | src, |
const DistanceTypes | distType, | ||
const double | param = 0. , |
||
const double | reps = 0. , |
||
const double | aeps = 0. |
||
) |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
GOpaque<Vec4f> cv::gapi::fitLine2D | ( | const GArray< Point2f > & | src, |
const DistanceTypes | distType, | ||
const double | param = 0. , |
||
const double | reps = 0. , |
||
const double | aeps = 0. |
||
) |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
GOpaque<Vec4f> cv::gapi::fitLine2D | ( | const GArray< Point2d > & | src, |
const DistanceTypes | distType, | ||
const double | param = 0. , |
||
const double | reps = 0. , |
||
const double | aeps = 0. |
||
) |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
GOpaque<Vec6f> cv::gapi::fitLine3D | ( | const GMat & | src, |
const DistanceTypes | distType, | ||
const double | param = 0. , |
||
const double | reps = 0. , |
||
const double | aeps = 0. |
||
) |
#include <opencv2/gapi/imgproc.hpp>
Fits a line to a 3D point set.
The function fits a line to a 3D point set by minimizing \(\sum_i \rho(r_i)\) where \(r_i\) is a distance between the \(i^{th}\) point, the line and \(\rho(r)\) is a distance function, one of the following:
\[\rho (r) = r^2/2 \quad \text{(the simplest and the fastest least-squares method)}\]
\[\rho (r) = r\]
\[\rho (r) = 2 \cdot ( \sqrt{1 + \frac{r^2}{2}} - 1)\]
\[\rho \left (r \right ) = C^2 \cdot \left ( \frac{r}{C} - \log{\left(1 + \frac{r}{C}\right)} \right ) \quad \text{where} \quad C=1.3998\]
\[\rho \left (r \right ) = \frac{C^2}{2} \cdot \left ( 1 - \exp{\left(-\left(\frac{r}{C}\right)^2\right)} \right ) \quad \text{where} \quad C=2.9846\]
\[\rho (r) = \fork{r^2/2}{if \(r < C\)}{C \cdot (r-C/2)}{otherwise} \quad \text{where} \quad C=1.345\]
The algorithm is based on the M-estimator ( http://en.wikipedia.org/wiki/M-estimator ) technique that iteratively fits the line using the weighted least-squares algorithm. After each iteration the weights \(w_i\) are adjusted to be inversely proportional to \(\rho(r_i)\) .
src | Input set of 3D points stored in one of possible containers: Mat, std::vector<cv::Point3i>, std::vector<cv::Point3f>, std::vector<cv::Point3d>. |
distType | Distance used by the M-estimator, see DistanceTypes. DIST_USER and DIST_C are not suppored. |
param | Numerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen. |
reps | Sufficient accuracy for the radius (distance between the coordinate origin and the line). 1.0 would be a good default value for reps. If it is 0, a default value is chosen. |
aeps | Sufficient accuracy for the angle. 0.01 would be a good default value for aeps. If it is 0, a default value is chosen. |
GOpaque<Vec6f> cv::gapi::fitLine3D | ( | const GArray< Point3i > & | src, |
const DistanceTypes | distType, | ||
const double | param = 0. , |
||
const double | reps = 0. , |
||
const double | aeps = 0. |
||
) |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
GOpaque<Vec6f> cv::gapi::fitLine3D | ( | const GArray< Point3f > & | src, |
const DistanceTypes | distType, | ||
const double | param = 0. , |
||
const double | reps = 0. , |
||
const double | aeps = 0. |
||
) |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
GOpaque<Vec6f> cv::gapi::fitLine3D | ( | const GArray< Point3d > & | src, |
const DistanceTypes | distType, | ||
const double | param = 0. , |
||
const double | reps = 0. , |
||
const double | aeps = 0. |
||
) |
#include <opencv2/gapi/imgproc.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.