script1 - imshow(moon); %To just get the moon and not the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%write a script that takes in a small picture and copies it into a larger %picture. For this example, use the eiffel tower and moon pics that I DONT %HAVE! eiffel = imread('eiffel.jpg'); moon = imread('moon.jpg'); newMoonWidth = 150; [moonR, moonC, clr] = size(moon); factor = newMoonWidth./moonC; moon = scaleImg(moon, factor);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: imshow(moon); %To just get the moon and not the background; true where moon is: thresh = 10; layer = moon(:,:,1) >= thresh | moon(:,:,2) >= thresh | moon(:,:,3) >= thresh; mask = cat(3, layer, layer, layer); eiffel = pasteInto(moon, eiffel, 50, 50) imshow(eiffel)...
View Full Document

This note was uploaded on 10/05/2011 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.

Ask a homework question - tutors are online