Commit 360eb591 authored by Andrey Filippov's avatar Andrey Filippov

improving fitting

parent 24a92f5c
......@@ -4509,8 +4509,8 @@ public class GpuQuad{ // quad camera description
double [][] cxy = new double [2][2]; // image number, {x,y}
int [][] icxy = new int [2][2];
for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) {
int tileY = nTile / tiles_woi.width + tiles_woi.x;
int tileX = nTile % tiles_woi.width + tiles_woi.y;
int tileY = nTile / tiles_woi.width + tiles_woi.y;
int tileX = nTile % tiles_woi.width + tiles_woi.x;
double [] cxy0 = {
(tileX + 0.5) * GPUTileProcessor.DTT_SIZE,
(tileY + 0.5) * GPUTileProcessor.DTT_SIZE};
......
package com.elphel.imagej.orthomosaic;
import java.awt.Rectangle;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicInteger;
import com.elphel.imagej.common.PolynomialApproximation;
import com.elphel.imagej.tileprocessor.ImageDtt;
public class FloatImageData {
public int width;
public int height;
......@@ -66,12 +73,12 @@ public class FloatImageData {
ze = 2.0 * pix_size_in_cm;
}
} else { // high resolution, pixel size < 1
zl--;
// zl--;
while (pix_size_in_cm <= (1.0-e)) {
zl++;
pix_size_in_cm *= 2;
}// exits with (2-2*e) >= pix_in_cm > (1-e)
vz = pix_size_in_cm > (2.0 - e);
vz = pix_size_in_cm < (1.0 + e);
if (!vz) {
ze = pix_size_in_cm;
}
......@@ -82,9 +89,9 @@ public class FloatImageData {
if (zoom_in_extra != null) {
zoom_in_extra[0] = ze;
}
return zl;
}
// processing altitudes to remove non-flat surfaces from fitting ortho maps
}
......@@ -3294,7 +3294,7 @@ public class TexturedModel {
}
double avg_z = sum_z/num_pix;
LocalDateTime dt = scenes[ref_index].getLocalDateTime();
corrected_lla[2] = avg_z; // average altitude. Maybe keep drone altitude?
// corrected_lla[2] = avg_z; // average altitude. Maybe keep drone altitude? - yes
if (gmap_save_alt) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment