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

Acquiring images sets with LWIR16

parent 57a60fb7
......@@ -27,6 +27,14 @@
<description>A Maven project implementing imagej-elphel plugin</description>
<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>
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
......
......@@ -34,6 +34,7 @@ import com.elphel.imagej.calibration.hardware.GoniometerMotors;
import com.elphel.imagej.cameras.EyesisCameraParameters;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.common.WindowTools;
import com.elphel.imagej.lwir.Lwir16Reader;
import com.elphel.imagej.lwir.LwirReader;
import ij.IJ;
......@@ -53,7 +54,8 @@ horizontal axis:
// for
// debugging
public CamerasInterface cameras = null;
public LwirReader lwirReader = null;
public LwirReader lwirReader = null;
public Lwir16Reader lwir16Reader = null;
// public CalibrationHardwareInterface.LaserPointers lasers = null;
// public static CalibrationHardwareInterface.FocusingMotors motorsS=null;
// public DistortionProcessConfiguration
......@@ -123,6 +125,28 @@ horizontal axis:
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:
this.lwirReader.setMotorsPosition(this.goniometerParameters.goniometerMotors.getTargetPositions()); // Used target, not current to prevent minor variations
this.lwirReader.reportTiming=debugTiming;
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 {
System.out.println("Neignter traditional camera/rig, no LWIR rig are initialized, dry run");
}
......
......@@ -4793,7 +4793,7 @@ public class MatchSimulatedPattern {
// process
final double[] bPattern, final double[] windowFunction, final double[] windowFunctionCorr,
final double[] windowFunctionCorr2, final double[] windowFunctionCorr4, final double[][] locsNeib, // which
// neibors
// neighbors
// to
// try
// (here
......@@ -6919,6 +6919,8 @@ public class MatchSimulatedPattern {
noMessageBoxes);
}
// ====== end of calculateDistortions()
// ==============================================
/**
......
......@@ -318,7 +318,7 @@ public class GenericJTabbedDialog implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println(e.getActionCommand());
// System.out.println(e.getActionCommand());
if (e.getActionCommand().equals("Cancel")) {
result = e.getActionCommand();
jd.dispose();
......@@ -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++){
// System.out.println(String.format("item %s = %s", i, selectedItem[i]));
// }
......
This diff is collapsed.
......@@ -96,13 +96,13 @@ public class LwirReader {
// -- constructors
public LwirReader() {
this.lwirReaderParameters = new LwirReaderParameters(); // default
this.lwirReaderParameters = new LwirReaderParameters(LwirReaderParameters.NAME_TALON); // default
imagejJp4TiffMulti = null;
}
public LwirReader(LwirReaderParameters lwirReaderParameters) {
if (lwirReaderParameters == null) {
this.lwirReaderParameters = new LwirReaderParameters(); // default
this.lwirReaderParameters = new LwirReaderParameters(LwirReaderParameters.NAME_TALON); // default
} else {
this.lwirReaderParameters = lwirReaderParameters;
}
......@@ -404,9 +404,9 @@ public class LwirReader {
}
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;
// 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;
Document dom=null;
LOGGER.warn("calibrate(): Perform calibration (instead of 15 frames), url="+url);
......@@ -459,7 +459,7 @@ public class LwirReader {
return false;
}
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;
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
......@@ -467,7 +467,7 @@ public class LwirReader {
dom = db.parse(url);
if (!dom.getDocumentElement().getNodeName().equals("meta")) {
LOGGER.error("skipFrame() in " + url+
": Root element: expected 'me3ta', got \"" + dom.getDocumentElement().getNodeName()+"\"");
": Root element: expected 'meta', got \"" + dom.getDocumentElement().getNodeName()+"\"");
return false;
}
} catch(MalformedURLException e){
......@@ -618,7 +618,7 @@ public class LwirReader {
int num_eo = lrp.eo_channels.length;
final String [] urls = new String [num_lwir + num_eo];
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"+
"&COLOR="+COLOR_RAW+ // +"*0"; // raw mode - delay 0 - breaks compressor
"&WOI_HEIGHT="+(LWIR_HEIGHT + (lrp.lwir_telemetry?LWIR_TELEMETRY_LINES:0));
......
......@@ -76,14 +76,13 @@ public class Boson640Telemetry {
dbg = bb.get();
bb.position(offset);
// this.bbtm =
bb.get(btm, 0,btm.length);
this.bbtm = ByteBuffer.wrap(btm);
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("getLong(162)"+this.bbtm.getLong(162));
System.out.println("getLong(162)"+this.bbtm.getInt(162));
// 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.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