Presentation is loading. Please wait.

Presentation is loading. Please wait.

제 3 장 영역 기반 처리.

Similar presentations


Presentation on theme: "제 3 장 영역 기반 처리."— Presentation transcript:

1 제 3 장 영역 기반 처리

2 영역 기반 처리 입력 화소와 그 주위 화소를 이용하여 출력 화소값을 결정 회선(convolution) 기법을 널리 이용
영역 기반 처리 예 흐리게 하기, 선명하게 하기, 경계선 검출, 잡음 제거

3 회선 출력 픽셀 값 입력 픽셀과 그 주위 픽셀 값에 회선 마스크의 값을 곱하여 합한 값

4 f 회선 수행 방법 좌측 상단의 픽셀부터 한 픽셀 씩 차례로 수행 먼저 우측 방향으로 진행 한 줄이 끝나면 아래 줄로 이동

5 마스크를 이용한 회선 연산의 예 1 ? Original Source: D. Lowe

6 마스크를 이용한 회선 연산의 예 1 Original Filtered (no change) Source: D. Lowe

7 마스크를 이용한 회선 연산의 예 1 ? Original Source: D. Lowe

8 마스크를 이용한 회선 연산의 예 1 Original Shifted left By 1 pixel Source: D. Lowe

9 마스크를 이용한 회선 연산의 예 ? 1 Original Source: D. Lowe

10 마스크를 이용한 회선 연산의 예 1 Original Blur (with a box filter) Source: D. Lowe

11 - ? 마스크를 이용한 회선 연산의 예 2 1 (Note that filter sums to 1) Original
2 1 ? (Note that filter sums to 1) Original Source: D. Lowe

12 - 마스크를 이용한 회선 연산의 예 2 1 Original 선명화 필터 지역적 평균을 이용한 차이 강조 효과
2 1 Original 선명화 필터 지역적 평균을 이용한 차이 강조 효과 Source: D. Lowe

13 영상 흐리게하기 입력 픽셀 값을 주위 픽셀 값들과의 평균 값으로 변환하는 다음과 같은 회선 마스크를 널리 사용 평균 마스크

14 영상 흐리게 하기 예 3X3 마스크 적용 5X5 마스크적용 입력영상

15 박스 마스크를 이용한 영상 흐리게 하기 아래 그림에서 무엇이 문제인가 ? 해결 방법은 ? Source: D. Forsyth

16 가우시안 마스크 (Gaussian Kernel)
5 x 5,  = 1 커널 함수의 상수 부분은 마스크 가중치들의 합이 1이 되도록 한다 (can be ignored when computing the filter values, as we should renormalize weights to sum to 1 in any case) Source: C. Rasmussen

17 가우시안 (Gaussian) vs. 박스 (box) 마스크

18 가우시안 스무딩 (Gaussian smoothing)
original smoothed (5x5 Gaussian) smoothed – original (scaled by 4, offset +128)

19 영상의 선명화 선명한 영상 생성을 위한 회선 마스크 -1 5 -1 9 마스크 1 마스크 2

20 선명화 적용 예 입력 영상 마스크 1 적용 마스크 2 적용

21 선명화 적용 예 before after

22 선명화 적용 예

23 경계선 검출 경계선 입력 영상에 대한 많은 정보 포함 물체를 식별하고 물체의 위치, 모양, 크기 등을 인지하는 데 큰 역할
영상의 밝기가 낮은 값에서 높은 값으로 또는 높은 값에서 낮은 값으로 변하는 지점에 존재

24 에지 유형 에지는 여러 요인에 의해 만들어 진다 : surface normal discontinuity
depth discontinuity surface color discontinuity illumination discontinuity Source: Steve Seitz

25 미분 연산자

26 경계선 검출 회선 마스크 미분 연산을 회선 마스크로 표현 가능 수평 경계선 수직 경계선 Prewitt Roberts Sobel
수평 경계선과 수직 경계선을 개별적으로 검출 수평 경계선 수직 경계선 Prewitt Roberts Sobel

27 경계선 검출 결과 입력영상 Sobel Prewitt Roberts

28 경계선 검출 결과 (Canny Edge Detector)
original image (Lena)

29 경계선 검출 결과 (Canny Edge Detector)
norm of the gradient

