KR102151750B1 - Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof - Google Patents

Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof Download PDF

Info

Publication number
KR102151750B1
KR102151750B1 KR1020190096970A KR20190096970A KR102151750B1 KR 102151750 B1 KR102151750 B1 KR 102151750B1 KR 1020190096970 A KR1020190096970 A KR 1020190096970A KR 20190096970 A KR20190096970 A KR 20190096970A KR 102151750 B1 KR102151750 B1 KR 102151750B1
Authority
KR
South Korea
Prior art keywords
fog
image
unit
estimating
background noise
Prior art date
Application number
KR1020190096970A
Other languages
Korean (ko)
Inventor
강봉순
이기동
김한결
이주희
박상욱
Original Assignee
동아대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 동아대학교 산학협력단 filed Critical 동아대학교 산학협력단
Priority to KR1020190096970A priority Critical patent/KR102151750B1/en
Application granted granted Critical
Publication of KR102151750B1 publication Critical patent/KR102151750B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • G06T5/002
    • G06T5/003
    • G06T5/005
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The present invention relates to a device for removing fog and improving visibility for a single image, and a driving method of the device thereof. According to an embodiment of the present invention, the device for removing fog and improving visibility for a single image comprises: an adaptive constraint condition unit for generating an adaptive constraint condition which is adaptively changed in accordance with a change in a pixel by using estimated atmospheric light and a pixel of a preprocessed fog image; a transfer map estimating unit for estimating a transfer map related to the subtraction amount of fog by applying a depth map which estimates the correlation between the saturation and brightness of the fog image having background noise removed therefrom to the pre-generated adaptive constraint condition unit; and an image restoring unit for restoring a fog-removed image by applying the weight to the fog image based on the pre-estimated transfer map when the fog is removed from the fog image having the background noise removed therefrom.

Description

단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치 및 그 장치의 구동방법{Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof}Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof}

본 발명은 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치 및 그 장치의 구동방법에 관한 것으로서, 더 상세하게는 영상 내에서 대기 중에 포함된 안개를 제거하고, 안개를 제거하는 과정에서 발생할 수 있는 가시성 훼손 영역에 대하여 가시성을 향상시키며, 아울러 선형 모델을 기반으로 하여 하드웨어 설계 관점에서도 빠른 처리가 가능한 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치 및 그 장치의 구동방법에 관한 것이다.The present invention relates to an apparatus for removing fog and improving visibility of a single image, and a method of driving the same, and more particularly, to a method of removing fog contained in the atmosphere in an image and removing the fog. The present invention relates to a device for removing fog and improving visibility for a single image, which improves visibility for a region of visibility impairment, and enables fast processing from a hardware design point of view based on a linear model, and a driving method thereof.

최근 자율주행시스템(Autonomous driving system)과 같이 영상을 통하여 부자연스러운 상황을 판단하는 분야에서 안개, 황사, 미세먼지와 같이 급격한 날씨 변화에도 주변 사물을 정확히 인식할 수 있도록 하기 위하여 높은 가시성을 가진 영상이 요구되고 있다. 안개를 제거하여 가시성을 향상시키는 방법은 원하지 않는 요소들을 제거하기 위해 여러 장의 영상을 이용하는 방법, 단일 영상을 이용하여 안개를 제거하는 방법이 존재한다.Recently, in the field of determining unnatural situations through images, such as an autonomous driving system, an image with high visibility has been developed to accurately recognize surrounding objects even in sudden weather changes such as fog, yellow dust, and fine dust. Is required. Methods of removing fog to improve visibility include a method of using multiple images to remove unwanted elements, and a method of removing fog using a single image.

첫 번째로 여러 장의 영상을 이용하여 가시성을 향상하는 방법이다. 이 방법은 동일한 위치에서 여러 환경에서 촬영된 영상을 이용하여 안개의 정보를 추출하여 안개를 제거하고, 영상의 가시성을 향상하는 방법이다. 여러 장의 영상을 사용하면 단일 영상에 비하여 성능이 뛰어나지만, 동일한 위치에서 여러 환경의 영상을 촬영하는 것이 힘들기 때문에 활용도가 낮은 단점이 있다.The first is a method to improve visibility by using multiple images. This method is a method of removing fog by extracting information of fog using images captured in multiple environments at the same location, and improving visibility of images. If multiple images are used, the performance is superior to that of a single image, but it is difficult to capture images of multiple environments at the same location, so the utilization is low.

두 번째로는 Kaiming He, Jian Sun, Xiaoou Tang이 작성한 단일 영상에서 DCP(Dark channel Prior)를 이용하여 가시성을 향상하는 방법이다. 이 방법은 많은 실험을 통하여 색 선명도가 높은 화소는 컬러 채널 값 중 매우 낮고 0에 가까운 픽셀을 가지는 화소가 존재한다는 관측 결과로 안개를 제거하는 방법이다. 하지만, 이 방법은 하늘 영역을 잘 처리하지 못하고, 많은 연산량을 요구하는 단점이 있다.The second method is to improve visibility using DCP (Dark Channel Prior) in a single image created by Kaiming He, Jian Sun, and Xiaoou Tang. This method is a method of removing fog as a result of observation that, through many experiments, pixels with high color clarity have very low and near zero pixels among color channel values. However, this method has a disadvantage that it does not handle sky areas well and requires a large amount of computation.

마지막으로 Qingsong Zhu, Jiaming Mai, Ling Shao의 CAP(Color Attenuation Prior)를 이용한 가시성 향상 방법이다. 이 방법은 밝기와 채도의 차이를 이용하여 영상의 깊이 지도(Depth map)에 대하여 선형 모델을 생성하고, 기계학습을 통해 선형 모델의 매개 변수를 구하여 안개를 제거하는 방법이다. 이 방법은 효과적으로 안개를 제거하여 가시성이 향상되었지만, 복잡한 계산량과 고정되어 있는 제약조건, 색상 왜곡 등 품질 측면에서 개선의 여지가 많다.Lastly, this is a visibility enhancement method using CAP (Color Attenuation Prior) of Qingsong Zhu, Jiaming Mai, and Ling Shao. This method creates a linear model for the depth map of an image using the difference between brightness and saturation, and removes fog by obtaining the parameters of the linear model through machine learning. This method effectively removes fog and improves visibility, but there is a lot of room for improvement in terms of quality, such as complex computational volume, fixed constraints, and color distortion.

한국등록특허공보 제10-1788660호(2017.10.20. 공고) 단일 영상 내의 안개 제거 장치 및 방법Korean Patent Publication No. 10-1788660 (2017.10.20. Announcement) Fog removal device and method in a single image 한국등록특허공보 제10-1568971호(2015.11.13. 공고) 화상 및 동영상에서 안개를 제거하는 방법 및 시스템Korean Patent Publication No. 10-1568971 (announcement on November 13, 2015) Method and system for removing fog from images and videos 한국공개특허공보 제10-2014-0142381호(2014.12.12. 공개) 단일영상 내의 안개 제거 방법 및 장치Korean Patent Publication No. 10-2014-0142381 (published on Dec. 12, 2014) Method and apparatus for removing fog in a single image 미국등록특허공보 제9754356호(2017.09.05. 등록) Method and system for processing an input image based on a guidance image and weights determined thereformU.S. Patent Publication No.9754356 (registered on September 5, 2017) Method and system for processing an input image based on a guidance image and weights determined thereform

"Single Image Haze Removal Using Dark Channel Prior" IEEE Transactions on Pattern Analysis and Machine Intelligence(2011), K He, J Sun, X Tang 등, pp. 2341-2353 "Single Image Haze Removal Using Dark Channel Prior" IEEE Transactions on Pattern Analysis and Machine Intelligence (2011), K He, J Sun, X Tang et al., pp. 2341-2353 "A Fast Single Image Haze Removal Algorithm Using Color Attenuation Prior" IEEE Transactions on Image Processing(2015), Q Zhu, J Mai, L Shao 등, pp. 3522-3533 "A Fast Single Image Haze Removal Algorithm Using Color Attenuation Prior" IEEE Transactions on Image Processing (2015), Q Zhu, J Mai, L Shao et al., pp. 3522-3533 "안개량 오추정 영역 보정을 이용한 개선된 Dark Channel Prior 안개 제거 알고리즘" 방송공학회논문지 제21권제5호, 김종현, 차형태, 2016년 9월 "Improved Dark Channel Prior Fog Removal Algorithm Using Correction of Mispredicted Fog Volume" Journal of the Korean Society of Broadcast Engineers, Vol. 21, No. 5, Kim Jong-Hyeon and Cha Hyung-myung, September 2016

본 발명의 실시예는, 가령 영상 내에서 대기 중에 포함된 안개를 제거하고, 안개를 제거하는 과정에서 발생할 수 있는 가시성 훼손 영역에 대하여 가시성을 향상시키며, 아울러 선형 모델을 기반으로 하여 하드웨어 설계 관점에서도 빠른 처리가 가능한 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치 및 그 장치의 구동방법을 제공함에 그 목적이 있다.The embodiment of the present invention removes fog contained in the atmosphere in an image, improves visibility for areas of visibility loss that may occur in the process of removing fog, and also improves visibility from a hardware design perspective based on a linear model. An object of the present invention is to provide an apparatus for removing fog and improving visibility of a single image capable of fast processing, and a method of driving the apparatus.

본 발명의 실시예에 따른 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치는, 전처리된 안개 영상의 추정 대기광 및 화소(pixel)를 이용하여 화소의 변화에 따라 적응적으로 변화하는 적응형 제약조건을 생성하는 적응형 제약조건부, 상기 배경 잡음을 제거한 안개 영상의 채도와 밝기의 상관 관계를 추정한 깊이지도(depth map)를 상기 생성한 적응형 제약조건부에 적용해 안개의 빼는 양에 관련된 전달지도를 추정하는 전달지도 추정부, 및 배경 잡음을 제거한 안개 영상의 안개 제거시 상기 추정한 전달지도를 근거로 가중치를 상기 안개 영상에 적용해 안개 제거 영상을 복원하는 영상 복원부를 포함한다.An apparatus for removing fog and improving visibility for a single image according to an embodiment of the present invention is an adaptive constraint that adaptively changes according to a change of a pixel using an estimated atmospheric light and a pixel of a preprocessed fog image. An adaptive constraint unit that creates a condition, a depth map that estimates the correlation between the saturation and brightness of the haze image from which the background noise has been removed, is applied to the generated adaptive constraint, and transfers related to the amount of haze subtracted. And a transmission map estimating unit for estimating a map, and an image restoration unit for restoring the fog image by applying a weight to the fog image based on the estimated transmission map when the fog image from which the background noise is removed is removed.

상기 장치는, 입력된 안개 영상의 화이트 밸런스를 조정하여 전처리를 수행하는 전처리부, 상기 전처리된 안개 영상의 채도 채널에 저역통과필터를 적용해 배경 잡음을 제거하는 배경잡음 제거부, 상기 전처리된 안개 영상의 휘도 채널을 이용하여 대기광을 추정하는 대기광 추정부, 및 상기 깊이지도를 추정하는 깊이지도 추정부를 더 포함하며, 상기 깊이지도 추정부는, 등분할된 균일 분포를 갖는 훈련용 영상을 이용하여 기계 학습에 의해 추정되는 매개 변수를 상기 채도 및 상기 밝기와 더 연산하여 상기 깊이지도를 추정할 수 있다.The apparatus includes a preprocessor for performing preprocessing by adjusting a white balance of an input fog image, a background noise removal unit for removing background noise by applying a low pass filter to a saturation channel of the preprocessed fog image, and the preprocessed fog An atmospheric light estimating unit for estimating atmospheric light using a luminance channel of the image, and a depth map estimating unit for estimating the depth map, wherein the depth map estimating unit uses a training image having an equally divided uniform distribution Thus, the depth map may be estimated by further calculating a parameter estimated by machine learning with the saturation and the brightness.

