본문 바로가기

Enginius/Matlab

image (rgb2gray, im2bw, edge)

I = imread('test.bmp');


% 1. gray pic으로 바꾼다. 

Igray = rgb2gray(I);


% 2. 흑백사진(1 or 0)으로 바꾼다.

Ibw = im2bw(Igray, graythresh(Igray));


% 3. 사진의 edge를 분리시킨다. 

Iedge = edge(uint8(Ibw));



'Enginius > Matlab' 카테고리의 다른 글

contourf : Matrix의 값을 그림으로 보고 싶을 때  (0) 2012.08.01
max (find maximum values in matrix)  (0) 2012.06.11
Histogram 그리기(2d / 3d)  (2) 2012.05.31
Matlab에서 "Out of Memory" 해결하기  (5) 2012.05.24
newff  (0) 2011.11.07