Changes made to getRotationMatrix2D() in version 4.1.2?

asked 2019-12-20 12:07:29 -0500

danfur gravatar image

Hi,

When compiling with new opencv 4.1.2 I get some issues with the getRotationMatrix2D() that I didnt used to have with opencv 4.0.1. Trying to figure out if anything has changed with header files etc. that I might have missed.

The compiler throws the error:

Symbol not found: __ZN2cv19getRotationMatrix2DENS_6Point_IfEEdd

I only use getRotationMatrix2D() at two places in my program. First here:

#include "opencv2/opencv.hpp"
#include "opencv2/opencv_modules.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/imgproc/types_c.h>

/* .... */

Point2f src_center(img.cols/2.0F, img.rows/2.0F);
Mat rot_mat = getRotationMatrix2D(src_center, (double)rotflag, 1.0);
warpAffine(img, img, rot_mat, img.size());

Then an additional time here:

#include "opencv2/opencv.hpp"
#include "opencv2/opencv_modules.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"

Point2f center(dst.cols/2.0, dst.rows/2.0);
Mat rot = getRotationMatrix2D(center, angle, 1.0);
// determine bounding rectangle
Rect bbox = RotatedRect(center,dst.size(), angle).boundingRect();
// adjust transformation matrix
rot.at<double>(0,2) += bbox.width/2.0 - center.x;
rot.at<double>(1,2) += bbox.height/2.0 - center.y;

warpAffine(dst, rotated, rot, bbox.size());

Any advise much appreciated!

edit retag flag offensive close merge delete