Commit defa789f authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Better pixel offset estimation

parent 1f6a9eb9
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -626,10 +626,22 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
		return toString(false);
		return toString(false);
	}
	}
	
	
	/**
	 * Astimate azimuth/tilt angle for 1 pixel shift
	 * @return Angle in radians to rotate image by 1 pixel by 1 pixel
	 */
	public double getTiltAzPerPixel() {
	public double getTiltAzPerPixel() {
		return 1.0/1000.0*geometryCorrection.focalLength/geometryCorrection.pixelSize;
		return 1.0/1000.0*geometryCorrection.focalLength/geometryCorrection.pixelSize;
	}
	}


	/**
	 * Estimate roll angle for average pixel shift of 1 pixel 
	 * @return Angle in radians when pixels at 1/4 sensor width rotate by 1 pixel
	 */
	public double getRollPixel() {
		return 4.0/geometryCorrection.getSensorWH()[0];
	}
	
	public String toString(boolean short_out) {
	public String toString(boolean short_out) {
		String s;
		String s;
		double [] sym_vect = toSymArray(null);
		double [] sym_vect = toSymArray(null);
+1 −1
Original line number Original line Diff line number Diff line
@@ -1280,7 +1280,7 @@ public class ImageDtt extends ImageDttCPU {
		gpuQuad.execConvertDirect(use_reference_buffer, wh, erase_clt); // put results into a "reference" buffer
		gpuQuad.execConvertDirect(use_reference_buffer, wh, erase_clt); // put results into a "reference" buffer
	}
	}


	public void setReferenceTDMotionBlur(
	public void setReferenceTDMotionBlur( // updates tasks
			final int                 erase_clt,
			final int                 erase_clt,
			final int []              wh,               // null (use sensor dimensions) or pair {width, height} in pixels
			final int []              wh,               // null (use sensor dimensions) or pair {width, height} in pixels
			final ImageDttParameters  imgdtt_params,    // Now just extra correlation parameters, later will include, most others
			final ImageDttParameters  imgdtt_params,    // Now just extra correlation parameters, later will include, most others