블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
  • total
  • today
  • yesterday

Category

'Filter'에 해당되는 글 2건

  1. 2010.04.04 OpenCV: cvFilter2D() 연습 코드
  2. 2010.04.03 OpenCV: cvSobel() 연습 코드 3
2010. 4. 4. 00:00 Computer Vision
http://en.wikipedia.org/wiki/Convolution

void cvFilter2D(const CvArr* src, CvArr* dst, const CvMat* kernel, CvPoint anchor=cvPoint(-1, -1))

Convolves an image with the kernel.

Parameters:
  • src – The source image
  • dst – The destination image
  • kernel – Convolution kernel, a single-channel floating point matrix. If you want to apply different kernels to different channels, split the image into separate color planes using Split and process them individually
  • anchor – The anchor of the kernel that indicates the relative position of a filtered point within the kernel. The anchor shoud lie within the kernel. The special default value (-1,-1) means that it is at the kernel center



elt3470@naver: 사용자가 kernel에 원하는 행렬을 입력함으로써, LPF, HPF 등을 직접 디자인해서 사용할 수 있습니다.

=> 그러므로,
DoG (Derivative of Gaussian) 필터도 만들어 넣을 수 있다.



예로, 5x5 Gaussian  kernel을 만들어서 필터링하면 다음과 같이 영상을 smoothing하게 된다.

ref. 
2010/04/03 - [Visual Information Processing Lab] - Image Filtering





입력 영상

흑백 영상

2차원 5x5 Gaussian convolution 영상 (smoothing)



'Computer Vision' 카테고리의 다른 글

virtual studio 구현: line fitting test  (0) 2010.04.06
virtual studio 구현: gradient filtering  (0) 2010.04.04
Image Filtering  (0) 2010.04.03
OpenCV: cvSobel() 연습 코드  (3) 2010.04.03
OpenCV: CV_IMAGE_ELEM  (0) 2010.04.02
posted by maetel
2010. 4. 3. 22:27 Computer Vision
OpenCV 2.0 C++ reference - Image Filtering


void cvSobel(const CvArr* src, CvArr* dst, int xorder, int yorder, int apertureSize=3)

Calculates the first, second, third or mixed image derivatives using an extended Sobel operator.

Parameters:
  • src – Source image of type CvArr*
  • dst – Destination image
  • xorder – Order of the derivative x
  • yorder – Order of the derivative y
  • apertureSize – Size of the extended Sobel kernel, must be 1, 3, 5 or 7


간단한 예로, 다음과 같은 (1차 미분, 크기3의) 마스크를 적용하면,

x방향 Sobal mask:

\vecthreethree {-1}{0}{1} {-2}{0}{2} {-1}{0}{1}


y방향 Sobel mask:

\vecthreethree {-1}{-2}{-1} {0}{0}{0} {1}{2}{1}






입력 영상

흑백 영상

x방향 Sobel 마스크로 필터링한 영상

y방향 Sobel 마스크로 필터링한 영상




입력 영상

흑백 영상

x방향 Sobel 마스크로 필터링한 영상

y방향 Sobel 마스크로 필터링한 영상




'Computer Vision' 카테고리의 다른 글

OpenCV: cvFilter2D() 연습 코드  (0) 2010.04.04
Image Filtering  (0) 2010.04.03
OpenCV: CV_IMAGE_ELEM  (0) 2010.04.02
OpenCV: cvFindContours  (0) 2010.04.02
Harris corner detector  (0) 2010.03.31
posted by maetel