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
请教一下,这个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;
没想明白,请指点