상기 적응형 제약조건부는, 상기 화소의 평균 및 표준편차를 이용하는 제약조건을 사용하여 상기 안개 영상에서의 안개 제거시 발생하는 검은 픽셀(black pixel)을 방지할 수 있다.The adaptive constraint unit may prevent black pixels generated when fog is removed from the fog image by using a constraint using the average and standard deviation of the pixels.

상기 영상 복원부는, 상기 배경 잡음을 제거한 안개 영상에서 어두운 영역의 안개 제거시 가중치를 부여하여 각 적(R), 녹(G) 및 청(B)의 채널 값들이 일관되게 동작시킬 수 있다.The image restoration unit may apply a weight when removing the fog in a dark area from the fog image from which the background noise has been removed, so that channel values of red (R), green (G), and blue (B) may be consistently operated.

상기 영상 복원부는, 상기 어두운 영역의 안개 제거시 가중치를 부여하여 각 적(R), 녹(G) 및 청(B)의 채널 값들이 일관되게 감소하거나 변경되지 않게 할 수 있다.The image restoration unit may apply a weight when removing the fog in the dark area so that channel values of red (R), green (G), and blue (B) are not consistently decreased or changed.

또한, 본 발명의 실시예에 따른 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 구동방법은 적응형 제약조건부, 전달지도 추정부 및 영상 복원부를 포함하는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 구동방법으로서, 전처리된 안개 영상의 추정 대기광 및 화소를 이용해 화소의 변화에 따라 적응적으로 변화하는 적응형 제약조건을 상기 적응형 제약조건부에서 생성하는 단계, 상기 배경 잡음을 제거한 안개 영상의 채도와 밝기의 상관 관계를 추정한 깊이지도를 상기 생성한 적응형 제약조건부에 적용해 상기 전달지도 추정부에서 안개의 빼는 양에 관련된 전달지도를 추정하는 단계, 및 배경 잡음을 제거한 안개 영상의 안개 제거시 상기 추정한 전달지도를 근거로 가중치를 상기 안개 영상에 적용해 상기 영상 복원부에서 안개 제거 영상을 복원하는 단계를 포함한다.In addition, the method of driving an apparatus for removing fog and improving visibility for a single image according to an embodiment of the present invention provides for removing fog and improving visibility for a single image including an adaptive constraint conditioner, a transfer map estimation unit, and an image restoration unit. A method of driving an apparatus for driving a preprocessed fog image, comprising: generating an adaptive constraint that changes adaptively according to a pixel change using an estimated atmospheric light and a pixel of a pre-processed fog image, in the adaptive constraint conditioner, and the background noise is removed Estimating a transfer map related to the amount of fog subtracted from the transfer map estimation unit by applying a depth map that estimates the correlation between the saturation and brightness of the image to the generated adaptive constraint, and a fog image from which background noise has been removed And restoring the fog removal image by the image restoration unit by applying a weight to the fog image based on the estimated transmission map when the fog is removed.

상기 구동방법은, 전처리부가, 입력된 안개 영상의 화이트 밸런스를 조정해 전처리하는 단계, 배경잡음 제거부가, 상기 전처리된 안개 영상의 채도 채널에 저역통과필터를 적용해 배경 잡음을 제거하는 단계, 대기광 추정부가, 상기 전처리된 안개 영상의 휘도 채널을 이용하여 대기광을 추정하는 단계, 및 깊이지도 추정부가, 상기 깊이지도를 추정하는 단계를 더 포함하며, 상기 깊이지도를 추정하는 단계는, 등분할된 균일 분포를 갖는 훈련용 영상을 이용하여 기계 학습에 의해 추정되는 매개 변수를 상기 채도 및 상기 밝기와 더 연산하여 상기 깊이지도를 추정할 수 있다.In the driving method, a preprocessing unit pre-processing by adjusting a white balance of an input fog image, a background noise removing unit removing background noise by applying a low-pass filter to a saturation channel of the pre-processed fog image. A light estimating unit, estimating atmospheric light using a luminance channel of the pre-processed fog image, and a depth map estimating unit, further comprising estimating the depth map, and the step of estimating the depth map may include: The depth map may be estimated by further calculating parameters estimated by machine learning with the saturation and brightness using a training image having a discounted uniform distribution.

상기 생성하는 단계는, 상기 화소의 평균 및 표준편차를 이용하는 제약조건을 사용하여 상기 안개 영상에서의 안개 제거시 발생하는 검은 픽셀을 방지할 수 있다.In the generating step, a black pixel generated when the fog is removed from the fog image may be prevented by using a constraint using the average and standard deviation of the pixels.

상기 복원하는 단계는, 상기 배경 잡음을 제거한 안개 영상에서 어두운 영역의 안개 제거시 가중치를 부여하여 각 적(R), 녹(G) 및 청(B)의 채널 값들이 일관되게 동작시킬 수 있다.In the restoring, a weight is applied to the fog image from which the background noise is removed when the fog is removed from a dark area, so that channel values of red (R), green (G), and blue (B) may be consistently operated.

상기 복원하는 단계는, 상기 어두운 영역의 안개 제거시 가중치를 부여하여 각 적(R), 녹(G) 및 청(B)의 채널 값들이 일관되게 감소하거나 변경되지 않게 할 수 있다.In the restoring, a weight is given when the fog is removed in the dark area so that channel values of red (R), green (G), and blue (B) are not consistently decreased or changed.

본 발명의 실시예에 따르면 안개 영상을 복원되는 과정에서 발생하는 가시성 훼손 영역에 대하여 가시성을 향상시킬 수 있게 될 것이다. 다시 말해, 안개를 제거하면서 발생하는 배경 잡음, 색상 왜곡과 같은 문제들을 적응형 제약조건과 저역통과필터, 적응형 가중치 요소들을 통하여 안개를 제거하여 안개 없는 영상으로 복원시키면서 가시성 또한 향상시키는 효과가 있다.According to an exemplary embodiment of the present invention, it is possible to improve visibility of a region of visibility deterioration that occurs during a process of reconstructing a fog image. In other words, there is an effect of improving visibility while restoring a fog-free image by removing fog through adaptive constraints, low-pass filters, and adaptive weighting elements for problems such as background noise and color distortion that occur while removing fog. .

또한, 본 발명의 실시예에 따라 4K(Ultra High Definition) 정도의 고해상도의 영상을 자율주행자동차와 같은 시스템에 실시간으로 적용할 수 있는 장치의 개발이 용이하게 될 것이다. 다시 말해, 수학식들을 선형 모델들만 사용함으로써 하드웨어 구현시 빠르게 동작할 수 있는 효과가 있다.In addition, according to an embodiment of the present invention, it will be easy to develop a device capable of applying a high-resolution image of about 4K (Ultra High Definition) to a system such as an autonomous vehicle in real time. In other words, by using only linear models of equations, there is an effect that it can operate quickly when implementing hardware.

도 1은 본 발명의 실시예에 따른 영상처리장치가 적용된 자율주행자동차시스템을 예시하여 나타낸 도면,
도 2는 본 발명의 실시예에 따른 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 세부 구조를 예시한 블록다이어그램,
도 3 내지 도 5는 안개를 제거했을 경우 발생하는 색상 왜곡을 설명하기 위한 도면,
도 6은 안개가 존재하는 입력 영상과 본 발명의 실시예에 따른 기술이 적용된 출력 영상을 대비하여 보여주는 도면,
도 7은 본 발명의 실시예에 따른 안개영상 처리 과정의 흐름도, 그리고
도 8은 본 발명의 다른 실시예에 따른 안개영상 처리 과정의 흐름도이다.
1 is a view showing an example of an autonomous vehicle system to which an image processing device according to an embodiment of the present invention is applied;
2 is a block diagram illustrating a detailed structure of an apparatus for removing fog and improving visibility for a single image according to an embodiment of the present invention;
3 to 5 are diagrams for explaining color distortion that occurs when fog is removed;
6 is a view showing a comparison between an input image in which fog exists and an output image to which a technology according to an embodiment of the present invention is applied;
7 is a flowchart of a fog image processing process according to an embodiment of the present invention, and
8 is a flowchart of a process of processing a fog image according to another embodiment of the present invention.

이하, 도면을 참조하여 본 발명의 실시예에 대하여 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings.

도 1에 도시된 바와 같이, 본 발명의 실시예에 따른 자율주행자동차시스템(90)은 촬영장치(100)와 자율주행자동차(110)의 일부 또는 전부를 포함한다.As shown in FIG. 1, the autonomous vehicle system 90 according to the embodiment of the present invention includes a photographing device 100 and a part or all of the autonomous vehicle 110.

여기서, "일부 또는 전부를 포함한다"는 것은 촬영장치(100)의 일부 또는 전부가 자율주행자동차(110)에 통합되어 구성될 수 있는 것 등을 의미하는 것으로서, 발명의 충분한 이해를 돕기 위하여 전부 포함하는 것으로 설명한다.Here, "including some or all" means that some or all of the photographing device 100 can be integrated and configured in the autonomous vehicle 110, and all in order to help a sufficient understanding of the invention It is described as including.

구체적으로 설명하기에 앞서, 본 발명의 실시예에 따른 자율주행자동차시스템(90)은 교통관제시스템이나 방범관제시스템으로 대체될 수도 있다. 다시 말해, 교통관제시스템이나 방범관제시스템은 교통관제센터나 방범관제센터에서 운영하는 서버와, 그 서버에 연동하는 CCTV, IP 카메라 등의 촬영장치로 구성될 수 있고, 본 발명의 실시예에 따른 영상처리장치가 서버 등에 탑재되어 활용될 수 있다. 예를 들어, 안개 속을 자율주행자동차(110)가 운행하겠지만, 교통사고가 발생한 경우에도 사태를 수습하기 위하여 안개가 제거된 상태의 영상을 이용할 수도 있을 것이다. 따라서, 교통관제센서에서 운영하는 교통관제서버는 본 발명의 실시예에 따른 영상처리장치를 포함할 수 있다. 이와 같이, 본 발명의 실시예에 따른 영상처리장치는 다양한 분야에서 다양한 장치에 적용될 수 있지만, 본 발명의 실시예에서는 설명의 편의를 위하여 자율주행자동차(110)를 예로 들어 설명하고, 또 영상처리가 자율주행자동차(110)에서 이루어지는 것으로 설명할 뿐, 어느 하나의 형태에 특별히 한정하지는 않을 것이다.Prior to a detailed description, the autonomous vehicle system 90 according to an embodiment of the present invention may be replaced with a traffic control system or a security control system. In other words, the traffic control system or the security control system may be composed of a server operated by a traffic control center or a security control center, and a photographing device such as CCTV or IP camera interlocking with the server, and according to an embodiment of the present invention. An image processing device may be mounted on a server and used. For example, although the autonomous vehicle 110 will operate in the fog, even when a traffic accident occurs, an image of the fog removed may be used to correct the situation. Accordingly, the traffic control server operated by the traffic control sensor may include an image processing apparatus according to an embodiment of the present invention. As described above, the image processing apparatus according to the embodiment of the present invention can be applied to various devices in various fields, but in the embodiment of the present invention, for convenience of explanation, the autonomous vehicle 110 is described as an example, and image processing It is only described as being made in the autonomous vehicle 110, it will not be specifically limited to any one form.

