Edge Detection - Sobel
sobel은 많이 쓰이는 edge detection 알고리즘중의 하나이다.기본적으로 edge는 x, y direction을 구하고 이를 이용하여 magnitude을 구하여 이를 표시하면 edge을 구할수 있다.plus, x, y direction 을 이용하여 edge direction을 구할 수 있다. 또 하나의 중요한 것은 mask단위이므로 convolution 연산을 한다는 것이다. sobel mask magnitude angle 소스 보기 int w = image->width; int h = image->height; // soble x, y int sx[3][3] = { {-1, 0, 1}, {-2, 0, 2}, {-1, 0, 1}}; int sy[3][3] = { {-1, -2, -1}, { 0..
더보기
bilinear interpolation
기본적으로 bilinear interpolation = interpolation을 3번 한 것이다. // interpolation // su,ev su,eu // c----------d // | | // | p(x,y) | // | | // a----------b // su,sv su,ev 이라면, pixel과 바로 옆 한 픽셀사이를 그 범위로 한다. 따라서 0~1 위치값으로 대변된다. interpolation의 기본식은(찾아보기 바람) 식(1) (1-p)*a+p*b 이때 a와 b는 pixel값이다. 예를 들어, 위의 그림에서 a(x, y)이면 b(x+1, y)란걸 인식해야한다.그러면, 식(2) (1-p)a+pb = (1-p)* I(x,y)+p*I(x,y) p는 무엇인가 interpolation의 wei..
더보기