Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the following code, please note the missing sections labeled ? 1 , ? 2 and ? 3 . function [ final ] = examQuestion

In the following code, please note the missing sections labeled ?1,?2 and ?3.
function [final]= examQuestion (mat)
[m,n,~]= size(mat);
final = uint8(zeros(?1));
for i =?2
if mod(i,2)==1% odd index
for j =1:n
final(i,j,1)= mat ((i+1)/2,j,1);
final(i,j,2)= mat ((i+1)/2,j,2);
final(i,j,3)= mat ((i+1)/2,j,3);
end
?3% even index
for j =1:n
final(i,j,1)= mat (i/2,j,1)/2+ mat (i/2+1,j,1)/2;
final(i,j,2)= mat (i/2,j,2)/2+ mat (i/2+1,j,2)/2;
final(i,j,3)= mat (i/2,j,3)/2+ mat (i/2+1,j,3)/2;
end
end
end
The final image is supposed to be extended along the vertical direction by inserting new row as average of neighboring rows. Which of the following should replace the missing sections?
Group of answer choices
?1 should be (2*m-1,n,3),?2 should be 1:2*m-1,?3 should be else
?1 should be (m,2*n-1,3),?2 should be 1:m,?3 should be end
?1 should be (2*m-1,2*n-1,3),?2 should be 1:2*m-1,?3 should be elseif mod(i,2)==0
?1 should be (2*m-1,n,3),?2 should be 1:m,?3 should be elseif

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

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

1. How might volunteering help the employer and the employee?

Answered: 1 week ago