도 1의 촬영장치(100)는 적어도 하나의 카메라를 포함하며 PTZ 카메라와 같이 팬(Pan), 틸트(Tilt), 줌(Zoom) 동작이 가능한 카메라를 포함할 수 있다. 촬영장치(100)는 가령 자율주행자동차(110)에 구비되어 자율주행자동차(110)의 주행 방향을 촬영하고 촬영된 영상을 자율주행자동차(110)로 제공할 수 있다.The photographing apparatus 100 of FIG. 1 includes at least one camera, and may include a camera capable of pan, tilt, and zoom operations like a PTZ camera. The photographing device 100 may be provided in the autonomous vehicle 110, for example, to photograph the driving direction of the autonomous vehicle 110 and provide the photographed image to the autonomous vehicle 110.

자율주행자동차(110)는 촬영장치(100)로부터 수신한 영상 내에 안개 등이 존재하는 경우 안개를 제거하여 가시성이 향상된 영상을 생성하고, 가시성이 향상된 영상을 토대로 영상 분석을 수행하여 분석 결과를 근거로 다양한 동작을 수행할 수 있다. 물론 촬영영상은 동영상의 형태로 제공되어 1초에 수십에서 수백장의 단위 프레임 영상이 수신될 수 있다. 자율주행자동차(110)는 촬영영상의 분석을 통해 주변 사물을 인지하게 되므로 정확한 인지를 위해서는 수신된 촬영영상의 정확한 분석이 이루어져야 하는 것은 분명하다. 이러한 점에서, 본 발명의 실시예에 따른 영상처리장치는 자율주행자동차(110)에 적용되어 유용하게 활용될 수 있다.The autonomous vehicle 110 removes the fog when there is fog or the like in the image received from the photographing device 100 to generate an image with improved visibility, and performs image analysis based on the image with improved visibility, based on the analysis result. You can perform various actions with. Of course, the captured image is provided in the form of a moving picture, so that tens to hundreds of unit frame images may be received per second. Since the autonomous vehicle 110 recognizes surrounding objects through the analysis of the captured image, it is clear that an accurate analysis of the received captured image must be performed for accurate recognition. In this respect, the image processing apparatus according to the embodiment of the present invention may be applied to the autonomous vehicle 110 and be usefully utilized.

물론 자율주행자동차(110)는 전륜, 후륜, 운전대, 센서 등 다양한 구성요소를 포함할 수 있지만, 도 1에서는 영상처리의 관점에서 구동부만을 도시하였다. 통상 자동차의 구동부는 전자제어장치나 ECU(Electronic Control Unit)라 지칭된다. 따라서, 도 1의 통신 인터페이스부(111), 제어부(113) 및 안개영상처리부(혹은 영상처리부)(115)는 ECU를 의미하거나 그 일부를 의미할 수 있다.Of course, the autonomous vehicle 110 may include various components such as a front wheel, a rear wheel, a steering wheel, and a sensor, but in FIG. 1, only the driving unit is illustrated in terms of image processing. In general, the driving unit of a vehicle is referred to as an electronic control device or an electronic control unit (ECU). Accordingly, the communication interface unit 111, the control unit 113, and the fog image processing unit (or image processing unit) 115 of FIG. 1 may mean an ECU or a part thereof.

통신 인터페이스부(111)는 제어부(113)에 의해 제어되며, 촬영장치(100)와 통신을 수행한다. 예를 들어, 전방에 차량 사고가 발생하였을 때, 차량이 해당 장소를 우회하게 되면, 따라서 촬영장치(100)는 우회하려는 방향을 촬영하게 된다. 따라서, 촬영장치(100)는 통신 인터페이스부(111)와 통신을 수행하고 제어부(113)의 제어에 의해 팬, 틸트, 줌의 다양한 동작을 수행할 수 있다.The communication interface unit 111 is controlled by the control unit 113 and communicates with the photographing apparatus 100. For example, when a vehicle accident occurs in front, when the vehicle bypasses the corresponding place, the photographing apparatus 100 photographs the direction to be bypassed. Accordingly, the photographing apparatus 100 may perform communication with the communication interface unit 111 and perform various operations such as pan, tilt, and zoom under the control of the controller 113.

제어부(113)는 통신 인터페이스부(111) 및 안개영상처리부(115)의 전반적인 제어 동작을 담당한다. 제어부(113)는 통신 인터페이스부(111)를 통해 촬영장치(100)에서 촬영된 촬영영상이 수신되면, 수신한 촬영영상이 처리되도록 안개영상처리부(115)로 제공한다. 그리고, 제어부(113)는 다시 안개영상처리부(115)에서 지시하는 제어명령을 근거로 통신 인터페이스부(111)를 통해 촬영장치(100)와 통신을 수행하는 등 다양한 동작을 수행할 수 있다. 가령, 제어부(113)는 촬영영상의 분석을 통해 갑자기 끼어든 차량이 발견되면 점멸 등을 동작시킬 수도 있을 것이다.The control unit 113 is in charge of overall control operations of the communication interface unit 111 and the fog image processing unit 115. When a photographed image photographed by the photographing apparatus 100 is received through the communication interface unit 111, the control unit 113 provides the received photographed image to the fog image processing unit 115 to be processed. Further, the control unit 113 may perform various operations such as performing communication with the photographing apparatus 100 through the communication interface unit 111 based on a control command commanded by the fog image processing unit 115 again. For example, the control unit 113 may operate a flashing or the like when a vehicle suddenly interrupted is found through analysis of the captured image.

이외에도 제어부(113)는 다양한 제어 동작을 수행하지만, 도 1에서는 영상처리의 관점에서만 살펴보고자 하며, 기타 자세한 내용은 당업자에게 자명하므로 더 이상의 설명은 생략하도록 한다.In addition to this, the controller 113 performs various control operations, but in FIG. 1, only the viewpoint of image processing is described, and other details are apparent to those skilled in the art, so further description will be omitted.

안개영상처리부(115)는 더 정확하게는 영상처리부로 명명될 수 있다. 다시 말해, 본 발명의 실시예에서는 대기 중 황사나 미세먼지보다는 안개가 차량 운행에 더 위험한 요인이 될 수 있다는 점 때문에 안개를 예로 들어 설명하지만, 본 발명의 실시예에서는 안개에 특별히 한정하지는 않을 것이다.The fog image processing unit 115 may be more accurately referred to as an image processing unit. In other words, in the embodiment of the present invention, fog is described as an example because fog may become a more dangerous factor for vehicle operation than yellow dust or fine dust in the atmosphere, but the embodiment of the present invention will not be specifically limited to fog. .

안개영상처리부(115)는 가령 수신된 촬영영상에서 안개가 존재하는지 여부를 먼저 판단할 수 있다. 물론 안개 존재 여부는 기상청으로부터 관련 정보를 제공받거나 외부 센서를 통해 감지할 수도 있으므로 이에 특별히 한정하지는 않을 것이다. 현재 수신된 촬영영상의 채도가 이전 시간의 촬영영상보다 채도가 갑자기 떨어질 때, 또 학습을 통해 안개 특성이나 패턴을 경험하여 이를 근거로 안개영상을 판단할 수 있다. 안개영상처리부(115)는 가령 수신된 영상에서 안개가 존재하는 경우 안개를 제거하고 안개가 제거된 영상을 이용해 분석을 수행하여 제어부(113)에 제공할 수 있다. 예를 들어, 제어부(113)는 안개영상처리부(115)에서 2진비트정보의 분석결과를 제공하면, 해당 2진비트정보를 룩업테이블(LUT)상의 데이터와 비교하여 어떠한 동작을 수행해야 할지를 인식할 수 있다.The fog image processing unit 115 may first determine whether fog exists in the received photographed image. Of course, the presence or absence of fog is not particularly limited as it may be provided with relevant information from the Meteorological Agency or detected through an external sensor. When the saturation of the currently received photographed image suddenly drops from the photographed image of the previous time, the fog image may be determined based on the experience of fog characteristics or patterns through learning. For example, when there is fog in the received image, the fog image processing unit 115 may remove the fog and perform analysis using the image from which the fog has been removed, and provide it to the controller 113. For example, when the fog image processing unit 115 provides the analysis result of the binary bit information, the control unit 113 compares the binary bit information with the data on the look-up table (LUT) to recognize what operation to perform. can do.

안개영상처리부(115)는 도 2를 참조하여 이후에 자세히 설명하겠지만, 촬영영상에서 대기 중에 포함된 안개를 제거하고 안개를 제어하는 과정에서 발생할 수 있는 가시성 훼손 영역에 대하여 가시성을 향상시키며, 선형 모델을 기반으로 하여 하드웨어 설계 관점에서도 빠른 처리가 가능하다. 안개영상처리부(115)는 가시성 향상을 위하여, 더 정확하게는 기존 대비 가시성 훼손 영역이 발생(예: 배경 잡음, 색상 왜곡과 같은 문제 등)하지 않도록 하기 위하여 저역통과필터(Low Pass Filter)와 적응형 제약조건, 그리고 적응형 가중치 요소들을 통하여 안개 없는 영상으로 복원시켜 가시성을 향상시킨다. 저역통과필터는 배경 잡음의 제거를 위해 채도 채널에 적용한다. 또한, 적응형 제약조건은 영상의 화소에 따라 적응적으로 변화하는 적응형 제약조건이 생성되며, 가령 전처리된 영상의 화소의 최소값, 평균, 표준편차 중 적어도 하나를 이용해 계산한다. 평균과 표준편차를 이용하는 제약조건을 사용하여 안개를 제거할 때 발생할 수 있는 검은 픽셀을 방지할 수 있다. 또한, 입력 영상에서 안개를 제거할 때 어두운 영역의 안개 제거시 가중치 요소를 사용하여 즉 가중치를 부여하여 각 적(R), 녹(G), 청(B) 채널 값들이 일관되게 동작되도록 하여 가시성을 향상시킨다. 여기서, "적응적"이라는 것은 외부 환경(예: 화소)에 변화가 발생했을 때 이에 적절히 대응하기 위하여 변화하거나 변화를 시도하는 것이다.The fog image processing unit 115 will be described in detail later with reference to FIG. 2, but it removes the fog contained in the atmosphere from the captured image and improves the visibility for the visibility loss area that may occur in the process of controlling the fog, and the linear model Based on this, fast processing is possible from a hardware design point of view. In order to improve visibility, more precisely, the fog image processing unit 115 is equipped with a low pass filter in order to prevent the occurrence of a visible area (e.g., background noise, color distortion, etc.) The visibility is improved by restoring the image without fog through constraints and adaptive weighting factors. The low-pass filter is applied to the saturation channel to remove background noise. In addition, the adaptive constraint is generated by generating an adaptive constraint that changes adaptively according to the pixels of the image, and is calculated using at least one of a minimum value, an average, and a standard deviation of the pixels of the preprocessed image. Constraints using mean and standard deviation can be used to avoid black pixels that can occur when removing the fog. In addition, when removing fog from an input image, a weight factor is used to remove fog in a dark area, that is, a weight is given to ensure that the values of each red (R), green (G), and blue (B) channel are operated consistently. Improves. Here, "adaptive" refers to changing or attempting to change to appropriately respond to changes in the external environment (eg, pixels).

