2008年9月10日 星期三

2008年6月20日 星期五

2008年5月2日 星期五

第六題

Fast Fourier Transform, FFT應用

原始影像
FFT處理
3維展示



第五題

第三題


樹葉光合作用面積測量





指令程序

開啟ImageJ
開啟範例圖檔
將影像改為8-bit的影像
設定影像比例尺
設定閾值範圍
調整Threshold的上下兩列的捲軸,使紅色的面積剛好覆蓋在葉子的綠色部份
計算綠色面積
再取一次閾值,設定範圍


第四題

胚胎數量及面積計算

第二題

..

Original影像與處理後影像之影像差


原始影像......影像平滑......影像銳利......影像找邊.......影像雜訊.......影像陰影

第一題

基本數位影像處理

2008年3月28日 星期五

97/03/28 立體像對製做&FFT影像過濾

立體像對製做




FFT影像過濾

未修改

2008年3月21日 星期五

97/03/21 128x128Original影像處理

原圖128x128



Smooth 平滑 128X128 SM





Sharpen 銳利 128X128 SP




Find Edges 找邊 128X128 FE



Noise> 雜訊128X128 NO




Shadows> 陰影 128X128 SD



Montage

2008年3月14日 星期五

97/03/14 影像Montage處理

5合1



RGB



50X50




120X120



120X180



180X120


180X180


2008年3月7日 星期五

2008/03/07 圖片上傳去

修改前 21x21




Title: 9513060003.txtWidth: 21 pixelsHeight: 21 pixelsCoordinate origin: 0,0Bits per pixel: 32 (float)Display range: 0.0000 - 255.0000No ThresholdUncalibratedNo Selection


修改後 11x11





Title: 9513060003.txtWidth: 21 pixelsHeight: 21 pixelsCoordinate origin: 0,0Bits per pixel: 32 (float)Display range: 0.0000 - 255.0000No ThresholdUncalibratedNo Selection




2008年2月29日 星期五

97/02/29 新旅程(課程)的開始


今日下午是我們班導的課也是學習旅程的其中一樣!!
只不過我怕這很難學不好,會令我沒心情想學啦........(火乍
但我會努力撐到最後一刻的!!!(口古月

2007年11月9日 星期五

第七題

import java.io.*;
import java.util.*;
import java.awt.geom.Point2D;
/*此程式使用9513060003(1).TXT輸入*/


class Seven {

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.*;
import java.util.*;
import java.awt.geom.Point2D;
/*此程式使用 9513060003(1).txt輸入*/


class Six {

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.awt.geom.Point2D;


public class Five {
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);
System.out.println("輸入第四點北緯UTM: ");
String n4 = keyin.readLine();
p4n = Double.parseDouble(n4);
System.out.println("輸入第四點東經UTM: ");
String e4 = keyin.readLine();
p4e = Double.parseDouble(e4);
System.out.println("輸入第五點北緯UTM: ");
String n5 = keyin.readLine();
p5n = Double.parseDouble(n5);
System.out.println("輸入第五點東經UTM: ");
String e5 = keyin.readLine();
p5e = Double.parseDouble(e5);


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);

}

}

第四題

import java.awt.geom.Point2D;

class ComputeDistance {
public static void main (String args[]) {
double sum;
Point2D.Double p1 = new Point2D.Double(371880.4954, 2782119.892);
Point2D.Double p2 = new Point2D.Double(371749.3277, 2781015.385);
Point2D.Double p3 = new Point2D.Double(373287.0808, 2779773.921);
Point2D.Double p4 = new Point2D.Double(373722.4445, 2780534.667);
Point2D.Double p5 = new Point2D.Double(374067.5787, 2780825.884);

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);
}
}

第三題JAVA程式

import java.io.FileInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.io.FileOutputStream;
import java.io.IOException;

class ans3 {

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("outdara.txt");

// now turn the FileInputStream into a DataInputStream
try {
DataInputStream myInput = new DataInputStream(fin);
PrintStream myOutput = new PrintStream(fout);

try {
while ((thisLine = myInput.readLine()) != null) {
System.out.println(thisLine);
myOutput.println(thisLine);
} // 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

}

2007年10月17日 星期三

96/10/17之作業心得

嗯..............
關於這次作業阿.....說來慚愧
雖然我遲到,但是有同學們的幫助,好不容易才交出來阿!!
真的是"在家靠親人,在外靠朋友"!!!