30 경계선 검출 결과 (Canny Edge Detector)
thresholding

31 (non-maximum suppression)
경계선 검출 결과 (Canny Edge Detector) thinning (non-maximum suppression)

32 경계선검출 및 편집(edge detection & editing)
Elder, J. H. and R. M. Goldberg. "Image Editing in the Contour Domain," Proc. IEEE: Computer Vision and Pattern Recognition, pp , June, 1998.

33 능동적 경계검출 모델(Active Contour Model)
Sometimes edge detectors find the boundary pretty well.

34 능동적 경계검출 모델(Active Contour Model)
Sometimes it’s not enough.

35 능동적 경계검출 모델(Active Contour Model)
적용 가능한 분야 :

36 능동적 경계검출 모델(Active Contour Model)
Interactive forces

37 Tracking Heart Ventricles
능동적 경계검출 모델(Active Contour Model) Deformable contours Tracking Heart Ventricles (multiple frames)

38 능동적 경계검출 모델(Active Contour Model)
Magnetic resonance image of the left ventricle of human heart

39 능동적 경계검출 모델(Active Contour Model)

40 능동적 경계검출 모델(Active Contour Model)

41 잡음 제거 잡음 가우시안 잡음 임펄스 잡음 정규 분포를 갖는 잡음
영상의 픽셀 값으로부터 불규칙적으로 벗어나지만 뚜렷하게 벗어나지 않는 잡음 임펄스 잡음 영상의 픽셀 값과는 뚜렷하게 다른 픽셀 값에 의한 잡음 0, 255와 같은 뚜렷하게 잘못된 밝기 값을 갖는 화소

42 잡음 예 가우시안 잡음 임펄스 잡음

43 잡음 제거 평균 마스크 가우시안 노이즈를 줄이는데 효과적 임펄스 노이즈에는 비효과적 영상의 대비를 약화시킴

44 잡음 제거 적용 예 평균 마스크를 이용한 잡음 제거 결과 가우시안 잡음 제거 결과 임펄스 잡음 제거 결과

45 잡음 제거 중간값 필터링 임펄스 잡음을 제거하기위한 효과적인 방법 경계선을 보존 또는 강화 출력 영상 픽셀값의 정렬 13 15
16 17 18 20 22 255 입력 영상 필터 윈도우 15 16 17 13 255 18 20 22

46 잡음 제거 적용 예 중간값 필터링을 이용한 잡음 제거 결과 가우시안 잡음 제거 결과 임펄스 잡음 제거 결과

47 워핑 &모핑 image #1 cross-fading image #2 warp warp morphing

48 워핑 &모핑

49 워핑 &모핑 Warp specification 1. 대응점을 이용하는 방법

50 워핑 &모핑 Warp specification 2. 대응선 (대응 벡터)을 이용하는 방법

51 워핑 &모핑 Warp specification 3. 대응되는 스플라인 제어점을 이용하는 방법

52 시점 모핑 (View Morphing)

53 파노라마 (panoramas)

54 영상 정렬 (Image alignment)
Image from

55 Why Panoramas ? Cartography: stitching aerial images to make maps
Manhattan, 1949 Why Panoramas ? Cartography: stitching aerial images to make maps

56 파노라마 영상은 ? Virtual reality : 임장감을 느낄 수 있다
Demo: Quicktime VR [Chen & Williams 95]

57 파노라마 영상은 ? 전체적인 넓은 시야 영상 제공 Consumer camera: 50˚ x 35˚ [Brown 2003]

58 파노라마 영상은 ? 전체적인 넓은 시야 영상 제공 [Brown 2003] Consumer camera: 50˚ x 35˚
Human Vision: 176˚ x 135˚ [Brown 2003]

59 파노라마 영상은 ? 전체적인 넓은 시야 영상 제공 [Brown 2003] Consumer camera: 50˚ x 35˚
Human Vision: 176˚ x 135˚ Panoramic mosaics: up to 360˚ x 180˚ [Brown 2003]

60 The First Panoramas … Paris, c. 1845-50, photographer unknown
San Francisco from Rincon Hill, 1851, by Martin Behrmanx

61 파노라마 영상 생성 원리 Goal: Combine pixels from multiple images to compute a bigger image.

