Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Effects Of Reducing   Spatial Resolution
Spatial Resolution <ul><li>Equivalent to reduction in sampling rate. </li></ul><ul><li>Due to the reduction in sampling ra...
Input Image
After Reducing Sampling Rate… INPUT 256 X 256 Factor-2 Factor-4
Effects After Reshaping….
Cont…
Program Flow <ul><li>Get image & Reduction factor. </li></ul><ul><li>Reduce the sampling rate accordingly. </li></ul><ul><...
Program.. <ul><li>clc; </li></ul><ul><li>clear all; </li></ul><ul><li>close all; </li></ul><ul><li>%GET IMAGE,REDUCTION FA...
Cont… <ul><li>%REDUCING SAMPLING RATE </li></ul><ul><li>for i=0:(inp_width/factor)-1 </li></ul><ul><li>for j=0:(inp_height...
Cont.. <ul><li>%RESHAPING </li></ul><ul><li>for i=0:out_width-1 </li></ul><ul><li>for j=0:out_height-1 </li></ul><ul><li>f...
Upcoming SlideShare
Loading in …5
×

image processing-spatial resolution

6,047 views

Published on

This work is done to visualise the effects of reducing spatial resolution in images.
If you NEED this ,mail to me at,bagavath85@gmail.com

Published in: Technology, Business
  • Be the first to comment

image processing-spatial resolution

  1. 1. Effects Of Reducing Spatial Resolution
  2. 2. Spatial Resolution <ul><li>Equivalent to reduction in sampling rate. </li></ul><ul><li>Due to the reduction in sampling rate, image size gets reduced. </li></ul><ul><li>Check board effect. </li></ul><ul><li>Image reshaping is done for clear view of check board effect. </li></ul>
  3. 3. Input Image
  4. 4. After Reducing Sampling Rate… INPUT 256 X 256 Factor-2 Factor-4
  5. 5. Effects After Reshaping….
  6. 6. Cont…
  7. 7. Program Flow <ul><li>Get image & Reduction factor. </li></ul><ul><li>Reduce the sampling rate accordingly. </li></ul><ul><li>Reshape the resultant image back to its original size. </li></ul>
  8. 8. Program.. <ul><li>clc; </li></ul><ul><li>clear all; </li></ul><ul><li>close all; </li></ul><ul><li>%GET IMAGE,REDUCTION FACTOR & CONVERT TO GRAY SCALE </li></ul><ul><li>s=input('Enter image location:','s'); </li></ul><ul><li>factor=input('Enter reduction factor:'); </li></ul><ul><li>inp_img=imread(s); </li></ul><ul><li>check_rgb=isrgb(inp_img); </li></ul><ul><li>if check_rgb==1 </li></ul><ul><li>gry_map=rgb2gray(inp_img); </li></ul><ul><li>else </li></ul><ul><li>gry_map=imread(s); </li></ul><ul><li>end </li></ul><ul><li>gry_size=size(gry_map); </li></ul><ul><li>inp_width=gry_size(1,1); </li></ul><ul><li>inp_height=gry_size(1,2); </li></ul><ul><li>figure(1); </li></ul><ul><li>imshow(gry_map); </li></ul><ul><li>title(['GIVEN INPUT IMAGE : ',num2str(inp_width),'x',num2str(inp_height)]); </li></ul>
  9. 9. Cont… <ul><li>%REDUCING SAMPLING RATE </li></ul><ul><li>for i=0:(inp_width/factor)-1 </li></ul><ul><li>for j=0:(inp_height/factor)-1 </li></ul><ul><li>out(i+1,j+1)=gry_map(factor*i+1,factor*j+1); </li></ul><ul><li>end </li></ul><ul><li>end </li></ul><ul><li>out_size=size(out); </li></ul><ul><li>out_width=out_size(1,1); </li></ul><ul><li>out_height=out_size(1,2); </li></ul><ul><li>figure(2); </li></ul><ul><li>imshow(out); </li></ul><ul><li>title(['Resized Image']); </li></ul>
  10. 10. Cont.. <ul><li>%RESHAPING </li></ul><ul><li>for i=0:out_width-1 </li></ul><ul><li>for j=0:out_height-1 </li></ul><ul><li>for x=0:factor-1 </li></ul><ul><li>for y=0:factor-1 </li></ul><ul><li>final_out(factor*i+x+1,factor*j+y+1)=out(i+1,j+1); </li></ul><ul><li>end </li></ul><ul><li>end </li></ul><ul><li>end </li></ul><ul><li>end </li></ul><ul><li>figure(3); </li></ul><ul><li>imshow(final_out); </li></ul><ul><li>out_size=size(out); </li></ul><ul><li>final_out_size=size(final_out); </li></ul><ul><li>disp(final_out_size); </li></ul><ul><li>final_out_width=final_out_size(1,1); </li></ul><ul><li>final_out_height=final_out_size(1,2); </li></ul><ul><li>title(['AFTER REDUCING SPATIAL RESOLUTION BY FACTOR :',num2str(factor)]); </li></ul>

×