Commit 6bcd9932 authored by Andrey Filippov's avatar Andrey Filippov

Merge branch 'dct' of git@git.elphel.com:Elphel/imagej-elphel.git into dct

parents 658da32d 96af0b22
...@@ -111,6 +111,9 @@ public class EyesisCorrections { ...@@ -111,6 +111,9 @@ public class EyesisCorrections {
if ((this.debugLevel>101) && (correctionsParameters.sourcePaths!=null) && (correctionsParameters.sourcePaths.length>0)) { if ((this.debugLevel>101) && (correctionsParameters.sourcePaths!=null) && (correctionsParameters.sourcePaths.length>0)) {
testFF(correctionsParameters.sourcePaths[0]); testFF(correctionsParameters.sourcePaths[0]);
} }
if (debugLevel > -2) {
System.out.println();
}
} }
public void initSensorFilesAux(int debugLevel){ public void initSensorFilesAux(int debugLevel){
......
...@@ -94,7 +94,7 @@ public class JP46_Reader_camera extends PlugInFrame implements ActionListener { ...@@ -94,7 +94,7 @@ public class JP46_Reader_camera extends PlugInFrame implements ActionListener {
public String camera_jp46settings = ""; public String camera_jp46settings = "";
public boolean IS_SILENT=true; public boolean IS_SILENT=true;
public boolean ABSOLUTELY_SILENT=false; public boolean ABSOLUTELY_SILENT=false;
public boolean demux=true; public boolean demux=true;
public String imageTitle="cameraImage"; public String imageTitle="cameraImage";
private int ExifOffset=0x0c; private int ExifOffset=0x0c;
...@@ -150,6 +150,9 @@ public class JP46_Reader_camera extends PlugInFrame implements ActionListener { ...@@ -150,6 +150,9 @@ public class JP46_Reader_camera extends PlugInFrame implements ActionListener {
pack(); pack();
GUI.center(this); GUI.center(this);
setVisible(showGUI); setVisible(showGUI);
if (!showGUI) {
this.ABSOLUTELY_SILENT = true;
}
} }
void addButton(String label, Panel panel) { void addButton(String label, Panel panel) {
...@@ -648,14 +651,14 @@ public class JP46_Reader_camera extends PlugInFrame implements ActionListener { ...@@ -648,14 +651,14 @@ public class JP46_Reader_camera extends PlugInFrame implements ActionListener {
min_gain=2.0*gains[0]; min_gain=2.0*gains[0];
for (i=0;i<4;i++) { for (i=0;i<4;i++) {
if (min_gain > gains[i]*(1.0-blacks[i])) min_gain = gains[i]*(1.0-blacks[i]); if (min_gain > gains[i]*(1.0-blacks[i])) min_gain = gains[i]*(1.0-blacks[i]);
System.out.println("gains["+i+"]="+gains[i]+" min_gain="+min_gain); if (!this.ABSOLUTELY_SILENT) System.out.println("gains["+i+"]="+gains[i]+" min_gain="+min_gain);
} }
imp.setProperty("GAIN",String.format("%f",min_gain)); // common gain imp.setProperty("GAIN",String.format("%f",min_gain)); // common gain
for (i=0;i<4;i++) gains[i]/=min_gain; for (i=0;i<4;i++) gains[i]/=min_gain;
for (i=0;i<4;i++) blacks256[i]=256.0*blacks[i]; for (i=0;i<4;i++) blacks256[i]=256.0*blacks[i];
for (i=0;i<4;i++) { for (i=0;i<4;i++) {
System.out.println("scaled gains["+i+"]="+gains[i]); if (!this.ABSOLUTELY_SILENT) System.out.println("scaled gains["+i+"]="+gains[i]);
} }
...@@ -665,7 +668,7 @@ public class JP46_Reader_camera extends PlugInFrame implements ActionListener { ...@@ -665,7 +668,7 @@ public class JP46_Reader_camera extends PlugInFrame implements ActionListener {
else satValue[i]=((rgammas[i][255])-blacks256[i]); else satValue[i]=((rgammas[i][255])-blacks256[i]);
} else satValue[i]=255.0; } else satValue[i]=255.0;
imp.setProperty("saturation_"+i,String.format("%f",satValue[i])); imp.setProperty("saturation_"+i,String.format("%f",satValue[i]));
System.out.println("scaled gains["+i+"]="+gains[i]+" satValue["+i+"]="+satValue[i]); if (!this.ABSOLUTELY_SILENT) System.out.println("scaled gains["+i+"]="+gains[i]+" satValue["+i+"]="+satValue[i]);
} }
// swap satValue to match FLIPH,FLIPV again // swap satValue to match FLIPH,FLIPV again
......
...@@ -157,7 +157,12 @@ public class PixelMapping { ...@@ -157,7 +157,12 @@ public class PixelMapping {
if (subCamera < 0) { if (subCamera < 0) {
return null; return null;
} }
System.out.println("channelsForSubCamera("+subCamera+"),this.sensors.length="+this.sensors.length); if (this.debugLevel>1) {
System.out.print("channelsForSubCamera("+subCamera+"),this.sensors.length="+this.sensors.length+": ");
// } else if (this.debugLevel > -2) {
// System.out.print(".");
}
// ArrayList<ArrayList<ArrayList<Integer>>> camera_IPs = new ArrayList<ArrayList<ArrayList<Integer>>>(); // ArrayList<ArrayList<ArrayList<Integer>>> camera_IPs = new ArrayList<ArrayList<ArrayList<Integer>>>();
ArrayList<Point> cam_port = new ArrayList<Point>(); ArrayList<Point> cam_port = new ArrayList<Point>();
for (int i=0;i<this.sensors.length;i++) if (this.sensors[i]!=null) { for (int i=0;i<this.sensors.length;i++) if (this.sensors[i]!=null) {
...@@ -176,10 +181,16 @@ public class PixelMapping { ...@@ -176,10 +181,16 @@ public class PixelMapping {
}); });
// debugging: // debugging:
if (subCamera >= cam_port_arr.length) { if (subCamera >= cam_port_arr.length) {
System.out.println("Error: Subcamera "+subCamera+" > that total number of sensor ports in the system = "+cam_port_arr.length); if (this.debugLevel>1) {
System.out.println("Error: Subcamera "+subCamera+" > that total number of sensor ports in the system = "+cam_port_arr.length);
}
return null; return null;
} }
System.out.println("----- This filename subcamera "+subCamera+": physical camera "+cam_port_arr[subCamera].x+", sensor_port "+cam_port_arr[subCamera].y); if (this.debugLevel>1) {
System.out.println("----- This filename subcamera "+subCamera+": physical camera "+cam_port_arr[subCamera].x+", sensor_port "+cam_port_arr[subCamera].y);
} else if (this.debugLevel > -2) {
System.out.print(".");
}
if (this.sensors == null) return null; if (this.sensors == null) return null;
int numChannels=0; int numChannels=0;
for (int i=0;i<this.sensors.length;i++) if (this.sensors[i]!=null) { for (int i=0;i<this.sensors.length;i++) if (this.sensors[i]!=null) {
......
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