SHARE
TWEET

Untitled

a guest Jun 19th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Circuit1 = imread('Circuit.jpg');
  2. figure;
  3. med3 = medfilt2(Circuit1, [3 3]);
  4. med5 = medfilt2(Circuit1, [5 5]);
  5. subplot(1,2,1);
  6. imshow(med3);
  7. title('3x3 medfilt2 filtering');
  8. subplot(1,2,2);
  9. imshow(med5);
  10. title('5x5 medfilt2 filtering');
  11.  
  12. disp('---Finished Problem 1d----');
  13. pause;
  14.  
  15. %Problem 1e
  16. OriginalImage = im2double(imread('Moon.jpg'));
  17. figure;
  18. lap = -1 * ones(3);
  19. lap(2,2) = 8;
  20. FilteredImage = conv2(OriginalImage, lap, 'same');
  21. EnhancedImage = OriginalImage - FilteredImage;
  22.  
  23. figure;
  24. subplot(2,2,1);
  25. imshow(OriginalImage);
  26. title('Original Image');
  27.  
  28. subplot(2,2,2);
  29. imshow(FilteredImage);
  30. title('Laplacian Image');
  31.  
  32. %subplot(2,2,3);
  33. %imshow(ScaledImage);
  34. %title('Scaled Laplacian');
  35.  
  36. subplot(2,2,4);
  37. imshow(EnhancedImage);
  38. title('Enhanced image');
  39.  
  40. disp('----Finished Problem 1e----');
  41. pause;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top