CV_EXPORTS_W void randShuffle(InputOutputArray dst, double iterFactor = 1., RNG* rng = 0);
//! draws the line segment (pt1, pt2) in the image
-CV_EXPORTS_W void line(CV_IN_OUT InputOutputArray img, Point pt1, Point pt2, const Scalar& color,
+CV_EXPORTS_W void line(InputOutputArray img, Point pt1, Point pt2, const Scalar& color,
int thickness = 1, int lineType = LINE_8, int shift = 0);
//! draws the rectangle outline or a solid rectangle with the opposite corners pt1 and pt2 in the image
-CV_EXPORTS_W void rectangle(CV_IN_OUT InputOutputArray img, Point pt1, Point pt2,
+CV_EXPORTS_W void rectangle(InputOutputArray img, Point pt1, Point pt2,
const Scalar& color, int thickness = 1,
int lineType = LINE_8, int shift = 0);
int lineType = LINE_8, int shift = 0);
//! draws the circle outline or a solid circle in the image
-CV_EXPORTS_W void circle(CV_IN_OUT InputOutputArray img, Point center, int radius,
+CV_EXPORTS_W void circle(InputOutputArray img, Point center, int radius,
const Scalar& color, int thickness = 1,
int lineType = LINE_8, int shift = 0);
//! draws an elliptic arc, ellipse sector or a rotated ellipse in the image
-CV_EXPORTS_W void ellipse(CV_IN_OUT InputOutputArray img, Point center, Size axes,
+CV_EXPORTS_W void ellipse(InputOutputArray img, Point center, Size axes,
double angle, double startAngle, double endAngle,
const Scalar& color, int thickness = 1,
int lineType = LINE_8, int shift = 0);
//! draws a rotated ellipse in the image
-CV_EXPORTS_W void ellipse(CV_IN_OUT InputOutputArray img, const RotatedRect& box, const Scalar& color,
+CV_EXPORTS_W void ellipse(InputOutputArray img, const RotatedRect& box, const Scalar& color,
int thickness = 1, int lineType = LINE_8);
//! draws a filled convex polygon in the image
}
}
-void drawKeypoints( InputArray image, const std::vector<KeyPoint>& keypoints, InputOutputArray& outImage,
+void drawKeypoints( InputArray image, const std::vector<KeyPoint>& keypoints, InputOutputArray outImage,
const Scalar& _color, int flags )
{
if( !(flags & DrawMatchesFlags::DRAW_OVER_OUTIMG) )
outImg = Scalar::all(0);
outImg1 = outImg( Rect(0, 0, img1size.width, img1size.height) );
outImg2 = outImg( Rect(img1size.width, 0, img2size.width, img2size.height) );
- printf("%d %d\n", _outImg.size().width, _outImg.size().height);
+
if( img1.type() == CV_8U )
cvtColor( img1, outImg1, COLOR_GRAY2BGR );
else
if( !extAll )
{
// extract the best comparisons only
- Mat(cv::Mat::zeros((int)keypoints.size(), FREAK_NB_PAIRS/8, CV_8U)).copyTo(_descriptors);
+ _descriptors.create((int)keypoints.size(), FREAK_NB_PAIRS/8, CV_8U);
+ _descriptors.setTo(Scalar::all(0));
Mat descriptors = _descriptors.getMat();
#if CV_SSE2
__m128i* ptr= (__m128i*) (descriptors.data+(keypoints.size()-1)*descriptors.step[0]);
}
else // extract all possible comparisons for selection
{
- Mat(cv::Mat::zeros((int)keypoints.size(), 128, CV_8U)).copyTo(_descriptors);
+ _descriptors.create((int)keypoints.size(), 128, CV_8U);
+ _descriptors.setTo(Scalar::all(0));
Mat descriptors = _descriptors.getMat();
std::bitset<1024>* ptr = (std::bitset<1024>*) (descriptors.data+(keypoints.size()-1)*descriptors.step[0]);