Question

In: Computer Science

Design a convolution mask that does the following and implement the convolution process (Pls do not...

Design a convolution mask that does the following and implement the convolution process

(Pls do not use any image processing library functions)

1. smoothing

2. sharpening

3. detect edges

**Please do not use any image processing library functions.**

Solutions

Expert Solution

1. Smoothing:(Gaussian blur)

or

2. Sharpening:

3. Edge detector:

Here is a matlab code for the problem: (only conv2d is used for convolution)

clc;
clear;
A = imread('Lenna.png');
I = rgb2gray(A);
mask1 = (1/16)*[1 2 1;2 4 2;1 2 1]; %Gaussian blur
mask2 = [0 -1 -0;-1 5 -1; 0 -1 0]; %Sharpen
mask3 = [-1 -1 -1;-1 8 -1;-1 -1 -1]; %Edge
I1 = conv2(I,mask1);
I2 = conv2(I,mask2);
I3 = conv2(I,mask3);
subplot(2,2,1);
imshow(I);
title('original')
subplot(2,2,2);
imshow(uint8(I1));
title('smooth');
subplot(2,2,3);
imshow(uint8(I2));
title('sharp');
subplot(2,2,4);
imshow(uint8(I3));
title('edge');

Hope this helps.


Related Solutions

This is system engineering process. pls explain each step in this process. Problem definition(Analysis), Conceptual Design(Synthesis,...
This is system engineering process. pls explain each step in this process. Problem definition(Analysis), Conceptual Design(Synthesis, Preliminary design(Evaluation), Design decision(Decision), Detailed design(Action), Production, integration & test(verify)
Bank Accounts in Java! Design and implement a Java program that does the following: 1) reads...
Bank Accounts in Java! Design and implement a Java program that does the following: 1) reads in the principle 2) reads in additional money deposited each year (treat this as a constant) 3) reads in years to grow, and 4) reads in interest rate And then finally prints out how much money they would have each year. See below for formatting. Enter the principle: XX Enter the annual addition: XX Enter the number of years to grow: XX Enter the...
Describe the process of convolving an image with a mask (kernel). How could the process be...
Describe the process of convolving an image with a mask (kernel). How could the process be implemented in the (spatial) frequency domain?
Problem 2 (C++): Design and implement a class complexType, that can be used to process complex...
Problem 2 (C++): Design and implement a class complexType, that can be used to process complex numbers. A number of the form a +ib, in which i2 = -1 and a and b are real numbers, is called a complex number. We call a the real part and b the imaginary part of a + ib. Complex numbers can also be represented as ordered pairs (a, b). The class you will design should have the following features. Constructor Your class...
what does the PE and PLS exam test on? what sections do the exams have ?
what does the PE and PLS exam test on? what sections do the exams have ?
PLEASE DO THIS IN C#Design and implement a programming (name it NextMeeting) to determine the day...
PLEASE DO THIS IN C#Design and implement a programming (name it NextMeeting) to determine the day of your next meeting from today. The program reads from the user an integer value representing today’s day (assume 0 for Sunday, 1 for Monday, 2 for Tuesday, 3 for Wednesday, etc…) and another integer value representing the number of days to the meeting day. The program determines and prints out the meeting day. Format the outputs following the sample runs below. Sample run...
DO THIS IN C#. Design and implement a program (name it MinMaxAvg) that defines three methods...
DO THIS IN C#. Design and implement a program (name it MinMaxAvg) that defines three methods as follows: Method max (int x, int y, int z) returns the maximum value of three integer values. Method min (int X, int y, int z) returns the minimum value of three integer values. Method average (int x, int y, int z) returns the average of three integer values. In the main method, test all three methods with different input value read from the...
Why does the convolution of a clear phantom image with a Gaussian function result in a...
Why does the convolution of a clear phantom image with a Gaussian function result in a smooth (blurry) image (*use Fourier transform and frequency domain perspective to explain).
Question :Design the parameters for the PI controller urgent answer pls
Question :Design the parameters for the PI controller urgent answer pls
PLS EXPLAIN IN DETAIL THE SAND MOLD CASTING PROCESS. PLS WRITE IN MORE THAN 250 WORDS...
PLS EXPLAIN IN DETAIL THE SAND MOLD CASTING PROCESS. PLS WRITE IN MORE THAN 250 WORDS ILLUSTRATING EACH AND EVERY FINE DETAIL.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT