1 / 15

영상처리개론 실습

영상처리개론 실습. By Matlab. 목적. 기본적인 함수 소개 Matlab 으로 겪을 멘붕 감소. 설치. 설치 + 로그인 필요 세부 사항은 Doc 파일 참조. 실 행. 기본 함수. img = imread ('cameraman.bmp'); Image 파일을 불러온다 . Img 배열의 차원과 크기는 가로 * 세로 *3 : 3 차원 [N,M,Q] = size( img ); Img 배열의 크기를 구한다 imwrite ( img , ‘new_cameraman.bmp ');

lesley-levy
Download Presentation

영상처리개론 실습

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 영상처리개론 실습 By Matlab

  2. 목적 • 기본적인 함수 소개 • Matlab으로 겪을 멘붕 감소

  3. 설치 • 설치+로그인 필요 • 세부 사항은 Doc 파일 참조

  4. 실행

  5. 기본 함수 • img= imread('cameraman.bmp'); • Image 파일을 불러온다. • Img배열의 차원과 크기는 가로*세로*3 : 3차원 • [N,M,Q] = size(img); • Img배열의 크기를 구한다 • imwrite(img, ‘new_cameraman.bmp'); • Img배열을 new_cameraman.bmp 파일에 쓴다.

  6. 기본 함수 • for i=1:10end; • i~10까지 반복 • ; (세미콜론) • 대부분의 줄 끝에 붙임. • 붙이지 않아도 오류가 나진 않는다. 다만 그 줄의 결과값을 출력한다. • 디버깅시사용 • Disp(‘asdjlfaksjdlkasd’); • 출력 함수

  7. 멘붕 시작

  8. uint8

  9. 해결법1 • 모든 식의 중간 값, 계산 결과가 255를 넘지 않도록 한다

  10. 해결법2 • 새 배열 만들기

  11. 해결법2 • Matlab의 배열은 처음 만들어진 순간에 배정된 값으로 최적화 된다. • 따라서 새 배열을 만들면 큰 값도 저장할 수 있게 자동으로 조정된다.

  12. 멘붕season2

  13. 해결법2 - 이미지파일 생성 실패

  14. Uint8 again • Imwrite하기 전에 uint8로 다시 형 변환을 시켜주어야 한다. • 왜 이미지 파일을 받을 때부터 형 변환을 하지 않았을까? • 이미지 파일을 로딩한 배열은 여러 번 사용된다. • Double로 바꿔야 한다면?

More Related