ReadFramework
rdf::Converter Class Reference

#include <Utils.h>

Static Public Member Functions

static QPolygon stringToPoly (const QString &pointList)
 Converts a PAGE points attribute to a polygon. the format is: p1x,p1y p2x,p2y (for two points p1, p2) More...
 
static QString polyToString (const QPolygon &poly)
 Converts a QPolygon to QString according to the PAGE XML format. A line would look like this: p1x,p1y p2x,p2y More...
 
static QPointF cvPointToQt (const cv::Point &pt)
 
static cv::Point2d qPointToCv (const QPointF &pt)
 
static QRectF cvRectToQt (const cv::Rect &r)
 Converts a cv::Rect to QRectF. More...
 
static cv::Rect2d qRectToCv (const QRectF &r)
 Converts a QRectF to a cv::Rect. More...
 

Member Function Documentation

QPointF rdf::Converter::cvPointToQt ( const cv::Point &  pt)
static

Here is the caller graph for this function:

QRectF rdf::Converter::cvRectToQt ( const cv::Rect &  r)
static

Converts a cv::Rect to QRectF.

Parameters
rThe OpenCV rectangle.
Returns
QString rdf::Converter::polyToString ( const QPolygon &  polygon)
static

Converts a QPolygon to QString according to the PAGE XML format. A line would look like this: p1x,p1y p2x,p2y

Parameters
polygonThe polygon to convert.
Returns
A string representing the polygon.

Here is the caller graph for this function:

cv::Point2d rdf::Converter::qPointToCv ( const QPointF &  pt)
static
cv::Rect2d rdf::Converter::qRectToCv ( const QRectF &  r)
static

Converts a QRectF to a cv::Rect.

Parameters
rThe Qt rectangle.
Returns
QPolygon rdf::Converter::stringToPoly ( const QString &  pointList)
static

Converts a PAGE points attribute to a polygon. the format is: p1x,p1y p2x,p2y (for two points p1, p2)

Parameters
pointListA string containing the point list.
Returns
A QPolygon parsed from the point list.

Here is the caller graph for this function:


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