Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imgorig = imread("image.png");
- img = rgb2gray(imgorig);
- x = length(img(:,1));
- y = length(img(1,:));
- for i=1:x
- for j=1:y
- zerone(i, j) = double(img(i, j))/25.5-5;
- imgf(i, j) = uint8(1/(1+exp(-zerone(i, j)))*255);
- endfor
- endfor
- subplot(1, 2, 1), imshow(img)
- subplot(1, 2, 2), imshow(imgf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement