1 / 45

Assoc. Prof. Dr. Peerapol Yuvapoositanon Dept. of Electronic Engineering

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. Outline. Fundamental of Video and Image Processing Morphological Operations Video Play in Simulink

trumble
Download Presentation

Assoc. Prof. Dr. Peerapol Yuvapoositanon Dept. of Electronic Engineering

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. EEEB0765 Digital Signal Processing for Embedded Systems 8Video and Image Processing in Embedded Systems (I) Assoc. Prof. Dr. PeerapolYuvapoositanon Dept. of Electronic Engineering EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 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 http://embedsigproc.wordpress.com/eeeb0765 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 http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  4. Kernel 3x3 EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 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 http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  6. StrelExamples (I) SE = strel('disk', R, N) creates a flat, disk-shaped structuring element, where R specifies the radius. EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 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 http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  8. Dilation and Erosion Erosion Dilation http://homepages.inf.ed.ac.uk/rbf/HIPR2/matmorph.htm EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  9. Opening and Closing Closing Opening EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  10. Dilating http://homepages.inf.ed.ac.uk/rbf/HIPR2/dilate.htm Ifat 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 http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  11. Corner is rounded off EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  12. Grey Scale Dilation EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  13. Erosion From http://homepages.inf.ed.ac.uk/rbf/HIPR2/erode.htm If for everypixel 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. EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  14. hole in the middle of the image increases in size EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  15. Grey Scale Erosion EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  16. Erosion: Separate coins before counting EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  17. Opening From http://homepages.inf.ed.ac.uk/rbf/HIPR2/open.htm An erosion followed by a dilationusing the same structuring element for both operations. EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 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 http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  19. Opening: Separate out the circles from the lines EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  20. Opening EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  21. Opening: Salt Noise EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  22. Opening: Dark Noise EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  23. Opening: Count the Spokes using Opening EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  24. Run the Matlab commands >> I= imread('testpat1.png'); >> imshow(I) EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  25. Closing From http://homepages.inf.ed.ac.uk/rbf/HIPR2/close.htm Closing is opening performed in reverse.  Simply as a dilation followed by an erosion EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 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 http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  27. Closing: Removing Small Holes EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  28. Closing EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

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

  30. Try to erase all those lines! EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  31. Closing: Finding Skeleton EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  32. Closing EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  33. Dark Noise EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  34. Salt Noise EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 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 http://embedsigproc.wordpress.com/eeeb0765 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 http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

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

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

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

  40. Edge Detection and Image Overlay EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  41. Edge Detection and Image Overlay EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

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

  43. Edge Detection and Image Overlay + Pixel Stream HDL Model EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  44. Tracking Cars Using Foreground Detection EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

  45. Tracking Cars Using Foreground Detection (result) EEEB0765 DSP fort Embedded Systems http://embedsigproc.wordpress.com/eeeb0765 Assoc. Prof. Dr. P.Yuvapoositanon

More Related