Commit 7135cb85 authored by Andrey Filippov's avatar Andrey Filippov

Updated TileProcessor:getShowScan for variable number of sensors

parent 6346b15e
...@@ -73,7 +73,11 @@ public class CLTPass3d{ ...@@ -73,7 +73,11 @@ public class CLTPass3d{
public double [][] tiles_RBGA = null; public double [][] tiles_RBGA = null;
SuperTiles superTiles = null; SuperTiles superTiles = null;
TileProcessor tileProcessor; final TileProcessor tileProcessor;
public int getNumSensors() {
return tileProcessor.getNumSensors();
}
public CLTPass3d (TileProcessor tileProcessor) public CLTPass3d (TileProcessor tileProcessor)
{ {
this.tileProcessor = tileProcessor; this.tileProcessor = tileProcessor;
...@@ -304,8 +308,8 @@ public class CLTPass3d{ ...@@ -304,8 +308,8 @@ public class CLTPass3d{
public double [][] getDiffs (){ public double [][] getDiffs (){
if (disparity_map == null) return null; if (disparity_map == null) return null;
double [][] these_diffs = new double[ImageDtt.QUAD][]; double [][] these_diffs = new double[getNumSensors()][];
for (int i = 0; i< ImageDtt.QUAD; i++) these_diffs[i] = disparity_map[ImageDtt.IMG_DIFF0_INDEX + i]; for (int i = 0; i< these_diffs.length; i++) these_diffs[i] = disparity_map[ImageDtt.IMG_DIFF0_INDEX + i]; // IMG_DIFF0_INDEX does not depend on num sensors
return these_diffs; return these_diffs;
} }
......
...@@ -85,7 +85,7 @@ public class ImageDttCPU { ...@@ -85,7 +85,7 @@ public class ImageDttCPU {
{0,1,3,4}}; // bottom right {0,1,3,4}}; // bottom right
// public static int FORCE_DISPARITY_BIT = 8; // move to parameters? // public static int FORCE_DISPARITY_BIT = 8; // move to parameters?
static int QUAD = 4; // number of cameras in camera // static int QUAD = 4; // number of cameras in camera
static int GREEN_CHN = 2; // index of green channel static int GREEN_CHN = 2; // index of green channel
static int MONO_CHN = 2; // index of channel used in monochrome mode static int MONO_CHN = 2; // index of channel used in monochrome mode
......
...@@ -194,7 +194,7 @@ public class MacroCorrelation { ...@@ -194,7 +194,7 @@ public class MacroCorrelation {
final int mTilesY = (pTilesY + tileSize - 1) / tileSize; final int mTilesY = (pTilesY + tileSize - 1) / tileSize;
final int mTiles = mTilesX * mTilesY; final int mTiles = mTilesX * mTilesY;
final int num_chn = tmp_input? 3: (1 + ((other_channels == null) ? 0 : (other_channels[0].length))); final int num_chn = tmp_input? 3: (1 + ((other_channels == null) ? 0 : (other_channels[0].length)));
final double [][][] input_data = new double [ImageDtt.QUAD][num_chn][mTiles*tileSize*tileSize]; final double [][][] input_data = new double [src_scan.getNumSensors()][num_chn][mTiles*tileSize*tileSize];
// double [][] tiles_tone = src_scan.getTileRBGA( No, we need individual subcameras // double [][] tiles_tone = src_scan.getTileRBGA( No, we need individual subcameras
// 4); // int num_layers); // 4); // int num_layers);
// TODO: add other channels (average tone) // TODO: add other channels (average tone)
......
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