36
מבוא לעיבוד תמונה1 89-560, 88-584 פרופ' נתן נתניהו המח' למדעי המחשב אונ' בר- אילן

הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

מבוא לעיבוד תמונה

1

89-560, 88-584

נתן נתניהו' פרופ למדעי המחשב' המח

אילן-בר' אונ

Page 2: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

מנהלה

נתן נתניהו ' פרופ : מרצה

03-531-7721:'טל

אימייל: [email protected]

קאפחאורן ר "ד: מתרגל ([email protected])

ציון תרגיל 50% :ציון( בתרגילי תכנות-Matlab בזוגות )!50% -ו .ציון מבחן

2

Page 3: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

מנהלה

לינאריתאלגברה , חשבון דיפרנציאלי ואינטגרלי :דרישות קדם

בחבילת תוך שימוש ממוחשבים תרגילי בית : במהלך הקורסMatlab לעיבוד תמונה

3

Page 4: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

ספרים מומלצים

Digital Picture Processing, Azriel Rosenfeld, Avinash Kak

Computer Vision, Dana H. Ballard, Christopher M. Brown

Digital Image Processing, Rafael C. Gonzalez, Richard E. Woods

Fundamentals of Digital Image Processing, Anil K. Jain

Digital Image Processing, William K. Pratt

Computer and Robot Vision, Robert M. Haralick, Linda G. Shapiro

4

Page 5: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

ספרים מומלצים

Digital Image Processing, Kenneth R. Castleman

Machine Vision, E. R. Davies

Introductory Techniques for 3-D Computer Vision,

Emanuele Trucco , Alessandro Verri

Fundamentals of Electronic Image Processing, Arthur R. Weeks , Jr.

5

Page 6: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Azriel Rosenfeld (1931—2004)CVL / CfAR, UMCP

A Visionary of Visionaries (IP, CV, PR, DG, and more)

Page 7: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

במהלך הקורס( חלקית)נושאים שיכוסו

Feature Extraction / Detection

סגמנטציה(Image Segmentation)

Shape / Pattern Recognition (2D)

דחיסת תמונות(Image Compression)

לדוגמה עיבוד תמונות חישוב , אפליקציות.מרחוק

הגדרות, מושגי יסוד, מבוא

Image Acquisition / Formation

Basic Transforms / Filtering

שיפור תמונה(Image Enhancement)

טרנספורמציות נוספות על / אופרטוריםתמונות ותמונות בינאריות

7

Page 8: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

הגדרות ומושגי יסוד, מבוא

תמונה(picture, image) - זירה", (עצם)ייצוג מרחבי של אובייקט "(scene )או -דו, קרי, משתניםתמונה היא פונקציה של שני , מתמטית .אחרתאו של תמונה , מימדית-תלת

ואשר (image plane)במישור התמונה (x,y)הנרשמת בנקודה ( intensity)עוצמת האור .I(x,y) -נסמנה ב

עצמים המחזירים אור ומצלמה הקולטת את האור המוחזר, בהינתן מקור תאורה, עקרונית ,ניתן לדבר על היווצרות תמונה כתוצאה מהתמקדות האור העובר דרך עדשת המצלמה

עוצמת האור בכל נקודה תלויה במידת ההארה של העצם . במישור הדמות או התמונה( תלוי בתכונות ההחזרה של המשטח)ממנו ( reflected)כמות האור המוחזרת , (המשטח)

(.המצלמה)העצם והמערכת האופטית , ובמיקומם היחסי של מקור האור

ומכאן שאינה מכילה את מלוא , מימדי-תלתשל עולם מימדי-תמונה הינה ייצוג דו! זכור.המידע באשר לעולם עצמו

8

Page 9: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Computer Vision (CV)

Embedding human visual capabilities into an automated system (e.g., extraction, analysis, and understanding of a (sequence of) image(s).

Src: CS131

Page 10: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

מימד-היווצרות תמונה של עצמים בתלת10

Page 11: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

רכישת תמונה /קבלת /יצירת (image acquisition)

(.או הקלטה)מדידה ורישום , נעשית באמצעות צילום

תשליל –( סרט צילום הרגיש לאור)צילום באמצעים כימיים(negative ) סרטמתורגמות לנקודות ( במציאות)הצילום הינו רישום של הנקודות כך שנקודות בהירות

.שחורות בתשליל ולהיפך

מודדים באמצעות רכיבים אלקטרוניים את עוצמת –צילום בשיטות אלקטרוניות. האור על ידי תרגום לאות חשמלי

(video image)הפלט במקרה זה הינו תמונות וידיאו

11

Page 12: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

12

Page 13: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Computer imaging system are comprised of

two primary component types, hardware and

software. The hardware components, can be

divided into image acquisition subsystem, the

computer itself, and the display devices. The

software allows us to manipulate the image

and perform any desired processing on.

Introduction to Computer Vision and Image Processing, Ch. 1

13

Page 14: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

מקורות נוספים לקבלת תמונה

באמצעות סורק אופטי מימדית-צילום תמונה דו(scanner ) הבנוי ממערך ליניארי של (.מימדית-האובייקט במקרה הזה הוא תמונה דו)קולטים הרגישים לאור

תמונותX-ray ,ומערך קולטים , מתקבלות באמצעות מקור קרינה המכוון לעצם .הנמצא מצדו השני של העצם ומודד את חלק הקרינה שעבר מבלי להיבלע

תמונות טווחrange images)) , באמצעות מתמרים מאחדים ניתן ליצור תמונהלפני משטח )אשר הערך בכל נקודה בה הוא יחסי למרחק הנקודה הקרובה ביותר

