Matlab代写 - COSC 445 – Computer Vision
时间:2020-12-07
1. [7 points]: Consider the binary image 𝐼𝐼 and the structuring element 𝑆𝑆 below. Do the following by hand (don’t use a computer): a. Label the 4-connected components in 𝐼𝐼. b. Label the 8-connected components in 𝐼𝐼. c. Find the output of morphologically opening 𝐼𝐼 with 𝑆𝑆 – assume the origin of 𝑆𝑆 is at its center. d. Find the output of morphologically closing 𝐼𝐼𝑐𝑐 with 𝑆𝑆̂, where 𝐼𝐼𝑐𝑐 is the background. e. Using the results from (c) and (d) above, show that opening and closing are duals of each other, i.e., (𝐼𝐼 ∘ 𝑆𝑆)𝑐𝑐 = (𝐼𝐼𝑐𝑐 • 𝑆𝑆̂). (an explanation with few words will do). 𝐼𝐼 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 𝑆𝑆111 Marking guide: +1 for a,b,e +2 for c,d 2. [10 points]: Use the image ‘money.png’ with this assign, then implement a morphology-based algorithm in Matlab to compute and display the amount of money in $ in the image. The output should be as shown below. Marking guide: +2 for breaking up the image into coins +3 for segmenting based on coin types (+1 for each type of coins) +3 for computations based on the coin type +2 for overall logic and correctness There is $11.50 in this image. COSC 445 – Computer Vision Winter 2020 T1 Dr. M. S. Shehata 3. [13 points] [Adapted from Gonzales textbook Q9.36]: A preprocessing step in an application of microscopy is concerned with the issue of isolating individual round particles from similar particles that overlap in groups of two or more particles (see following image – available on Connect as ‘particles.png’). Assuming that particles have between 230 to 275 pixels per particle: (a) Implement in Matlab an algorithm that uses “Connected Component Analysis” to produce three images consisting respectively of • Only of particles that have merged with the boundary of the image. • Only overlapping particles. • Only nonoverlapping particles. (b) Extend your Matlab program so that it merges the above three image into one colored image that displays the three classes of particles in three different colors (see example below). Marking guide: +9 for segmenting based on particle (+3 for each type) +2 for generating and displaying three grayscale images. +2 for the color image. particles merged with the boundary nonoverlapping particles overlapping particles 3 classes of particles COSC 445 – Computer Vision Winter 2020 T1 Dr. M. S. Shehata Note the following: • Don’t dilate, erode, open, or close the given image. • To build the colored final image, use the grayscale images as the three RGB components. Refer to the course’s intro to Matlab lecture notes to see how to build a 3D array from several 2D arrays. • Useful Matlab functions: padarray, find, cat. 4. [10 points]: Use the image ‘445_descr.png’. Implement a morphology-based algorithm in Matlab that will split the given image into two: one with the text only and one with the background only. The output should be similar to the images below. 445_descr.png  Text only Background only Marking guide: +6 for extracting and displaying the background +4 for extracting and displaying the text Submission Instructions 1- Solve Q1 in Word/Excel/or similar program. 2- For each question Q2 to Q4, write a separate Matlab program or function. 3- Submit everything as one zip file to canvas. Note that you can resubmit an assignment, but the new submission overwrites the old submission and receives a new timestamp.