Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. image = imread("papug.jpg");
  2. image_gray = rgb2gray(image);
  3. str = image_gray(1,:);
  4. col = image_gray(:,1);
  5. kont = double(image_gray)/25.5-5; #значения от -5 до 5
  6. for i=1:sizeof(col)
  7. for j=1:sizeof(str)
  8. kont1(i,j) = 1/(1+e^(-kont(i,j))); #график от -5 до 5
  9. endfor
  10. endfor
  11. kont2 = uint8(kont1*255);
  12. #kont3 =imadjust(image_gray);
  13. subplot(1,2,1), subimage(image_gray);
  14. subplot(1,2,2), subimage(kont2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement