Presentation is loading. Please wait.

Presentation is loading. Please wait.

EEEB0765 Digital Signal Processing for Embedded Systems 8 Video and Image Processing in Embedded Systems (I) Assoc. Prof. Dr. Peerapol Yuvapoositanon.

Similar presentations


Presentation on theme: "EEEB0765 Digital Signal Processing for Embedded Systems 8 Video and Image Processing in Embedded Systems (I) Assoc. Prof. Dr. Peerapol Yuvapoositanon."— Presentation transcript:

1 EEEB0765 Digital Signal Processing for Embedded Systems 8 Video and Image Processing in Embedded Systems (I) Assoc. Prof. Dr. Peerapol Yuvapoositanon Dept. of Electronic Engineering EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

2 Outline Fundamental of Video and Image Processing
Morphological Operations Video Play in Simulink Hands on Simulation with Matlab and Simulink EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

3 Mathematical Morphology
Morphology is the study of the shape and form of objects. Object extraction Image filtering operations, such as removal of small objects or noise from an image Image segmentation operations, such as separating connected objects Measurement operations, such as texture analysis and shape description EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

4 Kernel 3x3 EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

5 Strel= Structuring Element
SE = strel('arbitrary', NHOOD)  creates a flat structuring element where NHOOD specifies the neighborhood. EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

6 Strel Examples (I) SE = strel('disk', R, N) creates a flat, disk-shaped structuring element, where R specifies the radius. EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

7 Strel Examples (II) SE = strel('diamond', R) creates a flat, diamond-shaped structuring element R specifies the distance from the structuring element origin to the points of the diamond EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

8 Dilation and Erosion Erosion Dilation
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

9 Opening and Closing Opening Closing
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

10 Dilating If at least one pixel in the structuring element coincides with a foreground (i.e., “1”) pixel in the image underneath, then the input pixel is set to the foreground (1) value EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

11 Corner is rounded off EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

12 Grey Scale Dilation EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

13 Erosion If for every pixel in the structuring element, the corresponding pixel in the image underneath is a foreground pixel, then the input pixel is left as it is. If any of the corresponding pixels in the image are background, however, the input pixel is also set to background value. From EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

14 hole in the middle of the image increases in size
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

15 Grey Scale Erosion EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

16 Erosion: Separate coins before counting
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

17 Opening An erosion followed by a dilation using the same structuring element for both operations. From EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

18 Opening vs. Erosion The basic effect of an opening is somewhat like erosion in that it tends to remove some of the foreground (bright) pixels from the edges of regions of foreground pixels. However it is less destructive than erosion in general. EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

19 Opening: Separate out the circles from the lines
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

20 Opening EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

21 Opening: Salt Noise EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

22 Opening: Dark Noise EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

23 Opening: Count the Spokes using Opening
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

24 Run the Matlab commands
>> I= imread('testpat1.png'); >> imshow(I) EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

25 Closing Closing is opening performed in reverse.
Simply as a dilation followed by an erosion From EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

26 Closing vs. Dilation Closing is similar in some ways to dilation in that it tends to enlarge the boundaries of foreground (bright) regions in an image (and shrink background color holes in such regions). But it is less destructive than dilation of the original boundary shape. EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

27 Closing: Removing Small Holes
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

28 Closing EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

29 EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

30 Try to erase all those lines!
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

31 Closing: Finding Skeleton
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

32 Closing EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

33 Dark Noise EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

34 Salt Noise EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

35 Mplay and implay >>implay('rhinos.avi'); % Use implay >>mplay('rhinos.avi'); % mplay will be removed in future release EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

36 Read and Play Video File
>> videoFReader = vision.VideoFileReader('viplanedeparture.avi'); >> videoPlayer = vision.VideoPlayer; >> while ~isDone(videoFReader) videoFrame = step(videoFReader); step(videoPlayer, videoFrame); end >> release(videoPlayer); >>release(videoFReader); EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

37 EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

38 >> I = imread('circuit
>> I = imread('circuit.tif'); >> corners = detectFASTFeatures(I,'MinContrast',0.1); >> J = insertMarker(I,corners,'circle'); >> imshow(J); EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

39 EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

40 Edge Detection and Image Overlay
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

41 Edge Detection and Image Overlay
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

42 EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

43 Edge Detection and Image Overlay + Pixel Stream HDL Model
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

44 Tracking Cars Using Foreground Detection
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon

45 Tracking Cars Using Foreground Detection (result)
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon


Download ppt "EEEB0765 Digital Signal Processing for Embedded Systems 8 Video and Image Processing in Embedded Systems (I) Assoc. Prof. Dr. Peerapol Yuvapoositanon."

Similar presentations


Ads by Google