Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. img1 = imread('D:\TAPI\Laborator 3-20170321\images\Fig3.jpg');
  2.  
  3. Ihsi=rgb2hsi(img1);
  4. i=Ihsi(:,:,3);
  5. h=Ihsi(:,:,1);
  6. s=Ihsi(:,:,2);
  7.  
  8. f=fspecial('average');
  9. so=fspecial('sobel');
  10. img_h =imfilter(i,so); %histeq(i);
  11.  
  12. hsi=cat(3,h,s,img_h);
  13. rgb=hsi2rgb(hsi);
  14.  
  15. subplot(1,3,1)
  16. imshow(img1)
  17.  
  18. subplot(1,3,2)
  19. imshow(rgb)
  20.  
  21. r=img1(:,:,1);
  22. g=img1(:,:,2);
  23. b=img1(:,:,3);
  24.  
  25. rh =imfilter(r,so);% histeq(r);
  26. gh = imfilter(g,so);%histeq(g);
  27. bh = imfilter(b,so);%histeq(b);
  28.  
  29. rgbh=cat(3,rh,gh,bh);
  30. subplot(1,3,3)
  31. imshow(rgbh)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement