1 / 11

DIP HW1

DIP HW1. Yuan-Wei Fu Visual Communications Lab Department of Communication Engineering National Central University ChungLi, Taiwan 2008/09/25. 1-1 讀 .bmp 圖片檔頭 ﹝1/3﹞. 一張圖片可以想成在一個矩形的範圍裡,由很多 pixels 組合成一張大圖,圖示如下:. 紅色為檔頭資訊 放置處示意圖. 1-1 讀 .bmp 圖片檔頭 ﹝2/3﹞. 圖片檔頭包含的資訊 圖片種類、圖片長寬大小、檔頭 byte 數等。

Download Presentation

DIP HW1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DIP HW1 Yuan-Wei Fu Visual Communications LabDepartment of Communication EngineeringNational Central University ChungLi, Taiwan 2008/09/25

  2. 1-1 讀.bmp圖片檔頭﹝1/3﹞ • 一張圖片可以想成在一個矩形的範圍裡,由很多pixels組合成一張大圖,圖示如下: 紅色為檔頭資訊 放置處示意圖

  3. 1-1 讀.bmp圖片檔頭﹝2/3﹞ • 圖片檔頭包含的資訊 • 圖片種類、圖片長寬大小、檔頭byte數等。 • 參考網站 • http://inversereality.org/tutorials/graphics%20programming/bitmaploading.html

  4. 1-2 彩色圖片histogram分析﹝1/4﹞ • 對於彩色圖片,每個pixel皆儲存3個色彩資訊,排列方式為BGR

  5. 1-2 彩色圖片histogram分析﹝2/4﹞ • 要求:計算出圖片中所有RGB值,並把RGB的值以區間1區分,作一個數量的計算。 ﹝個數累計﹞ ‧‧‧ ﹝Pixel 值﹞ 0 1 2 3

  6. 1-2 彩色圖片histogram分析﹝3/4﹞ ﹝個數累計﹞ ‧‧‧ ﹝Pixel 值﹞ 0 1 2 3

  7. 1-2 彩色圖片histogram分析﹝4/4﹞ ﹝個數累計﹞ ‧‧‧ ﹝Pixel 值﹞ 0 1 2 3

  8. 測試影像 • 影像下載處: • 彩色http://www.indinf.pub.ro/catalinp/proiect/lena512.bmp • 灰階 http://wwwece.rice.edu/~wakin/images/lena512.bmp

  9. 總結 • 1.對lena圖進行讀檔頭的動作並將結果印出﹝彩色以及黑白都要﹞ • 2.對彩色lena圖進行RGB值histogram分析 • 3.解析度大小﹝ex:512x512﹞不可以是固定的,換句話說,用不同解析度的圖也要可以work。

  10. Example

  11. 注意事項 • 評分標準 • 書面與討論50%,demo30%,電子檔20% • 電子檔繳交檔名: • DIPHW1_9XXXXXXXX_沉至終.doc • 寄至:965203025@cc.ncu.edu.tw • Deadline 2008/10/08 23:59 • Demo time • 2008/10/08 星期三 PM 8:00開始 • Demo schedule • 助教時間: • Wed. PM7:00 to 10:00

More Related