Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB I have this code so far, the object of the assignment is to take the image Parkes.png, resize it and turn it into four

MATLAB

image text in transcribed

I have this code so far, the object of the assignment is to take the image "Parkes.png", resize it and turn it into four images in a sort of four-square type box. One is supposed to be gray, one is supposed to be gray-from-mean, and one is supposed to be edges, the last is the original image.

The issue I'm having is with concatenation, I'm not sure how to specify the dimensions for concatenation with the different filters on these images. This is the error message I'm receiving:

Error using horzcat Dimensions of matrices being concatenated are not consistent.

Error in test (line 17) imshow([F1,F2])

Please note, I am supposed to achieve this using concatenation, not subplot. The images are supposed to be in a 2x2 style setup, with touching edges, like shown below. My code all seems to work until the concatenation at the end, I am unsure of how to set the boundaries so that they work for concatenation.

My code is as follows:

O =imread('Parkes.png'); R = imresize(O,0.25);

%RGB I1 = R; %gray I3 = rgb2gray(R); %edge I4 = edge(I3,'sobel'); I4 = uint8(I4.*255); %gray from mean I2 = mean(R,3); I2 = uint8(I2);

F1 = cat(3,I1,I2); F2 = cat(2,I3,I4); imshow([F1,F2]) imshow([I1,I2,I3,I4])

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions