CDMS/src/CDMS/swiatlow/ImageMapperII
diff -u -r1.2 -r1.3
--- ImageMapperII.java 25 Feb 2011 06:37:36 -0000 1.2
+++ ImageMapperII.java 7 Mar 2011 23:07:15 -0000 1.3
@@ -15,13 +15,15 @@
public class ImageMapperII {
- private static final int INTERESTING_CUT = 1;
- private static final boolean LEVELLING_ON = true;
+ private static final int INTERESTING_CUT = 20;
+ private static final boolean LEVELLING_ON = false;
private static final double pixWidth = 45.0;
private static final double pixHeight = 33.0;
- private static final double mmPerPixel = .00810282; // high res
+// private static final double mmPerPixel = .00810282; // high res
+ private static final double mmPerPixel = .00818493; // high res
+
private double imageWidth;
private double imageHeight;
@@ -36,6 +38,8 @@
private BufferedWriter output;
private int debug;
+ private int dPrintCounter=1;
+ private static final int dPrint=0;
public ImageMapperII(String imageFile, String outFile, int debugFlag) throws IOException{
//initialize variables, say hello
@@ -215,10 +219,25 @@
}
}
-
+
+
// if there are enough non-white pixels, it's interesting
- if(nColorPix > INTERESTING_CUT)
+ if(nColorPix > INTERESTING_CUT){
+ if(debug==1){
+ if(dPrint==1){
+ try {
+ File outputfile = new File("/Users/maxinion/Documents/Work/CDMS/imagingII/out2-28/broken/b"+dPrintCounter+".jpg");
+ ImageIO.write(sub, "jpg", outputfile);
+ System.out.println("There are " + nColorPix + " interesting pixels in image " +dPrintCounter);
+ dPrintCounter++;
+ } catch (IOException e) {
+ System.out.println("error writing out broken images!");
+ }
+ }
+ }
return true;
+
+ }
return false;
}
}
CDMS/src/CDMS/swiatlow/ImageMapperII
diff -u -r1.2 -r1.3
--- ImageMapperIIRun.java 25 Feb 2011 06:37:36 -0000 1.2
+++ ImageMapperIIRun.java 7 Mar 2011 23:07:15 -0000 1.3
@@ -11,7 +11,7 @@
try {
ImageMapperII mapper = new ImageMapperII("/Users/maxinion/Documents/Work/CDMS/imagingII/qets2-hires.jpg",
- "/Users/maxinion/Documents/Work/CDMS/imagingII/out2-24/qets2-out.csv",1);
+ "/Users/maxinion/Documents/Work/CDMS/imagingII/out2-28/qets2-full-out.csv",1);
mapper.doAll();
} catch (IOException e) {
e.printStackTrace();