hi Fatemah
The function 'upsample' upsamples the image but inserts zeros in the
extrapolated regions. This is the reason you notice checkered appearance in the
image as the value '0' gives no (or dark) luminance.
Try repeating the previous values instead of inserting zeros.
I can give you a function to do this if you want it urgently. otherwise i would
suggest you to write a function to do this urself.
Regards
Praveen Kumar
***************************************************************************
hi everybody
>i have problem upsampling an image!
>this is my code:
>
>image_1=image(:,:,1);
>image_2=image(:,:,2);
>image_3=image(:,:,3);
>image_1_up=upsample((upsample(image_1,2))',2)';
>image_2_up=upsample((upsample(image_2,2))',2)';
>image_3_up=upsample((upsample(image_3,2))',2)';
>image_up(:,:,1)=image_1_up;
>image_up(:,:,2)=image_2_up;
>image_up(:,:,3)=image_3_up;
>imshow(image_up)
>
>but it shows an image like a checker board that is the same for all the
images!
>and i can downsample images with the same code(just change 'upsample'
to 'downsample')
>am i wrong in my code?