Devlog

7-1장 흑백 반전(Image Reversal)

ImgPos=Imread('lena_gray.bmp');
imgFullWhite = 255 * ones(512,512);
imgNeg = imgFullWhite - double(imgPos);
figure, subplot(1,2,1);
imshow(imgPos, colormap(gray(256)));
title('Postive image');
subplot(1,2,2);
imshow(imgNeg, colormap(gray(256)));
title('Negative image');

 

 

 

7-2장 비트 평면 분할

mg = double(imread('Lenna.jpg'));

bp0 = mod(img,2);
bp1 = mod(fllor(img/2),2);
bp2 = mod(fllor(img/4),2);
bp3 = mod(fllor(img/8),2);
bp4 = mod(fllor(img/16),2);
bp5 = mod(fllor(img/32),2);
bp6 = mod(fllor(img/64),2);
bp7 = mod(fllor(img/128),2);

figure;

subplot(3,3,1); imshow(bp0); title('bit plane0');
subplot(3,3,2); imshow(bp1); title('bit plane1');
subplot(3,3,3); imshow(bp2); title('bit plane2');
subplot(3,3,4); imshow(bp3); title('bit plane3');
subplot(3,3,5); imshow(bp4); title('bit plane4');
subplot(3,3,6); imshow(bp5); title('bit plane5');
subplot(3,3,7); imshow(bp6); title('bit plane6');
subplot(3,3,8); imshow(bp7); title('bit plane7');

 

 

profile

Devlog

@덩이

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

검색 태그