Our website is a unique platform where students can share their papers in a matter of giving an example of the work to be done. If you find papers
matching your topic, you may use them only as an example of work. This is 100% legal. You may not submit downloaded papers as your own, that is cheating. Also you
should remember, that this work was alredy submitted once by a student who originally wrote it.
This assignment "Effects of Personalized Filter and Its Use" focuses on Edge detection that is very important as it enables users to detect boundaries of an image and that area that are irrelevant to the image especially that area with high light that needs to be removed. …
Download full paperFile format: .doc, available for editing
Extract of sample "Effects of Personalized Filter and Its Use"
Student’s Name
Instructor’s Name
Course Name:
Date: 28th November, 2012.
Convolution process
Method applied to complete convolution process- Matlab has conv as in-built function to solve the convolution equations. In this case we used calc.conv.m with the aim of completing the convolution process and create a function of the new pixel. This was established in matlab as functionNewPixelValue = CalcConv(imSegment, filter). The aim was to help in establishing new pixels that will result from the filtering matrix (l) of the equation. Then multiplication will be used to help in determining the sum of the two matrices established. This is used in masking of the image that is filtering out unwanted frequencies to have a new image. Usually the filter is in component of zero to one and in our case there are negatives in the filtering process thus the frequencies are tossed out The multiplication will be done as multiplication = imSegment.*filter; this will be positioned in a row by multiplication = multiplication(:). A new variable will be introduced to the convolution process which will be used in filtering. This will make the end of the convolution process where the new pixel values will be obtained as NewPixelValue = normalised;
Iterations in the development of the code - While developing the code of the function, solutions occurred in small increments that result from each iteration this worked well and made it easier to test outcomes and interactions can as they appeared. This worked very well. This force me to confront at every iteration trade-offs between delay in obtaining useful results and inputting new codes.
Testing resulting code;- the consideration to test the code will be made when the matlab is giving an error. When it gives an error a testing technique is employed. Testing will include writing the conditions under which testing must occur and performing the actual tests. In order for one to test whether the codes are correct, the input and output are tested. The key to successful, efficient testing is producing good test cases—test cases that are most likely to expose bugs. This task is hard because the input possibilities accepted by a nontrivial program are, for all practical purposes, infinite. Thus we must find a way to reduce the number of possible test cases into a smaller, more manageable set that is still effective at exposing any potential bugs.
Application of low and high pass filters
There is minimal difference between the original image and the output from the filter this makes it a low pass filter. This filter has only enlarged margins of the image without altering the appearance of the image.
This a low pass filter
Both filter_c = [1 1 1; 1 -8 1; 1 1 1]; and filter_d = [0 1 0; 1 -4 1; 0 1 0]; are high pass filters. This is because they are both blurred and clarity of image has disappeared. This filters can be noted to have a centre cell that has a negative value has a different weight value as compared to other cells. Image that comes from filter_d has more generalized the features while the output from filter_c has edge enlargement with discontinuities in some of the features. The other notable comparison is that both images have been enlarged
Effects of low pass filters and its application - low pass filters can be used to improve the quality of an image that has high frequencies. In this case an image is softened as well as the craters of the images fades away leaving a clearer image. This process is applied to images that have been taken under too much light and have a shadow that needs to be removed. the image needs to be filtered using a low pass filter so that the deep shadows can be removed to make image clearer. This is done images taken out-door where there is too much light. Cameras that are used by journalist especially those covering events have been made with this technology.
Effects of high pass filters and the application of the process - this is makes a normal image blur. It makes the image sharper by reducing the colour because it allows high frequency features to be detected. This can be used on images taken indoors. The low frequency features of the image are enhanced while maintaining high frequency features. This ensures an image that is not clear is made clearer but a clear image can be made useless by this filter. The output image in this two filters is sharpened at the same time it is obscured this makes a normal image look abnormal. A close look at the two images and the original one will note that they have been filtered to produce a radically modified which its edges are emphasised.
Two images from internet- Edge detection is very important as it enables users detect boundaries of an image and those area that are irrelevant to the image especially those area with high light that needs to be removed. When an image is filtered its gray-scale image has some areas with great brightness than the original image. The two images obtained from internet are used in this case to detect edge are as shown below;
In the images shown above some features did not occur from the original image. In the filter that filtered the image has same values of zeros or sum up to zero in cells that are neighbouring each other except those in the centre.
The two images that their edges are not detected are as shown below;
Creating and applying personalised filter
The student number used in this case is 564504 which generates the following personal filter
filter_e = [5 6 4; 0 0 0; 1 -6 -1]; derived as follows
This filter will be used to filter the image so as to identify whether low or high pass filter. The filtered image done is compared with the original image as shown below;
Form the image one can state that the filter is a low pass filter because image is not blurred as in the case of high pass filters and it smoothened. The images pixels are harmonised because the filter allowed features of low frequency to retain as they were as well as reducing high frequency features. High frequency information is the dark pixels within the image and this are reduced.
Effects of personalised filter and its use
The personalised filter used in this case attenuated the image’s dark pixels. This was done by averaging all the images pixels to produce a clear image with uniform pixels. The personalised filter allowed minimum light to pass thus allowing low frequency features to be retained and remove high frequency information in the image. This keeps the image similar to the original by stressing some brightness trend in the image. It should be noted that it is used in images that requires its frequencies to be reduced to have a quality image other it be blurred and degraded if the image did not require smoothing. Thus it is used one needs to study the image to know which filter is required to have a quality image.
Works cited
Laplacian Edge Detection. Apr. 2011. 30 Nov. 2012
Bourke, Paul. Image Filtering in the Frequency Domain. June. 1998. 30 Nov. 2012. < http://paulbourke.net/miscellaneous//imagefilter/>
Appendix
calc.conv.m
functionNewPixelValue = CalcConv(imSegment, filter)
%
% This function is needs to calculate the new pixel value by calculating
% the sum of the convolution of the filter with the image segment.
%
% You will need to code this function for the filtering process to work.
%
% Input: imSegment - the segment of the orginal image to which the
% filter is currenly being applied
% filter - the filter being applied
%
% Output: NewPixelValue the value of the pixel in the new filtered image
%
%%
multiplication = imSegment.*filter; % we now multiply the two matrices together
% calcualte the sum of the element wise multiplication
multiplication = multiplication(:); %to position all the numbers in one row to get them ready to be summed.
multiplication = sum(multiplication); % to add the number of the new varibaleNumberMulti
filter = filter(:); % to position all the numbers in one row to get them ready to be summed
filter = sum(filter); % to add the number of filter
% normalise for any offset (bais) the filter may create
normalised = multiplication/filter; % to normalise.
% return NewPixelValue
NewPixelValue = normalised; % to get result of the new matrix.
assignment
% This is the master script for the
% Continual Assessment Exercice - Assignement 2
% Multimedia Communications EG-371
% Speech and Image Communications EG-348
%
% You will need to edit this script to aplly different filters to different
% images
%
%% In this section an image is read into the program and displayed
im = imread('ID-1008575.jpg'); % change the image here to apply filters to different images
if size(im,3) == 3
im = rgb2gray(im); % convert the image to gray if it is colour
end
imshow(im)
fprintf('Displaying orginal image\n');
pause;
%% in this section you will need to define the filters that have not been defined
filter_a = [1 1 1; 1 1 1; 1 1 1];
filter_b = [1 3 1; 3 16 3; 1 3 1];
% place the definition of your filter_c here
filter_c = [1 1 1; 1 -8 1; 1 1 1];
% place the definition of your filter_d here
filter_d = [0 1 0; 1 -4 1; 0 1 0];
% place the definition of your personal_filter here
filter_e = [5 6 4; 0 0 0; 1 -6 -1];
%% In this section you need to apply filters b) c) d) and your personal filter.
% a) is already given as an example. NOTE running this code will give an error until
% CalcConv.m is complete.
output_mat = ConvImageFilter(im, filter_a);
outputIm = mat2gray(output_mat, [0 255]); % this line is need to convert a matrix to a gray image in Matlab
imwrite(outputIm,'outIm_a.jpg'); % this line writes the image to a file in the current directory, remember to chage this file name for the different results.
imshow(outputIm); % this line displays the image in the Matlab viewer
fprintf('Displaying filtered image\n');
pause;
Read
More
Share:
sponsored ads
Save Your Time for More Important Things
Let us write or edit the assignment on your topic
"Effects of Personalized Filter and Its Use"
with a personal 20% discount.