Commit 34ac02e8 authored by Andrey Filippov's avatar Andrey Filippov

refactoring

parent 7af3b919
......@@ -80,8 +80,11 @@ 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.gpu.GPUTileProcessor;
import com.elphel.imagej.gpu.JCuda_ImageJ_Example_Plugin;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import com.elphel.imagej.lwir.LwirReader;
import com.elphel.imagej.tensorflow.TensorflowInferModel;
import ij.CompositeImage;
import ij.IJ;
......
......@@ -87,7 +87,7 @@ public class GeometryCorrection {
public CorrVector extrinsic_corr;
public RigOffset rigOffset = null;
int [] woi_tops; // used to calculate scanline timing
public int [] woi_tops; // used to calculate scanline timing
public int [] getWOITops() {
return woi_tops;
......
......@@ -168,9 +168,9 @@ public class ImageDtt {
"top-aux", "bottom-aux", "left_aux", "right-aux", "diagm-aux", "diago-aux", "hor-aux", "vert-aux",
"inter", "other", "dbg1"};
static int ML_OTHER_TARGET = 0; // Offset to target disparity data in ML_OTHER_INDEX layer tile
static int ML_OTHER_GTRUTH = 2; // Offset to ground truth disparity data in ML_OTHER_INDEX layer tile
static int ML_OTHER_GTRUTH_STRENGTH = 4; // Offset to ground truth confidence data in ML_OTHER_INDEX layer tile
public static int ML_OTHER_TARGET = 0; // Offset to target disparity data in ML_OTHER_INDEX layer tile
public static int ML_OTHER_GTRUTH = 2; // Offset to ground truth disparity data in ML_OTHER_INDEX layer tile
public static int ML_OTHER_GTRUTH_STRENGTH = 4; // Offset to ground truth confidence data in ML_OTHER_INDEX layer tile
// indices in cross-camera correlation results
......@@ -5842,7 +5842,7 @@ public class ImageDtt {
* From Stephan Preibisch's Multithreading.java class. See:
* http://repo.or.cz/w/trakem2.git?a=blob;f=mpi/fruitfly/general/MultiThreading.java;hb=HEAD
*/
static Thread[] newThreadArray(int maxCPUs) {
public static Thread[] newThreadArray(int maxCPUs) {
int n_cpus = Runtime.getRuntime().availableProcessors();
if (n_cpus>maxCPUs)n_cpus=maxCPUs;
return new Thread[n_cpus];
......
......@@ -43,6 +43,7 @@ import java.util.Random;
import com.elphel.imagej.cameras.EyesisCorrectionParameters;
import com.elphel.imagej.common.GenericJTabbedDialog;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.gpu.GPUTileProcessor;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import ij.IJ;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.gpu;
/**
** -----------------------------------------------------------------------------**
** GPUTileProcessor.java
......@@ -52,6 +52,10 @@ 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 Jama.Matrix;
import ij.IJ;
import jcuda.Pointer;
......@@ -73,12 +77,12 @@ public class GPUTileProcessor {
static String GPU_CONVERT_CORRECT_TILES_NAME = "convert_correct_tiles";
static String GPU_IMCLT_RBG_NAME = "imclt_rbg";
// pass some defines to gpu source code with #ifdef JCUDA
static int DTT_SIZE = 8;
public static int DTT_SIZE = 8;
static int THREADSX = DTT_SIZE;
static int NUM_CAMS = 4;
public static int NUM_CAMS = 4;
static int NUM_COLORS = 3;
static int IMG_WIDTH = 2592;
static int IMG_HEIGHT = 1936;
public static int IMG_WIDTH = 2592;
public static int IMG_HEIGHT = 1936;
static int KERNELS_HOR = 164;
static int KERNELS_VERT = 123;
static int KERNELS_LSTEP = 4;
......@@ -592,7 +596,7 @@ public class GPUTileProcessor {
cuCtxSynchronize();
}
float [][] getRBG (int ncam){
public float [][] getRBG (int ncam){
int height = (IMG_HEIGHT + DTT_SIZE);
int width = (IMG_WIDTH + DTT_SIZE);
int rslt_img_size = width * height;
......
/**
*
*/
/**
* @author eyesis
*
*/
package com.elphel.imagej.gpu;
\ No newline at end of file
package com.elphel.imagej.dp;
package com.elphel.imagej.tensorflow;
/**
* Copyright (C) 2018 Elphel, Inc.
* SPDX-License-Identifier: GPL-3.0-or-later
......
package com.elphel.imagej.dp;
package com.elphel.imagej.tensorflow;
/**
* Copyright (C) 2018 Elphel, Inc.
* SPDX-License-Identifier: GPL-3.0-or-later
......@@ -19,6 +19,7 @@ import org.tensorflow.SavedModelBundle;
import org.tensorflow.Tensor;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.ImageDtt;
import ij.IJ;
import ij.ImagePlus;
......
/**
*
*/
/**
* @author eyesis
*
*/
package com.elphel.imagej.tensorflow;
\ No newline at end of file
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