Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
eeeeee41
Commit
eeeeee41
authored
Nov 24, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added sensor calibration read/write (in Distrotions class) to be aware
of defects list
parent
4bfd5679
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
Distortions.java
src/main/java/Distortions.java
+32
-2
No files found.
src/main/java/Distortions.java
View file @
eeeeee41
...
...
@@ -5904,8 +5904,17 @@ List calibration
imp.setProperty("subchannel", ""+camerasInterface.getSubChannel(numSensor));
imp.setProperty("comment_entrancePupilForward", "entrance pupil distance from the azimuth/radius/height, outwards in mm");
imp.setProperty("entrancePupilForward", ""+entrancePupilForward); // currently global, decoders will use per-sensor
imp.setProperty("comment_defects", "Sensor hot/cold pixels list as x:y:difference");
if (subCam.defectsXY!=null){
StringBuffer sb = new StringBuffer();
for (int i=0;i<subCam.defectsXY.length;i++){
if (sb.length()>0) sb.append(" ");
sb.append(subCam.defectsXY[i][0]+":"+subCam.defectsXY[i][1]+":"+subCam.defectsDiff[i]);
}
imp.setProperty("defects", sb.toString());
// } else {
// imp.setProperty("defects", null);
}
//camerasInterface, numSensor
(new JP46_Reader_camera(false)).encodeProperiesToInfo(imp);
...
...
@@ -6041,6 +6050,21 @@ List calibration
// Update intrinsic image parameters
this.lensDistortionParameters.pixelSize=subCam.pixelSize;
this.lensDistortionParameters.distortionRadius=subCam.distortionRadius;
if (imp.getProperty("defects")!=null) {
String sDefects=(String) imp.getProperty("defects");
String [] asDefects=sDefects.trim().split(" ");
subCam.defectsXY=new int [asDefects.length][2];
subCam.defectsDiff=new double [asDefects.length];
for (int i=0;i<asDefects.length;i++) {
String [] stDefect=asDefects[i].split(":");
subCam.defectsXY[i][0]=Integer.parseInt(stDefect[0]);
subCam.defectsXY[i][1]=Integer.parseInt(stDefect[1]);
subCam.defectsDiff[i]=Double.parseDouble(stDefect[2]);
}
} else {
subCam.defectsXY=null;
subCam.defectsDiff=null;
}
}
for (int imgNum=0;imgNum<fittingStrategy.distortionCalibrationData.getNumImages();imgNum++){
int imageSubCam= fittingStrategy.distortionCalibrationData.getImageSubcamera(imgNum);
...
...
@@ -12811,6 +12835,8 @@ Which parameters affect which matrices
public double py0=968.0; // center of the lens on the sensor, pixels
public double channelWeightDefault=1.0;
public double channelWeightCurrent=1.0;
public int [][] defectsXY=null; // pixel defects coordinates list (starting with worst)
public double [] defectsDiff=null; // pixel defects value (diff from average of neighbors), matching defectsXY
public EyesisSubCameraParameters(
double azimuth, // azimuth of the lens entrance pupil center, degrees, clockwise looking from top
double radius, // mm, distance from the rotation axis
...
...
@@ -12852,7 +12878,11 @@ Which parameters affect which matrices
this.py0=py0;
this.channelWeightDefault=channelWeightDefault;
this.channelWeightCurrent=this.channelWeightDefault;
this.defectsXY=null; // pixel defects coordinates list (starting with worst)
this.defectsDiff=null; // pixel defects value (diff from average of neighbors), matching defectsXY
}
// defects are not cloned!
public EyesisSubCameraParameters clone() {
return new EyesisSubCameraParameters(
this.azimuth,
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment