1 EEE 178 First Exam- Take Home Partathena.ecs.csus.edu/~belkhouf/EEE178Exam1.pdf1 EEE 178 First...

3
1 EEE 178 First Exam- Take Home Part Today: Saturday 2 nd March, 2019. Due: Thursday 07 th March, 2019 at 3pm. PROBLEM 1 (7 PTS) The image of figure 1 shows the edges of another image. Our goal is to extract/recover the original image from its edges. The horizontal Roberts mask is used to obtain the edges. The first row and column of the original image are also available to us. In order to perform arithmetic operations on images, it is more practical to convert them to double. 1) Develop and implement an algorithm to recover the original image 2) Discuss your method and your results The edge image, the first row and first column of the original image are available from the instructor’s website in xlsx format. Matrix for first row and column: FirstRowandColumn.xlsx Edge matrix: EdgeMatrix.xlsx Hint: you can use Matlab functions xlswrite and xlsread. PROBLEM 2 (8 PTS) Figure 2 shows a picture of several types of fish. We want to perform morphological operations to detect and isolate the smallest fish. Perform morphological filtering on the original image to detect and isolate the smallest fish. You cannot perform more than five basic morphological operations (dilation and erosion). This means that opening and closing are seen as 2 operations, and hit and miss as 4 operations. You are restricted to the following morphological functions in this problem: imcrop, imdilate, imerode, imopen, strel, imclose, and bwhitmiss. There is no restriction on non-morphological functions such as rgb2gray, imread, imwrite, im2bw, and imcompliment, etc. Discuss your choice of the operation(s) and the structuring element(s), and your results. The image is available from the instructor’s website. PROBLEM 3 (15 PTS) Consider the image of figure 2. We want to detect the edge using three different approaches based on morphological operations. 1) Use the morphological gradient to detect the edges Figure 1: Edges of an image for problem 1

Transcript of 1 EEE 178 First Exam- Take Home Partathena.ecs.csus.edu/~belkhouf/EEE178Exam1.pdf1 EEE 178 First...

  • 1

    EEE 178 First Exam- Take Home PartToday: Saturday 2nd March, 2019.

    Due: Thursday 07th March, 2019 at 3pm.

    PROBLEM 1 (7 PTS)

    The image of figure 1 shows the edges of another image. Our goal is to extract/recover the original image from its edges.The horizontal Roberts mask is used to obtain the edges. The first row and column of the original image are also available tous. In order to perform arithmetic operations on images, it is more practical to convert them to double.

    1) Develop and implement an algorithm to recover the original image2) Discuss your method and your results

    The edge image, the first row and first column of the original image are available from the instructor’s website in xlsx format.• Matrix for first row and column: FirstRowandColumn.xlsx• Edge matrix: EdgeMatrix.xlsxHint: you can use Matlab functions xlswrite and xlsread.

    PROBLEM 2 (8 PTS)

    Figure 2 shows a picture of several types of fish. We want to perform morphological operations to detect and isolate thesmallest fish. Perform morphological filtering on the original image to detect and isolate the smallest fish. You cannot performmore than five basic morphological operations (dilation and erosion). This means that opening and closing are seen as 2operations, and hit and miss as 4 operations. You are restricted to the following morphological functions in this problem:imcrop, imdilate, imerode, imopen, strel, imclose, and bwhitmiss. There is no restriction on non-morphological functions suchas rgb2gray, imread, imwrite, im2bw, and imcompliment, etc. Discuss your choice of the operation(s) and the structuringelement(s), and your results. The image is available from the instructor’s website.

    PROBLEM 3 (15 PTS)

    Consider the image of figure 2. We want to detect the edge using three different approaches based on morphologicaloperations.

    1) Use the morphological gradient to detect the edges

    Figure 1: Edges of an image for problem 1

  • Time Now: 09:55 Saturday 2nd March, 2019

    Figure 2: Image for problems 2 and 3

    2) Use an operation based on dilation to detect the edges3) Use an operation based on erosion to detect the edges

    Discuss your method and results. The image is available from the instructor’s website.

    PROBLEM 4 (25 PTS)

    Consider the image of figure 3.1) Perform morphological filtering with the appropriate structuring element to detect and isolate letter O from the rest of

    the text. Use the appropriate morphological operation. The new image should have only the desired letter.2) Perform morphological filtering with the appropriate structuring element to detect and isolate letter P from the rest of

    the text. Use the appropriate morphological operation. The new image should have only the desired letter.3) Perform hit and miss operation on the image to detect letter F.4) Based on the hit and miss operation, develop an algorithm and write code to count the number of occurrences of letter

    F in the text.The matrix of the image is available online: Letters.xlsx.

    PROBLEM 5 (15 PTS)

    Consider the image shown in figure 4. We want to reduce the size of the image without losing too much information. Wewant the size of the new image to be one fourth (approximately) of the size of the old one. Write code to perform the necessaryoperations to achieve this task. Show the size of the new matrix and discuss tour method and results. Send the matrix of thenew image (excel file is ok) to the instructor by email.

    2

  • Time Now: 09:55 Saturday 2nd March, 2019

    Figure 3: Image with several characters

    Figure 4: Image for problem 5

    3