Main Content

저조도 영상 향상하기

이 예제에서는 영상에서 밝은 영역의 과포화를 방지하면서 어두운 영역을 밝게 만드는 방법을 보여줍니다.

부실한 조명 조건 때문에 영상의 품질이 크게 저하될 수 있습니다. 이러한 영상은 동적 범위가 낮고 잡음 수준이 높아 컴퓨터 비전 알고리즘의 전반적인 성능에 영향을 줄 수 있습니다. 컴퓨터 비전 알고리즘이 저조도 조건에서도 제대로 작동하게 하려면 저조도 영상 향상 기능을 사용하여 영상의 가시성을 높이십시오.

저조도에서 촬영한 RGB 영상을 읽어 들이고 표시합니다.

A = imread("lowlight_1.jpg");
imshow(A)
title("Original Image")

Figure contains an axes object. The axes object with title Original Image contains an object of type image.

국소 영역 밝게 만들기

국소 영역의 어두운 정도에 비례하여 저조도 영상을 밝게 만든 다음, 밝아진 영상을 표시합니다. 어두운 영역이 상당히 밝아집니다. 밝은 영역의 밝기도 약간 증가하며 과포화가 발생합니다. 영상이 다소 부자연스럽게 보이며 지나치게 밝아진 것 같습니다.

B = imlocalbrighten(A);
imshow(B)

Figure contains an axes object. The axes object contains an object of type image.

원본 영상의 픽셀 값으로 구성된 히스토그램과 밝아진 영상의 픽셀 값으로 구성된 히스토그램을 표시합니다. 원본 영상의 경우 히스토그램이 어두운 픽셀 값 방향으로 편중되어 있습니다. 밝아진 영상의 경우 픽셀 값이 전체 픽셀 값 범위에 더 고르게 분포되어 있습니다.

figure
subplot(1,2,1)
imhist(A)
title("Original Image")
subplot(1,2,2)
imhist(B)
title("Brightened Image")

Figure contains 4 axes objects. Axes object 1 with title Original Image contains an object of type stem. Axes object 2 contains 2 objects of type image, line. Axes object 3 with title Brightened Image contains an object of type stem. Axes object 4 contains 2 objects of type image, line.

원본 저조도 영상을 다시 밝게 만들고 밝게 만들기 양을 더 적게 지정합니다.

amt = 0.5;
B2 = imlocalbrighten(A,amt);

밝아진 영상을 표시합니다. 영상이 더 자연스러워 보입니다. 영상의 어두운 영역이 개선되었지만 창문 주변의 밝은 영역은 여전히 과포화 상태입니다.

figure
imshow(B2)
title("Image with Less Brightening")

Figure contains an axes object. The axes object with title Image with Less Brightening contains an object of type image.

밝은 영역의 과포화를 줄이기 위해 영상을 밝게 만들 때 알파 혼합을 적용합니다. 어두운 영역이 더 밝아지고 밝은 픽셀들이 원래 픽셀 값을 유지합니다.

B3 = imlocalbrighten(A,amt,AlphaBlend=true);
imshow(B3)
title("Image with Alpha Blending")

Figure contains an axes object. The axes object with title Image with Alpha Blending contains an object of type image.

비교를 위해 개선된 3개의 영상을 몽타주로 표시합니다.

figure
montage({B,B2,B3},Size=[1 3],BorderSize=5,BackgroundColor="w")

Figure contains an axes object. The axes object contains an object of type image.

참고 문헌

[1] Dong, X., G. Wang, Y. Pang, W. Li, J. Wen, W. Meng, and Y. Lu. "Fast efficient algorithm for enhancement of low lighting video." Proceedings of IEEE® International Conference on Multimedia and Expo (ICME). 2011, pp. 1–6.

참고 항목