Tuesday, June 24, 2008

Assignment # 8, question 4 and 5 (finished)

Question#4

If we enlarge an image beyond its original size, GIMP calculates the missing pixels by interpolation, but it does not add any new detail. The more an image is enlarged, the more blurred it becomes. The appearance of an enlarged image depends upon the interpolation method we choose.

To change the image size, either some pixels have to be removed or new pixels must be added. The process you use determines the quality of the result. The Interpolation drop down list provides a selection of available methods of interpolating the color of pixels in a scaled image:
Interpolation
• None: No interpolation is used. Pixels are simply enlarged or removed, as they are when zooming. This method is low quality, but very fast.
• Linear: This method is relatively fast, but still provides fairly good results.
• Cubic: The method that produces the best results, but also the slowest method.
Sinc (Lanczos 3): New with GIMP-2.4, this method gives less blur in important resizings.

http://docs.gimp.org/en/gimp-image-scale.html


Question # 5

>> A=imread('Start.jpg');
>> B=decrease2(A,.8);
C=decrease2(A,.6);
D=decrease2(A,.4);
E=decrease2(A,.2);
>>
>> size(A)

ans =

512 768 3

>> size(B)

ans =

409 614 3

>> size(C)

ans =

307 460 3

>> size(D)

ans =

204 307 3

>> size(D)

ans =

204 307 3

>> B=255*B;
C=255*C;
D=255*D;
E=255*E;
A(52:size(B,1)+(52-1),77:size(B,2)+(77-1),:)=B;
A(52*2:size(C,1)+(52*2-1),77*2:size(C,2)+(77*2-1),:)=C;
A(52*3:size(D,1)+(52*3-1),77*3:size(D,2)+(77*3-1),:)=D;
A(52*4:size(E,1)+(52*4-1),77*4:size(E,2)+(77*4-1),:)=E;
image(A)





No comments: