Question: In the following code, please note the missing sections labeled ? 1 , ? 2 and ? 3 . function newdata = examQuestion ( filelocation

In the following code, please note the missing sections labeled ?1,?2 and ?3.
function newdata = examQuestion (filelocation)
data = imread(filelocation);
[m,n,~]= size(data);
newdata =data;
for i =1:m
for j =1:n
newdata(i,j,1)= data(?1); % Green to Red
newdata(i,j,2)= data(?2); % Blue to Green
newdata(i,j,3)= data(?3); % Red to Blue
end
end
The final image newdata is supposed to be almost the same as data with color layers reshuffled as described in the comments, which of the following should replace the missing sections?
Group of answer choices
?1 should be (i,j,2),?2 should be (i,j,3),?3 should be (i,j,1),
?1 should be (i,j,1),?2 should be (i,j,2),?3 should be (i,j,3),
?1 should be (i,j,3),?2 should be (i,j,2),?3 should be (i,j,1),
?1 should be (i,j,2),?2 should be (i,j,1),?3 should be (i,j,3),

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!