![]() |
Spoofing Detection Engine
1.0
|
The visualization namespace contains classes and functions related to visual asset management. More...
Classes | |
| class | Triangle |
| Represents a triangle with vertex indices. More... | |
| class | FaceDrawer |
| Draws triangulation on faces based on facial points. More... | |
| class | VisualAsset |
| The VisualAsset class manages visual assets like images for rendering and manipulation. More... | |
Functions | |
| cv::Scalar | baseGreenColor (91, 192, 75) |
| cv::Scalar | baseBrightGreenColor (91, 222, 75) |
| double | drawNormalizedEye (cv::Mat &image, cv::Rect position, std::vector< cv::Point > eyeLidFrom, std::vector< cv::Point > iris) |
| Draw the normalized eye on the given image and return the iris-pupil size ratio. More... | |
| void | drawLandmarks (cv::Mat &image, const std::vector< cv::Point > &points, cv::Scalar color, const std::vector< std::pair< int, int >> &connections, double alpha=0.0) |
| Draw landmarks on the given image. More... | |
| void | drawHalo (cv::Mat &image, cv::Rect faceRect, std::vector< visualization::VisualAsset > &assets, double rotationKernel) |
| Draw a halo effect on the given face rectangle in the image. More... | |
| void | drawInfo (cv::Mat &image, cv::Rect faceRect, visualization::VisualAsset &infoBox, const std::string &info) |
| Draw information box on the given face rectangle in the image. More... | |
| void | printText (cv::Mat &frame, cv::Point pos, std::string text, double fontScale) |
| Print text on the given frame at the specified position. More... | |
| double | findCircleX (const cv::Rect &rect, double y) |
| Calculate the X coordinate on a circle for a given Y coordinate. More... | |
| void | alphaBlendPixel (cv::Vec3b &dst, const cv::Vec3b &src, float alpha) |
| void | drawEllipse (cv::Mat &image, const cv::Point ¢er, int baseRadius, double scaleFactor, int startAngle, int endAngle, double thickness, cv::Scalar baseColor=baseGreenColor, cv::Scalar brightColor=baseBrightGreenColor) |
| Draw a custom ellipse onto an image. More... | |
| void | drawEllipseAlpha (cv::Mat &image, cv::Point center, int baseRadius, double scale, int startAngle, int endAngle, int thickness, const cv::Scalar &baseColor, const cv::Scalar &brightColor, float alpha) |
| void | drawHaloAnimation (cv::Mat image, cv::Rect faceRect, long long seed, cv::Scalar baseColor=baseGreenColor, cv::Scalar brightColor=baseBrightGreenColor) |
| Draw an animated halo around the given face rectangle. More... | |
| void | showDetectionProperties (cv::Mat &image, const std::map< std::string, std::string > &values, cv::Rect faceRect, cv::Point startPoint, cv::Scalar backgroundColor=baseGreenColor) |
| Display detection properties next to a face region. More... | |
Variables | |
| cv::Scalar | baseGreenColor |
| cv::Scalar | baseBrightGreenColor |
The visualization namespace contains classes and functions related to visual asset management.
| void visualization::drawEllipse | ( | cv::Mat & | image, |
| const cv::Point & | center, | ||
| int | baseRadius, | ||
| double | scaleFactor, | ||
| int | startAngle, | ||
| int | endAngle, | ||
| double | thickness, | ||
| cv::Scalar | baseColor = baseGreenColor, |
||
| cv::Scalar | brightColor = baseBrightGreenColor |
||
| ) |
Draw a custom ellipse onto an image.
| image | Destination image. |
| center | Center point of the ellipse. |
| baseRadius | Base radius used for scaling. |
| scaleFactor | Additional scaling factor for the radius. |
| startAngle | Starting angle of the ellipse arc. |
| endAngle | Length of the arc in degrees. |
| thickness | Thickness of the drawn lines. |
| void visualization::drawHalo | ( | cv::Mat & | image, |
| cv::Rect | faceRect, | ||
| std::vector< visualization::VisualAsset > & | assets, | ||
| double | rotationKernel | ||
| ) |
Draw a halo effect on the given face rectangle in the image.
| image | The image on which to draw the halo. |
| faceRect | The rectangle defining the face's position. |
| assets | A vector of visual assets to be used for the halo effect. |
| rotationKernel | The kernel for rotation transformation. |
| void visualization::drawHaloAnimation | ( | cv::Mat | image, |
| cv::Rect | faceRect, | ||
| long long | seed, | ||
| cv::Scalar | baseColor = baseGreenColor, |
||
| cv::Scalar | brightColor = baseBrightGreenColor |
||
| ) |
Draw an animated halo around the given face rectangle.
| image | Image where the halo should be drawn. |
| faceRect | Rectangle of the detected face. |
| seed | Seed value controlling animation phase. |

| void visualization::drawInfo | ( | cv::Mat & | image, |
| cv::Rect | faceRect, | ||
| visualization::VisualAsset & | infoBox, | ||
| const std::string & | info | ||
| ) |
Draw information box on the given face rectangle in the image.
| image | The image on which to draw the info box. |
| faceRect | The rectangle defining the face's position. |
| infoBox | The visual asset representing the info box. |
| info | The string containing the information to be displayed. |

| void visualization::drawLandmarks | ( | cv::Mat & | image, |
| const std::vector< cv::Point > & | points, | ||
| cv::Scalar | color, | ||
| const std::vector< std::pair< int, int >> & | connections, | ||
| double | alpha = 0.0 |
||
| ) |
Draw landmarks on the given image.
| image | The image on which to draw the landmarks. |
| points | A vector of points representing the landmarks. |
| color | The color of the landmarks. |
| connections | A vector of pairs of integers representing the connections between landmarks. |
| alpha | Transparency of the landmarks. |
| double visualization::drawNormalizedEye | ( | cv::Mat & | image, |
| cv::Rect | position, | ||
| std::vector< cv::Point > | eyeLidFrom, | ||
| std::vector< cv::Point > | iris | ||
| ) |
Draw the normalized eye on the given image and return the iris-pupil size ratio.
| image | The image on which to draw. |
| position | The rectangle defining the position to draw the eye. |
| eyeLidFrom | A vector of points representing the eyelid. |
| iris | A vector of points representing the iris. |
| double visualization::findCircleX | ( | const cv::Rect & | rect, |
| double | y | ||
| ) |
Calculate the X coordinate on a circle for a given Y coordinate.
| rect | Bounding rectangle describing the circle. |
| y | Y coordinate for which the X coordinate should be returned. |

| void visualization::printText | ( | cv::Mat & | frame, |
| cv::Point | pos, | ||
| std::string | text, | ||
| double | fontScale | ||
| ) |
Print text on the given frame at the specified position.
| frame | The frame on which to print the text. |
| pos | The position at which to print the text. |
| text | The string of text to be printed. |
| fontScale | The scale of the font to be used. |
| void visualization::showDetectionProperties | ( | cv::Mat & | image, |
| const std::map< std::string, std::string > & | values, | ||
| cv::Rect | faceRect, | ||
| cv::Point | startPoint, | ||
| cv::Scalar | backgroundColor = baseGreenColor |
||
| ) |
Display detection properties next to a face region.
| image | Image onto which the text boxes are drawn. |
| values | Map of key-value property pairs to display. |
| faceRect | Rectangle of the detected face. |
| startPoint | Starting position for the first text box. |

