National Taiwan University National Taiwan University
Computer Organization and Assembly Languages
Fi l P j t FINDING NEMO Final Project – FINDING NEMO
組員:黃志勝 學號:R97921048
There are 3.7 trillion fish in the ocean.
l k f
We are looking for one.
On Nemo's first day of school, he's captured by a scuba diver Marlin and his new friend Dory a scuba diver. Marlin and his new friend Dory set off across the ocean to find Nemo.
Now, We help Marlin to find his son by GBA.
There are 3 7 trillion fish in the ocean There are 3.7 trillion fish in the ocean.
We are looking for one.
Finding Nemo
There are 3 7 trillion fish in the ocean There are 3.7 trillion fish in the ocean.
We are looking for one.
Finding Nemo
H fi d N ? How can we find Nemo?
利用電腦視覺演算法 & 模擬器平台
利用電腦視覺演算法 & GBA模擬器平台 1.Color Filter
2 Box Filter 2.Box Filter
3.Condition Dualization 4.Grouping
5 Histogram 5.Histogram
6.Bounding Box
Color Filter Color Filter
Uint5 0x7FFF Uint5 0x7FFF
By Mask 0x001F
Uint5 0x001F
By Mask 0x001F
Uint5 0x001F
Color Filter Color Filter
利用Color filter 可大致把Nemo找出 但仍有許多不必要的雜點如Marlin
Box Filter
3x3Boxfilter
1 1 1
1 1 1
1 1 1
1 1 1 1 1
1 1 1 1 1
5x5Boxfilter
7x7Boxfilter
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
Box Filter Box Filter
使用越大格數的Box filter (1)影像越模糊
(1)影像越模糊
(2)越能去除雜訊或降低雜訊強度 (3)但程式執行速度越慢
Project中選擇7x7 Box Filter
Dualization(二元化) Dualization(二元化)
取強度中間值15 若pixel強度>15取31,否則取0 模糊化後的影像做二元化後可將雜訊去除
但難免有無法去除的部分 但難免有無法去除的部分
Sampling
對無法去除的雜點Sampling 對無法去除的雜點Sampling 以Matlab軟體分析其RGB值
Samlping and Matlab Samlping and Matlab
Matlab使用Uint8格式 與GBA的Uint5略有不同 Uint8 255 = Uint5 31 Uint8 255 Uint5 31 Uint8 129 = Uint5 16
對影像做二元化時同時加入某些條件 對影像做二元化時同時加入某些條件 提高color filter選色門檻
If(G pixel<16 && R pixel>15) If(G_pixel<16 && R_pixel>15) pixel=0x001F;
else
pixel=0x0000;
Condition Dualization Condition Dualization
加入Condition後,成功去除Marlin的魚尾巴 但隨著選色的門檻提高
二元化後設為0x001F的pixel數目減少
G i
Grouping
利用G i 演算法將彼此相連的 i l編為同一群組 利用Groupig演算法將彼此相連的pixel編為同一群組 以區分不相連的pixel
不同顏色表示不同的群組編號 不同顏色表示不同的群組編號
Histogram & Bounding Box Histogram & Bounding Box
統計Histogram選出最大的群組pixel
再使用Bounding Box演算法畫出可包覆最大群組的最小框
Finding Nemog
Reference
Computer and robotic Vision Robert M. Haralick/Linda G. Shapiro 數位影像處理 ‐ 運用 MATLAB 繆紹綱