(.כלשהו

תמונות צבע(RGB .)קבלת . מכילות בכל נקודה אינפורמציה גם על הגווןי מדידת עוצמת האור עבור תחומי הצבע השונים "האינפורמציה הנוספת נעשית ע

(.תמונות 3א מתקבלות "ז)

בדומה ל. חישה מרחוק/ תמונות לוויין- RGB ,רק עבור תחום גדול יותר של אורכי גל.

14

Page 15: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

15

Page 16: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Computer imaging system are comprised of

two primary component types, hardware and

software. The hardware components, can be

divided into image acquisition subsystem, the

computer itself, and the display devices. The

software allows us to manipulate the image

and perform any desired processing on.

Introduction to Computer Vision and Image Processing, Ch. 1

16

Page 17: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

17

Page 18: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

דגימה וכימוי (Sampling and Quantization)

מעשי יותר לדגום את התמונה על גבי , במקום להקליט את הפילוג הרציף של עוצמות האור–דגימהמתקבלת תמונת דגימה מרחבית כך . האורכאשר בכל נקודת דגימה רושמים את עוצמת (grid),סריג

(spatially-sampled image) של ערכים מספריים מימדי-דוהמהווה למעשה מערך.

I(i,j) בנקודה הינו הערך המספרי המייצג את עוצמת האורi,j (השורה ה- i והעמודה ה-j הסריגשל.)

מטריציייצוג התמונה הוא נשים לב כי.

מדובר בתא , למעשה(cell ) אינטגרציה של / הינה יחסית למיצוע והקריאה המספרית , הסריגשל (pictureהתמונהבמישור התמונה ידוע בשם אלמנט התא . התאעוצמת האור על פני השטח של אותו

element ) או בקיצור פיקסל(pixel.)

או " רמת האפור"הערך המספרי של פיקסל ידוע בשםgray level . באופן טיפוסי משתמשים בתמונותx 512שגודלן .פיקסלים 512

18

Page 19: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

דגימה וכימוי (Sampling and Quantization)

19

Page 20: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

20

Page 21: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

22

Page 22: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Grayscale Image23

Page 23: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Degradation via Spatial Sampling 24

Page 24: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Stages in the Digitization Process:

Spatial sampling

Gray-level quantization

25

Page 25: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Using Different Number of Samples26

Page 26: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Degradation due to Gray Level Quantization 27

2 gray levels (binary image) 4 gray levels (2 bits)

Page 27: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Quantization Example (Cont‘d) 28

8 gray levels (3 bits) 16 gray levels (4 bits)

Page 28: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Quantization Example (Cont‘d) 29

32 gray levels (5 bits) 64 gray levels (6 bits)

Page 29: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

עיבוד תמונה (Image Processing)

לאחר שיש בידינו ייצוג דיגיטלי של תמונה ,ניתן לעבד את התמונה על ידי הפעלת

נומריות על /אופרציות מתמטיותאינספור .אותו ייצוג המאוחסן במחשב

30

Page 30: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

פעולות בסיסיות רלוונטיות לעיבוד תמונה

31

Page 31: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

Computer Vision–ל מבוא

(Low Level)

תמונות /י הפעלת אופרטורים שונים נותן תמונת"עיבוד תמונה עלהוציא מסקנות כלשהן ( י עיבוד נוסף מתקדם"ע)פלט שמתוכן ניתן

.לסצנה המצולמתביחס

דוגמאות :edge detection ,סגמנטציה וכו'

32

Page 32: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

CV ApplicationsOptical Character Recognition (OCR)

Page 33: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

CV Applications (Cont‘d)Facial Image Processing

Face recognition vs. DB

Facial expression recognition

Page 34: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

CV Applications (Cont‘d)Object Tracking (e.g., Sports)

Page 35: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

CV Applications (Cont‘d)Medical Image Analysis

Page 36: הנומת דוביעל אובמ - BIUu.cs.biu.ac.il/~kapaho/IP/lectures/lecture1.pdf · Azriel Rosenfeld, Avinash Kak ... CV Applications (Cont‘d) Autonomous Vehicles ―Our system

CV Applications (Cont‘d)Autonomous Vehicles

―Our system requires a computer in the car equipped with television camera input that uses

the same visual input available to the human driver. Essentially, we are proposing an

automatic chauffeur‖, -- John McCarthy, ‗69