1) Smooth image with a Gaussian
- optimizes the trade-off between noise filtering and edge 2) Compute the Gradient magnitude using approximations of partial derivatives
- 2x2 filters
3) Thin edge by applying non-maxima suppression to the gradient magnitude
4) Detect edges by double thresholding
- optimizes the trade-off between noise filtering and edge 2) Compute the Gradient magnitude using approximations of partial derivatives
- 2x2 filters
3) Thin edge by applying non-maxima suppression to the gradient magnitude
4) Detect edges by double thresholding
- //
- <div><br>
- int imageWidth = 512; // 영상의 가로 크기 <br>
- int imageHeight = 512; // 영상의 세로 크기 <br>
- int depth = 1; // 1 = 흑백 영상, 3 = 컬러 영상 </div>
- <div> unsigned char *dx; // 입력 영상의 기억 장소에 대한 포인터 변수 <br>
- unsigned char *dy; // 출력 영상의 기억 장소에 대한 포인터 변수 <br>
- unsigned char *m; // flag 변수 </div>
- <div> dx= (unsigned char *) malloc(imageWidth * imageHeight * depth); <br>
- dy= (unsigned char *) malloc(imageWidth * imageHeight * depth);<br>
- m = (unsigned char *) malloc(imageWidth * imageHeight * depth);</div>
- <div> char *inpath = "lena512gray_Gnoise.pgm"; //output file path<br>
- <br>
- int x, y, i, sta, end = 12;<br>
- int value;</div>
- <div> int sigma = 1;<br>
- int fs = 6; //Filter size = fs*2 +1<br>
- double filter1[7] = {0.004432, 0.053991, 0.241971, 0.398942, 0.241971, 0.053991, 0.004432}; //16<br>
- double filter2[13] = {0.002216, 0.008764, 0.026995, 0.064759, 0.120985, 0.176033, 0.199471, <br>
- 0.176033, 0.120985, 0.064759, 0.026995, 0.008764, 0.002216};</div>
- <div> for(ubt</div>
- <div> <br>
- </div>
'Part 3 > ¶ 강의자료' 카테고리의 다른 글
마이크로프로세스및실습 (0) | 2011.09.08 |
---|---|
기업학습조직론 강의자료 (0) | 2011.09.08 |
컴퓨터 비젼 강의자료 (0) | 2011.09.08 |