mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Instrumentation for OpenCV API regions and IPP functions;
This commit is contained in:
@@ -79,6 +79,8 @@ FillConvexPoly( Mat& img, const Point* v, int npts,
|
||||
|
||||
bool clipLine( Size img_size, Point& pt1, Point& pt2 )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
int64 x1, y1, x2, y2;
|
||||
int c1, c2;
|
||||
int64 right = img_size.width-1, bottom = img_size.height-1;
|
||||
@@ -138,6 +140,8 @@ bool clipLine( Size img_size, Point& pt1, Point& pt2 )
|
||||
|
||||
bool clipLine( Rect img_rect, Point& pt1, Point& pt2 )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Point tl = img_rect.tl();
|
||||
pt1 -= tl; pt2 -= tl;
|
||||
bool inside = clipLine(img_rect.size(), pt1, pt2);
|
||||
@@ -922,6 +926,8 @@ void ellipse2Poly( Point center, Size axes, int angle,
|
||||
int arc_start, int arc_end,
|
||||
int delta, std::vector<Point>& pts )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
float alpha, beta;
|
||||
double size_a = axes.width, size_b = axes.height;
|
||||
double cx = center.x, cy = center.y;
|
||||
@@ -1726,6 +1732,8 @@ void drawMarker(Mat& img, Point position, const Scalar& color, int markerType, i
|
||||
void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color,
|
||||
int thickness, int line_type, int shift )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat img = _img.getMat();
|
||||
|
||||
if( line_type == CV_AA && img.depth() != CV_8U )
|
||||
@@ -1742,6 +1750,8 @@ void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color,
|
||||
void arrowedLine(InputOutputArray img, Point pt1, Point pt2, const Scalar& color,
|
||||
int thickness, int line_type, int shift, double tipLength)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
const double tipSize = norm(pt1-pt2)*tipLength; // Factor to normalize the size of the tip depending on the length of the arrow
|
||||
|
||||
line(img, pt1, pt2, color, thickness, line_type, shift);
|
||||
@@ -1761,6 +1771,8 @@ void rectangle( InputOutputArray _img, Point pt1, Point pt2,
|
||||
const Scalar& color, int thickness,
|
||||
int lineType, int shift )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat img = _img.getMat();
|
||||
|
||||
if( lineType == CV_AA && img.depth() != CV_8U )
|
||||
@@ -1792,6 +1804,8 @@ void rectangle( Mat& img, Rect rec,
|
||||
const Scalar& color, int thickness,
|
||||
int lineType, int shift )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
CV_Assert( 0 <= shift && shift <= XY_SHIFT );
|
||||
if( rec.area() > 0 )
|
||||
rectangle( img, rec.tl(), rec.br() - Point(1<<shift,1<<shift),
|
||||
@@ -1802,6 +1816,8 @@ void rectangle( Mat& img, Rect rec,
|
||||
void circle( InputOutputArray _img, Point center, int radius,
|
||||
const Scalar& color, int thickness, int line_type, int shift )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat img = _img.getMat();
|
||||
|
||||
if( line_type == CV_AA && img.depth() != CV_8U )
|
||||
@@ -1830,6 +1846,8 @@ void ellipse( InputOutputArray _img, Point center, Size axes,
|
||||
double angle, double start_angle, double end_angle,
|
||||
const Scalar& color, int thickness, int line_type, int shift )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat img = _img.getMat();
|
||||
|
||||
if( line_type == CV_AA && img.depth() != CV_8U )
|
||||
@@ -1856,6 +1874,8 @@ void ellipse( InputOutputArray _img, Point center, Size axes,
|
||||
void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color,
|
||||
int thickness, int lineType)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat img = _img.getMat();
|
||||
|
||||
if( lineType == CV_AA && img.depth() != CV_8U )
|
||||
@@ -1878,6 +1898,8 @@ void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color,
|
||||
void fillConvexPoly( Mat& img, const Point* pts, int npts,
|
||||
const Scalar& color, int line_type, int shift )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
if( !pts || npts <= 0 )
|
||||
return;
|
||||
|
||||
@@ -1895,6 +1917,8 @@ void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours,
|
||||
const Scalar& color, int line_type,
|
||||
int shift, Point offset )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
if( line_type == CV_AA && img.depth() != CV_8U )
|
||||
line_type = 8;
|
||||
|
||||
@@ -1920,6 +1944,8 @@ void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours,
|
||||
void polylines( Mat& img, const Point* const* pts, const int* npts, int ncontours, bool isClosed,
|
||||
const Scalar& color, int thickness, int line_type, int shift )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
if( line_type == CV_AA && img.depth() != CV_8U )
|
||||
line_type = 8;
|
||||
|
||||
@@ -2155,6 +2181,8 @@ void putText( InputOutputArray _img, const String& text, Point org,
|
||||
int thickness, int line_type, bool bottomLeftOrigin )
|
||||
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
if ( text.empty() )
|
||||
{
|
||||
return;
|
||||
@@ -2252,6 +2280,8 @@ Size getTextSize( const String& text, int fontFace, double fontScale, int thickn
|
||||
void cv::fillConvexPoly(InputOutputArray _img, InputArray _points,
|
||||
const Scalar& color, int lineType, int shift)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat img = _img.getMat(), points = _points.getMat();
|
||||
CV_Assert(points.checkVector(2, CV_32S) >= 0);
|
||||
fillConvexPoly(img, points.ptr<Point>(), points.rows*points.cols*points.channels()/2, color, lineType, shift);
|
||||
@@ -2261,6 +2291,8 @@ void cv::fillConvexPoly(InputOutputArray _img, InputArray _points,
|
||||
void cv::fillPoly(InputOutputArray _img, InputArrayOfArrays pts,
|
||||
const Scalar& color, int lineType, int shift, Point offset)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat img = _img.getMat();
|
||||
int i, ncontours = (int)pts.total();
|
||||
if( ncontours == 0 )
|
||||
@@ -2285,6 +2317,8 @@ void cv::polylines(InputOutputArray _img, InputArrayOfArrays pts,
|
||||
bool isClosed, const Scalar& color,
|
||||
int thickness, int lineType, int shift )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat img = _img.getMat();
|
||||
bool manyContours = pts.kind() == _InputArray::STD_VECTOR_VECTOR ||
|
||||
pts.kind() == _InputArray::STD_VECTOR_MAT;
|
||||
@@ -2347,6 +2381,8 @@ void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours,
|
||||
int lineType, InputArray _hierarchy,
|
||||
int maxLevel, Point offset )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat image = _image.getMat(), hierarchy = _hierarchy.getMat();
|
||||
CvMat _cimage = image;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user