![]() |
Spoofing Detection Engine
1.0
|
Core utilities for image and math operations using OpenCV. More...
#include <opencv2/core/mat.hpp>

Go to the source code of this file.
Functions | |
| void | core::image::resizeRect (cv::Rect &rect, double scaleFactor) |
| Resizes a rectangle by a given scale factor. More... | |
| void | core::image::createQuadraticRect (cv::Rect &r, const cv::Rect &imageRect) |
| Creates a quadratic rectangle based on an existing rectangle. More... | |
| void | core::image::histogramEqualization (cv::Mat &frame) |
| Performs histogram equalization on a given frame. More... | |
| void | core::math::eulerAnglesFromRotationVector (const cv::Mat &rotationVector, cv::Vec3d &eulerAngles) |
| Calculates Euler angles from a rotation vector. More... | |
| cv::Mat | core::math::eulerAnglesToRotationMatrix (const cv::Vec3f &theta) |
| Converts Euler angles to a rotation matrix. More... | |
| cv::Point3d | core::math::rotatePoint (const cv::Point3d &point, const cv::Mat &rotationmatrix) |
| Rotates a point using a given rotation matrix. More... | |
| cv::Point | core::math::perspectiveTransformPoint (const cv::Point2f &pt, cv::Mat &transformation) |
| Performs perspective transformation on a point. More... | |
| cv::Point2d | core::math::findProjectedPoint (const cv::Mat &rotation_matrix, const cv::Mat &translation_vector, const cv::Mat camera_matrix, cv::Point3d model_point) |
| Finds the projected point using rotation and translation matrices and a camera matrix. More... | |
| int | core::math::getBlobIntersectionArea (const cv::Mat &blobImg, const std::vector< cv::Point > &contour1, const std::vector< cv::Point > &contour2) |
| Calculates the intersection area of two blobs. More... | |
| void | core::math::getBlobCorners (const std::vector< cv::Point > &blob, cv::Point &tl, cv::Point &tr, cv::Point &br, cv::Point &bl) |
| Retrieves the corners of a blob. More... | |
| float | core::math::getAngleBetween (cv::Point a_begin, cv::Point a_end, cv::Point b_begin, cv::Point b_end) |
| Calculates the angle between two line segments. More... | |
| cv::Point | core::math::getMean (const std::vector< cv::Point > &vec) |
| Calculates the mean point of a vector of points. More... | |
Core utilities for image and math operations using OpenCV.
| void core::image::createQuadraticRect | ( | cv::Rect & | r, |
| const cv::Rect & | imageRect | ||
| ) |
Creates a quadratic rectangle based on an existing rectangle.
| r | Reference to the new quadratic rectangle. |
| imageRect | The existing rectangle to base the new rectangle on. |
| void core::math::eulerAnglesFromRotationVector | ( | const cv::Mat & | rotationVector, |
| cv::Vec3d & | eulerAngles | ||
| ) |
Calculates Euler angles from a rotation vector.
Usage example: Vec3d eulerAngles; eulerAnglesFromRotationVector(rotationVector, eulerAngles);
| rotationVector | The input rotation vector. |
| eulerAngles | Output Euler angles (yaw, pitch, roll). |
| cv::Mat core::math::eulerAnglesToRotationMatrix | ( | const cv::Vec3f & | theta | ) |
Converts Euler angles to a rotation matrix.
| theta | The input Euler angles. |
| cv::Point2d core::math::findProjectedPoint | ( | const cv::Mat & | rotation_matrix, |
| const cv::Mat & | translation_vector, | ||
| const cv::Mat | camera_matrix, | ||
| cv::Point3d | model_point | ||
| ) |
Finds the projected point using rotation and translation matrices and a camera matrix.
| rotation_matrix | Rotation matrix. |
| translation_vector | Translation vector. |
| camera_matrix | Camera matrix. |
| model_point | The 3D model point. |
| float core::math::getAngleBetween | ( | cv::Point | a_begin, |
| cv::Point | a_end, | ||
| cv::Point | b_begin, | ||
| cv::Point | b_end | ||
| ) |
Calculates the angle between two line segments.
| a_begin | Start point of the first line segment. |
| a_end | End point of the first line segment. |
| b_begin | Start point of the second line segment. |
| b | |
| b_end | End point of the second line segment. |
| void core::math::getBlobCorners | ( | const std::vector< cv::Point > & | blob, |
| cv::Point & | tl, | ||
| cv::Point & | tr, | ||
| cv::Point & | br, | ||
| cv::Point & | bl | ||
| ) |
Retrieves the corners of a blob.
| blob | The vector of points defining the blob. |
| tl | Top-left corner of the blob. |
| tr | Top-right corner of the blob. |
| br | Bottom-right corner of the blob. |
| bl | Bottom-left corner of the blob. |
| int core::math::getBlobIntersectionArea | ( | const cv::Mat & | blobImg, |
| const std::vector< cv::Point > & | contour1, | ||
| const std::vector< cv::Point > & | contour2 | ||
| ) |
Calculates the intersection area of two blobs.
| blobImg | The image containing blobs. |
| contour1 | The first contour. |
| contour2 | The second contour. |
| cv::Point core::math::getMean | ( | const std::vector< cv::Point > & | vec | ) |
Calculates the mean point of a vector of points.
| vec | The vector containing the points. |
| void core::image::histogramEqualization | ( | cv::Mat & | frame | ) |
Performs histogram equalization on a given frame.
| frame | Reference to the frame for histogram equalization. |
| cv::Point core::math::perspectiveTransformPoint | ( | const cv::Point2f & | pt, |
| cv::Mat & | transformation | ||
| ) |
Performs perspective transformation on a point.
| pt | The point for transformation. |
| transformation | The transformation matrix. |
| void core::image::resizeRect | ( | cv::Rect & | rect, |
| double | scaleFactor | ||
| ) |
Resizes a rectangle by a given scale factor.
| rect | Reference to the rectangle to resize. |
| scaleFactor | The scale factor for resizing. |
| cv::Point3d core::math::rotatePoint | ( | const cv::Point3d & | point, |
| const cv::Mat & | rotationmatrix | ||
| ) |
Rotates a point using a given rotation matrix.
| point | The point to rotate. |
| rotationmatrix | The rotation matrix. |