Upload
naver-d2
View
2.716
Download
5
Embed Size (px)
DESCRIPTION
Citation preview
정보 추출을 위한 이미지 분석 - 분석의 장애물을 어떻게 극복할까?
민재식 부장 / 멀티미디어연구 lab / NAVER LABS
유사이미지 검색
이미지 분석으로 할 수 있는 일들
정보 연결
사물 검색 이미지 분류
photo
clipart
sketch
아트 효과
이미지 분석으로 할 수 있는 일들
정보 연결
사물 검색
유사이미지 검색
이미지 분류
photo
clipart
sketch
효과
무엇을 하든 이미지 분석은 필요
이미지 분석을 방해하는 요인
데이터 과다 조명 불량
배경
low-level 노이즈 high-level 노이즈 연산량
저화질
picture frame
text overlay
방향 노이즈
이미지 분석을 방해하는 요인
데이터 과다 조명 불량
배경
low-level 노이즈 high-level 노이즈 연산량
저화질
picture frame
text overlay
방향 노이즈
데이터의 과다
이미지가 너무 크다??
이미지 축소
처리
결과 확대 (or not)
사물 위치 검출 주요영역 추출 이미지 분류 대부분의 인식
…
이미지 축소
처리
결과 확대 (or not)
Image matting Image morphing
…
Mission – 피사체와 배경의 분리
Spectral Clustering (brief overview)
Construct N x N affinity matrix L
Get M eigenvectors of L
K-means clustering of M projections
Project to M eigenvectors
N p
q
Lpq
affinity matrix L
N (total # pixels)
(pixel p와 q의 affinity)
Spectral Clustering (brief overview)
Construct N x N affinity matrix L
Get M eigenvectors of L
K-means clustering of M projections
Project to M eigenvectors
bottleneck N p
q
Lpq
affinity matrix L
N (total # pixels)
(pixel p와 q의 affinity)
데이터 분량 줄이기 - superpixels
Superpixels --- What is it?
• 일종의 over-segmentation • 데이터 수를 줄이는 효과 (e.g., 350,000 pixels à 1,000 superpixels) • 만약 일반 pixel 처럼 grid 성질을 유지하면 다루기 쉬워서 유리함
727 x 480 pixels
38 x 25 superpixels
Superpixels - comparison
• Superpixel 간 grid 성질 유지하면 다루기 쉬움
• No need of nearest neighbor search • No need of defining geometric distance between superpixels
Watershed algorithm SLIC algorithm
vs.
Distance between superpixels
Watershed algorithm SLIC algorithm
vs.
or or … ? Distance
between centroids is OK
SLIC superpixels – HOW?
참조: Achanta et al., “SLIC Superpixels Compared to State-of-the-art Superpixel Methods”
• K-means clustering (K=1,000)
• Performed in local window
• Seeds at the minimum gradient
SLIC superpixels – compactness parameter
K=500, m=10
K=500, m=40
• Parameter m • Controls compactness • Low m à more color coherent • High m àmore compact
SLIC superpixels – number of pixels parameter
K=1000, m=20
K=2000, m=20
• Parameter K • The number of superpixels
SLIC superpixels 효과
2,000 개의 superpixels 만으로도 원본의 주요 특징은 유지
Spectral Clustering 결과 (without superpixels)
원본 727 x 480 결과 727 x 480
56 x 37 56 x 37 clustering on
reduced image 축소 확대
Spectral Clustering 결과 (with superpixels)
원본 727 x 480 결과 727 x 480
56 x 37 56 x 37 clustering on superpixels 축소 확대
Spectral Clustering 결과 (without superpixels)
원본 640 x 480 결과 640 x 480
53 x 40 53 x 40 clustering on
reduced image 축소 확대
Spectral Clustering 결과 (with superpixels)
원본 640 x 480 결과 640 x 480
53 x 40 53 x 40 clustering on superpixels 축소 확대
이미지 분석을 방해하는 요인
데이터 과다 조명 불량
배경
low-level 노이즈 high-level 노이즈 연산량
저화질
picture frame
text overlay
방향 노이즈
촬영된 사진을 만화처럼 만들어 주기
만화 효과 요소 • 음영을 빗살문양으로 처리 (펜터치 효과) • 준비된 포토 프레임을 덧씌워 효과 극대화
Manga Camera (아이폰 앱)
Manga Camera의 만화효과 생성과정
원본 edge 추출
어두운 부분 à black
중간 부분 à 빗살문양
최종
Line drawing methods
Edge vs. XDoG vs. FDoG
Edge + dark shade XDoG FDoG
방향 노이즈 제거 작업이 필요
Line drawing method - XDoG
Gσ (= G smoothed) DoG (= Gσ – p·Gkσ)
S (= Gσ + DoG)
XDoG 참조: Winnemoller et al., “XDoG - An eXtended difference-of-Gaussian compendium including advanced image stylization”
threshold
eXtended DoG (XDoG)
밝기의 변화를 강조
Line drawing method - XDoG
Gσ (= G smoothed) DoG (= Gσ – p·Gkσ) S (= Gσ + DoG)
XDoG
Noise가 발생하는 이유?
threshold
eXtended DoG (XDoG)
• DoG = Gaussian Smoothing with σ0 - Gaussian Smoothing with σ1 • 사람 망막에서 일어나는 메커니즘과 유사 (σ1 = 1.6 * σ0) • 밝기의 변화율이 강조됨. 하지만 노이즈 역시 강조됨
à 변화가 일어나는 방향으로만 강조한다면??
DoG
Difference of Gaussians (DoG)
Gradient and tangent orientation
Gradient orientation Tangent orientation
Gradient orientation : 색상, 밝기 변화량이 가장 큰 방향 Tangent orientation : gradient orientation의 수직 방향 (패턴의 흐름 방향)
Tangent flow map
Line drawing method - FDoG
Step 1: 1-D DoG를 gradient orientation 방향으로만 적용한다
à 전제조건: 방향이 정제된 flow map이 필요하다
Step 2: Step 1의 결과를 tangent flow를 따라 smoothing 한다
참조: Kyprianidis et al., “Image Abstraction by Structure Adaptive Filtering”
Flow-based DoG (FDoG)
Flow smoothing – 복잡한 방법
이미 구해진 flow map을 정제하는 작업은 복잡하다
average orientation
average orientation
x
o
case 1
case 2
magnitude의 차이가 크다면? orientation 여러 개를
smoothing 하려면?
case 3 case 4
Flow smoothing – 간단한 방법
by Sobel operator
(gij): Structure Tensor of image f
Eigenvalues of pixel (i,j)
Eigenvectors of pixel (i,j)
gradient tangent magnitude
Structure tensor
Flow smoothing – 간단한 방법
gradient tangent magnitude
Structure tensor
EFG 3-channel 이미지로 보관
by Sobel operator
(gij): Structure Tensor of image f
Eigenvalues of pixel (i,j)
Eigenvectors of pixel (i,j)
Flow smoothing - 결과
초기 tangent flow smoothed tangent flow
초기 tangent flow는 Sobel operator로 쉽게 구할 수 있음 하지만 각 픽셀의 tangent flow는 방향 노이즈가 많아 매끄럽지 않음
à Structure tensor image를 smoothing 한다
Flow smoothing – line drawing 적용결과
XDoG vs. FDoG
원본 XDoG FDoG
Flow smoothing – 활용 사례
Pen sketch 효과
Flow smoothing – 활용 사례
타일 모자이크 효과
Flow smoothing – 활용 사례
Horizon detection & leveling
horizon detection corrected image original (tilted horizon)
p
Tangent orientation of pixel p
이미지 분석을 방해하는 요인
데이터 과다 조명 불량
배경
low-level 노이즈 high-level 노이즈 연산량
저화질
picture frame
text overlay
방향 노이즈
Mission - 사진품질 자동측정
사진 DB, 개인앨범 고품질 사진
저품질 사진
폴더 대표사진 Best shot
삭제 보정
사진이����������� ������������������ 쌓이는����������� ������������������ 속도����������� ������������������ ����������� ������������������ >����������� ������������������ 정리,����������� ������������������ 관리의����������� ������������������ 속도����������� ������������������
사진 품질을 어떻게 측정하나?
사진의 품질 기준은 주관적이고 모호함
Semantic-level����������� ������������������
High-level����������� ������������������
Low-level����������� ������������������ 단순 구도
초점, 노출, 대비, 색상
복잡 구도 인물간 친밀관계 인물의 표정
예술성 무드
사진의 품질 제대로 판단하기
전체적으로����������� ������������������ 초점이����������� ������������������ 안����������� ������������������ 맞았음����������� ������������������ (X)����������� ������������������ ����������� ������������������ 피사체에����������� ������������������ 초점����������� ������������������ 제대로����������� ������������������ 맞았음����������� ������������������ (O)����������� ������������������
노출이����������� ������������������ 부족함����������� ������������������ (X)����������� ������������������ 어둡지만����������� ������������������ 노출����������� ������������������ 문제는����������� ������������������ 없음����������� ������������������ (O)����������� ������������������
콘트라스트가����������� ������������������ 강함����������� ������������������ (X)����������� ������������������ 콘트라스트가����������� ������������������ 약함����������� ������������������ (O)����������� ������������������
품질 오판단을 유도하는 high-level 노이즈
Picture frames
Text overlay
품질 오판단을 유도하는 high-level 노이즈
배경 또는 non-salient area도 품질측정 입장에서는 노이즈에 해당
이 영역의 low-level feature 값은 중요하지 않음
à 이미지 내 주요영역을 알아 낼 필요가 있다
주요영역 검출 (Salient area detection) - Saliency map
Saliency of pixel (i,j) : Sij = max of { Eij * Csij }
Eij : edge density Cs
ij : local color contrast in the neighborhood at scale s
참조: Achanta et al., “Salient Region Detection and Segmentation”
주요영역 검출 (Salient area detection)
주요영역의 low-level feature 값만으로 품질을 판단
Clustering of saliency map +
2D Gaussian modeling
품질측정 결과
하위 (percentile 90%)
상위 (percentile 10%
)
주요영역 검출 활용사례 - Thumbnail cropping
Thumbnail cropping의 문제
3:2 비율의 thumbnail 생성
Stretch ??
Crop? … Where?
원본
주요영역 검출 활용사례 - Thumbnail cropping
Random 가로/세로 비율로 crop (주요영역 놓치지 않도록)
원본 6 random thumbnails
주요영역 검출 활용사례 - Thumbnail cropping
주요영역 검출 활용사례 - Thumbnail cropping
Picture frame은 주요영역 검출 이전에 자동으로 제거
Summary – 분석의 장애물을 어떻게 극복할까?
데이터 과다 방향 노이즈
low-level 노이즈 high-level 노이즈 연산량
배경 picture frame
Superpixels
디테일 유지하면서 데이터 대량 감소
Flow smoothing
방향 노이즈를 간단하게 제거
주요영역 추출
분석 시 배경 등의 영향력을 감소
Q&A
THANK YOU