node-opencv
node-opencv copied to clipboard
how to write analog code in node-opencv?
void rotate2D(const Mat & src, Mat & dst, double angle, Mat & irot)
{
Point2f center(src.cols/2.0, src.rows/2.0);
Mat rot = getRotationMatrix2D(center, angle, 1.0);
Rect bbox = RotatedRect(center, src.size(), angle).boundingRect();
rot.at<double>(0, 2) += bbox.width/2.0 - center.x;
rot.at<double>(1, 2) += bbox.height/2.0 - center.y;
invertAffineTransform(rot, irot);
warpAffine(src, dst, rot, bbox.size());
}
I use this code in C++ version app, but now I want to convert it to javascript, but don't understand how...
I can't find equivalent of RotatedRect
Can somebody help me?
Thanks.