• 沒有找到結果。

Box Filter

N/A
N/A
Protected

Academic year: 2022

Share "Box Filter"

Copied!
18
0
0

加載中.... (立即查看全文)

全文

(1)

Computer Organization and Assembly Language

Assignment #3

Box Filter

(2)

Virtual Boy Advance

„

An emulator for Nintendo Gameboy Advance

„

GBA - ARM7 architecture

(3)

Develop Environment

„ HAM GBA Devkit

„ http://www.ngine.de/index.jsp?pageid=3504

„ recommended

„ DevKit Advance

„ http://devkitadv.sourceforge.net/

„ Lightweight and simple

„ Base knowledge in writing Makefile required

(4)

Preparing

„

Download ham-280-full-win32.exe

„

Follow the instructions to install it

„

Download template files

„ http://w.csie.org/~r96051/hw3_template.rar

„ Extract to wherever you want

(5)

Replacing Makefile

„ In ($HAM_dir)/system/

„ Replacing

„ master.mak & standard-targets.mak

„ With these two files:

„ http://w.csie.org/~r96051/master.mak

„ http://w.csie.org/~r96051/standard- targets.mak

(6)

Getting start

„

Run ($HAM_dir)/vham/VHAM.exe

„

File -> Open workspace

„ open asm_hw3.vhw

„

Press ‘F7’ to Build and Run

(7)

Getting start

(8)

Box Filter

„ A spatial domain filter that

simply averaging pixel values in kernel.

„ Fixed 3x3 kernel for this assignment.

„ Notice: There are 2x2 kernel on corners, and 2x3 kernel on edges

(9)

Box Filter

(10)

Assignment

„

Modify myfilter.s as a box filter

„

void myfilter(u16* ret,const u16* ori);

„ ret and ori are two pointer to original and return images

„ ret in r0, ori in r1

(11)

myfilter.s

(12)

Auto Judge

„ Press Left, Up and

Down to switch between original image, filtered image and result.

„ Both accuracy and efficiency will be encountered when scoring.

(13)

Changing input

„

Replacing input.h for different input image.

„

You can use Gfx2gba making your own input image.

„ Gfx2gba 1.03

„ http://www.gbadev.org/tools.php?showinfo=143

(14)

Gfx2gba

„ Converting image file to C header file

„ See ReadMe.txt for usage information

(15)

BGR5 Format

„

15 bits for a pixel

„

5 bits for each BGR channel

„ Red channel at the lowest 5 bits

„ Green channel at bit6 to bit10

„ Blue channel at bit11 to bit15

„

Separating channels when blending

(16)

BGR5 Format

„ A straightforward C code for

blending

„ Is there a faster way?

(17)

Efficiency issue

„ Loop unrolling?

„ GBA memory :

„ 96KB VRAM

„ 32KB in-chip RAM

„ 256KB on-board RAM

„ Can we tiling?

„ Space and time : trade off

„ Are there duplicate adding? Can we reuse it?

(18)

Reference

„

More about GBA development:

„

GBADEV.org

„ http://www.gbadev.org/

„

Jonathan S. Harbour’s blog

„ http://theharbourfamily.com/jonathan/?page_id=89

參考文獻

相關文件

 image processing, visualization and interaction modules can be combined to complex image processing networks using a graphical

Most existing machine learning algorithms are designed by assuming that data can be easily accessed.. Therefore, the same data may be accessed

The algorithm used is averaging algorithm, i.e., when shrinking a 512 by 512 image into a 64 by 64 image, which is 1/8 of the original size, we take 8 by 8 blocks and use the

MR CLEAN: A Randomized Trial of Intra-arterial Treatment for Acute Ischemic Stroke. • Multicenter Randomized Clinical trial of Endovascular treatment for Acute ischemic stroke in

Teachers need to emphasize to the students that the exam will be both listening and reading.

The test materials in sealed carton boxes (the Test Material Boxes), a Principal’s Packet and a blue-coloured box (Blue Box), will be delivered to schools by a delivery

另外一般來說要處理不等號較為困難, 所以當 要證明 one-to-one 時, 我們大都用 Definition 5.3.7 的

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