Permalink
Browse files

Added data for calibration.

  • Loading branch information...
1 parent 0376409 commit 2e19405f276358f31a79ae7e5dae202297e0bff2 @ushadow committed Oct 1, 2012
@@ -0,0 +1,3 @@
+calib-method=UNDISTORT
+save-path=data/calibration/calibration.txt
+screen-image=data/calibration/checkerboard.png
File renamed without changes.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -20,15 +20,15 @@
/**
* View for camera calibration.
- *
+ *
* Keys:
* S: saves the points.
* @author yingyin
*
*/
public class CalibController implements KeyListener {
-
+
/**
* The image component.
* @author yingyin
@@ -44,15 +44,15 @@ public CalibImageComponent(Dimension d) {
super(d);
addMouseListener(this);
}
-
+
public CalibImageComponent(BufferedImage bi) {
super(bi);
addMouseListener(this);
}
public void paint(Graphics g) {
super.paint(g);
-
+
Graphics2D g2d = (Graphics2D) g;
List<Point> pts = model.getImagePoints();
@@ -130,25 +130,25 @@ public void keyPressed(KeyEvent ke) {
model.getPointsFileName());
model.saveImagePoints(fileName);
break;
-
+
case KeyEvent.VK_P:
model.createPoints();
frame.repaint();
break;
-
+
case KeyEvent.VK_C:
model.clearPoints();
frame.repaint();
break;
-
+
default:
break;
}
}
-
+
@Override
public void keyReleased(KeyEvent arg0) {}
-
+
@Override
public void keyTyped(KeyEvent arg0) {}
-}
+}
@@ -31,7 +31,7 @@
private BufferedImage bi;
private String ptsFileName;
private boolean isScrnCoord = true;
-
+
public GeoCalibModel(String imagePath, boolean isScrnCoord) {
try {
bi = ImageIO.read(new File(imagePath));
@@ -42,7 +42,7 @@ public GeoCalibModel(String imagePath, boolean isScrnCoord) {
this.isScrnCoord = isScrnCoord;
ptsFileName = FileUtil.setExtension(imagePath, "pts");
}
-
+
public GeoCalibModel(BufferedImage bi, String ptsFileName,
boolean isScrnCoord) {
this.bi = bi;
@@ -31,12 +31,12 @@
/**
* Application that tracks the fingertips in data from an OpenNI device. Saves
* fingertip events to file in the end.
- *
+ *
* @author yingyin
*
*/
public class HandTrackingAppController extends KeyAdapter {
-
+
private static Logger logger = Logger.getLogger(
HandTrackingAppController.class.getName());
@@ -102,7 +102,7 @@ public HandTrackingAppController(String mainDir) {
String derivativeSaveDir = mainDir + config.getProperty("derivative-dir",
"data/derivative/");
String calibrationFile = mainDir + config.getProperty("calibration-file",
- "data/calibration.txt");
+ "data/calibration/calibration.txt");
if (displayOnProperty.equals("false"))
displayOn = false;

0 comments on commit 2e19405

Please sign in to comment.