좀더 구체적으로 안개영상처리부(115)는 안개 영상이 입력되면 안개가 존재하는 영상에서 조명에 의한 왜곡을 복원해주는 화이트 밸런스를 처리해 전처리 동작을 수행하고, 전처리 동작 후 대기광(Atmospheric light)을 추정하며, 영상의 배경 잡음을 제거한다. 여기서, "화이트 밸런스"는 빛의 온도 즉 색 온도에 따라 피사체의 색감이 달리 표현되는 것을 방지하기 위해 조명 환경이나 영상 장치를 통해 빛의 색온도를 보정하여 이상적인 흰색이 되도록 하는 것이며, 흰색을 기준으로 R, G, B 각각의 색상에 게인(gain)을 조정한다. 즉 백색이 백색으로 표현되도록 하는 것이다. 또한, 안개영상처리부(115)는 영상의 화소에 따라 변화하는 적응형 제약조건을 생성하고, 영상의 완화된 깊이 지도(Depth map)를 추정하며, 새로운 전달 지도(Transmission map)를 추정하고 색상 왜곡 성분이 제거되어 가시성이 향상된 안개 제거 영상을 생성한다. 이후 안개가 제거된 영상에 대하여 영상 분석을 수행할 수 있다. 영상 분석 동작은 별도의 장치에서 이루어질 수도 있다.More specifically, when a fog image is input, the fog image processing unit 115 performs a pre-processing operation by processing a white balance that restores the distortion caused by lighting in the image in which the fog exists, and estimates atmospheric light after the pre-processing operation. , Remove the background noise of the image. Here, "white balance" is to correct the color temperature of light through a lighting environment or an image device to prevent the color of the subject from being expressed differently depending on the temperature of light, that is, color temperature, so that it becomes ideal white. Adjust the gain for each color of R, G, and B. In other words, white is expressed as white. In addition, the fog image processing unit 115 generates adaptive constraints that change according to the pixels of the image, estimates a relaxed depth map of the image, estimates a new transmission map, and color distortion. Components are removed to create a fog removal image with improved visibility. After that, image analysis may be performed on the image from which the fog has been removed. The image analysis operation may be performed in a separate device.

안개영상처리부(115)는 배경 잡음을 완화하기 위해 채도 채널에 저역통과필터를 적용한다. 또한, 안개영상처리부(115)는 대기광과, 전처리 단계 이후의 화소의 최소값, 평균, 표준편차를 이용하여 적응형 제약 조건을 생성한다. 밝기와 채도, 등분할된 균일분포를 갖는(혹은 이용한) 훈련용 영상을 이용해 기계 학습을 통해 추정된(혹은 얻은) 매개 변수를 연산하여 완화된 깊이 지도를 추정한 후 적응형 제약 조건을 적용하여 새로운 전달 지도를 생성한다. 이후 안개영상처리부(115)는 안개를 제거하면서 발생하는 색상 왜곡 현상을 방지하기 위해 완화된 깊이 지도와 가중치 요소를 적용하여 가시성을 향상시키게 되는 것이다.The fog image processing unit 115 applies a low-pass filter to the saturation channel to alleviate background noise. In addition, the fog image processing unit 115 generates an adaptive constraint condition using the atmospheric light and the minimum value, average, and standard deviation of the pixels after the preprocessing step. After estimating the relaxed depth map by calculating the parameters estimated (or obtained) through machine learning using (or using) training images with uniform distribution of brightness and saturation and equally divided, adaptive constraints are applied. Create a new delivery map. Thereafter, the fog image processing unit 115 improves visibility by applying a reduced depth map and a weighting factor to prevent color distortion occurring while removing the fog.

예를 들어, 안개가 있는 영상에서 조명 또는 대기 입자에 의해 변화된 영상의 색온도를 보정하여 백색이 백색으로 표현되도록 전처리 과정인 화이트 밸런스를 수행한다. 또한, 안개영상처리부(115)는 영상의 휘도 채널을 이용하여 대기광을 추정하고, 영상의 채도 채널에 저역통과필터를 적용하여 배경잡음을 완화하는 작업을 수행한다. 이후 영상의 화소에 따라 변화하는 적응형 제약조건을 생성하고, 기계학습을 통해 구한 CAP의 매개 변수를 밝기와 채도 채널에 적용하여 완화된 깊이 지도를 추정한다. 이어, 안개영상처리부(115)는 밝기, 채도, 매개변수, 적응형 제약조건을 통해 새로운 전달 지도를 추정하고, 깊이 지도 정보를 활용하여 적응형 가중치 요소를 생성해 이를 통해 안개를 제거하는 과정에서 발생하는 색상 왜곡 성분들을 방지하는 역할을 수행하게 되는 것이다.For example, white balance, a pre-processing process, is performed so that white is expressed as white by correcting the color temperature of the image changed by lighting or atmospheric particles in the image with fog. In addition, the fog image processing unit 115 performs a task of mitigating background noise by estimating atmospheric light using the luminance channel of the image and applying a low pass filter to the saturation channel of the image. After that, adaptive constraints that change according to the pixels of the image are created, and the CAP parameters obtained through machine learning are applied to the brightness and saturation channels to estimate the relaxed depth map. Then, the fog image processing unit 115 estimates a new transmission map through brightness, saturation, parameters, and adaptive constraints, and generates an adaptive weighting factor using the depth map information, thereby removing the fog. It plays a role of preventing color distortion components that occur.

한편, 도 1의 촬영장치(100)는 자체적으로 본 발명의 실시예에 따른 안개영상처리장치를 포함할 수도 있다. 이에 따라 촬영된 안개 영상, 더 정확하게는 주변 환경에 의해 변화된 영상에서 가시성 변화 요인을 제거하여 가시성이 향상된 상태의 영상을 바로 자율주행자동차(110)로 제공할 수도 있다. 무엇보다 본 발명의 실시예에 따른 영상처리장치는 가령 안개를 제거해 영상을 복원해 내는 과정에서 발생하는 기존의 가시성 훼손 영역에 대하여 가시성을 형상시키고, 또 4K 정도의 고해상도의 영상을 자율주행자동차(110)에 실시간으로 적용할 수 있다면 어떠한 위치에 구비되어도 무관하다. 여기서, 기존의 가시성 훼손 영역이란 CAP를 이용한 가시성 향상 방법으로 이해해도 좋다.Meanwhile, the photographing apparatus 100 of FIG. 1 may itself include a fog image processing apparatus according to an embodiment of the present invention. Accordingly, an image with improved visibility may be provided directly to the autonomous vehicle 110 by removing a factor of visibility change from a captured fog image, more precisely, an image changed by the surrounding environment. Above all, the image processing apparatus according to an embodiment of the present invention forms visibility for an existing visibility deterioration area that occurs in the process of reconstructing an image by removing fog, and also displays a high-resolution image of about 4K in an autonomous vehicle ( 110) can be applied in real time, regardless of the location. Here, the existing visibility impaired area may be understood as a visibility enhancement method using a CAP.

다른 한편, 도 1의 제어부(113)는 본 발명의 다른 실시예로서 CPU와 메모리를 포함할 수 있다. CPU는 제어회로, 연산부(ALU), 명령어해석부 및 레지스트리 등을 포함하고 메모리는 램을 포함할 수 있다. 따라서, 자율주행자동차(110)의 초기 구동시 CPU는 안개영상처리부(115)에 저장되어 있는 본 발명의 실시예에 따른 동작을 수행하기 위한 프로그램을 복사하여 메모리, 가령 램에 로딩한 후 이를 실행시켜 데이터 연산 처리 속도를 빠르게 진행시킬 수 있다. 제어회로는 제어동작을 담당하고, 연산부는 2진비트정보의 연산동작을, 그리고 명령어해석부는 고급언어를 기계어로 또는 기계어를 고급언어로 변환하는 동작을 수행할 수 있으며, 레지스트리는 소프트웨어적인 데이터 저장에 관여할 수 있다.On the other hand, the control unit 113 of FIG. 1 may include a CPU and a memory as another embodiment of the present invention. The CPU includes a control circuit, an operation unit (ALU), an instruction analysis unit, a registry, and the like, and the memory may include RAM. Therefore, when the autonomous vehicle 110 is initially driven, the CPU copies the program for performing the operation according to the embodiment of the present invention stored in the fog image processing unit 115, loads it into memory, such as RAM, and executes it. So that the data operation processing speed can be accelerated. The control circuit is in charge of the control operation, the operation unit performs the operation of binary bit information, and the instruction analysis unit performs the operation of converting high-level language into machine language or machine language into high-level language, and the registry stores software data. Can be involved in

계속해서, 도 2를 참조하여 본 발명의 실시예에 따른 안개 제거를 위한 영상처리 과정에 대하여 구체적으로 살펴본다.Subsequently, an image processing process for removing fog according to an embodiment of the present invention will be described in detail with reference to FIG. 2.

도 2는 본 발명의 실시예에 따른 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 세부 구조를 예시한 블록다이어그램이고, 도 3 내지 도 5는 안개를 제거했을 경우 발생하는 색상 왜곡을 설명하기 위한 도면이며, 도 6은 안개가 존재하는 입력 영상과 본 발명의 실시예에 따른 기술이 적용된 출력 영상을 대비하여 보여주는 도면이다.2 is a block diagram illustrating a detailed structure of an apparatus for removing fog and improving visibility for a single image according to an embodiment of the present invention, and FIGS. 3 to 5 are diagrams illustrating color distortion occurring when fog is removed. 6 is a view showing an input image in which fog exists and an output image to which a technology according to an embodiment of the present invention is applied.

