Question: Write a matlab code that performs the following operations in order. 1. Read the image in the file named test.tif from the disk and assign
Write a matlab code that performs the following operations in order.
1. Read the image in the file named test.tif from the disk and assign it to the array A.
2. Apply the 3 x 3 Laplacian filter to image A, assign the result to array B.
3. Calculate the gradient magnitude of image A using Sobel operators and assign it to array C.
4. Apply the 3 x 3 averaging filter to image C, assign the result to array D.
5. Add image A to it, after multiplying images B and D, assign the result to array E.
6. Apply the intensity transformation given by the function s = 12 r^0.5 to array E and assign the result to array F.
7. With a suitable mask to detect 1-pixel thick lines in the horizontal direction in the F image
filter, assign result to array G
8. Threshold the G image by selecting a T threshold value of 0.95 times its maximum value and display the result on the screen.
What could be the purpose of the preprocessing applied in steps 2-6 above? What problems did it solve in the image and what effect did this have on the result of segmenting the lines?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
