@@ -189,9 +403,79 @@ public class CalibrationIllustrationParameters {
gd.addNumericField("JPEG quality",this.JPEG_quality,0,3,"","JPEG quality, 0 - use Tiff");
gd.addNumericField("Threshold contrast",this.threshold_contrast,3,6,"","Consider grid nodes with higher contrast to determine bad grids.");
gd.addNumericField("Minimal number of high-contrast nodes",this.threshold_number,0,3,"","Consider a failed grid if the number of strong nodes is below this.");
}
gd.addTab("Kernels","'Humanize' partial, direct and inverse kernels");
gd.addNumericField("Kernel (partial, direct) size to keep, LWIR",this.kernel_dia_direct_lwir,0,3,"pix","Size=3 preserves 3x3 center from each kernel, even add 1 pixel gap");
gd.addNumericField("Kernel (partial, direct) size to keep, EO",this.kernel_dia_direct_eo,0,3,"pix","Size=3 preserves 3x3 center from each kernel, even add 1 pixel gap");
gd.addNumericField("Kernel (inverted) size to keep, LWIR",this.kernel_dia_inverse_lwir,0,3,"pix","Size=3 preserves 3x3 center from each kernel, even add 1 pixel gap");
gd.addNumericField("Kernel (inverted) size to keep, EO",this.kernel_dia_inverse_eo,0,3,"pix","Size=3 preserves 3x3 center from each kernel, even add 1 pixel gap");
gd.addNumericField("Decimate direct LWIR kernels",this.kernel_decimate_direct_lwir,0,3,"","reduce output kernel density");
gd.addNumericField("Decimate direct EO kernels",this.kernel_decimate_direct_eo,0,3,"pix","reduce output kernel density");
gd.addNumericField("Decimate inverted EO kernels",this.kernel_decimate_inverse_eo,0,3,"pix","reduce output kernel density");
gd.addCheckbox("Illustrate partial kernels",this.kernel_process_partial,"Process and save partial kernels");
gd.addCheckbox("Illustrate direct kernels",this.kernel_process_direct,"Process and save combined direct kernels");
gd.addCheckbox("Illustrate inverted kernels",this.kernel_process_inverse,"Process and save inverted kernels");
gd.addMessage("Levels for direct LWIR kernels");
gd.addNumericField("Low level for LWIR direct kernels",this.kernel_direct_lwir_min,4,8,"","Applies to partial and direct kernels (from histograms: -0.007)");
gd.addNumericField("High level for LWIR direct kernels",this.kernel_direct_lwir_max,4,8,"","Applies to partial and direct kernels (from histograms: 0.176)");
gd.addMessage("Levels for direct RGB kernels (same for all color components to merge into a color image)");
gd.addNumericField("Low level for RGB/red direct kernels",this.kernel_direct_red_min,4,8,"","Applies to partial and direct kernels (from histograms: -0.001)");
gd.addNumericField("High level for RGB/red direct kernels",this.kernel_direct_red_max,4,8,"","Applies to partial and direct kernels (from histograms: 0.0448)");
gd.addNumericField("Low level for RGB/green direct kernels",this.kernel_direct_green_min,4,8,"","Applies to partial and direct kernels (from histograms: -0.00118)");
gd.addNumericField("High level for RGB/green direct kernels",this.kernel_direct_green_max,4,8,"","Applies to partial and direct kernels (from histograms: 0.0627)");
gd.addNumericField("Low level for RGB/blue direct kernels",this.kernel_direct_blue_min,4,8,"","Applies to partial and direct kernels (from histograms: -0.0008)");
gd.addNumericField("High level for RGB/blue direct kernels",this.kernel_direct_blue_max,4,8,"","Applies to partial and direct kernels (from histograms: 0.0344)");
gd.addMessage("Levels for inverse LWIR kernels");
gd.addNumericField("Low level for LWIR inverse kernels",this.kernel_inverse_lwir_min,4,8,"","Applies to inverse kernels (from histograms: -0.144 (-0.07 most))");
gd.addNumericField("High level for LWIR inverse kernels",this.kernel_inverse_lwir_max,4,8,"","Applies to inverse kernels (from histograms: .874 (.7 - most))");
gd.addMessage("Levels for inverse RGB kernels");
gd.addNumericField("Low level for RGB/red inverse kernels",this.kernel_inverse_red_min,4,8,"","Applies to inverse kernels (from histograms: -0.73 (-0.3 most))");
gd.addNumericField("High level for RGB/red inverse kernels",this.kernel_inverse_red_max,4,8,"","Applies to inverse kernels (from histograms: 0.23 ( 1.7 most))");
gd.addNumericField("Low level for RGB/green inverse kernels",this.kernel_inverse_green_min,4,8,"","Applies to inverse kernels (from histograms: -1.1 (-0.53 most))");
gd.addNumericField("High level for RGB/green inverse kernels",this.kernel_inverse_green_max,4,8,"","Applies to inverse kernels (from histograms: 3.6 ( 2.87 most))");
gd.addNumericField("Low level for RGB/blue inverse kernels",this.kernel_inverse_blue_min,4,8,"","Applies to inverse kernels (from histograms: -0.6 (-0.4 most))");
gd.addNumericField("High level for RGB/blue inverse kernels",this.kernel_inverse_blue_max,4,8,"","Applies to inverse kernels (from histograms: 2.3 (1.94 most))");
gd.addNumericField("Palette to use for monochrome kernels",this.kernel_lwir_palette,0,3,"","0 - normal, 1 - inverted, 2+ - heatmap");
gd.addCheckbox("Normalize each kernel/component",this.kernels_normalize,"Make each kernel component maximum be 1.0");
gd.addTab("Field footage","Coverting raw captured images into PNG/JPEG sequences to convert to video");
gd.addCheckbox("Ignore scenes with partial LWIR channels",this.captures_all_lwir,"Skip scenes where not all or none LWIR channels are available");
gd.addCheckbox("Ignore scenes with partial EO channels",this.captures_all_eo,"Skip scenes where not all or none EO channels are available");
gd.addCheckbox("Ignore partial scenes",this.captures_all,"Skip scenes where not all (20) images are present");
gd.addNumericField("Ignore coldest percentile",100*this.percentile_min,4,8,"%","This fraction of all pixels will be considered 'too cold'");
gd.addNumericField("Ignore hottest percentile",100*this.percentile_max,4,8,"%","This fraction of all pixels will be considered 'too hot'");
gd.addNumericField("Maximal range",this.max_range,4,8,"counts","Maximal range (in 16-bit raw TIFF counts) to use while presenting output data");
gd.addNumericField("Hot importance",this.hot_importance,4,8,"","Maximal range (in 16-bit raw TIFF counts) to use while presenting output data");
gd.addCheckbox("Auto range LWIR images",this.auto_range,"Auto range images, if unchecked - use per-channel ranges specified in LWIR tab");
gd.addCheckbox("Limit range",this.auto_lim_range,"When difference between max and min exceeds maximal range, use maximal range and find best offset");
gd.addCheckbox("Annotate images with timestamps",this.captures_annotate,"Imprint timestamps into output images");
gd.addNumericField("Noise sigma",this.noise_sigma,2,8,"counts","Typical sigma of the LWIR images with uniform illumination");
gd.addNumericField("Minimal LWIR sigma",this.min_sigma,2,8,"counts","Do not use images were sigma is below for gain calibration");
gd.addNumericField("Shift range up (fraction of new value)",this.autorange_offs_up,4,6,"","If system wants to shift range up, use this (<=1.0) fraction of the new value");
gd.addNumericField("Shift range down (fraction of new value)",this.autorange_offs_down,4,6,"","If system wants to shift range up, use this (<=1.0) fraction of the new value");
gd.addNumericField("Increase range (fraction of new value)",this.autorange_range_up,4,6,"","If system wants to increase range, use this (<=1.0) fraction of the new value");
gd.addNumericField("Decrease range (fraction of new value)",this.autorange_range_down,4,6,"","If system wants to decrease range, use this (<=1.0) fraction of the new value");
gd.addCheckbox("Edit selected channels",false,"check to edit selected channels");
}
//kernels_normalize
publicvoiddialogAnswers(GenericJTabbedDialoggd){
// --- LWIR ---
this.palette=(int)gd.getNextNumber();
...
...
@@ -250,7 +534,76 @@ public class CalibrationIllustrationParameters {
@@ -141,13 +142,26 @@ public class ImagejJp4Tiff {
publicImagePlusreadTiffJp4(Stringpath_url,booleanscale,Stringstd)throwsIOException,FormatException{// std - include non-elphel properties with prefix std
// determine if it is a file or URL and read url to memory
// If URL, then read to memory, if normal file - use direct access
if(path_url==null){
LOGGER.warn("readTiffJp4(): null path_url");
returnnull;
}
url=null;
// String mime = null; // use to select jp4/tiff later? Or to check it is correct