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

improving fitting

parent 24a92f5c
...@@ -4509,8 +4509,8 @@ public class GpuQuad{ // quad camera description ...@@ -4509,8 +4509,8 @@ public class GpuQuad{ // quad camera description
double [][] cxy = new double [2][2]; // image number, {x,y} double [][] cxy = new double [2][2]; // image number, {x,y}
int [][] icxy = new int [2][2]; int [][] icxy = new int [2][2];
for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) { for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) {
int tileY = nTile / tiles_woi.width + tiles_woi.x; int tileY = nTile / tiles_woi.width + tiles_woi.y;
int tileX = nTile % tiles_woi.width + tiles_woi.y; int tileX = nTile % tiles_woi.width + tiles_woi.x;
double [] cxy0 = { double [] cxy0 = {
(tileX + 0.5) * GPUTileProcessor.DTT_SIZE, (tileX + 0.5) * GPUTileProcessor.DTT_SIZE,
(tileY + 0.5) * GPUTileProcessor.DTT_SIZE}; (tileY + 0.5) * GPUTileProcessor.DTT_SIZE};
......
package com.elphel.imagej.orthomosaic; 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 class FloatImageData {
public int width; public int width;
public int height; public int height;
...@@ -66,12 +73,12 @@ public class FloatImageData { ...@@ -66,12 +73,12 @@ public class FloatImageData {
ze = 2.0 * pix_size_in_cm; ze = 2.0 * pix_size_in_cm;
} }
} else { // high resolution, pixel size < 1 } else { // high resolution, pixel size < 1
zl--; // zl--;
while (pix_size_in_cm <= (1.0-e)) { while (pix_size_in_cm <= (1.0-e)) {
zl++; zl++;
pix_size_in_cm *= 2; pix_size_in_cm *= 2;
}// exits with (2-2*e) >= pix_in_cm > (1-e) }// 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) { if (!vz) {
ze = pix_size_in_cm; ze = pix_size_in_cm;
} }
...@@ -82,9 +89,9 @@ public class FloatImageData { ...@@ -82,9 +89,9 @@ public class FloatImageData {
if (zoom_in_extra != null) { if (zoom_in_extra != null) {
zoom_in_extra[0] = ze; zoom_in_extra[0] = ze;
} }
return zl; return zl;
} }
// processing altitudes to remove non-flat surfaces from fitting ortho maps
} }
...@@ -3294,7 +3294,7 @@ public class TexturedModel { ...@@ -3294,7 +3294,7 @@ public class TexturedModel {
} }
double avg_z = sum_z/num_pix; double avg_z = sum_z/num_pix;
LocalDateTime dt = scenes[ref_index].getLocalDateTime(); 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) { 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