본문 바로가기

전체 글227

4개의 클래스 분류 with a perceptron 4개의 카테고리(클래스) 생성 후 input 데이터를 classifying 해보는 연습. Matlab code 테스트를 해보자 p에 1.3과 0.1을 넣게되면 net의 값으로 [1; 0]이 나온다 이것은 classB를 뜻한다.실제 p값이 클래스 B의 영역이 있으니 잘 classification했다. 2014. 12. 19.
bwperim() 함수 bwperim() 선 추출함수라고 할 수 있다. % binary 이미지를 load하여 bwperim을 통해 선만을 나타낸다 아래 예는 mathwork사이트의 예제 이다. Find the perimeter of objects in an image mask.BW1 = imread('circbw.tif'); BW2 = bwperim(BW1,8); imshow(BW1) figure, imshow(BW2)예를 들어0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 위와 같은 10x6 행렬이 있는데 (binary image) bwperim()함수를 적용하.. 2014. 12. 19.
linspace(a, b, n) 함수 linspace Generate linearly spaced vectorsSyntax y = linspace(a,b) y = linspace(a,b,n) Description The linspace function generates linearly spaced vectors. It is similar to the colon operator ":", but gives direct control over the number of points.y = linspace(a,b) generates a row vector y of 100 points linearly spaced between and including a and b.y = linspace(a,b,n) generates a row vector y of .. 2014. 12. 19.
[dlmwrite 함수] excel로 저장할때 데이터가 커서 오류가 날 경우 Excel returned: Error: Object returned error code: 0x800A03EC. 오류! 이미지 프로세싱을 하면서 엑셀로 파일을 저장하고 싶었다. xlswrite() 라는 함수를 사용해서 간단하게 저장했었는데이미지 프로세싱같은 큰 데이터를 저장하려하면 에러가 났다. excel help를 보면 엑셀에서 데이터를 저장할 때 크기 제한이 있기 때문이였다. 이런 저런 방법을 찾아보다가 dlmwrite 함수를 발견했다. Write a matrix to an ASCII delimited file 아스키로 규정된 파일 매트릭스를 저장하는 함수였다. 정의를 보겠다. Syntax dlmwrite(filename,M,delimiter) dlmwrite(filename,M,delimiter,R.. 2014. 12. 19.
반응형