DennisLiu1993 / Fastest_Image_Pattern_Matching

C++ implementation of a ScienceDirect paper "An accelerating cpu-based correlation-based image alignment for real-time automatic optical inspection"
BSD 2-Clause "Simplified" License
859 stars 205 forks source link

ptRotatePt2f问题 #53

Open zglinghunan opened 11 months ago

zglinghunan commented 11 months ago

请教一下,这个ptRotatePt2f函数中,是计算图像旋转后坐上角顶点的坐标? 为什么要用: double dY1 = dHeight - ptInput.y, dY2 = dHeight - ptOrg.y;

double dX = (ptInput.x - ptOrg.x) cos(dAngle) - (dY1 - ptOrg.y) sin(dAngle) + ptOrg.x; double dY = (ptInput.x - ptOrg.x) sin(dAngle) + (dY1 - ptOrg.y) cos(dAngle) + dY2;

没想明白,请指点

DennisLiu1993 commented 11 months ago

點繞點旋轉 https://blog.csdn.net/x1131230123/article/details/127555266

zglinghunan commented 11 months ago

谢谢您的回复。平常的旋转我能理解,但为什么要用dy1,dy2? (dY1 - ptOrg.y) sin(dAngle) (dY1 - ptOrg.y) cos(dAngle)