2008-09-10
2008-05-02
胚胎數量及面積計算

embryos.jpg 9 149498.820 16610.980 3.6
1 36111.342 255 255 255 221 97
2 24862.962 255 255 255 373 125
3 30915.209 255 255 255 584 145
4 107.014 255 255 255 171 175
5 166.467 255 255 255 336 177
6 225.919 255 255 255 348 179
7 31414.609 255 255 255 45 195
8 24993.758 255 255 255 289 214
9 701.537 255 255 255 301 237
指令順序
(1)help>Documentation>examples>ares measurements particle counting
(2)file>open samples>embryos
(3)lmage>type>8-bit
(4)畫直線>100um
(5)analyze>setscale>knowndistance改20,unitoflength改um,global打勾
(6)process>binary>make binary打線框起來edit>clear>anslyze>analyze parti>size改20,show改outlines,display.sumnarize.record starts打勾
(1)help>Documentation>examples>ares measurements particle counting
(2)file>open samples>embryos
(3)lmage>type>8-bit
(4)畫直線>100um
(5)analyze>setscale>knowndistance改20,unitoflength改um,global打勾
(6)process>binary>make binary打線框起來edit>clear>anslyze>analyze parti>size改20,show改outlines,display.sumnarize.record starts打勾
樹葉光合作用面積測量

