digital image processing #hw1

11
Digital Image Processing #HW1 -Extraction of Bitmap Header File -Manipulation of Image Pixel Information Contact Information Tzu-Jui Wang ( 王王王 ) Visual Communications Lab Dep. of Communications Engineering, National Central University No.300, Jhongda Rd., Jhongli City, Taoyuan County 32001, Taiwan (R.O.C.) Phone: +886958801691

Upload: aaron

Post on 08-Feb-2016

43 views

Category:

Documents


2 download

DESCRIPTION

Digital Image Processing #HW1. Extraction of Bitmap Header File Manipulation of Image Pixel Information. Contact Information Tzu- Jui Wang ( 王子睿 ) V isual C ommunications Lab Dep. of Communications Engineering, N ational C entral U niversity - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Digital Image Processing #HW1

Digital Image Processing #HW1-Extraction of Bitmap Header File

-Manipulation of Image Pixel Information

Contact Information

Tzu-Jui Wang (王子睿 ) Visual Communications Lab Dep. of Communications Engineering, National Central University No.300, Jhongda Rd., Jhongli City, Taoyuan County 32001, Taiwan (R.O.C.) Phone: +886958801691 E-mail: [email protected]

Page 2: Digital Image Processing #HW1

Outline• Reference• Work Flow• Introduction to Bitmap File• Homework Details– Extract Header File– Construct Histogram– Extract Region of Interest with Specified Coordinate

Set• Grading Policy• Demo Schedule

Page 3: Digital Image Processing #HW1

Reference• A Beginners Guide To Bitmaps, – http://local.wasp.uwa.edu.au/~pbourke/dataformats/

bitmaps/

– http://atlc.sourceforge.net/bmp.html

• Data type in Computer, wiki resources, – http://en.wikipedia.org/wiki/Integer_(computer_scien

ce)Those might be useful !

Page 4: Digital Image Processing #HW1

Work Flow

Extract region of interest

Input coordinate set(xi, yi), i=1,..,4 of

bounding box

(x1,y1) (x2,y2)

(x3,y4) (x4,y4)

Extract header information

Construct histogram on R, G, B channels, respectively

Extract pixel information

24-bit 8-bit

Page 5: Digital Image Processing #HW1

Introduction to Bitmap File (1/2)Bitmap File Header

Identifier (ID) 2File Size 4

Reserved 4Bitmap Data Offset 4

Bitmap Info HeaderBitmap Header Size 4

Width 4Height 4Planes 2

Bits Per Pixel 2Compression 4

Bitmap Data Size 4H-Resolution 4V-Resolution 4Used Colors 4

Important Colors 4Color Table (Palette)

Palette N*4Bitmap Array

Bitmap Data N/A

File header(14 bytes)

Info header(50 bytes)

Header file(Image profile)

Image content Pixel information

i.e. a 8-bit image, N = 28

Empty for 24-bit image

Page 6: Digital Image Processing #HW1

Introduction to Bitmap File (2/2)

Header + Color paletteHeader54 bytes

54 bytes +1024 bytes

Image content

Image content

24-bit lena.bmp 8-bit lena.bmp

Page 7: Digital Image Processing #HW1

Construct Histogram• Histogram on R, G, B channels

Figure1: beatles.bmp Figure2: RGB histogram

FrequencyPixel value

Page 8: Digital Image Processing #HW1

Extract Region of Interest with Specified Coordinate Set

• Suppose given (x1, y1), (x2, y2), (x3, y3), (x4, y4)– The bounding box will be as followed

(x1,y1)

(x2,y2)

(x3,y3)(x4,y4)

Bounding box

Final output

Page 9: Digital Image Processing #HW1

Grading Policy – Code & Demo (80%)• Everyone will be asked few questions.• Extract Header File (20%)– We’ll test your system with images except lovely Lena.

• Construct Histogram (30%)– Same as the above.

• Extract Region of Interest with Specified Coordinate Set (30%)– Arbitrarily give four coordinates, and create a new

bitmap file with extracted region.

Page 10: Digital Image Processing #HW1

Grading Policy – Report (20%)• Report (20%)– Plot all your experimental results. (10%)– Depict the .bmp format as clear as possible. (5%)– Describe your findings as rich as possible. (5%)

• We don’t force you to write down how you feel about this homework. But, you can still show it up.– Too trivial, too hard, …too ?– You can describe any difficulty you’ve encountered.

Page 11: Digital Image Processing #HW1

Demo Time• Demo time will be at 2010.10.07, begin around

7:00 pm (2 weeks later) at R3-307 (VCLab).

• Demo orders will be announced later, 5 minutes for each, please refer TA’s website.– http://

140.115.156.251/vclab/html/course/DIP2010.html– Bring your codes and report.– No delay is allowed except a special cause.