From dd01861de2844772acf532b649dd22ca332a344f Mon Sep 17 00:00:00 2001 From: Marina Kolpakova Date: Wed, 28 Mar 2012 20:54:58 +0000 Subject: [PATCH] test case from ticket #1650 --- modules/imgproc/test/test_imgwarp.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/imgproc/test/test_imgwarp.cpp b/modules/imgproc/test/test_imgwarp.cpp index 4aa2019..45713f5 100644 --- a/modules/imgproc/test/test_imgwarp.cpp +++ b/modules/imgproc/test/test_imgwarp.cpp @@ -1372,6 +1372,18 @@ void CV_GetQuadSubPixTest::prepare_to_validation( int /*test_case_idx*/ ) dst.convertTo(dst0, dst0.depth()); } +TEST(Imgproc_cvWarpAffine, regression) +{ + IplImage* src = cvCreateImage(cvSize(100, 100), IPL_DEPTH_8U, 1); + IplImage* dst = cvCreateImage(cvSize(100, 100), IPL_DEPTH_8U, 1); + + float m[6]; + CvMat M = cvMat( 2, 3, CV_32F, m ); + int w = src->width; + int h = src->height; + cv2DRotationMatrix(cvPoint2D32f(w*0.5f, h*0.5f), 45.0, 1.0, &M); + cvWarpAffine(src, dst, &M); +} ////////////////////////////////////////////////////////////////////////// -- 2.7.4