Question: Write a script which imports the image ( cracked _ wall.jpg ) and filter the image: Hint: the resulting image should have a single channel

Write a script which imports the image (cracked_wall.jpg) and filter the image:
Hint: the resulting image should have a single channel (it will be a grayscale image). You may also have to convert your uint8() matrix into the datatype double() before doing this.
Hint: there will be other parts of the image that still shows. We call this noise and that is acceptable.
Script ?
im = imread('cracked_wall.JPG');
im =1 imread(' cracked__ im_gray = rgb2gray(im) figure;
figure;
subplot (1,3,1) imshow(im gray)
imshow('im_gray)
im_ratio =double(im(:,:,1))+double(im(:,:,2))+double(im(:,:,3))3;
subplot (1,3,2)
imshow (im_ratio, [])
title('imratio Image')
threshold =1.9
im_out = im_ratio > threshold
subplot (1,3,3)
title('Filtered Image (Red Cracks)')
figure
imshow (im .* uint8(cat (3, im_out, im_out, im_out)))
imshow(im .* uint8(cat(3, im_out, im_out, im_out))) title('Original Image with Red Cracks Highlighted')
Previous Assessment: 2 of 4 Tests Passed (50%)
Correct im_gray
( Correct im_ratio
Variable im_ratio has an incorrect value.
Incorrect im_ratio. Remember that im-ratio is the ratio of the red channel over the mean of the three channels!
( Correct im_out
Variable im_out must be of data type double. It is currently of type logical. Check where the variable is assigned a value.
Incorrect im_out. Remember that im_out only show elements with im_ratio >1.9
 Write a script which imports the image (cracked_wall.jpg) and filter the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!