Commit 016b8b7c authored by Andrey Filippov's avatar Andrey Filippov

Acquiring images sets with LWIR16

parent 57a60fb7
...@@ -27,6 +27,14 @@ ...@@ -27,6 +27,14 @@
<description>A Maven project implementing imagej-elphel plugin</description> <description>A Maven project implementing imagej-elphel plugin</description>
<dependencies> <dependencies>
<!-- ssh support - see https://www.baeldung.com/java-ssh-connection -->
<!-- https://mvnrepository.com/artifact/org.apache.sshd/sshd-core -->
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
<version>2.6.0</version>
</dependency>
<dependency> <dependency>
<groupId>net.imagej</groupId> <groupId>net.imagej</groupId>
<artifactId>ij</artifactId> <artifactId>ij</artifactId>
......
...@@ -73,6 +73,7 @@ import com.elphel.imagej.common.PolynomialApproximation; ...@@ -73,6 +73,7 @@ import com.elphel.imagej.common.PolynomialApproximation;
import com.elphel.imagej.common.ShowDoubleFloatArrays; import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.common.WindowTools; import com.elphel.imagej.common.WindowTools;
import com.elphel.imagej.jp4.JP46_Reader_camera; import com.elphel.imagej.jp4.JP46_Reader_camera;
import com.elphel.imagej.lwir.Lwir16Reader;
import com.elphel.imagej.lwir.LwirReader; import com.elphel.imagej.lwir.LwirReader;
import com.elphel.imagej.lwir.LwirReaderParameters; import com.elphel.imagej.lwir.LwirReaderParameters;
import com.elphel.imagej.readers.EyesisTiff; import com.elphel.imagej.readers.EyesisTiff;
...@@ -108,6 +109,7 @@ public class Aberration_Calibration extends PlugInFrame implements ActionListene ...@@ -108,6 +109,7 @@ public class Aberration_Calibration extends PlugInFrame implements ActionListene
private Panel panelGoniometer; private Panel panelGoniometer;
private Panel panelPixelMapping, panelStereo,panelStereo1; private Panel panelPixelMapping, panelStereo,panelStereo1;
private Panel panelLWIR; private Panel panelLWIR;
private Panel panelLWIR16;
private ShowDoubleFloatArrays SDFA_INSTANCE; // just for debugging? private ShowDoubleFloatArrays SDFA_INSTANCE; // just for debugging?
JP46_Reader_camera JP4_INSTANCE; JP46_Reader_camera JP4_INSTANCE;
...@@ -289,6 +291,7 @@ public class Aberration_Calibration extends PlugInFrame implements ActionListene ...@@ -289,6 +291,7 @@ public class Aberration_Calibration extends PlugInFrame implements ActionListene
); );
public static LwirReader LWIR_READER = null; public static LwirReader LWIR_READER = null;
public static Lwir16Reader LWIR16_READER = null;
public static ProcessCalibrationFilesParameters PROCESS_PARAMETERS = new ProcessCalibrationFilesParameters( public static ProcessCalibrationFilesParameters PROCESS_PARAMETERS = new ProcessCalibrationFilesParameters(
...@@ -650,9 +653,7 @@ public static MatchSimulatedPattern.DistortionParameters DISTORTION =new MatchSi ...@@ -650,9 +653,7 @@ public static MatchSimulatedPattern.DistortionParameters DISTORTION =new MatchSi
public static Goniometer GONIOMETER=null; public static Goniometer GONIOMETER=null;
public static LwirReaderParameters LWIR_PARAMETERS=new LwirReaderParameters(); public static LwirReaderParameters LWIR_PARAMETERS = new LwirReaderParameters();
// new CalibrationHardwareInterface.LaserPointers(); // new CalibrationHardwareInterface.LaserPointers();
public class SyncCommand{ public class SyncCommand{
...@@ -1030,6 +1031,11 @@ if (MORE_BUTTONS) { ...@@ -1030,6 +1031,11 @@ if (MORE_BUTTONS) {
panelLWIR.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap panelLWIR.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap
addButton("LWIR Configure", panelLWIR,color_configure); addButton("LWIR Configure", panelLWIR,color_configure);
addButton("LWIR_TEST", panelLWIR, color_conf_process); addButton("LWIR_TEST", panelLWIR, color_conf_process);
addButton("CMPRS_STOP", panelLWIR, color_stop);
addButton("CMPRS_START", panelLWIR, color_process);
addButton("LWIR_FFC", panelLWIR, color_conf_process);
addButton("RST BUFs", panelLWIR, color_stop);
addButton("LWIR_ACQUIRE", panelLWIR, color_conf_process); addButton("LWIR_ACQUIRE", panelLWIR, color_conf_process);
addButton("Configure Goniometer", panelLWIR,color_configure); addButton("Configure Goniometer", panelLWIR,color_configure);
addButton("Goniometer Move", panelLWIR,color_debug); addButton("Goniometer Move", panelLWIR,color_debug);
...@@ -1041,8 +1047,8 @@ if (MORE_BUTTONS) { ...@@ -1041,8 +1047,8 @@ if (MORE_BUTTONS) {
addButton("EO Offsets", panelLWIR,color_process); addButton("EO Offsets", panelLWIR,color_process);
addButton("LWIR to EO", panelLWIR,color_process); addButton("LWIR to EO", panelLWIR,color_process);
addButton("Manual hint", panelLWIR,color_configure); addButton("Manual hint", panelLWIR,color_configure);
add(panelLWIR); add(panelLWIR);
pack(); pack();
GUI.center(this); GUI.center(this);
setVisible(true); setVisible(true);
...@@ -9284,25 +9290,90 @@ if (MORE_BUTTONS) { ...@@ -9284,25 +9290,90 @@ if (MORE_BUTTONS) {
LWIR_PARAMETERS.showJDialog(); LWIR_PARAMETERS.showJDialog();
return; return;
} }
//startStopCompressor(LwirReaderParameters lrp, boolean start, double delay)
//condProgramLWIRCamera()
/* ======================================================================== */
if (label.equals("CMPRS_START") || label.equals("CMPRS_STOP")) {
boolean start = label.equals("CMPRS_START");
if (LWIR_PARAMETERS.isLwir16()) {
if (LWIR16_READER == null) {
LWIR16_READER = new Lwir16Reader(LWIR_PARAMETERS);
}
LWIR16_READER.condProgramLWIRCamera();
double delay = 3.0;
LWIR16_READER.startStopCompressor(LWIR_PARAMETERS, start, delay);
}
return;
}
/* ======================================================================== */
if (label.equals("LWIR_FFC")) {
if (LWIR_PARAMETERS.isLwir16()) {
if (LWIR16_READER == null) {
LWIR16_READER = new Lwir16Reader(LWIR_PARAMETERS);
}
LWIR16_READER.condProgramLWIRCamera();
int skip_frames = 0; // 300; // 5 second to come to the camera, remove later
if (skip_frames > 0) {
LWIR16_READER.skipMasterFrames(new String[] {LWIR_PARAMETERS.getLwirIP(0)}, skip_frames);
}
LWIR16_READER.runFFC(LWIR_PARAMETERS);
}
return;
}
/* ======================================================================== */
if (label.equals("RST BUFs")) {
if (LWIR_PARAMETERS.isLwir16()) {
if (LWIR16_READER == null) {
LWIR16_READER = new Lwir16Reader(LWIR_PARAMETERS);
}
LWIR16_READER.condProgramLWIRCamera();
LWIR16_READER.resetFrameBuffers(LWIR_PARAMETERS);
}
return;
}
/* ======================================================================== */ /* ======================================================================== */
//
if (label.equals("LWIR_TEST")) { if (label.equals("LWIR_TEST")) {
DEBUG_LEVEL=MASTER_DEBUG_LEVEL; DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
// public static LwirReader LWIR_READER = null; // public static LwirReader LWIR_READER = null;
ImagePlus [][] imps;
if (LWIR_PARAMETERS.isLwir16()) {
if (LWIR16_READER == null) {
LWIR16_READER = new Lwir16Reader(LWIR_PARAMETERS);
}
LWIR16_READER.programLWIRCamera(LWIR_PARAMETERS);
if (DEBUG_LEVEL <1000) {
return;
}
imps = LWIR16_READER.readAllMultiple(
LWIR_PARAMETERS.getNumFrames(), // 10, // final int num_frames,
// true, // use LWIR telemetry
true, // final boolean show,
false); // true); // final boolean scale)
} else {
if (LWIR_READER == null) { if (LWIR_READER == null) {
LWIR_READER = new LwirReader(LWIR_PARAMETERS); LWIR_READER = new LwirReader(LWIR_PARAMETERS);
} }
ImagePlus [][] imps = LWIR_READER.readAllMultiple( imps = LWIR_READER.readAllMultiple(
LWIR_PARAMETERS.getNumFrames(), // 10, // final int num_frames, LWIR_PARAMETERS.getNumFrames(), // 10, // final int num_frames,
// true, // use LWIR telemetry // true, // use LWIR telemetry
true, // final boolean show, true, // final boolean show,
false); // true); // final boolean scale) false); // true); // final boolean scale)
}
for (ImagePlus imp: imps[0]) { for (ImagePlus imp: imps[0]) {
imp.show(); imp.show();
} }
System.out.println("LWIR_TEST: got "+imps.length+" image sets"); System.out.println("LWIR_TEST: got "+imps.length+" image sets");
if (LWIR_PARAMETERS.isLwir16()) {
// will probably not needed for Bosons
ImagePlus [][] imps_sync = LWIR16_READER.matchSets(imps, 0.001, 3); // double max_mismatch)
if (imps_sync != null) {
ImagePlus [] imps_avg = LWIR16_READER.averageMultiFrames(imps_sync);
for (ImagePlus imp: imps_avg) {
imp.show();
}
}
} else {
ImagePlus [][] imps_sync = LWIR_READER.matchSets(imps, 0.001, 3); // double max_mismatch) ImagePlus [][] imps_sync = LWIR_READER.matchSets(imps, 0.001, 3); // double max_mismatch)
if (imps_sync != null) { if (imps_sync != null) {
ImagePlus [] imps_avg = LWIR_READER.averageMultiFrames(imps_sync); ImagePlus [] imps_avg = LWIR_READER.averageMultiFrames(imps_sync);
...@@ -9310,48 +9381,68 @@ if (MORE_BUTTONS) { ...@@ -9310,48 +9381,68 @@ if (MORE_BUTTONS) {
imp.show(); imp.show();
} }
} }
}
return; return;
} }
/* ======================================================================== */ /* ======================================================================== */
if (label.equals("LWIR_ACQUIRE")) { if (label.equals("LWIR_ACQUIRE")) {
DEBUG_LEVEL=MASTER_DEBUG_LEVEL; DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
// public static LwirReader LWIR_READER = null; ImagePlus [][] imps;
if (LWIR_PARAMETERS.isLwir16()) {
if (LWIR16_READER == null) {
LWIR16_READER = new Lwir16Reader(LWIR_PARAMETERS);
}
// ImagePlus [] imps =
LWIR16_READER.acquire(DISTORTION_PROCESS_CONFIGURATION.sourceDirectory); // directory to save
// ImagePlus [] imps = LWIR_READER.acquire("attic/lwir_test_images"); // directory to save
} else {
if (LWIR_READER == null) { if (LWIR_READER == null) {
LWIR_READER = new LwirReader(LWIR_PARAMETERS); LWIR_READER = new LwirReader(LWIR_PARAMETERS);
} }
// ImagePlus [] imps = // ImagePlus [] imps =
LWIR_READER.acquire(DISTORTION_PROCESS_CONFIGURATION.sourceDirectory); // directory to save LWIR_READER.acquire(DISTORTION_PROCESS_CONFIGURATION.sourceDirectory); // directory to save
// ImagePlus [] imps = LWIR_READER.acquire("attic/lwir_test_images"); // directory to save // ImagePlus [] imps = LWIR_READER.acquire("attic/lwir_test_images"); // directory to save
}
return; return;
} }
/* ======================================================================== */ /* ======================================================================== */
if (label.equals("LWIR Goniometer")) { if (label.equals("LWIR Goniometer")) {
DEBUG_LEVEL=MASTER_DEBUG_LEVEL; DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
if ((GONIOMETER==null) || (LWIR_PARAMETERS.isLwir16()?(GONIOMETER.lwir16Reader == null):(GONIOMETER.lwirReader == null))) {
// CAMERAS.setNumberOfThreads(THREADS_MAX); if (LWIR_PARAMETERS.isLwir16()) {
// CAMERAS.debugLevel=DEBUG_LEVEL; if (LWIR16_READER == null) {
LWIR16_READER = new Lwir16Reader(LWIR_PARAMETERS);
if ((GONIOMETER==null) || (GONIOMETER.lwirReader == null)) { }
GONIOMETER= new Goniometer(
LWIR16_READER,
DISTORTION, //MatchSimulatedPattern.DistortionParameters distortion,
PATTERN_DETECT, //MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
EYESIS_CAMERA_PARAMETERS, //EyesisCameraParameters eyesisCameraParameters,
LASER_POINTERS, // MatchSimulatedPattern.LaserPointer laserPointers
SIMUL, //SimulationPattern.SimulParameters simulParametersDefault,
GONIOMETER_PARAMETERS, //LensAdjustment.FocusMeasurementParameters focusMeasurementParameters,
DISTORTION_PROCESS_CONFIGURATION);
} else {
if (LWIR_READER == null) { if (LWIR_READER == null) {
LWIR_READER = new LwirReader(LWIR_PARAMETERS); LWIR_READER = new LwirReader(LWIR_PARAMETERS);
} }
GONIOMETER= new Goniometer( GONIOMETER= new Goniometer(
LWIR_READER, LWIR_READER,
// CAMERAS, // CalibrationHardwareInterface.CamerasInterface cameras,
DISTORTION, //MatchSimulatedPattern.DistortionParameters distortion, DISTORTION, //MatchSimulatedPattern.DistortionParameters distortion,
PATTERN_DETECT, //MatchSimulatedPattern.PatternDetectParameters patternDetectParameters, PATTERN_DETECT, //MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
EYESIS_CAMERA_PARAMETERS, //EyesisCameraParameters eyesisCameraParameters, EYESIS_CAMERA_PARAMETERS, //EyesisCameraParameters eyesisCameraParameters,
LASER_POINTERS, // MatchSimulatedPattern.LaserPointer laserPointers LASER_POINTERS, // MatchSimulatedPattern.LaserPointer laserPointers
SIMUL, //SimulationPattern.SimulParameters simulParametersDefault, SIMUL, //SimulationPattern.SimulParameters simulParametersDefault,
GONIOMETER_PARAMETERS, //LensAdjustment.FocusMeasurementParameters focusMeasurementParameters, GONIOMETER_PARAMETERS, //LensAdjustment.FocusMeasurementParameters focusMeasurementParameters,
DISTORTION_PROCESS_CONFIGURATION DISTORTION_PROCESS_CONFIGURATION);
);
}
if (DEBUG_LEVEL>1){ if (DEBUG_LEVEL>1){
System.out.println("Initiaslizing Goniometer class"); System.out.println("Initialized Goniometer class for "+LWIR_PARAMETERS.getCameraName());
} }
} else if (DEBUG_LEVEL>1){ } else if (DEBUG_LEVEL>1){
System.out.println("GONIOMETER was initialized"); System.out.println("GONIOMETER was initialized for "+LWIR_PARAMETERS.getCameraName());
} }
// calculate angular size of the target as visible from the camera // calculate angular size of the target as visible from the camera
...@@ -9437,7 +9528,6 @@ if (MORE_BUTTONS) { ...@@ -9437,7 +9528,6 @@ if (MORE_BUTTONS) {
} }
/* ======================================================================== */ /* ======================================================================== */
IJ.showMessage("Not yet implemented"); IJ.showMessage("Not yet implemented");
DEBUG_LEVEL=MASTER_DEBUG_LEVEL; DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
return; return;
...@@ -34,6 +34,7 @@ import com.elphel.imagej.calibration.hardware.GoniometerMotors; ...@@ -34,6 +34,7 @@ import com.elphel.imagej.calibration.hardware.GoniometerMotors;
import com.elphel.imagej.cameras.EyesisCameraParameters; import com.elphel.imagej.cameras.EyesisCameraParameters;
import com.elphel.imagej.common.ShowDoubleFloatArrays; import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.common.WindowTools; import com.elphel.imagej.common.WindowTools;
import com.elphel.imagej.lwir.Lwir16Reader;
import com.elphel.imagej.lwir.LwirReader; import com.elphel.imagej.lwir.LwirReader;
import ij.IJ; import ij.IJ;
...@@ -54,6 +55,7 @@ horizontal axis: ...@@ -54,6 +55,7 @@ horizontal axis:
// debugging // debugging
public CamerasInterface cameras = null; public CamerasInterface cameras = null;
public LwirReader lwirReader = null; public LwirReader lwirReader = null;
public Lwir16Reader lwir16Reader = null;
// public CalibrationHardwareInterface.LaserPointers lasers = null; // public CalibrationHardwareInterface.LaserPointers lasers = null;
// public static CalibrationHardwareInterface.FocusingMotors motorsS=null; // public static CalibrationHardwareInterface.FocusingMotors motorsS=null;
// public DistortionProcessConfiguration // public DistortionProcessConfiguration
...@@ -123,6 +125,28 @@ horizontal axis: ...@@ -123,6 +125,28 @@ horizontal axis:
this.distortionProcessConfiguration=distortionProcessConfiguration; this.distortionProcessConfiguration=distortionProcessConfiguration;
} }
public Goniometer(
Lwir16Reader lwir16Reader,
// CalibrationHardwareInterface.CamerasInterface cameras,
MatchSimulatedPattern.DistortionParameters distortionParametersDefault,
MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
EyesisCameraParameters eyesisCameraParameters,
LaserPointer laserPointers,
SimulationPattern.SimulParameters simulParametersDefault,
Goniometer.GoniometerParameters goniometerParameters,
DistortionProcessConfiguration distortionProcessConfiguration
) {
this.lwir16Reader= lwir16Reader;
// this.cameras = cameras;
this.distortionParametersDefault = distortionParametersDefault;
// this.distortion = distortion;
this.patternDetectParameters=patternDetectParameters;
this.eyesisCameraParameters = eyesisCameraParameters;
this.laserPointers = laserPointers;
this.simulParametersDefault=simulParametersDefault;
this.goniometerParameters=goniometerParameters;
this.distortionProcessConfiguration=distortionProcessConfiguration;
}
...@@ -459,6 +483,10 @@ horizontal axis: ...@@ -459,6 +483,10 @@ horizontal axis:
this.lwirReader.setMotorsPosition(this.goniometerParameters.goniometerMotors.getTargetPositions()); // Used target, not current to prevent minor variations this.lwirReader.setMotorsPosition(this.goniometerParameters.goniometerMotors.getTargetPositions()); // Used target, not current to prevent minor variations
this.lwirReader.reportTiming=debugTiming; this.lwirReader.reportTiming=debugTiming;
this.lwirReader.acquire(this.distortionProcessConfiguration.sourceDirectory); // true - use lasers, updateStatus - make false? this.lwirReader.acquire(this.distortionProcessConfiguration.sourceDirectory); // true - use lasers, updateStatus - make false?
} else if (lwir16Reader != null) {
this.lwir16Reader.setMotorsPosition(this.goniometerParameters.goniometerMotors.getTargetPositions()); // Used target, not current to prevent minor variations
this.lwir16Reader.reportTiming=debugTiming;
this.lwir16Reader.acquire(this.distortionProcessConfiguration.sourceDirectory); // true - use lasers, updateStatus - make false?
} else { } else {
System.out.println("Neignter traditional camera/rig, no LWIR rig are initialized, dry run"); System.out.println("Neignter traditional camera/rig, no LWIR rig are initialized, dry run");
} }
......
...@@ -4793,7 +4793,7 @@ public class MatchSimulatedPattern { ...@@ -4793,7 +4793,7 @@ public class MatchSimulatedPattern {
// process // process
final double[] bPattern, final double[] windowFunction, final double[] windowFunctionCorr, final double[] bPattern, final double[] windowFunction, final double[] windowFunctionCorr,
final double[] windowFunctionCorr2, final double[] windowFunctionCorr4, final double[][] locsNeib, // which final double[] windowFunctionCorr2, final double[] windowFunctionCorr4, final double[][] locsNeib, // which
// neibors // neighbors
// to // to
// try // try
// (here // (here
...@@ -6919,6 +6919,8 @@ public class MatchSimulatedPattern { ...@@ -6919,6 +6919,8 @@ public class MatchSimulatedPattern {
noMessageBoxes); noMessageBoxes);
} }
// ====== end of calculateDistortions() // ====== end of calculateDistortions()
// ============================================== // ==============================================
/** /**
......
...@@ -318,7 +318,7 @@ public class GenericJTabbedDialog implements ActionListener { ...@@ -318,7 +318,7 @@ public class GenericJTabbedDialog implements ActionListener {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
System.out.println(e.getActionCommand()); // System.out.println(e.getActionCommand());
if (e.getActionCommand().equals("Cancel")) { if (e.getActionCommand().equals("Cancel")) {
result = e.getActionCommand(); result = e.getActionCommand();
jd.dispose(); jd.dispose();
...@@ -409,7 +409,7 @@ public class GenericJTabbedDialog implements ActionListener { ...@@ -409,7 +409,7 @@ public class GenericJTabbedDialog implements ActionListener {
} }
System.out.println(combo.getSelectedItem()); // System.out.println(combo.getSelectedItem());
// for (int i = 0; i < selectedItem.length; i++){ // for (int i = 0; i < selectedItem.length; i++){
// System.out.println(String.format("item %s = %s", i, selectedItem[i])); // System.out.println(String.format("item %s = %s", i, selectedItem[i]));
// } // }
......
This diff is collapsed.
...@@ -96,13 +96,13 @@ public class LwirReader { ...@@ -96,13 +96,13 @@ public class LwirReader {
// -- constructors // -- constructors
public LwirReader() { public LwirReader() {
this.lwirReaderParameters = new LwirReaderParameters(); // default this.lwirReaderParameters = new LwirReaderParameters(LwirReaderParameters.NAME_TALON); // default
imagejJp4TiffMulti = null; imagejJp4TiffMulti = null;
} }
public LwirReader(LwirReaderParameters lwirReaderParameters) { public LwirReader(LwirReaderParameters lwirReaderParameters) {
if (lwirReaderParameters == null) { if (lwirReaderParameters == null) {
this.lwirReaderParameters = new LwirReaderParameters(); // default this.lwirReaderParameters = new LwirReaderParameters(LwirReaderParameters.NAME_TALON); // default
} else { } else {
this.lwirReaderParameters = lwirReaderParameters; this.lwirReaderParameters = lwirReaderParameters;
} }
...@@ -404,9 +404,9 @@ public class LwirReader { ...@@ -404,9 +404,9 @@ public class LwirReader {
} }
String hex_chan = String.format("0x%x", channels); String hex_chan = String.format("0x%x", channels);
String url = "http://"+lrp.lwir_ip+"/parsedit.php?immediate&sensor_port="+chn+ String url = "http://"+lrp.getLwirIP()+"/parsedit.php?immediate&sensor_port="+chn+
"&SENSOR_REGS67=0*"+FRAMES_AHEAD+"!"+hex_chan; "&SENSOR_REGS67=0*"+FRAMES_AHEAD+"!"+hex_chan;
// String url = "http://"+lrp.lwir_ip+"/parsedit.php?immediate&sensor_port="+chn+ // String url = "http://"+lrp.getLwirIP()+"/parsedit.php?immediate&sensor_port="+chn+
// "&SENSOR_REGS67=0&*SENSOR_REGS67="+hex_chan; // "&SENSOR_REGS67=0&*SENSOR_REGS67="+hex_chan;
Document dom=null; Document dom=null;
LOGGER.warn("calibrate(): Perform calibration (instead of 15 frames), url="+url); LOGGER.warn("calibrate(): Perform calibration (instead of 15 frames), url="+url);
...@@ -459,7 +459,7 @@ public class LwirReader { ...@@ -459,7 +459,7 @@ public class LwirReader {
return false; return false;
} }
int chn = lrp.lwir_channels[0]; int chn = lrp.lwir_channels[0];
String url = "http://"+lrp.lwir_ip+":"+IMGSRV_PORTS[chn]+SKIP_FRAME_URL; String url = "http://"+lrp.getLwirIP()+":"+IMGSRV_PORTS[chn]+SKIP_FRAME_URL;
Document dom=null; Document dom=null;
try { try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
...@@ -467,7 +467,7 @@ public class LwirReader { ...@@ -467,7 +467,7 @@ public class LwirReader {
dom = db.parse(url); dom = db.parse(url);
if (!dom.getDocumentElement().getNodeName().equals("meta")) { if (!dom.getDocumentElement().getNodeName().equals("meta")) {
LOGGER.error("skipFrame() in " + url+ LOGGER.error("skipFrame() in " + url+
": Root element: expected 'me3ta', got \"" + dom.getDocumentElement().getNodeName()+"\""); ": Root element: expected 'meta', got \"" + dom.getDocumentElement().getNodeName()+"\"");
return false; return false;
} }
} catch(MalformedURLException e){ } catch(MalformedURLException e){
...@@ -618,7 +618,7 @@ public class LwirReader { ...@@ -618,7 +618,7 @@ public class LwirReader {
int num_eo = lrp.eo_channels.length; int num_eo = lrp.eo_channels.length;
final String [] urls = new String [num_lwir + num_eo]; final String [] urls = new String [num_lwir + num_eo];
for (int chn:lrp.lwir_channels) { for (int chn:lrp.lwir_channels) {
urls[chn] = "http://"+lrp.lwir_ip+"/parsedit.php?immediate&sensor_port="+chn+ urls[chn] = "http://"+lrp.getLwirIP()+"/parsedit.php?immediate&sensor_port="+chn+
"&BITS=16"+ "&BITS=16"+
"&COLOR="+COLOR_RAW+ // +"*0"; // raw mode - delay 0 - breaks compressor "&COLOR="+COLOR_RAW+ // +"*0"; // raw mode - delay 0 - breaks compressor
"&WOI_HEIGHT="+(LWIR_HEIGHT + (lrp.lwir_telemetry?LWIR_TELEMETRY_LINES:0)); "&WOI_HEIGHT="+(LWIR_HEIGHT + (lrp.lwir_telemetry?LWIR_TELEMETRY_LINES:0));
......
...@@ -76,14 +76,13 @@ public class Boson640Telemetry { ...@@ -76,14 +76,13 @@ public class Boson640Telemetry {
dbg = bb.get(); dbg = bb.get();
bb.position(offset); bb.position(offset);
// this.bbtm =
bb.get(btm, 0,btm.length); bb.get(btm, 0,btm.length);
this.bbtm = ByteBuffer.wrap(btm); this.bbtm = ByteBuffer.wrap(btm);
this.bbtm.order( bb.order()); // or is it already same as in bb? this.bbtm.order( bb.order()); // or is it already same as in bb?
System.out.println("getShort(94)"+this.bbtm.getShort(94)); // System.out.println("getShort(94)"+this.bbtm.getShort(94));
System.out.println("getLong(162)"+this.bbtm.getLong(162)); // System.out.println("getLong(162)"+this.bbtm.getLong(162));
System.out.println("getLong(162)"+this.bbtm.getInt(162)); // System.out.println("getLong(162)"+this.bbtm.getInt(162));
......
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