Move de-fishing code _before_ distortion correction, so de-fishing occurs _after_ distortion correction.
This commit is contained in:
@@ -515,10 +515,6 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector<Coord2D> &src,
|
||||
break;
|
||||
}
|
||||
|
||||
if (pLCPMap && params->lensProf.useDist) {
|
||||
pLCPMap->correctDistortion(x_d, y_d, w2, h2);
|
||||
}
|
||||
|
||||
x_d /= params->perspective.camera_scale;
|
||||
y_d /= params->perspective.camera_scale;
|
||||
if (params->perspective.camera_defish) {
|
||||
@@ -532,6 +528,10 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector<Coord2D> &src,
|
||||
y_d *= factor;
|
||||
}
|
||||
|
||||
if (pLCPMap && params->lensProf.useDist) {
|
||||
pLCPMap->correctDistortion(x_d, y_d, w2, h2);
|
||||
}
|
||||
|
||||
// rotate
|
||||
double Dx = x_d * cost - y_d * sint;
|
||||
double Dy = x_d * sint + y_d * cost;
|
||||
@@ -1253,10 +1253,6 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I
|
||||
break;
|
||||
}
|
||||
|
||||
if (enableLCPDist) {
|
||||
pLCPMap->correctDistortion(x_d, y_d, w2, h2);
|
||||
}
|
||||
|
||||
x_d /= params->perspective.camera_scale;
|
||||
y_d /= params->perspective.camera_scale;
|
||||
if (params->perspective.camera_defish) {
|
||||
@@ -1270,6 +1266,10 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I
|
||||
y_d *= factor;
|
||||
}
|
||||
|
||||
if (enableLCPDist) {
|
||||
pLCPMap->correctDistortion(x_d, y_d, w2, h2);
|
||||
}
|
||||
|
||||
// rotate
|
||||
const double Dxc = x_d * cost - y_d * sint;
|
||||
const double Dyc = x_d * sint + y_d * cost;
|
||||
|
Reference in New Issue
Block a user