[2019-1] 디지털영상처리1 7장 과제

2021. 8. 12. 01:27·학교

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');

 

 

'학교' 카테고리의 다른 글

[2019-1] 자바프로그래밍 과제  (0) 2021.08.12
[2019-1] 디지털영상처리1 8장 과제  (0) 2021.08.12
[2019-1] 디지털영상처리1 6장 과제  (0) 2021.08.12
[2019-1] 멀티미디어통신 과제  (0) 2021.08.12
[2018-1] 비주얼프로그래밍1 프로젝트  (0) 2021.08.12
'학교' 카테고리의 다른 글
  • [2019-1] 자바프로그래밍 과제
  • [2019-1] 디지털영상처리1 8장 과제
  • [2019-1] 디지털영상처리1 6장 과제
  • [2019-1] 멀티미디어통신 과제
덩이
덩이
찍먹 대마왕
  • 덩이
    Devlog
    덩이
  • 전체
    오늘
    어제
    • 분류 전체보기 (118)
      • 강의 (68)
        • SAP ERP (11)
        • KOSTA (32)
        • Inflearn (0)
        • etc (25)
      • 회사 (0)
        • 스터디 (3)
        • 전자정부 (0)
      • 학교 (15)
      • 스터디 (30)
        • 알고리즘 (25)
        • 프로젝트 (3)
        • 에러 (2)
        • 자격증 (0)
      • 기타 (2)
        • 자료 (1)
        • 회고록 (1)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

    • GitHub
    • Naver
  • 공지사항

  • 인기 글

  • 태그

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
덩이
[2019-1] 디지털영상처리1 7장 과제
상단으로

티스토리툴바