120 likes | 314 Views
Digital Image Processing HW1. Yi-Chun Wei Visual Communications Lab National Central University Mar . 2, 2012 . Outline. Work Chart Introduction to Bitmap File Homework Details - Construct color histogram - Color image transform to gray-level image - Resize the image Grading
E N D
Digital Image ProcessingHW1 Yi-Chun Wei Visual Communications Lab National Central University Mar. 2, 2012
Outline • Work Chart • Introduction to Bitmap File • Homework Details - Construct color histogram - Color image transform to gray-level image - Resize the image • Grading • Demo Schedule • References
Work Chart Extract header information Extract pixel information Transform to gray-level image 512*512 Construct the histogram on Y Channel HW1-1 512*512 Resize image HW1-2 640*480
Introduction to Bitmap File(1/2) • Header file • - File header (14 bytes) • - Info header (54 bytes) • Color table • - ex: a 8 bit image, • N=28 • Image content • - Bit array • (pixel information) Y. C. Dong, “Digital Image Processing HW1”, 2009
Introduction to Bitmap File(2/2) Scale: 512*512 Scale: 512*512 Header + Color palette 54 bytes + 1024 bytes 54 bytes Header Image content Image content 8-bit Lena 24-bit Lena Y. C. Dong, “Digital Image Processing HW1”, 2009
Color Image Transform to Gray-Level Image Y = 0.299R + 0.587G + 0.114B 8-bit Lena 24-bit Lena
Gray-levelHistogram Blue Gray level 196 ? Green 122 Red 83 Y histogram number Gray level pixel value
Resize Image Bilinear Interpolation: • P: Desired Point • Q: Known Points • (four closet pixels) • R: Point on the line with known points Z = AX + BY + CXY+ D Gray level value known points Where A, B, C and D are obtained from the gray-level of the four neighbors. J. Nett,”Bilinear Interpolation”, 2009.
Grading • Demo Code (80%) - Extract header file (20%) - Color image transform to gray-level image (20%) - Construct color histogram (20%) - Resize image to 640*480 (20%) • Report(20%) - Plot all your experimental results. (10%) - Describe your finding as rich as possible. (10%)
Demo Schedule • Thursday night, March , 2012. - Begin around at 19:00 at R3-307.(VCLab) • NOTE: • We will use another image to test your code. • The details will be announced on our course website. ( http://140.115.156.251/vclab/html/course/DIP2012.html )
References • Lena 24-bit color image, 512*512 http://www.indinf.pub.ro/catalinp/proiect/lena512.bmp • About Bmp format website http://en.wikipedia.org/wiki/BMP_file_format(wiki) http://crazycat1130.pixnet.net/blog/post/1345538-%E9%BB%9E%E9%99%A3%E5%9C%96%EF%BC%88bitmap%EF%BC%89%E6%AA%94%E6%A1%88%E6%A0%BC%E5%BC%8F