Commit 3649ef29 authored by Andrey Filippov's avatar Andrey Filippov

no default package left

parent 0a5c39b6
......@@ -78,8 +78,6 @@ import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.PolynomialApproximation;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.common.WindowTools;
import com.elphel.imagej.dp.LensDistortionParameters;
import com.elphel.imagej.dp.WavePatternGenerator;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import Jama.Matrix; // Download here: http://math.nist.gov/javanumerics/jama/
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
/**
** -----------------------------------------------------------------------------**
** Crosstalk_Deconv.java
......@@ -37,9 +37,6 @@ import java.awt.event.*;
import ij.plugin.frame.*;
import java.util.Random;
import com.elphel.imagej.calibration.Aberration_Calibration;
import java.util.Arrays;
import ij.text.*;
......
......@@ -41,7 +41,6 @@ import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.PolynomialApproximation;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.common.WindowTools;
import com.elphel.imagej.dp.LensDistortionParameters;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import Jama.LUDecomposition;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
import java.util.Arrays;
import java.util.Properties;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
import java.util.Arrays;
import java.util.Random;
......@@ -18,7 +18,7 @@ import ij.process.ImageProcessor;
** Copyright (C) 2014 Elphel, Inc.
**
** -----------------------------------------------------------------------------**
**
**
** WavePatternGenerator.java is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
......@@ -48,15 +48,15 @@ public class WavePatternGenerator {
double x0=width/2;
double y0=height/2;
boolean binary=false;
int fft_size= 4096;
boolean useSelectedImage=false;
double fxc=0.15; // center frequency X (0..0.5)
double fyc=0.05; // center frequency Y (0..0.5)
double sigma_long=0.001; // coeff for x^2, relative to full size
double sigma_lat= 0.001; //
double sigma_long=0.001; // coeff for x^2, relative to full size
double sigma_lat= 0.001; //
gd.addCheckbox("Halftone",!binary);
gd.addMessage("=== Circular waves generation ===");
gd.addCheckbox("Generate circular wave pattern",generateCirc);
......@@ -66,7 +66,7 @@ public class WavePatternGenerator {
gd.addNumericField("Wave center X", x0, 2, 10, "pixels");
gd.addNumericField("Wave center Y", y0, 2, 10, "pixels");
gd.addMessage("=== FFT filter ===");
gd.addCheckbox("Generate FFT-fileterd wave pattern",generateFFT);
gd.addCheckbox("Generate FFT-filtered wave pattern",generateFFT);
gd.addCheckbox("Use selected image (otherwise use random data)",useSelectedImage);
gd.addNumericField("FFT size", fft_size, 0, 4, "pixels");
gd.addNumericField("Filter center X (frequency domain)", fxc, 5, 7, "fraction");
......@@ -89,7 +89,7 @@ public class WavePatternGenerator {
fyc= gd.getNextNumber();
sigma_long= gd.getNextNumber();
sigma_lat= gd.getNextNumber();
if (generateCirc) {
circularPatternGenerator(
width,
......@@ -105,8 +105,8 @@ public class WavePatternGenerator {
useSelectedImage?WindowManager.getCurrentImage():null, // input image or null (will use random)
fxc, // center frequency X (0..0.5)
fyc, // center frequency Y (0..0.5)
sigma_long, // coeff for x^2, relative to full size
sigma_lat, //
sigma_long, // coeff for x^2, relative to full size
sigma_lat, //
binary);
}
return true;
......@@ -116,8 +116,8 @@ public class WavePatternGenerator {
ImagePlus imp_in, // input image or null (will use random)
double fxc, // center frequency X (0..0.5)
double fyc, // center frequency Y (0..0.5)
double sigma_long, // coeff for x^2, relative to full size
double sigma_lat, //
double sigma_long, // coeff for x^2, relative to full size
double sigma_lat, //
boolean binary
){
// Random random=new Random();
......@@ -142,7 +142,7 @@ public class WavePatternGenerator {
int x_in=x+dx;
if ((x_in<0) || (x_in>=iWidth)) data[y*size+x]=0.0;
else {
data[y*size+x]=fpixels[y_in*iWidth+x_in];
}
}
......@@ -192,7 +192,7 @@ public class WavePatternGenerator {
imp_circle.show();
return imp_circle;
}
public ImagePlus circularPatternGenerator(
int width,
int height,
......@@ -207,10 +207,10 @@ public class WavePatternGenerator {
for (int y=0;y<height;y++){
int base=y*width;
for (int x=0;x<width;x++){
double dx=x-centerX;
double dy=y-centerY;
double r=Math.sqrt(dx*dx+dy*dy);
float d=(float) Math.sin(r/l);
pixels[base+x]=binary?((d>0)?1.0f:0.0f):d;
......
......@@ -37,11 +37,11 @@ import java.util.Set;
import com.elphel.imagej.calibration.CalibrationFileManagement;
import com.elphel.imagej.common.GenericJTabbedDialog;
import com.elphel.imagej.common.WindowTools;
import com.elphel.imagej.dp.BiQuadParameters;
import com.elphel.imagej.dp.ImageDtt;
import com.elphel.imagej.dp.ImageDttParameters;
import com.elphel.imagej.dp.MeasuredLayersFilterParameters;
import com.elphel.imagej.dp.PoleProcessorParameters;
import com.elphel.imagej.tileprocessor.BiQuadParameters;
import com.elphel.imagej.tileprocessor.ImageDtt;
import com.elphel.imagej.tileprocessor.ImageDttParameters;
import com.elphel.imagej.tileprocessor.MeasuredLayersFilterParameters;
import com.elphel.imagej.tileprocessor.PoleProcessorParameters;
import ij.IJ;
import ij.Prefs;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.correction;
/**
** -----------------------------------------------------------------------------**
** Aberration_Correction.java
......
package com.elphel.imagej.dp;
package com.elphel.imagej.correction;
/**
** -----------------------------------------------------------------------------**
** BlueLeak.java
......
package com.elphel.imagej.dp;
package com.elphel.imagej.correction;
/**
** -----------------------------------------------------------------------------**
** CorrectionColorProc.java
......
package com.elphel.imagej.dp;
package com.elphel.imagej.correction;
/**
** -----------------------------------------------------------------------------**
** CorrectionDenoise.java
......
package com.elphel.imagej.dp;
package com.elphel.imagej.correction;
/**
** -----------------------------------------------------------------------------**
** EyesisCorrections.java
......@@ -56,7 +56,7 @@ import loci.formats.FormatException;
public class EyesisCorrections {
JP46_Reader_camera JP4_INSTANCE= new JP46_Reader_camera(false);
public JP46_Reader_camera JP4_INSTANCE= new JP46_Reader_camera(false);
ShowDoubleFloatArrays SDFA_INSTANCE= new ShowDoubleFloatArrays();
DebayerScissorsClass debayerScissors=null;
public AtomicInteger stopRequested=null; // 1 - stop now, 2 - when convenient
......@@ -2321,7 +2321,7 @@ public class EyesisCorrections {
return outStack;
}
void extractOneKernel(float [] pixels, // array of combined square kernels, each
public void extractOneKernel(float [] pixels, // array of combined square kernels, each
double [] kernel, // will be filled, should have correct size before call
int numHor, // number of kernels in a row
int xTile, // horizontal number of kernel to extract
......@@ -2392,7 +2392,7 @@ public class EyesisCorrections {
correctionsParameters.JPEG_quality);
}
void saveAndShow(
public void saveAndShow(
// public void saveAndShow(
ImagePlus imp,
EyesisCorrectionParameters.CorrectionParameters correctionsParameters,
......@@ -2401,7 +2401,7 @@ public class EyesisCorrections {
saveAndShow(imp, correctionsParameters, save, show, -1);
}
void saveAndShow(
public void saveAndShow(
ImagePlus imp,
EyesisCorrectionParameters.CorrectionParameters correctionsParameters,
boolean save,
......@@ -2420,7 +2420,7 @@ public class EyesisCorrections {
jpegQuality);
}
void saveAndShow(
public void saveAndShow(
ImagePlus imp,
String path,
boolean png,
......@@ -2436,7 +2436,7 @@ public class EyesisCorrections {
}
void saveAndShow(
public void saveAndShow(
ImagePlus imp,
String path,
boolean png,
......
package com.elphel.imagej.dp;
package com.elphel.imagej.correction;
/**
**
** EyesisDCT - Process images with DTT-based methods (code specific to ImageJ plugin)
......@@ -29,6 +29,9 @@ import java.util.concurrent.atomic.AtomicInteger;
import com.elphel.imagej.cameras.EyesisCorrectionParameters;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dct.FactorConvKernel;
import com.elphel.imagej.tileprocessor.DttRad2;
import com.elphel.imagej.tileprocessor.ImageDtt;
import ij.CompositeImage;
import ij.IJ;
......
/**
*
*/
/**
* @author eyesis
*
*/
package com.elphel.imagej.correction;
\ No newline at end of file
package com.elphel.imagej.dp;
package com.elphel.imagej.dct;
/**
**
** FactorConvKernel Split convolution kernel into small asymmetrical
......
/**
*
*/
/**
* @author eyesis
*
*/
package com.elphel.imagej.dct;
\ No newline at end of file
/**
*
*/
/**
* @author Andrey Filippov
* Just all classes that are not yet refactored
*
*/
package com.elphel.imagej.dp;
\ No newline at end of file
......@@ -52,9 +52,9 @@ import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.concurrent.atomic.AtomicInteger;
import com.elphel.imagej.dp.DttRad2;
import com.elphel.imagej.dp.GeometryCorrection;
import com.elphel.imagej.dp.ImageDtt;
import com.elphel.imagej.tileprocessor.DttRad2;
import com.elphel.imagej.tileprocessor.GeometryCorrection;
import com.elphel.imagej.tileprocessor.ImageDtt;
import Jama.Matrix;
import ij.IJ;
......
......@@ -19,7 +19,7 @@ import org.tensorflow.SavedModelBundle;
import org.tensorflow.Tensor;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.ImageDtt;
import com.elphel.imagej.tileprocessor.ImageDtt;
import ij.IJ;
import ij.ImagePlus;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** AlignmentCorrection - try to apply minor adjustments to the misaligned camera
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
** BiCamDSI - Building DSI using correlation between two quad cameras
**
......@@ -30,7 +30,7 @@ import com.elphel.imagej.common.ShowDoubleFloatArrays;
public class BiCamDSI {
TileNeibs tnImage; // = new TileNeibs(tilesX, tilesY)
int threadsMax;
ArrayList<BiScan> biScans;
public ArrayList<BiScan> biScans;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** BiQuadParameters - parameters defining Operation of a two quad camera rig
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
** BiCamScan - class to represent multiple bi-quad camera measurements
**
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** CLTPass3d - A single processing "pass" over the image set. May be both actual
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** Conflict - Represent a "conflit" between connected supertiles
......@@ -6,7 +6,7 @@ package com.elphel.imagej.dp;
** Copyright (C) 2017 Elphel, Inc.
**
** -----------------------------------------------------------------------------**
**
**
** Conflict.java is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
......@@ -29,7 +29,7 @@ public class Conflict{
int end_layer;
boolean [] start_dirs = new boolean[24];
// 0 ... 7 - ortho-diagonal-ortho
// 0 ... 3 from start_layer to end_layer: 0 - start_layer->N->SE->W->end_layer, 1 - start_layer->E->SW->N->end_layer, ...
// 0 ... 3 from start_layer to end_layer: 0 - start_layer->N->SE->W->end_layer, 1 - start_layer->E->SW->N->end_layer, ...
// 4 ... 7 from end_layer to start_layer: 4 - end_layer->N->SE->W->start_layer, 7 - end_layer->E->SW->N->start_layer, ...
// 8 ... 15 - ortho-ortho-diagonal (turn right)
// 8 ... 11 : 8 - start_layer->N->E->SW->end_layer, 9 - start_layer->E->S->NW->end_layer, ...
......@@ -83,31 +83,32 @@ public class Conflict{
dbgCheck();
}
Conflict(int nsTile,
int [] arr)
public Conflict(int nsTile,
int [] arr)
{
this.nsTile = nsTile;
this.start_layer = arr[0];
this.end_layer = arr[1];
for (int i = 0; i < start_dirs.length; i++){
start_dirs[i] = (arr[2] & (1 << i)) != 0;
start_dirs[i] = (arr[2] & (1 << i)) != 0;
}
}
Conflict(int bits)
Conflict(int bits)
{
this.start_layer = -1;
this.end_layer = -1;
for (int i = 0; i < start_dirs.length; i++){
start_dirs[i] = (bits & (1 << i)) != 0;
start_dirs[i] = (bits & (1 << i)) != 0;
}
dbgCheck();
}
int getSTile()
public int getSTile()
{
return this.nsTile;
}
@Override
public String toString()
{
String s="Conflict"+
......@@ -115,8 +116,8 @@ public class Conflict{
" nl1 = "+ getStartLayer()+
" nl2 = "+ getEndLayer()+
" all = "+ getNumConflicts() + " ("+String.format("%06x", getDirBits())+")" +
" odo = "+ getNumOrthoDiagOrthoConflicts() +
" ood = "+ getNumOrthoOrthoDiagConflicts() +
" odo = "+ getNumOrthoDiagOrthoConflicts() +
" ood = "+ getNumOrthoOrthoDiagConflicts() +
" number of odo incompatible triangles = "+ getIncompatibleOrthoDiagOrthoConflicts() +
" number of odo dual triangles = " + getDualTriOrthoDiagOrthoConflicts();
return s;
......@@ -148,16 +149,16 @@ public class Conflict{
return end_layer;
}
int getStartLayer(boolean reverse){
public int getStartLayer(boolean reverse){
return reverse? end_layer: start_layer;
}
int getEndLayer(boolean reverse){
public int getEndLayer(boolean reverse){
return reverse? start_layer : end_layer;
}
int getDirBits(){
int dirs_bits = 0;
for (int i = 0; i < start_dirs.length; i++){
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** Conflicts - Represent "conflicts" (instances of Conflict) between connected supertiles
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** ConnectionCosts - calculate and incrementally update cost of supertile connections
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
import java.util.ArrayList;
import com.elphel.imagej.common.PolynomialApproximation;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
import java.util.ArrayList;
import Jama.Matrix;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** Correlation2dLMA - Fit multi - baseline correaltion pairs to the model
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
import ij.IJ;
import ij.ImagePlus;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** DisparityProcessor
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** DttRad2 - Calculate DCT types II and IV for n=2^t and n*n 2-d
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** ExtendSurfaces predict disparity in the unknown areas
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
** -----------------------------------------------------------------------------**
** Eyesis_Correction.java
......@@ -80,6 +80,13 @@ import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.GenericJTabbedDialog;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.common.WindowTools;
import com.elphel.imagej.correction.BlueLeak;
import com.elphel.imagej.correction.CorrectionColorProc;
import com.elphel.imagej.correction.EyesisCorrections;
import com.elphel.imagej.correction.EyesisDCT;
import com.elphel.imagej.correction.PostProcessing;
import com.elphel.imagej.correction.CorrectionColorProc.ColorGainsParameters;
import com.elphel.imagej.dct.FactorConvKernel;
import com.elphel.imagej.gpu.GPUTileProcessor;
import com.elphel.imagej.gpu.JCuda_ImageJ_Example_Plugin;
import com.elphel.imagej.jp4.JP46_Reader_camera;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
import java.util.ArrayList;
import java.util.Properties;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** ImageDtt - Process images with DTT-based methods
......@@ -27,6 +27,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import com.elphel.imagej.cameras.EyesisCorrectionParameters;
import com.elphel.imagej.common.PolynomialApproximation;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.correction.EyesisDCT;
import com.elphel.imagej.correction.EyesisDCT.DCTKernels;
import Jama.Matrix;
import ij.ImageStack;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** ImageDttParameters - parameters defining TP operations (at first extra)
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** LinkPlanes - manage links between supertile planes
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
** MLStats - Generate reports over multiple scenes
**
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** MacroCorrelation handle "correlations of correlations" - tiles instead of pixels
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
import com.elphel.imagej.common.PolynomialApproximation;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
** PoleProcessor - handling poles like street lights and other vertical objects
** common in artificial environments
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
import java.util.Properties;
import com.elphel.imagej.common.GenericJTabbedDialog;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** QuadCLT - Process images with CLT-based methods (code specific to ImageJ plugin)
......@@ -44,6 +44,8 @@ import com.elphel.imagej.calibration.PixelMapping;
import com.elphel.imagej.cameras.EyesisCorrectionParameters;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.correction.CorrectionColorProc;
import com.elphel.imagej.correction.EyesisCorrections;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import com.elphel.imagej.x3d.export.WavefrontExport;
import com.elphel.imagej.x3d.export.X3dOutput;
......@@ -72,7 +74,7 @@ public class QuadCLT {
public EyesisCorrections eyesisCorrections = null;
public EyesisCorrectionParameters.CorrectionParameters correctionsParameters=null;
double [][][][][][] clt_kernels = null;
GeometryCorrection geometryCorrection = null;
public GeometryCorrection geometryCorrection = null;
double [] extrinsic_corr = new double [GeometryCorrection.CORR_NAMES.length]; // extrinsic corrections (needed from properties, before geometryCorrection
public int extra_items = 8; // number of extra items saved with kernels (center offset (partial, full, derivatives)
public ImagePlus eyesisKernelImage = null;
......@@ -82,7 +84,7 @@ public class QuadCLT {
public double [][][] fine_corr = new double [4][2][6]; // per port, per x/y, set of 6 coefficient for fine geometric corrections
TileProcessor tp = null;
public TileProcessor tp = null;
String image_name = null;
double [] gps_lla = null;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** SuperTiles - Process tiles resulted from quad image sets
......@@ -33,7 +33,7 @@ import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
public class SuperTiles{
TileProcessor tileProcessor;
public TileProcessor tileProcessor;
double step_far;
double step_near;
double step_threshold_far; // relative to min_disparity
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** SurfaceData - represents rectangular area with per-tile disparity
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
/**
**
** TileAssignment - handle tile surfaces
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tileprocessor;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -119,