도 2에 도시된 바와 같이, 본 발명의 실시예에 따른 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치(이하, 색상왜곡방지장치(115')는 영상 입력부(200), 전처리 단계부(혹은 전처리부)(210), 대기광 추정부(220), 배경잡음 제거부(230), 적응형 제약조건부(240), (완화된) 깊이지도 추정부(250), 전달지도 추정부(260), 영상 복원부(270) 및 영상 출력부(280)의 일부 또는 전부를 포함한다.As shown in FIG. 2, an apparatus for removing fog and improving visibility for a single image according to an embodiment of the present invention (hereinafter, the color distortion prevention apparatus 115 ′ is an image input unit 200, a pre-processing unit (or Preprocessing unit) 210, atmospheric light estimating unit 220, background noise removing unit 230, adaptive constraint condition unit 240, (relaxed) depth map estimating unit 250, transmission map estimating unit 260 , A part or all of the image restoration unit 270 and the image output unit 280 are included.

여기서, "일부 또는 전부를 포함한다"는 것은 상기의 구성요소들이 하드웨어, 소프트웨어 또는 그 조합에 의해 구성되어 일부 구성요소가 다른 구성요소에 통합되어 구성될 수 있는 것 등을 의미하는 것으로서, 발명의 충분한 이해를 돕기 위하여 전부 포함하는 것으로 설명한다.Here, "including some or all" means that the above components are configured by hardware, software, or a combination thereof, and some components can be integrated into other components to be configured. Explain that it is all inclusive to help you understand it.

본 발명의 실시예에 따른 도 2의 색상왜곡방지장치(115')는 안개 영상의 안개 제거를 위해 McCartney가 제안한 대기 분산 모델을 사용할 수 있다. 해당 대기 분산 모델은 <수학식 1>로 표현될 수 있다.The color distortion prevention apparatus 115 ′ of FIG. 2 according to an exemplary embodiment of the present invention may use the atmospheric dispersion model proposed by McCartney to remove fog from a fog image. The atmospheric dispersion model can be expressed by <Equation 1>.

Figure 112019081562815-pat00001
Figure 112019081562815-pat00001

여기서, x,y는 화소의 위치를 의미하고, I(x,y)는 카메라를 통해 촬영한 안개가 포함된 입력 영상, J(x,y)는 안개가 제거된 영상, t(x,y)는 안개 전달량을 의미하는 전달 지도, 그리고 A는 대기 강도 추정에 의해 얻어진 대기광(Atmospheric light)을 의미한다. J(x,y)t(x,y)는 직접 감쇠이며, A[1-t(x,y)]는 산란광으로 인한 부가적인 왜곡을 의미한다.Here, x,y means the location of the pixels, I(x,y) is the input image including the fog captured by the camera, J(x,y) is the image from which the fog has been removed, and t(x,y) ) Denotes a transmission map indicating the amount of fog transmitted, and A denotes the atmospheric light obtained by estimation of the atmospheric intensity. J(x,y)t(x,y) is the direct attenuation, and A[1-t(x,y)] is the additional distortion caused by the scattered light.

영상 입력부(200)는 안개 성분이 포함된 R, G, B 영상 I(x,y)가 입력된다. 도 3에 제시된 영상은 입력 영상이 될 수 있다. 단위 프레임 영상(unit frame image)은 R, G, B 화소의 조합에 의해 이루어지며, 동영상은 통상 1초에 60장의 단위 프레임 영상을 화면에 구현한다.The image input unit 200 inputs R, G, and B images I(x,y) including fog components. The image presented in FIG. 3 may be an input image. A unit frame image is formed by a combination of R, G, and B pixels, and a moving picture usually implements 60 unit frame images per second on the screen.

전처리 단계부(210)는 입력된 I(x,y)에 대하여 조명 또는 대기 입자에 의해 변화된 색온도를 화이트 밸런스를 이용하여 백색이 백색으로 표현될 수 있도록 전처리 동작을 수행한다. 여기서, 색온도는 색을 나타내는 한가지 방식으로, 켈빈(K)으로 표시하며, 온도가 높아지면 푸른색, 낮아지면 붉은색을 띤다.The pre-processing step unit 210 performs a pre-processing operation for the input I(x,y) so that the color temperature changed by lighting or atmospheric particles can be expressed as white by using a white balance. Here, the color temperature is a method of indicating color, and is expressed in Kelvin (K). When the temperature increases, the color temperature becomes blue and when the temperature decreases, the color temperature becomes red.

대기광 추정부(220)는 프레임 버퍼를 사용하지 않는 방법으로 대기광을 추정한다. 가령, 대기광 추정부(220)는 McCartney가 제안한 대기 분산 모델에 따라 대기 강도 추정에 의해 대기광을 추정할 수 있으며, 전처리 또는 배경 잡음을 제거한 안개 영상의 휘도 채널을 이용해 대기광을 추정할 수 있다.The atmospheric light estimating unit 220 estimates the atmospheric light in a method that does not use a frame buffer. For example, the atmospheric light estimating unit 220 can estimate atmospheric light by estimating atmospheric intensity according to the atmospheric dispersion model proposed by McCartney, and can estimate atmospheric light using a luminance channel of a fog image from which preprocessing or background noise has been removed. have.

배경잡음 제거부(230)는 안개 제거시 채도 채널에 있는 비선형적인 잡음, 마치‘소금-후추 잡음(salt-and-pepper)’과 같은 현상이 발생한다. 이러한 배경 잡음 현상은 모든 안개 제거 알고리즘에 공통적인 문제이다. 이러한 원치 않는 잡음을 제거하기 위하여 채도 채널에 저역통과필터를 사용하여 해결한다.When removing the fog, the background noise removing unit 230 generates nonlinear noise in the saturation channel, such as a “salt-and-pepper” phenomenon. This background noise phenomenon is a common problem for all fog removal algorithms. In order to remove this unwanted noise, it is solved by using a low pass filter in the saturation channel.

적응형 제약조건부(240)는 대기 분산 모델로부터 추정할 수 있다. <수학식 1>을 정제하여 가공되지 않은 t(x,y)를 구할 수 있고, 이에 의해 <수학식 2>를 추론할 수 있다. 적응형 제약조건(수학식 2-7)에서 사용되는 I(x,y)는 화이트 밸런스를 통과한 안개가 존재하는 영상의 휘도 채널을 의미하고, Ic(x,y)는 안개가 존재하는 영상의 R, G, B 채널을 가지는 안개가 있는 영상이다.The adaptive constraint conditioner 240 may estimate from the atmospheric variance model. <Equation 1> can be refined to obtain unprocessed t(x,y), whereby <Equation 2> can be inferred. I(x,y) used in the adaptive constraint (Equation 2-7) means the luminance channel of the image in which the fog passing through the white balance exists, and I c (x,y) is the It is a foggy image with R, G, and B channels of the image.

Figure 112019081562815-pat00002
Figure 112019081562815-pat00002

여기서, 안개가 제거된 J(x,y)가 올바르게 제거가 되었는지 여부는 정규화된 0에서 1의 범위 내에 있다. 따라서, 이를 표현하면 <수학식 3>과 같다.Here, whether or not the haze is removed J(x,y) is correctly removed is within the range of normalized 0 to 1. Therefore, this is expressed as <Equation 3>.

Figure 112019081562815-pat00003
Figure 112019081562815-pat00003

여기서, A에 해당하는 대기광은 상수로 동작한다.Here, the atmospheric light corresponding to A operates as a constant.

또한, 적응형 제약조건의 제1 제약조건은 <수학식 4>와 같다.In addition, the first constraint of the adaptive constraint is as shown in Equation 4.

Figure 112019081562815-pat00004
Figure 112019081562815-pat00004

여기서,

Figure 112019081562815-pat00005
는 r,g,b 채널의 max값을 의미하고,
Figure 112019081562815-pat00006
는 c ∈ {r,g,b}이므로 I(x)(안개가 있는 영상)의 x,y 좌표를 의미하므로, 종합하면 r,g,b채널의 안개가 있는 영상의 x,y 좌표이다.
Figure 112019081562815-pat00007
는 c ∈ {r,g,b}이므로 대기광의 r,g,b 채널을 의미한다.here,
Figure 112019081562815-pat00005
Means the max value of the r,g,b channels,
Figure 112019081562815-pat00006
Is c ∈ {r,g,b}, so it means the x,y coordinates of I(x) (image with fog), so in sum, it is the x,y coordinates of the image with fog in r,g,b channels.
Figure 112019081562815-pat00007
Is c ∈ {r,g,b}, meaning the r,g,b channels of atmospheric light.

두 번째 적응형 제약조건은 통계의 평균 및 표준 편차 정의로부터 영향을 받는다. 안개 제거는 안개가 있는 영상에서 안개를 빼는 것을 의미한다. 여기서, 안개를 빼는 양은 전달 지도에 의해 제어된다. 이 값이 작을수록 안개가 많이 제거 되고, 안개가 제거된 영상의 밝기가 낮아진다. 특히, 안개가 제거되기 전 어두운 영상의 경우 안개가 제거된 뒤에는 음수가 되는 경우도 발생한다. 음수들은 0으로 반올림되고, 이 값들은 검은 픽셀(Black Pixel)이 된다. 이러한 검은 픽셀이 발생하는 것을 방지하기 위하여 두 번째 제약조건은 영상의 평균이 영상의 표준 편차보다 크거나 같아야 된다는 성질을 이용한다. 이는 <수학식 5>와 같다.The second adaptive constraint is influenced by the definition of the mean and standard deviation of the statistics. Fog removal means subtracting fog from an image with fog. Here, the amount of fog subtracted is controlled by the transmission map. The smaller this value, the more fog is removed, and the brightness of the image from which the fog is removed decreases. In particular, in the case of a dark image before the fog is removed, a negative number occurs after the fog is removed. Negative numbers are rounded to zero, and these values become black pixels. In order to prevent such black pixels from occurring, the second constraint uses the property that the average of the image must be greater than or equal to the standard deviation of the image. This is the same as Equation 5.

Figure 112019081562815-pat00008
Figure 112019081562815-pat00008

여기서,

Figure 112019081562815-pat00009
는 i,j∈Ω{x,y}의 의미는 x,y좌표 중심으로 사각형 윈도우 필터(window filter)를 의미하며, 윈도우 내의 구성성분 좌표를 i,j라 한다. 즉, meani,j는 x,y를 기준으로 사각형의 평균값 필터를 사용할 때, 그 사각형 평균값 필터의 구성성분을 i,j라고 말한다.
Figure 112019081562815-pat00010
는 J는 안개 없는 영상이며, i,j는 구성성분을 의미한다.
Figure 112019081562815-pat00011
의 의미는 x,y 좌표 중심으로 사각 윈도우 필터를 의미한다.
Figure 112019081562815-pat00012
에서 f는 제약조건을 제어하기 위한 상수이고, std는 표준편차이며, i,j는 표준편차 내의 성분을 의미한다.
Figure 112019081562815-pat00013
는 meani,j∈Ω{x,y}의 의미는 x,y좌표 중심으로 사각 윈도우 필터를 의미하며, 윈도우의 각각 좌표를 i,j라 한다.here,
Figure 112019081562815-pat00009
The meaning of i,j∈Ω{x,y} means a rectangular window filter centered on the x,y coordinates, and the component coordinates in the window are called i,j. That is, meani,j refers to i,j as the constituent components of the square mean value filter when using a square mean value filter based on x,y.
Figure 112019081562815-pat00010
Where J is the image without fog, and i,j is the component.
Figure 112019081562815-pat00011
Means a square window filter centered on the x,y coordinates.
Figure 112019081562815-pat00012
In, f is a constant for controlling the constraint, std is the standard deviation, and i,j are the components within the standard deviation.
Figure 112019081562815-pat00013
Meani,j∈Ω{x,y} means a rectangular window filter centered on the x,y coordinates, and the coordinates of each window are referred to as i,j.

<수학식 5>에서 f는 제약조건을 제어하기 위한 상수로 사용된다. <수학식 5>를 <수학식 1>에 대입하여 정제하면 적응형 제약조건의 제2 제약조건은 <수학식 6>과 같이 나타난다.In <Equation 5>, f is used as a constant for controlling the constraint. If <Equation 5> is substituted into <Equation 1> and refined, the second constraint of the adaptive constraint appears as in <Equation 6>.

Figure 112019081562815-pat00014
Figure 112019081562815-pat00014

제1 제약조건과 제2 제약조건을 결합하여 <수학식 7>과 같이 적응형 제약조건을 표현한다.By combining the first constraint and the second constraint, an adaptive constraint is expressed as shown in Equation 7.

Figure 112019081562815-pat00015
Figure 112019081562815-pat00015

완화된 깊이지도 추정부(250)는 영상의 깊이 지도를 추정하는 영역이다. <수학식 8>은 완화된 깊이 지도는 영상의 밝기와 채도 사이의 상관 관계를 설명하는 선형모델이다.The relaxed depth map estimation unit 250 is an area for estimating a depth map of an image. <Equation 8> is a linear model that explains the correlation between the brightness and saturation of an image.

Figure 112019081562815-pat00016
Figure 112019081562815-pat00016

v(x,y)와 s(x,y)는 각각 영상의 밝기와 배경잡음 제거부(230)를 통과한 채도를 의미하고, θo, θ1, θ2는 선형모델의 매개 변수이다. ε(x,y)는 오차를 뜻한다. 오차를 최소화하는 매개 변수의 값을 구하기 위해 감독 학습(Supervised Learning)을 통하여 추정한다. 감독 학습을 하기 위해서 훈련 영상이 필요하지만, 훈련 영상에 따라 신뢰할 수 있는 정확한 깊이 지도를 획득할 수 있는 수단은 존재하지 않는다. 종래에는 난수생성기를 이용하여 깊이 지도를 정제하였다. 균일 분포를 보장하는 등분할된 균일분포를 사용해 훈련 영상을 제작하여 종래보다 더 신뢰도가 높은 선형 모델의 매개 변수를 구할 수 있다.v(x,y) and s(x,y) denote the brightness of the image and the saturation passed through the background noise removal unit 230, respectively, and θo, θ 1 , θ 2 are parameters of the linear model. ε(x,y) means error. In order to obtain the value of the parameter that minimizes the error, it is estimated through supervised learning. Although training images are required for supervised learning, there is no means for obtaining reliable and accurate depth maps according to the training images. In the past, the depth map was refined using a random number generator. By producing a training image using an equally divided uniform distribution that guarantees a uniform distribution, the parameters of a linear model with higher reliability than before can be obtained.

전달지도 추정부(260)는 밝기와 채도, 기계 학습을 통해 얻은 매개 변수를 완화된 깊이지도 추정부(250)에 적용하고, 적응형 제약조건부(240)를 바탕으로 새로운 전달 지도 t(x,y)값을 구한다. The transfer map estimator 260 applies the parameters obtained through brightness, saturation, and machine learning to the relaxed depth map estimator 250, and based on the adaptive constraint unit 240, the new transfer map t(x, Find the y) value.

<수학식 9>는 대기 산란 모델(Atmospheric scattering model)의 전달 지도의 표현식이다. <수학식 9>를 통해 완화된 깊이 지도와 지수적으로 비례함을 알 수 있다.<Equation 9> is an expression of the transfer map of the Atmospheric scattering model. It can be seen from Equation 9 that it is exponentially proportional to the relaxed depth map.

Figure 112019081562815-pat00017
Figure 112019081562815-pat00017

여기서, ß는 분산 계수(scattering coefficent), d(x,y)는 완화된 깊이 지도를 의미한다.Here, ß denotes a scattering coefficent, and d(x,y) denotes a relaxed depth map.

영상 복원부(270)는 새롭게 구한 전달지도 추정부(260)의 값을 받아 안개를 제거하고, 색상 왜곡문제를 해결하여 가시성을 향상시키는 동작을 수행한다. 색상 왜곡이 발생하는 원인은 컬러 어텐뉴에이션 프라이어(Color Attenuation Prior) 방법 즉 선험적 컬러감쇠 방법에서 어두운 영역, 즉 밝기와 채도가 낮은 영역에 대하여 가까운 영역으로 인식하여 <수학식 9>에 의하여 d(x,y)는 작거나 0으로 인식하게 되고, 이로 인하여 t(x,y)값은 1에 가까운 값으로 설정되어 제대로 처리하지 못한다는 단점이 있다.The image restoration unit 270 receives the newly obtained value from the transmission map estimation unit 260, removes fog, and solves a color distortion problem to improve visibility. The cause of color distortion is recognized as a region close to a dark region, that is, a region with low brightness and saturation in the Color Attenuation Prior method, that is, the a priori color attenuation method. x,y) is recognized as being small or 0, which has a disadvantage in that the t(x,y) value is set to a value close to 1 and cannot be properly processed.

<수학식 10>을 통해 안개가 제거된 영상으로 복원될 때, 영상의 어두운 영역내의 화소 값은 약간 감소되거나 변경되지 않을 수도 있다.When the image is restored from which the fog has been removed through Equation 10, the pixel value in the dark area of the image may be slightly decreased or may not be changed.

Figure 112019081562815-pat00018
Figure 112019081562815-pat00018

도 3 내지 도 5를 참조하면, 어두운 영역에서 청색(B) 채널 값이 적색(R), 녹색(G) 채널 값에 비해 큰 값을 포함하는 것을 확인할 수 있다. 안개를 제거한 뒤의 영상에서도 청색(B) 채널 값은 감소하지 않고, 거의 비슷한 값을 포함하는 것을 확인할 수 있다. 따라서, 어두운 영역에 대하여 안개를 제거하는 경우 파란색 영역처럼 보이는 색상 왜곡 현상이 발생한다. 이러한 문제점을 해결하는 방법은 어두운 영상에서의 각 채널 값을 일관되게 감소하게 동작하도록 가중치 요소를 추가하고 완화된 깊이지도의 값을 활용하여 문제를 해결 할 수 있다.Referring to FIGS. 3 to 5, it can be seen that the blue (B) channel value includes a larger value than the red (R) and green (G) channel values in the dark area. In the image after removing the fog, it can be seen that the blue (B) channel value does not decrease and contains almost the same value. Therefore, when the fog is removed for a dark area, a color distortion phenomenon that looks like a blue area occurs. A method of solving this problem can solve the problem by adding a weighting factor to consistently reduce the value of each channel in the dark image and using the value of the relaxed depth map.

도 4의 (a)는 안개가 존재하는 영상에서 어두운 영역에서의 R, G, B 채널의 화소값, 도 4의 (b)는 안개를 제거한 영상에서 R, G, B 채널의 화소값을 의미하며, 도 5의 (a)는 색상 왜곡 현상이 발생한 영상을 보여주고, 도 5의 (b)는 적응형 가중치를 적용하여 색상 왜곡이 완화된 영상을 의미한다. 본 발명의 실시예에 따라 도 5의 빨간색 박스 즉 어두운 영역에서 발생하는 색상 왜곡이 방지된다.Fig. 4(a) shows the pixel values of the R, G, and B channels in the dark area in the image where the fog exists, and Fig. 4(b) shows the pixel values of the R, G, and B channels in the image with the fog removed. 5A shows an image in which color distortion has occurred, and FIG. 5B shows an image in which color distortion is reduced by applying an adaptive weight. According to an embodiment of the present invention, color distortion occurring in the red box of FIG. 5, that is, a dark area is prevented.

<수학식 11>은 가중치를 추가하기 위한 식이며, 이는 적응형 가중치라 명명될 수 있다. w0는 가중치의 시작 값, d0는 근거리 영역을 지정하는 깊이지도(Depth map)의 값을 의미한다. <Equation 11> is an equation for adding weights, which may be referred to as adaptive weights. w 0 denotes the starting value of the weight, and d 0 denotes the value of the depth map designating the near-field.

Figure 112019081562815-pat00019
Figure 112019081562815-pat00019

<수학식 12>는 색상 왜곡 현상을 해결한 안개가 제거된 영상을 얻기 위한 <수학식 10>에 적응형 가중치를 적용한 수학식이다.<Equation 12> is an equation in which an adaptive weight is applied to <Equation 10> to obtain an image from which the fog is removed from which the color distortion phenomenon is solved.

Figure 112019081562815-pat00020
Figure 112019081562815-pat00020

상기의 구성 결과, 본 발명의 실시예에 따른 색상왜곡방지장치(115')는 도 6에서와 같이 안개가 존재하는 영상(도 6의 (a))에서 안개를 제거할 때 색상왜곡이 발생하지 않도록 하여 안개가 없는 영상을 복원할 수 있게 된다(도 6의 (b)).As a result of the above configuration, the color distortion prevention apparatus 115 ′ according to the embodiment of the present invention does not cause color distortion when removing the fog from the image (Fig. 6(a)) where the fog exists as shown in FIG. By doing so, it is possible to restore the image without fog (Fig. 6(b)).

도 7은 본 발명의 실시예에 따른 안개영상 처리 과정의 흐름도이다.7 is a flowchart of a process of processing a fog image according to an embodiment of the present invention.

설명의 편의상 도 7을 도 1과 함께 참조하면, 본 발명의 실시예에 따른 가령 자율주행자동차(110)의 제어장치(예: ECU, 제어부)는, 촬영장치(100)로부터 안개가 존재하는 안개 영상을 수신할 수 있다(S700).For convenience of explanation, referring to FIG. 7 together with FIG. 1, a control device (eg, an ECU, a control unit) of an autonomous vehicle 110 according to an embodiment of the present invention is a fog in which fog exists from the photographing device 100. An image may be received (S700).

이어, 제어장치는 수신한 안개 영상의 안개를 제거할 때 발생하는 색상왜곡을 방지하기 위해 저역통과필터, 적응형 제약조건 및 적응형 가중치 요소를 적용해 안개가 제거된 영상을 복원한다(S710).Subsequently, the control device restores the image from which the fog has been removed by applying a low-pass filter, an adaptive constraint, and an adaptive weight factor to prevent color distortion that occurs when the fog is removed from the received fog image (S710). .

여기서, 저역통과필터는 배경 잡음을 제거하기 위해 채도 채널에 적용된다. 또한, 적응형 제약조건은 화소에 따라 적응적으로 변화하는 제약조건을 이용한다. 적응형 제약조건의 생성을 위하여 전처리된 안개 영상의 대기광을 추정하고, 화소의 평균 및 표준편차를 이용해 제약조건을 생성한다. 나아가, 배경 잡음을 제거한 안개 영상의 안개 제거시 전달지도를 근거로 가중치를 안개 영상에 적용해 영상을 복원하며, 여기서 전달지도는 배경 잡음을 제거한 안개 영상의 채도와 안개 영상의 밝기, 나아가 훈련 영상을 이용해 얻은 매개변수를 근거로 깊이지도를 추정하고, 추정한 깊이지도를 적응적 제약조건에 적용해 안개의 전달지도를 추정한다.Here, the low-pass filter is applied to the saturation channel to remove background noise. Also, the adaptive constraint uses a constraint that changes adaptively according to the pixel. To create an adaptive constraint, the atmospheric light of the preprocessed fog image is estimated, and the constraint is created using the mean and standard deviation of pixels. Furthermore, the image is restored by applying a weight to the fog image based on the transmission map when the fog image is removed from the background noise, and the transmission map is the saturation of the fog image from which the background noise is removed, the brightness of the fog image, and further, the training image. The depth map is estimated based on the parameters obtained by using and the estimated depth map is applied to the adaptive constraint to estimate the transmission map of the fog.

여기서, 전달지도는 안개를 빼는 양에 관련되며 안개 제거는 안개가 있는 영상에서 안개를 빼는 것을 의미한다. 따라서, 안개를 빼는 양은 전달 지도에 의해 제어되는 것이다. 가령, 값이 작을수록 안개가 많이 제거된다. 또한 깊이지도는 영상의 밝기와 채도 사이의 상관 관계를 설명하려는 선형모델에 해당된다.Here, the transmission map is related to the amount of subtracting fog, and removing fog means subtracting fog from an image with fog. Thus, the amount of fog subtracted is controlled by the transfer map. For example, the smaller the value, the more fog is removed. Also, the depth map corresponds to a linear model that attempts to explain the correlation between the brightness and saturation of an image.

제어장치는 상기한 내용 이외에도 다양한 동작을 수행할 수 있으며, 기타 자세한 내용은 앞서 충분히 설명하였으므로, 그 내용들로 대신하고자 한다.The control device can perform various operations in addition to the above descriptions, and other detailed information has been sufficiently described above, and thus the contents will be substituted.

도 8은 본 발명의 다른 실시예에 따른 안개영상 처리 과정의 흐름도이다.8 is a flowchart of a process of processing a fog image according to another embodiment of the present invention.

설명의 편의상 도 8을 도 2와 함께 참조하면, 본 발명의 실시예에 따른 색상왜곡방지장치(115')의 전처리 단계부(210)는 영상 입력부(200)로 입력된 안개 영상을 수신하여 안개가 있는 입력 영상을 화이트 밸런스를 통해 전처리 동작을 수행한다(S800). 화이트 밸런스를 조정하여 기계적으로 빛의 색깔을 변경하는 것이다.For convenience of explanation, referring to FIG. 8 together with FIG. 2, the preprocessing step unit 210 of the color distortion prevention apparatus 115 ′ according to an embodiment of the present invention receives a fog image input to the image input unit 200 and A pre-processing operation is performed on an input image having a presence through white balance (S800). It mechanically changes the color of the light by adjusting the white balance.

또한, 대기광 추정부(220)는 전처리된 안개 영상에서 대기광을 추정한다(S810). 대기광 추정을 위해 대기 강도를 계산할 수 있으며, 휘도 채널을 이용하여 얻을 수 있다.In addition, the atmospheric light estimating unit 220 estimates atmospheric light from the preprocessed fog image (S810). The atmospheric intensity can be calculated for atmospheric light estimation, and can be obtained using the luminance channel.

배경잡음 제거부(230)는 전처리된 안개 영상에서 배경 잡음을 제거한다. 이를 위하여 채도 채널에 저역통과필터를 적용한다.The background noise removal unit 230 removes background noise from the preprocessed fog image. To this end, a low-pass filter is applied to the saturation channel.

또한, 적응형 제약조건부(240)는 전처리 후의 화소의 변화에 따라 적응적으로 변화하는 적응적 제약조건을 생성한다(S830). 이를 위하여, 전처리 후의 추정 대기광과 전처리 후의 화소의 평균 및 표준편차를 이용해 적응형 제약 조건을 생성하고, 화소의 최소값을 더 연산하여 적응형 제약조건을 생성할 수 있다.In addition, the adaptive constraint conditioner 240 generates an adaptive constraint that adaptively changes according to a change in a pixel after preprocessing (S830). To this end, an adaptive constraint may be generated using the estimated atmospheric light after preprocessing and the average and standard deviation of the pixels after the preprocessing, and the minimum value of the pixel may be further calculated to generate the adaptive constraint.

완화된 깊이지도 추정부(250)는 영상의 깊이 지도를 추정하는 영역이다.The relaxed depth map estimation unit 250 is an area for estimating a depth map of an image.

이어, 전달지도 추정부(260)는 배경 잡음을 제거한 안개 영상의 밝기와 채도, 기계 학습을 통해 추정한 매개변수를 연산하여 추정한 완화된 깊이지도를 적응형 제약조건에 적용해 새로운 전달지도를 추정한다(S840). 전달지도 추정부(260)는 안개를 빼는 양과 관련되는 전달지도를 추정하는 것이다. 이를 위하여 배경 잡음을 제거한 안개 영상의 밝기와 채도를 이용한다.Next, the transfer map estimator 260 calculates the brightness and saturation of the haze image from which the background noise has been removed, and the parameters estimated through machine learning, and applies the estimated relaxed depth map to the adaptive constraint to create a new transfer map. It is estimated (S840). The transmission map estimating unit 260 estimates a transmission map related to an amount of subtracting fog. For this, the brightness and saturation of the fog image from which the background noise has been removed is used.

마지막으로, 영상 복원부(270)는 완화된 깊이지도와 가중치 요소를 적용하여 안개 영상의 안개 제거시 색상왜곡을 방지해 영상을 복원한다(S850). 안개 영상에서 어두운 영역들의 안개를 제거할 때, 가중치 요소를 사용해 각 R, G, B 채널 값들이 일관되게 동작하도록 한다. 가령, 어두운 영역에서 각 채널값을 일관되게 감소시킬 수 있다.Finally, the image restoration unit 270 restores the image by applying the relaxed depth map and weighting factor to prevent color distortion when removing the fog from the fog image (S850). When removing the fog of dark areas from a fog image, a weighting factor is used to make each R, G, and B channel values operate consistently. For example, each channel value can be consistently reduced in a dark area.

한편, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합하거나 결합하여 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시 예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 비일시적 저장매체(non-transitory computer readable media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시 예를 구현할 수 있다.On the other hand, even if all the constituent elements constituting an embodiment of the present invention are described as being combined into one or operating in combination, the present invention is not necessarily limited to this embodiment. That is, within the scope of the object of the present invention, all of the constituent elements may be selectively combined and operated in one or more. In addition, although all the components may be implemented as one independent hardware, a program module that performs some or all functions combined in one or more hardware by selectively combining some or all of the components. It may be implemented as a computer program having Codes and code segments constituting the computer program may be easily deduced by a person skilled in the art of the present invention. Such a computer program is stored in a non-transitory computer readable media that can be read by a computer and is read and executed by a computer, thereby implementing an embodiment of the present invention.

여기서 비일시적 판독 가능 기록매체란, 레지스터, 캐시(cache), 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라, 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 구체적으로, 상술한 프로그램들은 CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리 카드, ROM 등과 같은 비일시적 판독가능 기록매체에 저장되어 제공될 수 있다.Here, the non-transitory readable recording medium is not a medium that stores data for a short moment, such as a register, cache, memory, etc., but a medium that stores data semi-permanently and can be read by a device. . Specifically, the above-described programs may be provided by being stored in a non-transitory readable recording medium such as a CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, or the like.

이상에서는 본 발명의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어서는 안 될 것이다.In the above, preferred embodiments of the present invention have been illustrated and described, but the present invention is not limited to the specific embodiments described above, and is generally used in the technical field to which the present invention pertains without departing from the gist of the present invention claimed in the claims. Various modifications are possible by those skilled in the art of course, and these modifications should not be individually understood from the technical idea or perspective of the present invention.

100: 촬영장치 110: 자율주행자동차
111: 통신 인터페이스부 113: 제어부
115: 안개영상처리부 200: (영상) 입력부
210: 전처리 단계부 220: 대기광 추정부
230: 배경잡음 제거부 240: 적응형 제약조건부
250: 완화된 깊이지도 추정부 260: 전달지도 추정부
270: 영상 복원부 280: (영상) 출력부
100: photographing device 110: autonomous vehicle
111: communication interface unit 113: control unit
115: fog image processing unit 200: (video) input unit
210: pre-processing step 220: atmospheric light estimation unit
230: background noise removal unit 240: adaptive constraint unit
250: relaxed depth map estimation unit 260: transmission map estimation unit
270: image restoration unit 280: (image) output unit

Claims (10)

안개 성분이 포함된 R, G, B 영상 I(x,y)를 입력하는 영상 입력부;
입력된 안개 영상의 화이트 밸런스를 조정하여 전처리를 수행하는 전처리부;
상기 전처리된 안개 영상의 휘도 채널을 이용하여 대기광을 추정하는 대기광 추정부;
상기 전처리된 안개 영상의 채도 채널에 저역통과필터를 적용해 배경 잡음을 제거하는 배경잡음 제거부;
전처리된 안개 영상의 추정 대기광 및 화소(pixel)를 이용하여 화소의 변화에 따라 적응적으로 변화하는 적응형 제약조건을 생성하는 적응형 제약조건부;
등분할된 균일 분포를 갖는 훈련용 영상을 이용하여 기계 학습에 의해 추정되는 매개 변수를 채도 및 밝기와 더 연산하여 깊이지도를 추정하는 깊이지도 추정부;
배경 잡음을 제거한 안개 영상의 채도와 밝기의 상관 관계를 추정한 깊이지도(depth map)를 상기 생성한 적응형 제약조건부에 적용해 안개의 빼는 양에 관련된 전달지도를 추정하는 전달지도 추정부;
배경 잡음을 제거한 안개 영상의 안개 제거시 상기 추정한 전달지도를 근거로 아래 [수학식 12]에 의한 가중치를 상기 안개 영상에 적용해 안개 제거 영상을 복원하는 영상 복원부; 및
안개가 존재하는 입력 영상과 안개를 제거 처리한 영상의 출력 영상을 대비하여 보여주는 영상 출력부;
를 포함하는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치.
[수학식 12]
Figure 112020063047501-pat00021

상기에서, x,y는 화소의 위치, J(x,y)는 카메라를 통해 촬영한 안개가 제거된 영상, I(x,y)는 카메라를 통해 촬영한 안개가 포함된 입력 영상, A는 대기 강도 추정에 의해 얻어진 대기광(Atmospheric light), wt(x, y)는 적응형 가중치, t(x,y)는 안개 전달량을 의미하는 전달 지도이다.
An image input unit for inputting an R, G, B image I(x,y) including a fog component;
A preprocessor for performing preprocessing by adjusting the white balance of the input fog image;
An atmospheric light estimating unit for estimating atmospheric light using a luminance channel of the preprocessed fog image;
A background noise removal unit that removes background noise by applying a low-pass filter to a saturation channel of the preprocessed fog image;
An adaptive constraint conditioner that generates an adaptive constraint that adaptively changes according to a change of a pixel by using the estimated atmospheric light and a pixel of the preprocessed fog image;
A depth map estimating unit for estimating a depth map by further calculating parameters estimated by machine learning with saturation and brightness using the training image having an equally divided uniform distribution;
A transfer map estimating unit for estimating a transfer map related to a subtraction amount of fog by applying a depth map obtained by estimating a correlation between saturation and brightness of a fog image from which background noise has been removed to the generated adaptive constraint;
An image restoration unit for restoring a fog image by applying a weight according to [Equation 12] below to the fog image based on the estimated transmission map when the background noise is removed from the fog image; And
An image output unit that compares an input image in which fog is present and an output image of an image obtained by removing the fog;
An apparatus for removing fog and improving visibility for a single image comprising a.
[Equation 12]
Figure 112020063047501-pat00021

In the above, x,y are the location of the pixels, J(x,y) is the image taken by the camera from which the fog has been removed, I(x,y) is the input image including the fog captured by the camera, and A is Atmospheric light obtained by estimation of atmospheric intensity, w t (x, y) is an adaptive weight, and t (x, y) is a transmission map representing the amount of fog transmitted.
삭제delete 제1항에 있어서,
상기 적응형 제약조건부는, 상기 화소의 평균 및 표준편차를 이용하는 제약조건을 사용하여 상기 안개 영상에서의 안개 제거시 발생하는 검은 픽셀(black pixel)을 방지하는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치.
The method of claim 1,
The adaptive constraint unit, by using a constraint using the average and standard deviation of the pixels, removes fog and improves visibility for a single image that prevents black pixels from removing fog from the fog image. Device for.
제1항에 있어서,
상기 영상 복원부는, 상기 배경 잡음을 제거한 안개 영상에서 어두운 영역의 안개 제거시 가중치를 부여하여 각 적(R), 녹(G) 및 청(B)의 채널 값들이 일관되게 동작시키는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치.
The method of claim 1,
The image restoration unit applies a weight when removing the fog in a dark area from the fog image from which the background noise has been removed, so that the channel values of red (R), green (G) and blue (B) are consistently operated. A device for removing fog and improving visibility.
제4항에 있어서,
상기 영상 복원부는, 상기 어두운 영역의 안개 제거시 가중치를 부여하여 각 적(R), 녹(G) 및 청(B)의 채널 값들이 일관되게 감소하거나 변경되지 않게 하는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치.
The method of claim 4,
The image restoration unit applies a weight when removing the fog in the dark area so that the channel values of red (R), green (G), and blue (B) are not consistently decreased or changed, and A device for improved visibility.
영상 입력부, 전처리부, 대기광 추정부, 배경잡음 제거부, 적응형 제약조건부, 깊이지도 추정부, 전달지도 추정부, 영상 복원부 및 영상 출력부를 포함하는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 구동방법으로서,
영상 입력부에서 안개 성분이 포함된 R, G, B 영상 I(x,y)를 입력하는 영상 입력 단계;
전처리부가, 입력된 안개 영상의 화이트 밸런스를 조정해 전처리하는 단계;
대기광 추정부가, 상기 전처리된 안개 영상의 휘도 채널을 이용하여 대기광을 추정하는 단계;
배경잡음 제거부가, 상기 전처리된 안개 영상의 채도 채널에 저역통과필터를 적용해 배경 잡음을 제거하는 단계;
적응형 제약조건부가, 전처리된 안개 영상의 추정 대기광 및 화소를 이용해 화소의 변화에 따라 적응적으로 변화하는 적응형 제약조건을 생성하는 단계;
깊이지도 추정부가, 등분할된 균일 분포를 갖는 훈련용 영상을 이용하여 기계 학습에 의해 추정되는 매개 변수를 채도 및 밝기와 더 연산하여 깊이지도를 추정하는 단계;
배경 잡음을 제거한 안개 영상의 채도와 밝기의 상관 관계를 추정한 깊이지도를 상기 생성한 적응형 제약조건부에 적용해 상기 전달지도 추정부에서 안개의 빼는 양에 관련된 전달지도를 추정하는 단계;
배경 잡음을 제거한 안개 영상의 안개 제거시 상기 추정한 전달지도를 근거로 아래 [수학식 12]에 의한 가중치를 상기 안개 영상에 적용해 상기 영상 복원부에서 안개 제거 영상을 복원하는 단계; 및
영상 출력부에서, 안개가 존재하는 입력 영상과 안개를 제거 처리한 영상의 출력 영상을 대비하여 보여주는 영상 출력 단계;
를 포함하는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 구동방법.
[수학식 12]
Figure 112020063047501-pat00022

상기에서, x,y는 화소의 위치, J(x,y)는 카메라를 통해 촬영한 안개가 제거된 영상, I(x,y)는 카메라를 통해 촬영한 안개가 포함된 입력 영상, A는 대기 강도 추정에 의해 얻어진 대기광(Atmospheric light), wt(x, y)는 적응형 가중치, t(x,y)는 안개 전달량을 의미하는 전달 지도이다.
Image input unit, preprocessing unit, atmospheric light estimating unit, background noise removing unit, adaptive constraint conditioner, depth map estimation unit, transmission map estimation unit, image restoration unit and image output unit. As a driving method of the device for,
An image input step of inputting an R, G, B image I(x,y) including a fog component from an image input unit;
Preprocessing by adjusting a white balance of the input fog image by a preprocessor;
An atmospheric light estimating unit estimating atmospheric light using a luminance channel of the preprocessed fog image;
A background noise removal unit removing background noise by applying a low pass filter to a saturation channel of the preprocessed fog image;
Generating, by an adaptive constraint condition unit, an adaptive constraint that changes adaptively according to a change of the pixel using the estimated atmospheric light and the pixel of the preprocessed fog image;
Estimating a depth map by further calculating a parameter estimated by machine learning with saturation and brightness using the training image having a uniform distribution divided by the depth map;
Estimating a transfer map related to a subtraction amount of fog from the transfer map estimating unit by applying a depth map obtained by estimating a correlation between saturation and brightness of a fog image from which background noise has been removed, to the generated adaptive constraint condition unit;
Restoring the fog image by the image restoration unit by applying a weight according to the following [Equation 12] to the fog image based on the estimated transmission map when the fog image from which the background noise has been removed; And
An image output step of comparing an input image in which fog is present and an output image of an image obtained by removing the fog, in the image output unit;
A method of driving an apparatus for removing fog and improving visibility for a single image comprising a.
[Equation 12]
Figure 112020063047501-pat00022

In the above, x,y are the location of the pixels, J(x,y) is the image taken by the camera from which the fog has been removed, I(x,y) is the input image including the fog captured by the camera, and A is Atmospheric light obtained by estimation of atmospheric intensity, w t (x, y) is an adaptive weight, and t (x, y) is a transmission map representing the amount of fog transmitted.
삭제delete 제6항에 있어서,
상기 생성하는 단계는,
상기 화소의 평균 및 표준편차를 이용하는 제약조건을 사용하여 상기 안개 영상에서의 안개 제거시 발생하는 검은 픽셀을 방지하는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 구동방법.
The method of claim 6,
The generating step,
A method of driving an apparatus for removing fog and improving visibility for a single image, which prevents black pixels occurring when fog is removed from the fog image by using a constraint using the average and standard deviation of the pixels.
제6항에 있어서,
상기 복원하는 단계는,
상기 배경 잡음을 제거한 안개 영상에서 어두운 영역의 안개 제거시 가중치를 부여하여 각 적(R), 녹(G) 및 청(B)의 채널 값들이 일관되게 동작시키는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 구동방법.
The method of claim 6,
The restoring step,
To remove fog and improve visibility for a single image in which the channel values of red (R), green (G), and blue (B) are consistently operated by weighting when removing the fog in the dark area from the fog image from which the background noise has been removed Method of driving the device for.
제9항에 있어서,
상기 복원하는 단계는,
상기 어두운 영역의 안개 제거시 가중치를 부여하여 각 적(R), 녹(G) 및 청(B)의 채널 값들이 일관되게 감소하거나 변경되지 않게 하는 단일 영상에 대한 안개 제거 및 가시성 향상을 위한 장치의 구동방법.
The method of claim 9,
The restoring step,
A device for removing fog and improving visibility for a single image in which the channel values of red (R), green (G) and blue (B) are not consistently decreased or changed by assigning a weight when removing the fog in the dark area Method of driving.
KR1020190096970A 2019-08-08 2019-08-08 Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof KR102151750B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190096970A KR102151750B1 (en) 2019-08-08 2019-08-08 Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190096970A KR102151750B1 (en) 2019-08-08 2019-08-08 Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof

Publications (1)

Publication Number Publication Date
KR102151750B1 true KR102151750B1 (en) 2020-09-03

Family

ID=72469502

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190096970A KR102151750B1 (en) 2019-08-08 2019-08-08 Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof

Country Status (1)

Country Link
KR (1) KR102151750B1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102238629B1 (en) * 2020-10-13 2021-04-09 한국해양과학기술원 System and method for overcoming low visibility situation based on deep learning
KR102240127B1 (en) * 2020-10-13 2021-04-14 한국해양과학기술원 Surrounding situation monitoring device applying technology for overcoming low visibility situation based on deep learning
KR102483159B1 (en) 2021-09-09 2022-12-29 동아대학교 산학협력단 Method and system for auto image dehazing using machine learning
GB2609983A (en) * 2021-08-20 2023-02-22 Garford Farm Machinery Ltd Image processing
KR102533709B1 (en) * 2021-12-03 2023-05-18 한국전자기술연구원 A sea fog level estimation system based on digital image for protection of aids to navigation
KR20230123735A (en) 2022-02-17 2023-08-24 동아대학교 산학협력단 Machine learning-based single image haze removal system using detail enhancement, and method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140142381A (en) 2013-05-28 2014-12-12 삼성테크윈 주식회사 Method and Apparatus for removing haze in a single image
KR101568971B1 (en) 2011-08-03 2015-11-13 인디안 인스티튜트 오브 테크놀로지, 카라그푸르 Method and system for removal of fog, mist or haze from images and videos
KR101788660B1 (en) 2016-08-12 2017-10-20 포항공과대학교 산학협력단 Apparatus and method for removing haze in a single image
KR20180061504A (en) * 2016-11-29 2018-06-08 엘지전자 주식회사 Image processing apparatus and method for removing haze in image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101568971B1 (en) 2011-08-03 2015-11-13 인디안 인스티튜트 오브 테크놀로지, 카라그푸르 Method and system for removal of fog, mist or haze from images and videos
KR20140142381A (en) 2013-05-28 2014-12-12 삼성테크윈 주식회사 Method and Apparatus for removing haze in a single image
KR101788660B1 (en) 2016-08-12 2017-10-20 포항공과대학교 산학협력단 Apparatus and method for removing haze in a single image
KR20180061504A (en) * 2016-11-29 2018-06-08 엘지전자 주식회사 Image processing apparatus and method for removing haze in image

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
"A Fast Single Image Haze Removal Algorithm Using Color Attenuation Prior" IEEE Transactions on Image Processing(2015), Q Zhu, J Mai, L Shao 등, pp. 3522-3533
"Single Image Haze Removal Using Dark Channel Prior" IEEE Transactions on Pattern Analysis and Machine Intelligence(2011), K He, J Sun, X Tang 등, pp. 2341-2353
"안개량 오추정 영역 보정을 이용한 개선된 Dark Channel Prior 안개 제거 알고리즘" 방송공학회논문지 제21권제5호, 김종현, 차형태, 2016년 9월
Jean-Philippe Tarel ET AL:"Vision Enhancement in Homogeneous and Heterogeneous Fog", IEEE Intelligent Transportation Systems Magazine, Volume: 4, Issue: 2, Summer 2012(2012.04.26.) 1부.* *
Qingsong Zhu ET AL:"A Fast Single Image Haze Removal Algorithm Using Color Attenuation Prior", IEEE Transactions on Image Processing, Volume: 24, Issue: 11, Nov. 2015(2015.11.30.) 1부.* *
미국등록특허공보 제9754356호(2017.09.05. 등록) Method and system for processing an input image based on a guidance image and weights determined thereform

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102238629B1 (en) * 2020-10-13 2021-04-09 한국해양과학기술원 System and method for overcoming low visibility situation based on deep learning
KR102240127B1 (en) * 2020-10-13 2021-04-14 한국해양과학기술원 Surrounding situation monitoring device applying technology for overcoming low visibility situation based on deep learning
GB2609983A (en) * 2021-08-20 2023-02-22 Garford Farm Machinery Ltd Image processing
KR102483159B1 (en) 2021-09-09 2022-12-29 동아대학교 산학협력단 Method and system for auto image dehazing using machine learning
KR102533709B1 (en) * 2021-12-03 2023-05-18 한국전자기술연구원 A sea fog level estimation system based on digital image for protection of aids to navigation
KR20230123735A (en) 2022-02-17 2023-08-24 동아대학교 산학협력단 Machine learning-based single image haze removal system using detail enhancement, and method thereof

Similar Documents

Publication Publication Date Title
KR102151750B1 (en) Apparatus for Removing Fog and Improving Visibility in Unit Frame Image and Driving Method Thereof
US9275445B2 (en) High dynamic range and tone mapping imaging techniques
US9197789B2 (en) Method and system for removal of fog, mist, or haze from images and videos
US11127117B2 (en) Information processing method, information processing apparatus, and recording medium
KR102261532B1 (en) Method and system for image dehazing using single scale image fusion
Ko et al. Artifact-free low-light video enhancement using temporal similarity and guide map
CN111192205A (en) Image defogging method and system and computer readable storage medium
JP2016126750A (en) Image processing system, image processing device, imaging device, image processing method, program, and recording medium
CN110175967B (en) Image defogging processing method, system, computer device and storage medium
Chen et al. Improve transmission by designing filters for image dehazing
KR101881883B1 (en) A visibility Improvement System for foggy/dark image in luminance-color difference signal color coordinate system
KR20230049231A (en) Image enhancement method and apparatus
KR102207441B1 (en) The apparatus and method of HDR imaging generation
KR102346752B1 (en) Image processing system and image processing method
KR102439145B1 (en) Method and system for Auto image dehazing using single scale image fusion
Negru et al. Exponential image enhancement in daytime fog conditions
Srinivas et al. Channel prior based Retinex model for underwater image enhancement
US11201989B2 (en) Processing of impulse noise in a video sequence
KR102111317B1 (en) System and method of transmission rate calculation for suppression of degradation of image quality
Chaudhry et al. Model-assisted content adaptive detail enhancement and quadtree decomposition for image visibility enhancement
KR20100027888A (en) Method for image processing using retinex algorithm
CN112740264A (en) Design for processing infrared images
CN112243118A (en) White balance correction method, device, equipment and storage medium
Stojanović et al. Improved dehazing techniques for maritime surveillance image enhancement
Ganguly et al. Fusion of Mathematical Morphology with Adaptive Gamma Correction for Dehazing and Visibility Enhancement of Images

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant