From 8b6a6d4546c36e11b9345495c01bf86977ca8a88 Mon Sep 17 00:00:00 2001 From: Suleyman TURKMEN Date: Sun, 31 Dec 2017 15:29:27 +0300 Subject: [PATCH] Update the function rectangle --- modules/imgproc/include/opencv2/imgproc.hpp | 4 ++-- modules/imgproc/src/drawing.cpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/imgproc/include/opencv2/imgproc.hpp b/modules/imgproc/include/opencv2/imgproc.hpp index 0d1ba52f58..af0c88e89b 100644 --- a/modules/imgproc/include/opencv2/imgproc.hpp +++ b/modules/imgproc/include/opencv2/imgproc.hpp @@ -4347,7 +4347,7 @@ CV_EXPORTS_W void rectangle(InputOutputArray img, Point pt1, Point pt2, use `rec` parameter as alternative specification of the drawn rectangle: `r.tl() and r.br()-Point(1,1)` are opposite corners */ -CV_EXPORTS void rectangle(CV_IN_OUT Mat& img, Rect rec, +CV_EXPORTS_W void rectangle(InputOutputArray img, Rect rec, const Scalar& color, int thickness = 1, int lineType = LINE_8, int shift = 0); @@ -4441,7 +4441,7 @@ marker types are supported, see cv::MarkerTypes for more information. @param line_type Type of the line, see cv::LineTypes @param markerSize The length of the marker axis [default = 20 pixels] */ -CV_EXPORTS_W void drawMarker(CV_IN_OUT Mat& img, Point position, const Scalar& color, +CV_EXPORTS_W void drawMarker(InputOutputArray img, Point position, const Scalar& color, int markerType = MARKER_CROSS, int markerSize=20, int thickness=1, int line_type=8); diff --git a/modules/imgproc/src/drawing.cpp b/modules/imgproc/src/drawing.cpp index 380c4052a4..dfcd5b99fb 100644 --- a/modules/imgproc/src/drawing.cpp +++ b/modules/imgproc/src/drawing.cpp @@ -1739,7 +1739,7 @@ PolyLine( Mat& img, const Point2l* v, int count, bool is_closed, /* ADDING A SET OF PREDEFINED MARKERS WHICH COULD BE USED TO HIGHLIGHT POSITIONS IN AN IMAGE */ /* ----------------------------------------------------------------------------------------- */ -void drawMarker(Mat& img, Point position, const Scalar& color, int markerType, int markerSize, int thickness, int line_type) +void drawMarker(InputOutputArray img, Point position, const Scalar& color, int markerType, int markerSize, int thickness, int line_type) { switch(markerType) { @@ -1875,13 +1875,12 @@ void rectangle( InputOutputArray _img, Point pt1, Point pt2, } -void rectangle( Mat& img, Rect rec, +void rectangle( InputOutputArray 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<