62 시야 (Field of View) 확장 원리 P Q Camera Center

63 Example Camera Center

64 같은 영상 평면에 투영시키기 P 원하는 평면 위에 영상을 투영하기 위해 필요한 기법은 ? Scaling ?
Translation ? Rotation ? Affine transform ? Perspective projection ? Q Camera Center

65 같은 영상 평면에 투영시키기 P 원하는 평면 위에 영상을 투영하기 위해 필요한 기법은 ? Scaling Translation
The perspective projection depends on the camera intrinsics and rotation. P 원하는 평면 위에 영상을 투영하기 위해 필요한 기법은 ? Scaling Translation Rotation Affine transform Perspective projection Q Camera Center

66 Why Rotation about Camera Center ?
Perspective projection for stitching does not depend on depth of scene points (what does it depend on ?) There is no occlusion / disocclusion P Q Camera Center

67 Aligning Images How can we find the homographies required for stitching ? From calibration parameters Works, but these aren’t always known What’s the relation between corresponding points?

68 Perspective warps (Homographies)
p1 ≈ K P P (X, Y, Z) (x, y) p1 Camera Center (0,0,0)

69 Perspective warps (Homographies)
p1 ≈ K P p2 ≈ K R P P (X, Y, Z) p1 p2 (x’, y’) Camera Center (0,0,0)

70 Perspective warps (Homographies)
Note that equality everywhere is defined up to a scale since we’re using homogeneous coordinates. p1 ≈ K P p2 ≈ K R P P K-1 p1 ≈ P p2 ≈ K R K-1 p1 3x3 Homography p1 p2 Camera Center (0,0,0)

71 호모그라피 (homographies)를 구하기 위해 ?
영상 연결 (stitching)을 위해 호모그라피를 구하는 방법은 ? 카메라 캘리브레이션 (calibration) 변수들로 부터 캘리브레이션 변수를 구하는 작업이 쉽지 않다 영상들 간에 특징들을 정합하여

72 호모그라피 구하기 How can we find the homographies required for stitching ?
From calibration parameters Works, but these aren’t always known 영상 간 특징 정합을 통해 구현 어떤 특징들을 정합할 것인가 ? 얼마나 많은 특징을 정합할 것인가 ?

73 호모그라피 구하기 영상간 어떤 특징을 정합할 것인가 ? Pixel values ? Canny edges ?
Harris Corners ? cvGoodFeaturesToTrack() ? SIFT features ? Hough lines ?

74 호모그라피 구하기 영상간 어떤 특징을 정합할 것인가 ? Pixel values Canny edges Harris Corners
cvGoodFeaturesToTrack() SIFT features Hough lines

75 특징 정합에 의한 호모그라피 구하기 p2 ≈ K R K-1 p1

76 Two linear equations per matching feature
특징 정합에 의한 호모그라피 구하기 p2 ≈ K R K-1 p1 Two linear equations per matching feature

77 SIFT 특징 정합 [Brown 2003]

78 RANSAC 알고리즘을 이용하여 이상점(outliers) 제거
[Brown 2003]

79 호모그라피를 이용하여 영상 연결 [Brown 2003]

80 솔기 (seams) 가 생기는 이유는 ? Differences in exposure Vignetting
How can we remove seams ? Pixels on opposite sides of a seam come from different images that overlap. The seam is the result of an abrupt transition from one image to another. To reduce seams, we can use weighted averages of pixels from different images in the region of overlap. Differences in exposure Vignetting Small misalignments [Brown 2003]

81 다해상도 블렌딩 (Multi-band Blending)
[Burt and Adelson 1983] Multi-resolution technique using image pyramid Hides seams but preserves sharp detail [Brown 2003]

82 Panoramic Stitching Algorithm
Here are the steps of the stitching algorithm we have discussed. You can implement this! What’s the time complexity ? Input: N images from camera rotating about center Find SIFT features in all images For adjacent images: Match features to get correspondences Eliminate outliers using RANSAC Solve for homography Project images on common “image plane” Blend overlapping images to obtain panorama Time complexity = O(N * RANSAC cost)


Download ppt "제 3 장 영역 기반 처리."

Similar presentations


Ads by Google