1 471.219 255 255 255
2 2014.156 255 255 255
指令順序
(1)help>Documentation>examples>ares measurements particle counting
(2)file>open samples>leaf
(3)lmage>type>8-bit
(4)畫直線>50mm
(5)analyze>setscale>knowndistance改50,unitoflength改mm,global打勾
(6)process>binary>make binary>anslyze>analyze parti>size改50,show改outlines,display打勾,clear
Original影像與處理後影像之影像差
128x128Original影像處理
2008-03-28
2008-03-21
樹葉光合作用
1 1905.151 255 255 2552 0.027 255 255 255
3 0.082 255 255 255
4 0.109 255 255 255
5 0.027 255 255 255
6 0.054 255 255 255
7 0.054 255 255 255
8 0.163 255 255 255
9 0.136 255 255 255
10 0.054 255 255 255
11 0.054 255 255 255
12 0.027 255 255 255
13 0.027 255 255 255
14 0.109 255 255 255
15 0.654 255 255 255
16 0.027 255 255 255
17 0.082 255 255 255
18 0.109 255 255 255
19 0.109 255 255 255
Original影像與影像處理後的影像差
128x128影像處理
2008-03-07
21x21 text lmage以canvas size處裡
2008-02-29
2007-11-09
今天的程式
第三題
/*import java.io.FileInputStream;import java.io.DataInputStream;import java.io.IOException;import java.io.PrintStream;import java.io.FileOutputStream;*/import java.io.*;import java.util.*;
class StringFileIO {
public static void main (String args[]) {
String thisLine;
//Loop across the arguments for (int i=0; i < args.length; i++) {
//Open the file for reading try { FileInputStream fin = new FileInputStream(args[i]); FileOutputStream fout = new FileOutputStream("outdata.txt");
// now turn the FileInputStream into a DataInputStream try { //DataInputStream myInput = new DataInputStream(fin); BufferedReader myInput = new BufferedReader(new InputStreamReader(fin)); PrintStream myOutput = new PrintStream(fout); try { while ((thisLine = myInput.readLine()) != null) { System.out.println(thisLine); myOutput.println(thisLine); StringTokenizer st = new StringTokenizer(thisLine); while (st.hasMoreTokens()) { System.out.println(st.nextToken()); }
} // while loop ends here } catch (Exception e) { System.err.println("Error: " + e); } } // end try catch (Exception e) { System.err.println("Error: " + e); }
} // end try catch (Exception e) { System.err.println("failed to open file " + args[i]); System.err.println("Error: " + e); } } // for end here
} // main ends here
}
第四題
import java.awt.geom.Point2D;
class ComputDistance {
public static void main (String args[]) {
Point2D.Double p1=new Point2D.Double(2770764.476,349528.6095); Point2D.Double p2=new Point2D.Double(2771270.845,349947.5405); Point2D.Double p3=new Point2D.Double(2772739.52,358400.7472); Point2D.Double p4=new Point2D.Double(2777131.941,371285.0676); Point2D.Double p5=new Point2D.Double(2782147.204,371780.8572);
System.out.println("p1到p2的距離: "+ p1.distance(p2)); System.out.println("p2到p3的距離: "+ p2.distance(p3)); System.out.println("p3到p4的距離: "+ p3.distance(p4)); System.out.println("p4到p5的距離: "+ p4.distance(p5)); //System.out.println("p5到p6的距離: "+ p1.distance(p2)); } }
第五題
import java.io.*;import java.awt.geom.Point2D;
public class xc {public static void main(String[] args) throws IOException {BufferedReader keyin;keyin = new BufferedReader(new InputStreamReader(System.in));double p1n, p1e, p2n, p2e, p3n, p3e, p4n, p4e, p5n, p5e, sum;System.out.println("輸入第一點北緯UTM: ");String n1 = keyin.readLine();p1n = Double.parseDouble(n1);System.out.println("輸入第一點東經UTM: ");String e1 = keyin.readLine();p1e = Double.parseDouble(e1);System.out.println("輸入第二點北緯UTM: ");String n2 = keyin.readLine();p2n = Double.parseDouble(n2);System.out.println("輸入第二點東經UTM: ");String e2 = keyin.readLine();p2e = Double.parseDouble(e2);System.out.println("輸入第三點北緯UTM: ");String n3 = keyin.readLine();p3n = Double.parseDouble(n3);System.out.println("輸入第三點東經UTM: ");String e3 = keyin.readLine();p3e = Double.parseDouble(e3);
Point2D.Double p1 = new Point2D.Double(p1n, p1e);Point2D.Double p2 = new Point2D.Double(p2n, p2e);Point2D.Double p3 = new Point2D.Double(p3n, p3e);
System.out.println("P1到P2的距離: " + p1.distance(p2));System.out.println("P2到P3的距離: " + p2.distance(p3));sum = p1.distance(p2) + p2.distance(p3);System.out.println("三點距離總和: " + sum);
}
}
第六題
import java.io.*;import java.util.*;import java.awt.geom.Point2D;/*此程式使用datain.txt輸入*/
class DDS {
public static void main (String args[]) {
String thisLine;
for (int i=0; i < args.length; i++) {
try {FileInputStream fin = new FileInputStream(args[i]);
try {DataInputStream myInput = new DataInputStream(fin);
try {while ((thisLine = myInput.readLine()) != null) {StringTokenizer st = new StringTokenizer(thisLine, " ,");double p1n, p1e, p2n, p2e, p3n, p3e, p4n, p4e, p5n, p5e, sum;
p1n = Double.parseDouble(st.nextToken());System.out.println("第一點北緯UTM:" + p1n);p1e = Double.parseDouble(st.nextToken());System.out.println("第一點東經UTM:" + p1e);p2n = Double.parseDouble(st.nextToken());System.out.println("第二點北緯UTM:" + p2n);p2e = Double.parseDouble(st.nextToken());System.out.println("第二點東經UTM:" + p2e);p3n = Double.parseDouble(st.nextToken());System.out.println("第三點北緯UTM:" + p3n);p3e = Double.parseDouble(st.nextToken());System.out.println("第三點東經UTM:" + p3e);p4n = Double.parseDouble(st.nextToken());System.out.println("第四點北緯UTM:" + p4n);p4e = Double.parseDouble(st.nextToken());System.out.println("第四點東經UTM:" + p4e);p5n = Double.parseDouble(st.nextToken());System.out.println("第五點北緯UTM:" + p5n);p5e = Double.parseDouble(st.nextToken());System.out.println("第五點東經UTM:" + p5e);
Point2D.Double p1 = new Point2D.Double(p1n, p1e);Point2D.Double p2 = new Point2D.Double(p2n, p2e);Point2D.Double p3 = new Point2D.Double(p3n, p3e);Point2D.Double p4 = new Point2D.Double(p4n, p4e);Point2D.Double p5 = new Point2D.Double(p5n, p5e);
System.out.println("P1到P2的距離: " + p1.distance(p2) + "公尺");System.out.println("P2到P3的距離: " + p2.distance(p3) + "公尺");System.out.println("P3到P4的距離: " + p3.distance(p4) + "公尺");System.out.println("P4到P5的距離: " + p4.distance(p5) + "公尺");
sum = p1.distance(p2) + p2.distance(p3) + p3.distance(p4) + p4.distance(p5);System.out.println("五點距離總和: " + sum + "公尺");
}
}catch (Exception e) {System.err.println("Error: " + e);}}catch (Exception e) {System.err.println("Error: " + e);}
}catch (Exception e) {System.err.println("failed to open file " + args[i]);System.err.println("Error: " + e);}}
}}
第七題
import java.io.*;import java.util.*;import java.awt.geom.Point2D;/*此程式使用datain.txt輸入*/
class GOS {
public static void main (String args[]) {
String thisLine;
for (int i=0; i < args.length; i++) {
try {FileInputStream fin = new FileInputStream(args[i]);
try {DataInputStream myInput = new DataInputStream(fin);
try {while ((thisLine = myInput.readLine()) != null) {StringTokenizer st = new StringTokenizer(thisLine, " ,");double p1n, p1e, p2n, p2e, p3n, p3e, p4n, p4e, p5n, p5e, sum;
p1n = Double.parseDouble(st.nextToken());System.out.println("第一點北緯UTM:" + p1n);p1e = Double.parseDouble(st.nextToken());System.out.println("第一點東經UTM:" + p1e);p2n = Double.parseDouble(st.nextToken());System.out.println("第二點北緯UTM:" + p2n);p2e = Double.parseDouble(st.nextToken());System.out.println("第二點東經UTM:" + p2e);p3n = Double.parseDouble(st.nextToken());System.out.println("第三點北緯UTM:" + p3n);p3e = Double.parseDouble(st.nextToken());System.out.println("第三點東經UTM:" + p3e);p4n = Double.parseDouble(st.nextToken());System.out.println("第四點北緯UTM:" + p4n);p4e = Double.parseDouble(st.nextToken());System.out.println("第四點東經UTM:" + p4e);p5n = Double.parseDouble(st.nextToken());System.out.println("第五點北緯UTM:" + p5n);p5e = Double.parseDouble(st.nextToken());System.out.println("第五點東經UTM:" + p5e);
Point2D.Double p1 = new Point2D.Double(p1n, p1e);Point2D.Double p2 = new Point2D.Double(p2n, p2e);Point2D.Double p3 = new Point2D.Double(p3n, p3e);Point2D.Double p4 = new Point2D.Double(p4n, p4e);Point2D.Double p5 = new Point2D.Double(p5n, p5e);
System.out.println("一英尺=0.3048公尺");System.out.println("P1到P2的距離: " + p1.distance(p2) + "公尺");System.out.println("P1到P2的距離: " + p1.distance(p2)/0.3048 + "英尺");System.out.println("P2到P3的距離: " + p2.distance(p3) + "公尺");System.out.println("P2到P3的距離: " + p2.distance(p3)/0.3048 + "英尺");System.out.println("P3到P4的距離: " + p3.distance(p4) + "公尺");System.out.println("P3到P4的距離: " + p3.distance(p4)/0.3048 + "英尺");System.out.println("P4到P5的距離: " + p4.distance(p5) + "公尺");System.out.println("P4到P5的距離: " + p4.distance(p5)/0.3048 + "英尺");
sum = p1.distance(p2) + p2.distance(p3) + p3.distance(p4) + p4.distance(p5);System.out.println("五點距離總和: " + sum + "公尺");System.out.println("五點距離總和: " + sum/0.3048 + "英尺");
}
}catch (Exception e) {System.err.println("Error: " + e);}}catch (Exception e) {System.err.println("Error: " + e);}
}catch (Exception e) {System.err.println("failed to open file " + args[i]);System.err.println("Error: " + e);}}
}}
/*import java.io.FileInputStream;import java.io.DataInputStream;import java.io.IOException;import java.io.PrintStream;import java.io.FileOutputStream;*/import java.io.*;import java.util.*;
class StringFileIO {
public static void main (String args[]) {
String thisLine;
//Loop across the arguments for (int i=0; i < args.length; i++) {
//Open the file for reading try { FileInputStream fin = new FileInputStream(args[i]); FileOutputStream fout = new FileOutputStream("outdata.txt");
// now turn the FileInputStream into a DataInputStream try { //DataInputStream myInput = new DataInputStream(fin); BufferedReader myInput = new BufferedReader(new InputStreamReader(fin)); PrintStream myOutput = new PrintStream(fout); try { while ((thisLine = myInput.readLine()) != null) { System.out.println(thisLine); myOutput.println(thisLine); StringTokenizer st = new StringTokenizer(thisLine); while (st.hasMoreTokens()) { System.out.println(st.nextToken()); }
} // while loop ends here } catch (Exception e) { System.err.println("Error: " + e); } } // end try catch (Exception e) { System.err.println("Error: " + e); }
} // end try catch (Exception e) { System.err.println("failed to open file " + args[i]); System.err.println("Error: " + e); } } // for end here
} // main ends here
}
第四題
import java.awt.geom.Point2D;
class ComputDistance {
public static void main (String args[]) {
Point2D.Double p1=new Point2D.Double(2770764.476,349528.6095); Point2D.Double p2=new Point2D.Double(2771270.845,349947.5405); Point2D.Double p3=new Point2D.Double(2772739.52,358400.7472); Point2D.Double p4=new Point2D.Double(2777131.941,371285.0676); Point2D.Double p5=new Point2D.Double(2782147.204,371780.8572);
System.out.println("p1到p2的距離: "+ p1.distance(p2)); System.out.println("p2到p3的距離: "+ p2.distance(p3)); System.out.println("p3到p4的距離: "+ p3.distance(p4)); System.out.println("p4到p5的距離: "+ p4.distance(p5)); //System.out.println("p5到p6的距離: "+ p1.distance(p2)); } }
第五題
import java.io.*;import java.awt.geom.Point2D;
public class xc {public static void main(String[] args) throws IOException {BufferedReader keyin;keyin = new BufferedReader(new InputStreamReader(System.in));double p1n, p1e, p2n, p2e, p3n, p3e, p4n, p4e, p5n, p5e, sum;System.out.println("輸入第一點北緯UTM: ");String n1 = keyin.readLine();p1n = Double.parseDouble(n1);System.out.println("輸入第一點東經UTM: ");String e1 = keyin.readLine();p1e = Double.parseDouble(e1);System.out.println("輸入第二點北緯UTM: ");String n2 = keyin.readLine();p2n = Double.parseDouble(n2);System.out.println("輸入第二點東經UTM: ");String e2 = keyin.readLine();p2e = Double.parseDouble(e2);System.out.println("輸入第三點北緯UTM: ");String n3 = keyin.readLine();p3n = Double.parseDouble(n3);System.out.println("輸入第三點東經UTM: ");String e3 = keyin.readLine();p3e = Double.parseDouble(e3);
Point2D.Double p1 = new Point2D.Double(p1n, p1e);Point2D.Double p2 = new Point2D.Double(p2n, p2e);Point2D.Double p3 = new Point2D.Double(p3n, p3e);
System.out.println("P1到P2的距離: " + p1.distance(p2));System.out.println("P2到P3的距離: " + p2.distance(p3));sum = p1.distance(p2) + p2.distance(p3);System.out.println("三點距離總和: " + sum);
}
}
第六題
import java.io.*;import java.util.*;import java.awt.geom.Point2D;/*此程式使用datain.txt輸入*/
class DDS {
public static void main (String args[]) {
String thisLine;
for (int i=0; i < args.length; i++) {
try {FileInputStream fin = new FileInputStream(args[i]);
try {DataInputStream myInput = new DataInputStream(fin);
try {while ((thisLine = myInput.readLine()) != null) {StringTokenizer st = new StringTokenizer(thisLine, " ,");double p1n, p1e, p2n, p2e, p3n, p3e, p4n, p4e, p5n, p5e, sum;
p1n = Double.parseDouble(st.nextToken());System.out.println("第一點北緯UTM:" + p1n);p1e = Double.parseDouble(st.nextToken());System.out.println("第一點東經UTM:" + p1e);p2n = Double.parseDouble(st.nextToken());System.out.println("第二點北緯UTM:" + p2n);p2e = Double.parseDouble(st.nextToken());System.out.println("第二點東經UTM:" + p2e);p3n = Double.parseDouble(st.nextToken());System.out.println("第三點北緯UTM:" + p3n);p3e = Double.parseDouble(st.nextToken());System.out.println("第三點東經UTM:" + p3e);p4n = Double.parseDouble(st.nextToken());System.out.println("第四點北緯UTM:" + p4n);p4e = Double.parseDouble(st.nextToken());System.out.println("第四點東經UTM:" + p4e);p5n = Double.parseDouble(st.nextToken());System.out.println("第五點北緯UTM:" + p5n);p5e = Double.parseDouble(st.nextToken());System.out.println("第五點東經UTM:" + p5e);
Point2D.Double p1 = new Point2D.Double(p1n, p1e);Point2D.Double p2 = new Point2D.Double(p2n, p2e);Point2D.Double p3 = new Point2D.Double(p3n, p3e);Point2D.Double p4 = new Point2D.Double(p4n, p4e);Point2D.Double p5 = new Point2D.Double(p5n, p5e);
System.out.println("P1到P2的距離: " + p1.distance(p2) + "公尺");System.out.println("P2到P3的距離: " + p2.distance(p3) + "公尺");System.out.println("P3到P4的距離: " + p3.distance(p4) + "公尺");System.out.println("P4到P5的距離: " + p4.distance(p5) + "公尺");
sum = p1.distance(p2) + p2.distance(p3) + p3.distance(p4) + p4.distance(p5);System.out.println("五點距離總和: " + sum + "公尺");
}
}catch (Exception e) {System.err.println("Error: " + e);}}catch (Exception e) {System.err.println("Error: " + e);}
}catch (Exception e) {System.err.println("failed to open file " + args[i]);System.err.println("Error: " + e);}}
}}
第七題
import java.io.*;import java.util.*;import java.awt.geom.Point2D;/*此程式使用datain.txt輸入*/
class GOS {
public static void main (String args[]) {
String thisLine;
for (int i=0; i < args.length; i++) {
try {FileInputStream fin = new FileInputStream(args[i]);
try {DataInputStream myInput = new DataInputStream(fin);
try {while ((thisLine = myInput.readLine()) != null) {StringTokenizer st = new StringTokenizer(thisLine, " ,");double p1n, p1e, p2n, p2e, p3n, p3e, p4n, p4e, p5n, p5e, sum;
p1n = Double.parseDouble(st.nextToken());System.out.println("第一點北緯UTM:" + p1n);p1e = Double.parseDouble(st.nextToken());System.out.println("第一點東經UTM:" + p1e);p2n = Double.parseDouble(st.nextToken());System.out.println("第二點北緯UTM:" + p2n);p2e = Double.parseDouble(st.nextToken());System.out.println("第二點東經UTM:" + p2e);p3n = Double.parseDouble(st.nextToken());System.out.println("第三點北緯UTM:" + p3n);p3e = Double.parseDouble(st.nextToken());System.out.println("第三點東經UTM:" + p3e);p4n = Double.parseDouble(st.nextToken());System.out.println("第四點北緯UTM:" + p4n);p4e = Double.parseDouble(st.nextToken());System.out.println("第四點東經UTM:" + p4e);p5n = Double.parseDouble(st.nextToken());System.out.println("第五點北緯UTM:" + p5n);p5e = Double.parseDouble(st.nextToken());System.out.println("第五點東經UTM:" + p5e);
Point2D.Double p1 = new Point2D.Double(p1n, p1e);Point2D.Double p2 = new Point2D.Double(p2n, p2e);Point2D.Double p3 = new Point2D.Double(p3n, p3e);Point2D.Double p4 = new Point2D.Double(p4n, p4e);Point2D.Double p5 = new Point2D.Double(p5n, p5e);
System.out.println("一英尺=0.3048公尺");System.out.println("P1到P2的距離: " + p1.distance(p2) + "公尺");System.out.println("P1到P2的距離: " + p1.distance(p2)/0.3048 + "英尺");System.out.println("P2到P3的距離: " + p2.distance(p3) + "公尺");System.out.println("P2到P3的距離: " + p2.distance(p3)/0.3048 + "英尺");System.out.println("P3到P4的距離: " + p3.distance(p4) + "公尺");System.out.println("P3到P4的距離: " + p3.distance(p4)/0.3048 + "英尺");System.out.println("P4到P5的距離: " + p4.distance(p5) + "公尺");System.out.println("P4到P5的距離: " + p4.distance(p5)/0.3048 + "英尺");
sum = p1.distance(p2) + p2.distance(p3) + p3.distance(p4) + p4.distance(p5);System.out.println("五點距離總和: " + sum + "公尺");System.out.println("五點距離總和: " + sum/0.3048 + "英尺");
}
}catch (Exception e) {System.err.println("Error: " + e);}}catch (Exception e) {System.err.println("Error: " + e);}
}catch (Exception e) {System.err.println("failed to open file " + args[i]);System.err.println("Error: " + e);}}
}}
2007-10-17
今天的課程
今天只有用一個專案,雖然只有一個,但是卻用了很多方法讓之前存在的問題,可以解決而變的更完善,以下是今天用來改善的程式
•BufferedReader d
= new BufferedReader(new InputStreamReader(in));
•d.readLine();
•thisLine = myInput.readLine()
•StringTokenizer st = new StringTokenizer(thisLine);
•while (st.hasMoreTokens()) { System.out.println(st.nextToken()); }
•BufferedReader d
= new BufferedReader(new InputStreamReader(in));
•d.readLine();
•thisLine = myInput.readLine()
•StringTokenizer st = new StringTokenizer(thisLine);
•while (st.hasMoreTokens()) { System.out.println(st.nextToken()); }
這是程式的圖片
經過反覆的練習後,這次我終於可以趕上老師的進度,不像之前都趕不太上,以後我要更認真的學習,才可以使自己的專業技能更加純熟。
訂閱:
文章 (Atom)





































