KR20120030635A - Image processing method for backlight image judgment and image compensation on cell phone camera - Google Patents

Image processing method for backlight image judgment and image compensation on cell phone camera Download PDF

Info

Publication number
KR20120030635A
KR20120030635A KR1020100092252A KR20100092252A KR20120030635A KR 20120030635 A KR20120030635 A KR 20120030635A KR 1020100092252 A KR1020100092252 A KR 1020100092252A KR 20100092252 A KR20100092252 A KR 20100092252A KR 20120030635 A KR20120030635 A KR 20120030635A
Authority
KR
South Korea
Prior art keywords
image
backlight
histogram
mobile phone
backlight image
Prior art date
Application number
KR1020100092252A
Other languages
Korean (ko)
Other versions
KR101146015B1 (en
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 KR1020100092252A priority Critical patent/KR101146015B1/en
Publication of KR20120030635A publication Critical patent/KR20120030635A/en
Application granted granted Critical
Publication of KR101146015B1 publication Critical patent/KR101146015B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of histogram techniques
    • G06T5/92
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • H04M1/0264Details of the structure or mounting of specific components for a camera module assembly

Abstract

PURPOSE: An image processing method for improving back light image quality is provided to compensate back light image by automatically determining the back light image. CONSTITUTION: A mobile phone camera photographs an image(S30). If an auto back light correction function is selected, it is automatically determined whether the photographed image is back light image or not(S40,S50). If the automatic back light image correction function is not selected, the mobile phone camera stores the photographed image or manually selects the back light image correction function(S60). The mobile phone corrects the back light image(S70).

Description

휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법{Image processing method for backlight image judgment and image compensation on cell phone camera}Image processing method for improving backlight image quality based on mobile phone {Image processing method for backlight image judgment and image compensation on cell phone camera}

본 발명은 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법에 관한 것으로, 더욱 세부적으로는 휴대폰 카메라를 사용하여 얻어진 영상의 대비를 개선하는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법에 관한 것이다.The present invention relates to an image processing method for improving a backlight image quality based on a mobile phone, and more particularly, to an image processing method for improving a backlight image quality based on a mobile phone, which improves the contrast of an image obtained using a mobile phone camera. .

현재 휴대폰을 통한 다양한 인터페이스는 더 이상 휴대폰을 부가적인 기기가 아닌 현대 사회의 필수적인 요소로 자리매김하고 있으며, 그 중 휴대폰의 카메라 기능은 독립적인 카메라 기기 없이도 간편하게 휴대폰을 이용하여 사용할 수 있고, 작동도 간편하여 거의 모든 휴대폰에서 카메라 기능이 가능하다.Currently, various interfaces through mobile phones are no longer additional devices, but essential elements of modern society. Among them, camera functions of mobile phones can be used easily without using camera devices. It's so simple that camera functions are available on almost all phones.

그러나, 휴대폰은 카메라 기능을 주요 목적으로 다루는 기기가 아니기 때문에 휴대폰 카메라에서 영상의 높은 질을 기대하는 데에는 어느 정도 한계가 있는데, 물론 기존의 휴대폰에도 카메라 보정기능이 있지만 도 1처럼 사용자가 눈으로 영상을 판단하여 스스로 조정해야 하기 때문에 번거롭고 불편한 문제점이 있다.However, since the mobile phone is not a device that deals with the camera function as a main purpose, there is a limit to expecting the high quality of the video from the mobile phone camera. Of course, the existing mobile phone has a camera correction function, but as shown in FIG. There is a cumbersome and inconvenient problem because you have to judge and adjust yourself.

또한, 휴대폰 내에서 허용할 수 있는 메모리의 크기나 수행 속도 역시 카메라 보정 기능들을 간단하고 단순하게 내장시켰기 때문에 역광 사진들은 휴대폰 카메라 내의 보정 기능으로는 더더욱 영상을 향상시키기가 어렵다.In addition, the amount of memory and performance speed that can be tolerated in a mobile phone also makes camera correction functions simple and simple, so that backlit photos are more difficult to improve with the correction function in a mobile phone camera.

따라서, 휴대폰 카메라에 부가적으로 추가되어 있는 기능들은 단순하고 한 번에 한가지 처리밖에 할 수 없으며, 역광 이미지에 관련해서 개선시켜줄 만한 효과적인 기능이 기존 휴대폰에는 내장되어 있지 않기 때문에, 사용자는 역광 이미지의 사진들을 휴대폰에서 지워버리거나, 또는 순간의 추억을 기억하고자 하는 사람들은 억지로 역광 영상을 PC로 전송하여 영상개선을 할 수 있는 프로그램을 직접 이용하여 이미지를 보정하는 복잡한 과정을 거치는 단점을 갖고 있다.Therefore, the functions added to the mobile phone camera are simple and can only be processed one at a time, and since the existing mobile phones do not have an effective function to improve the backlight image, the user can People who want to erase pictures from their mobile phones or remember the memories of the moment have the disadvantage of going through the complicated process of correcting the images by using a program that can directly improve the image by transferring the backlight image to the PC.

상술한 바와 같은 문제점을 해결하기 위하여, 본 발명은 휴대폰 카메라를 사용하여 얻어진 영상의 대비를 개선하는 것으로, 사용자가 휴대폰으로 사진 촬영시 역광으로 인해서 촬영하려는 대상이 어둡고 화질이 떨어지는 영상이 나오는 경우 자동으로 화질의 질을 판단하고, 역광 이미지라는 것이 판단될 경우 화질을 개선하여 이미지를 선명하고 밝게 처리해주는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법을 제공하는데 목적이 있다.In order to solve the problems described above, the present invention improves the contrast of the image obtained by using a mobile phone camera, when the user is taking a picture with a mobile phone due to backlight when the picture is dark and the image quality is lowered automatically The purpose of the present invention is to provide an image processing method for improving the quality of a backlight image of a mobile phone, which determines the quality of image quality and, when it is determined that the image is a backlight image, improves the image quality and processes the image vividly and brightly.

또한, 본 발명은 휴대폰으로 촬영하기 전에 사용자는 미리 역광을 처리해 줄 것인지 선택할 수 있어 적응적이고, 촬영 후에는 각각의 영상 RGB 색상 대비 분포 값에 따라 스트레칭 기법의 범위를 달리 계산하여 대비를 개선할 수 있는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법을 제공하는데 목적이 있다.In addition, the present invention is adaptive because the user can select whether to handle the backlight in advance before shooting with a mobile phone, after the shooting can be improved by contrasting the range of stretching techniques by calculating the range of stretching according to each image RGB color contrast distribution value An object of the present invention is to provide an image processing method for improving a backlight image quality based on a mobile phone.

목적을 달성하기 위한 방법으로는 휴대폰의 영상 촬영시 역광 이미지를 자동으로 보정할 것인지를 선택하는 제10단계와; 상기 역광 이미지가 자동 보정으로 선택시 이에 해당하는 명령 값을 저장하고, 자동 보정 설정 완료까지 대기하는 제20단계와; 휴대폰 카메라로 영상 촬영 및 저장되는 제30단계와; 역광 자동 보정을 선택했는지 판단하는 제40단계와; 역광 자동 보정이 선택되었다면, 촬영된 이미지가 역광 이미지인지 명암대비기반으로 자동 판단하는 제50단계와; 역광 자동 보정이 선택되지 않았다면, 촬영된 이미지를 그대로 저장하거나 또는 역광 이미지 보정을 수동으로 선택하는 제60단계와; 상기 제50단계에서 역광 이미지인지 판단되거나, 상기 제60단계에서 역광 이미지 보정을 수동으로 선택시, 역광 이미지 대비개선을 실시하여 역광 이미지를 보정하는 제70단계를 포함한다.A method for achieving the object comprises the step 10 of selecting whether to automatically correct the backlight image when the image of the mobile phone; A 20th step of storing a command value corresponding to the backlight image when the backlight image is selected as the automatic correction and waiting for completion of the automatic correction setting; A thirtieth step of capturing and storing an image with a mobile phone camera; Determining whether the backlight automatic correction is selected; If the backlight automatic correction is selected, automatically determining whether the photographed image is a backlight image based on contrast; If backlight automatic correction has not been selected, step 60 for storing the photographed image as it is or manually selecting backlight image correction; In step 50, if it is determined that the backlight image is selected, or when the backlight image correction is manually selected in step 60, the backlight image correction may be performed to correct the backlight image.

상기한 바와 같이, 본 발명은 휴대폰 카메라로 얻어진 역광 이미지를 PC상에 옮겨 처리하지 않고 휴대폰에서 간단히 보정할 수 있고, 사진을 찍는 것과 동시에 이미지가 역광으로 촬영되었는지 아닌지를 판단할 수 있어 사용자가 직접 판단하지 않고 처리할 수 있는 자동처리를 제공하며, 시스템의 이미지 처리 과정에 있어서 수행을 최소로하여 이미지 보정 처리속도가 빠른 효과가 있다.As described above, the present invention can be easily corrected in the mobile phone without processing the backlight image obtained by the mobile phone camera on the PC, and it is possible to determine whether the image was taken with backlight at the same time as the picture is taken and the user directly It provides automatic processing that can be processed without judgment, and has an effect of speeding up image correction processing by minimizing performance in the image processing process of the system.

또한, 본 발명은 기존의 스트레칭 방법을 기반으로 하여 향상된 스트레칭 방법을 제공함으로써 명암대비를 보다 향상시킬 수 있고, 휴대폰의 메모리를 추가할 필요가 없어 추가비용이 들어가지 않으며, 휴대폰에서 처리하는 방식으로 부가적인 이미지 보정 프로그램이나 도구가 필요하지 않고, 사용자가 촬영한 순간에 자동으로 보정할 것인지를 선택할 수 있기 때문에 기능면에서 적응적이고 보다 효과적으로 사용 가능하다.In addition, the present invention can improve the contrast by providing an improved stretching method based on the existing stretching method, there is no need to add the memory of the mobile phone does not add additional cost, the way to handle in the mobile phone No additional image correction program or tool is required, and the user can choose whether to correct automatically at the moment of shooting, so it is adaptive and more effective in terms of function.

도 1은 본 발명에 따른 휴대폰 기반의 역광 영상 화질 개선의 개략도.
도 2는 본 발명에 따른 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법의 순서도.
도 3은 본 발명에 따른 자동 보정 설정 과정을 나타낸 순서도.
도 4는 본 발명에 따른 자동 역광 보정 설정시 역광 이미지 판단 과정을 나타낸 순서도.
도 5는 본 발명에 따른 역광 이미지를 판별하기 위한 참고 사진.
도 6은 본 발명에 따른 역광 이미지 보정 과정을 나타낸 순서도.
도 7은 본 발명에 따른 Valley점을 찾는 방법을 나타낸 참고도.
도 8은 본 발명에 따른 원본 이미지와 스트레칭된 각각의 RGB 히스토그램을 병합하여 보정된 이미지 예를 보여주는 참고도.
1 is a schematic diagram of a mobile phone-based backlight image quality improvement according to the present invention.
2 is a flowchart of an image processing method for improving a backlight image quality based on a mobile phone according to the present invention;
Figure 3 is a flow chart illustrating a process for setting automatic correction in accordance with the present invention.
4 is a flowchart illustrating a backlight image determination process in setting automatic backlight compensation according to the present invention.
5 is a reference picture for determining a backlight image according to the present invention.
6 is a flowchart illustrating a backlight image correction process according to the present invention.
7 is a reference diagram showing a method for finding a valley point according to the present invention.
8 is a reference diagram showing an example of an image corrected by merging the original RGB image and each stretched RGB histogram according to the present invention.

도 1은 본 발명에 따른 휴대폰 기반의 역광 영상 화질 개선의 개략도이고, 도 2는 본 발명에 따른 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법의 순서도이고, 도 3은 본 발명에 따른 자동 보정 설정 과정을 나타낸 순서도이고, 도 4는 본 발명에 따른 자동 역광 보정 설정시 역광 이미지 판단 과정을 나타낸 순서도이고, 도 5는 본 발명에 따른 역광 이미지를 판별하기 위한 참고 사진이고, 도 6은 본 발명에 따른 역광 이미지 보정 과정을 나타낸 순서도이고, 도 7은 본 발명에 따른 Valley점을 찾는 방법을 나타낸 참고도이고, 도 8은 본 발명에 따른 원본 이미지와 스트레칭된 각각의 RGB 히스토그램을 병합하여 보정된 이미지 예를 보여주는 참고도이다.1 is a schematic diagram of improving a backlight image quality based on a mobile phone according to the present invention, FIG. 2 is a flowchart of an image processing method for improving backlight image quality based on a mobile phone according to the present invention, and FIG. 3 is an automatic correction according to the present invention. 4 is a flowchart illustrating a setting process, FIG. 4 is a flowchart illustrating a process of determining a backlight image when setting automatic backlight compensation according to the present invention, FIG. 5 is a reference picture for determining a backlight image according to the present invention, and FIG. FIG. 7 is a reference diagram illustrating a method of finding a valley point according to the present invention, and FIG. 8 is a view corrected by merging an original image and each stretched RGB histogram according to the present invention. See also an example image.

이하, 도면을 참고로 본 발명의 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법을 설명하면 다음과 같다.Hereinafter, an image processing method for improving a backlight image quality based on a mobile phone of the present invention will be described with reference to the accompanying drawings.

도 1은 본 발명의 휴대폰 기반 역광 영상 화질 개선의 개략적인 도면으로, 사용자가 휴대폰 카메라를 이용하여 영상을 촬영하고 자동 또는 역광 이미지를 판단하여 영상을 보정한다.1 is a schematic diagram of a mobile phone-based backlight image quality improvement of the present invention, in which a user photographs an image using a mobile phone camera and determines an automatic or backlight image and corrects the image.

도 2는 본 발명의 휴대폰 기반 역광 영상 화질 개선을 위한 영상처리 방법을 나타낸 순서도로서, 휴대폰의 영상 촬영시 역광 이미지를 자동으로 보정할 것인지를 선택하는 제10단계(S10)와, 상기 역광 이미지가 자동 보정으로 선택시 이에 해당하는 명령 값을 저장하고, 자동 보정 설정 완료까지 대기하는 제20단계(S20)와, 휴대폰 카메라로 영상 촬영 및 저장되는 제30단계(S30)와, 역광 자동 보정을 선택했는지 판단하는 제40단계(S40)와, 역광 자동 보정이 선택되었다면, 촬영된 이미지가 역광 이미지인지 명암대비기반으로 자동 판단하는 제50단계(S50)와, 역광 자동 보정이 선택되지 않았다면, 촬영된 이미지를 그대로 저장하거나 또는 역광 이미지 보정을 수동으로 선택하는 제60단계(S60)와, 상기 제50단계(S50)에서 역광 이미지인지 판단되거나, 상기 제60단계(S60)에서 역광 이미지 보정을 수동으로 선택시, 역광 이미지 대비개선을 실시하여 역광 이미지를 보정하는 제70단계(S70)를 포함한다.FIG. 2 is a flowchart illustrating an image processing method for improving a mobile phone-based backlight image quality according to an embodiment of the present invention. The tenth step (S10) of selecting whether to automatically correct a backlight image when an image of the mobile phone is photographed is performed. When the user selects the automatic correction, the corresponding command value is stored and waits until the completion of the automatic correction setting (S20), the thirtieth step (S30) captured and stored by the camera of the mobile phone, and the backlight automatic correction is selected. Step S40 of determining whether or not the automatic backlight compensation is selected, if it is selected, the step 50 of automatically determining whether the photographed image is a backlight image based on contrast, and if the backlight automatic correction is not selected, In step 60, the image is stored as it is or the backlight image correction is manually selected, and whether it is the backlight image is determined in the 50th step S50, or the 60th step S60. In step S70, when the backlight image correction is manually selected in step S70, the backlight image correction is performed to correct the backlight image.

도 3은 상기 역광 이미지 자동 보정에 따른 설정 완료 및 대기하는 제20단계(S20)의 세부 구성도로서, 역광 이미지가 자동 보정으로 선택되는 제21단계(S21)와, 선택된 명령 값이 저장되는 제22단계(S22)와, 상기 명령 값에 의해 촬영된 이미지를 처리하도록 영상사이즈 크기의 메모리를 할당하는 제23단계(S23)와, 각 RGB 데이터 크기 메모리를 할당하는 제24단계(S24)를 포함한다.FIG. 3 is a detailed configuration diagram of a 20th step S20 of completing setting and waiting according to the automatic backlight image correction, in which a backlight image is selected as an automatic correction in step 21, and a selected command value is stored. A twenty-second step (S22), a twenty-third step (S23) of allocating a memory of an image size size to process an image captured by the command value, and a twenty-fourth step (S24) of allocating each RGB data size memory; do.

도 4는 상기 역광 자동 보정 선택에 따른 촬영된 이미지가 역광 이미지인지 판단하는 제50단계(S50)의 세부 구성도로서, 촬영된 영상이 입력되면 RGB 컬러 영상을 회색 이미지로 변환하는 제51단계(S51)와, 변환된 회색 이미지의 명암대비 히스토그램을 생성하는 제52단계(S52)와, 히스토그램의 분포에 따른 평균값을 계산하는 제53단계(S53)와, 설정된 파라미터 값을 기준으로 역광 이미지인지를 판단하는 제54단계(S54)와, 역광 이미지일 경우 이미지 보정 후 저장하는 제55단계(S55)를 포함한다.FIG. 4 is a detailed configuration diagram of step 50 (S50) of determining whether a photographed image according to the backlight auto-correction selection is a backlight image, and converting an RGB color image into a gray image when the photographed image is input. S51), a 52 th step (S52) of generating a contrast histogram of the converted gray image, a 53 th step (S53) of calculating an average value according to the distribution of the histogram, and a backlight image based on the set parameter value. In operation S54, the method may include determining whether the image is backlit, and storing the image after correcting the image in operation S55.

도 5는 역광 이미지를 판별하기 위한 참고 사진을 보여주는데, 상기 역광 이미지를 판단하는 제54단계(S54)는 회색 이미지의 히스토그램 상에서 어두운 밝기영역(도 5의 부호 A)의 분포도를 계산하여 지정한 파라미터 값(도 5의 부호 C)보다 큰지 판단하는 제54-1단계(S54-1)와, 지정한 파라미터 값(도 5의 부호 C)보다 크다면, 히스토그램 상에서 밝은 영역(도 5의 부호 B)의 분포도와 비교하는 제54-2단계(S54-2)와, 상기 어두운 밝기영역(도 5의 부호 A)의 값이 더 크면 어두운 역광 이미지로 결정하여 색상보정과 밝기를 개선하는 제54-3단계(S54-3)를 포함한다.FIG. 5 shows a reference picture for determining a backlight image. In operation 54 of determining the backlight image, a parameter value designated by calculating a distribution degree of a dark brightness region (symbol A of FIG. 5) on a histogram of a gray image is illustrated. Step 54-1 (S54-1) for determining whether it is greater than (C in FIG. 5), and if it is larger than the designated parameter value (symbol C in FIG. 5), the distribution diagram of the bright area (symbol B in FIG. 5) on the histogram Step 54-2 to compare with (S54-2), and if the value of the dark brightness area (symbol A in Fig. 5) is larger than step 54-3 to determine the dark backlight image to improve color correction and brightness ( S54-3).

도 6은 상기 역광 이미지 대비개선을 실시하여 역광 이미지를 보정하는 제70단계(S70)의 세부 구성도로서, 보정할 영상이 입력되면 각 RGB 색상의 히스토그램을 생성하는 제71단계(S71)와, RGB 각 색상의 히스토그램을 병합하여 하나의 히스토그램을 생성하고 Valley점을 찾는 제72단계(S72)와, 상기 Valley점에 따른 분포도를 계산하는 제73단계(S73)와, 상기 분포도에 따른 스트레칭 적용범위를 계산하는 제74단계(S74)와, 각 RGB 적용 범위만큼 스트레칭을 연산하는 제75단계(S75)와, 상기 스트레칭된 RGB 히스토그램을 병합하여, 역광 이미지에서 보정된 영상을 생성 후 저장하는 제76단계(S76)를 포함한다.FIG. 6 is a detailed configuration diagram of a seventy step S70 of correcting a backlight image by improving the backlight image contrast, and generating a histogram of each RGB color when an image to be corrected is input; 72 step (S72) of generating a histogram by merging the histograms of each color of RGB and finding a valley point, step 73 (S73) of calculating a distribution point according to the valley point, and stretching application ranges according to the distribution point A seventy-seventh step (S74) of calculating a value, a seventy-seventh step (S75) of calculating a stretch by each RGB application range, and merging the stretched RGB histogram to generate and store a corrected image in a backlight image Step S76 is included.

상기 Valley점은 도 7에서와 같이, 히스토그램은 가장 어두운 0의 위치에서 가장 밝은 255의 위치까지 높이 솟은 Peak 점들과 움푹 패인 Valley 점들로 이루어져 있는데, 즉 Valley 점은 움푹 패인 지점들을 의미한다.As shown in FIG. 7, the histogram is composed of peak points and pitted valley points that rise from the darkest 0 position to the brightest 255 position, that is, the valley point means the recessed points.

상기 Valley점을 찾는 제72단계(S72)는 도 7의 좌측 첫 번째 그림의 히스토그램을 보면 증가와 감소가 너무 급진적으로 변화하는 것을 볼 수 있는데, 이러한 히스토그램으로 Peak 점과 Valley 점을 찾기란 쉽지 않으므로, 히스토그램 양쪽의 이웃한 분포도와 합하여 평균이 되는 값을 구해 히스토그램을 바꾸어 주면 도 7의 좌측 두 번째 그림과 같이 부드러운 곡선의 히스토그램을 구할 수 있다(S72-1 단계).In the 72th step (S72) of finding the valley point, the histogram of the first figure on the left side of FIG. 7 shows that the increase and decrease change too radically. In addition, if the histogram is changed by calculating the average value by adding the neighboring distributions on both sides of the histogram, the histogram of the smooth curve can be obtained as shown in the second image on the left of FIG. 7 (step S72-1).

그런 다음, 각각의 밝기 값을 누적하여 해당 히스토그램의 누적그래프를 도 7의 좌측 세 번째 그림과 같이 생성하고(S72-2 단계), 상기 누적그래프가 생성되면 도 7의 우측 첫 번째 그림과 같이 뒤에서부터 그래프의 각도를 계산하는데(S72-3 단계), 상기 도 7의 우측 첫 번째 그림에서도 볼 수 있듯이 기울기가 처음은 0이였다가 점점 증가하는 것을 볼 수 있으나, 점점 증가하는 기울기는 다시금 감소하는 구간이 나타나게 되며, 이 처음 지점이 바로 Peak 지점에서 Valley 지점으로 내려가는 위치인 즉 Peak 점이 되고, 이와 반대로 점점 기울기가 내려가다가 다시금 증가하는 지점은 Valley 지점에서 Peak 지점으로 올라가는 즉 Valley 지점이 되는 위치인 것이다.Then, by accumulating each brightness value, a cumulative graph of the corresponding histogram is generated as shown in the third image on the left side of FIG. 7 (step S72-2). To calculate the angle of the graph from (step S72-3), as shown in the first picture on the right of FIG. 7, the slope is initially 0 and gradually increases, but the gradually increasing slope is decreased again. This first point is the position that goes down from the peak point to the valley point, that is, the peak point, and on the contrary, the point where the slope gradually decreases and then increases again is the position that goes up from the valley point to the peak point, that is, the valley point. .

상기 기울기의 증가와 감소가 되는 지점들을 다 찾아내면 도 7의 우측 두 번째 그림과 같이 히스토그램의 Peak 지점과 Valley 지점을 최종적으로 구할 수 있으며(S72-4 단계), 본 발명에서 필요한 것은 Valley 지점이기 때문에 상기 구해진 Peak 지점은 제거되고 도 7의 우측 세 번째 그림과 같이 필요한 Valley 지점을 찾으면 된다(S72-5 단계).If all the points of the increase and decrease of the slope are found, the peak point and the valley point of the histogram can be finally obtained as shown in the second figure on the right side (step S72-4). Therefore, the obtained peak point is removed and the required valley point is found as shown in the right third picture of FIG. 7 (step S72-5).

상기 도 7의 우측 세 번째 그림에서는 최종적으로 찾아진 Valley 지점이 6개임을 알 수 있다(도 7의 우측 세 번째 그림의 부호 1 내지 6).It can be seen from the right third figure of FIG. 7 that six valley points were finally found (symbols 1 to 6 of the right third figure of FIG. 7).

상기 6개의 지점을 기반으로 각각의 영역에 대한 분포도를 계산하는 제73단계(S73)는 상기 도 7의 우측 세 번째 그림에서 1번 Valley 지점에서 2번 Valley 지점까지 밝기 분포도가 얼마인지 계산하고, 2번에서 3번 지점까지의 밝기 분포도도 계산하며, 이렇게 6번 지점까지 차례로 계산된 값이 각 영역을 얼마만큼 스트레칭할 것인지에 대한 비율 값이 된다.Step 73 (S73) of calculating distributions for each area based on the six points calculates the brightness distribution from Valley No. 1 to Valley No. 2 in the third image on the right side of FIG. The brightness distribution from point 2 to point 3 is also calculated, and the value calculated in turn up to point 6 is a ratio of how much each region is stretched.

상기 1번 지점에서 6번 지점까지의 분포율을 바탕으로 각각의 영역들을 히스토그램의 전체 길이(0에서 255까지의 밝기)에 몇 %까지 스트레칭할 것인지를 계산하여 분포도에 따른 스트레칭 적용범위를 계산하고(S74 단계), % 값이 나오면 이 값으로 전체 길이 255에서 스트레칭을 적용할 범위를 계산할 수 있으므로, 이 범위까지만 스트레칭 기법을 적용시킨다(S75 단계). 이것은 RGB 히스토그램에서 모두 이루어져야 하기 때문에 상기와 같은 작업이 3회 진행되며, 최종적으로 각각의 RGB 히스토그램 모두 스트레칭이 이루어졌으면 이 3개의 히스토그램을 병합하여 역광 이미지에서 보정된 영상을 생성하게 된다(S76 단계).On the basis of the distribution rate from point 1 to point 6, each region is calculated by the percentage of stretching to the total length of the histogram (brightness from 0 to 255) to calculate the stretching coverage according to the distribution ( Step S74), when the% value is obtained, the stretching range may be calculated using the total length 255, and the stretching technique is applied only to this range (step S75). Since the above operation is performed three times since all of the RGB histograms are performed, and when all the RGB histograms are stretched, the three histograms are merged to generate a corrected image from the backlight image (step S76). .

도 8은 원본 이미지와 스트레칭된 각각의 RGB 히스토그램을 병합하여 보정된 이미지의 예를 보여주는 것으로, 도 8의 좌측 첫 번째 그림인 원본 이미지의 역광으로 인해 건축물이 보이지 않고 전반적으로 어두운 이미지를 띄고 있으며, 도 8의 좌측 두 번째 그림인 히스토그램을 봐도 알 수 있듯이 RGB의 분포가 어두운 위치에 물려 있는 것을 알 수 있다.FIG. 8 shows an example of an image corrected by merging the stretched RGB histogram with the original image. The image is dark due to backlight of the original image, which is the first picture on the left of FIG. As can be seen from the histogram, which is the second figure on the left of FIG. 8, it can be seen that the RGB distribution is bitten at a dark position.

이를 상기에서 설명한 것처럼, 부분 스트레칭을 하게 되면 도 8의 우측 첫 번째 그림과 같은 결과 값을 얻을 수 있으며, 건축물의 명암이 개선되었음을 알 수 있고, 영상이 전반적으로 밝아져서 명암대비 개선된 이미지를 얻을 수 있으며, 도 8의 우측 두 번째 그림과 같이 히스토그램에서도 분포도가 높은 곳은 넓은 간격으로 스트레칭 되고 분포도가 작은 지역은 좁은 간격으로 스트레칭 되었음을 알 수 있다.As described above, when the partial stretching is obtained, the result value as shown in the first picture on the right of FIG. 8 can be obtained, and the contrast of the building is improved, and the image is generally brightened to obtain the improved contrast image. In the histogram, as shown in the second right side of FIG. 8, it can be seen that the high distribution region is stretched at a wide interval and the small distribution region is stretched at a narrow interval.

따라서, 본 발명은 휴대폰 카메라를 사용하여 얻어진 영상의 대비를 개선하는 것으로, 사용자가 휴대폰으로 사진 촬영시 역광으로 인해서 촬영하려는 대상이 어둡고 화질이 떨어지는 영상이 나오는 경우 자동으로 화질의 질을 판단하고, 역광 이미지라는 것이 판단될 경우 화질을 개선하여 이미지를 선명하고 밝게 처리해 줄 수 있다.Therefore, the present invention improves the contrast of the image obtained by using a mobile phone camera, when the user is taking a picture with the mobile phone due to backlight when the target image is dark and the image quality is lowered automatically determines the quality of the image, If it is determined that it is a backlight image, the image quality can be improved to make the image clearer and brighter.

또한, 본 발명은 휴대폰으로 촬영하기 전에 사용자는 미리 역광을 처리해 줄 것인지 선택할 수 있어 적응적이고, 촬영 후에는 각각의 영상 RGB 색상 대비 분포 값에 따라 스트레칭 기법의 범위를 달리 계산하여 대비를 개선할 수 있다.In addition, the present invention is adaptive because the user can select whether to handle the backlight in advance before shooting with a mobile phone, after the shooting can be improved by contrasting the range of stretching techniques by calculating the range of stretching according to each image RGB color contrast distribution value have.

본 발명은 특정의 실시 예와 관련하여 도시 및 설명하였지만, 첨부된 특허청구범위에 의해 나타난 발명의 사상 및 영역으로부터 벗어나지 않는 한도 내에서 다양한 개조 및 변화가 가능하다는 것을 당업계에서 통상의 지식을 가진 자라면 누구나 쉽게 알 수 있을 것이다.Although the present invention has been shown and described with respect to specific embodiments thereof, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined by the appended claims. Anyone who can afford it will know.

Claims (6)

휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법에 있어서,
휴대폰의 영상 촬영시 역광 이미지를 자동으로 보정할 것인지를 선택하는 제10단계(S10)와;
상기 역광 이미지가 자동 보정으로 선택시 이에 해당하는 명령 값을 저장하고, 자동 보정 설정 완료까지 대기하는 제20단계(S20)와;
휴대폰 카메라로 영상 촬영 및 저장되는 제30단계(S30)와;
역광 자동 보정을 선택했는지 판단하는 제40단계(S40)와;
역광 자동 보정이 선택되었다면, 촬영된 이미지가 역광 이미지인지 명암대비기반으로 자동 판단하는 제50단계(S50)와;
역광 자동 보정이 선택되지 않았다면, 촬영된 이미지를 그대로 저장하거나 또는 역광 이미지 보정을 수동으로 선택하는 제60단계(S60)와;
상기 제50단계(S50)에서 역광 이미지인지 판단되거나, 상기 제60단계(S60)에서 역광 이미지 보정을 수동으로 선택시, 역광 이미지 대비개선을 실시하여 역광 이미지를 보정하는 제70단계(S70)를 포함하는 것을 특징으로 하는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법.
An image processing method for improving a backlight image quality based on a mobile phone,
A tenth step (S10) of selecting whether to automatically correct a backlight image when the image of the mobile phone is taken;
A 20th step (S20) of storing a command value corresponding to the backlight image when the backlight image is selected as an automatic correction and waiting for completion of the automatic correction setting;
A thirtieth step (S30) of capturing and storing an image with a mobile phone camera;
A 40th step S40 of determining whether the backlight automatic correction is selected;
If the backlight automatic correction is selected, step 50 (S50) for automatically determining whether the photographed image is a backlight image based on contrast;
If backlight automatic correction is not selected, step 60 (S60) of storing the captured image as it is or manually selecting backlight image correction;
If it is determined in step 50 that the backlight image is determined or if the backlight image correction is manually selected in step 60, step 70 of correcting the backlight image is performed by improving the contrast of the backlight image. Image processing method for improving the backlight image quality based on the mobile phone, characterized in that it comprises a.
제 1항에 있어서, 상기 제20단계(S20)는
역광 이미지가 자동 보정으로 선택되는 제21단계(S21)와;
선택된 명령 값이 저장되는 제22단계(S22)와;
상기 명령 값에 의해 촬영된 이미지를 처리하도록 영상사이즈 크기의 메모리를 할당하는 제23단계(S23)와;
각 RGB 데이터 크기 메모리를 할당하는 제24단계(S24)를 포함하는 것을 특징으로 하는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법.
The method of claim 1, wherein the 20th step (S20)
A twenty-first step S21 in which the backlight image is selected for automatic correction;
A twenty-second step S22 of storing the selected command value;
A twenty-third step (S23) of allocating a memory having an image size to process an image captured by the command value;
And a twenty-fourth step (S24) of allocating each RGB data size memory.
제 1항에 있어서, 상기 제50단계(S50)는
촬영된 영상이 입력되면 RGB 컬러 영상을 회색 이미지로 변환하는 제51단계(S51)와;
변환된 회색 이미지의 명암대비 히스토그램을 생성하는 제52단계(S52)와;
히스토그램의 분포에 따른 평균값을 계산하는 제53단계(S53)와;
설정된 파라미터 값을 기준으로 역광 이미지인지를 판단하는 제54단계(S54)와;
역광 이미지일 경우 이미지 보정 후 저장하는 제55단계(S55)를 포함하는 것을 특징으로 하는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법.
The method of claim 1, wherein the 50th step (S50)
A 51 st step of converting an RGB color image into a gray image when the captured image is input;
A 52nd step (S52) of generating a contrast histogram of the converted gray image;
Calculating an average value according to the distribution of the histogram (S53);
A step S54 of determining whether the backlight image is based on the set parameter value;
The image processing method for improving the backlight image quality of the mobile phone, characterized in that it comprises a 55 step (S55) for storing after the image correction in the case of a backlight image.
제 3항에 있어서, 제 3항에 있어서, 상기 제54단계(S54)는
회색 이미지의 히스토그램 상에서 어두운 밝기영역의 분포도를 계산하여 지정한 파라미터 값보다 큰지 판단하는 제54-1단계(S54-1)와;
지정한 파라미터 값보다 크다면, 히스토그램 상에서 밝은 영역의 분포도와 비교하는 제54-2단계(S54-2)와;
상기 어두운 밝기영역의 값이 더 크면 어두운 역광 이미지로 결정하여 색상보정과 밝기를 개선하는 제54-3단계(S54-3)를 포함하는 것을 특징으로 하는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법.
The method of claim 3, wherein the 54th step (S54) is
Step 54-1 (S54-1) of calculating a distribution degree of the dark brightness area on the histogram of the gray image to determine whether the value is greater than a specified parameter value;
Step 54-2 (S54-2) comparing the degree of distribution of bright areas on the histogram if greater than a specified parameter value;
If the value of the dark brightness area is larger, the image processing for improving the backlight image quality of the mobile phone, characterized in that it comprises a step 54-3 (S54-3) to determine the dark backlight image to improve color correction and brightness. Way.
제 1항에 있어서, 상기 제70단계(S70)는
보정할 영상이 입력되면 각 RGB 색상의 히스토그램을 생성하는 제71단계(S71)와;
RGB 각 색상의 히스토그램을 병합하여 하나의 히스토그램을 생성하고 Valley점을 찾는 제72단계(S72)와;
상기 Valley점에 따른 분포도를 계산하는 제73단계(S73)와;
상기 분포도에 따른 스트레칭 적용범위를 계산하는 제74단계(S74)와;
각 RGB 적용 범위만큼 스트레칭을 연산하는 제75단계(S75)와;
상기 스트레칭된 RGB 히스토그램을 병합하여, 역광 이미지에서 보정된 영상을 생성 후 저장하는 제76단계(S76)를 포함하는 것을 특징으로 하는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법.
The method of claim 1, wherein the seventy step (S70)
A 71 st step (S71) of generating a histogram of each RGB color when an image to be corrected is input;
A 72 th step (S72) of generating a histogram by merging the histograms of respective RGB colors and finding valley points;
A 73 th step (S73) of calculating a distribution degree according to the valley point;
A 74th step (S74) of calculating a stretching application range according to the distribution;
A seventy-fifth step S75 of calculating stretching by each RGB application range;
And a step S76 of merging the stretched RGB histograms to generate and store a corrected image from a backlight image.
제 5항에 있어서, 상기 제72단계(S72)는
히스토그램 양쪽의 이웃한 분포도와 합하여 평균이 되는 값을 구해 히스토그램을 바꾸어 부드러운 곡선의 히스토그램을 구하는 제72-1단계(S72-1)와;
각각의 밝기 값을 누적하여 해당 히스토그램의 누적그래프를 생성하는 제72-2단계(S72-2)와;
상기 누적그래프가 생성되면 뒤에서부터 그래프의 각도를 계산하는 제72-3단계(S72-3)와;
기울기의 증가와 감소가 되는 지점을 찾은 후 히스토그램의 Peak 지점과 Valley 지점을 최종적으로 구하는 제72-4단계(S72-4)와;
상기 구해진 Peak 지점은 제거되고 필요한 Valley 지점을 찾는 제72-5단계(S72-5)를 포함하는 것을 특징으로 하는 휴대폰 기반의 역광 영상 화질 개선을 위한 영상처리 방법.
The method of claim 5, wherein the 72th step (S72)
Step 72-1 (S72-1) of obtaining a smooth curve histogram by changing the histogram by calculating a mean value by adding the neighboring distributions of both histograms;
Step 72-2 (S72-2) of accumulating respective brightness values to generate a cumulative graph of the histogram;
A 72-3 step (S72-3) of calculating the angle of the graph from the back when the cumulative graph is generated;
Step 72-4 (S72-4) of finally finding peak and valley points of the histogram after finding a point where the slope increases and decreases;
The obtained peak point is removed and the image processing method for improving the backlight image quality of the mobile phone based on the step 72-5 (S72-5) to find the required valley point.
KR1020100092252A 2010-09-20 2010-09-20 Image processing method for backlight image judgment and image compensation on cell phone camera KR101146015B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100092252A KR101146015B1 (en) 2010-09-20 2010-09-20 Image processing method for backlight image judgment and image compensation on cell phone camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100092252A KR101146015B1 (en) 2010-09-20 2010-09-20 Image processing method for backlight image judgment and image compensation on cell phone camera

Publications (2)

Publication Number Publication Date
KR20120030635A true KR20120030635A (en) 2012-03-29
KR101146015B1 KR101146015B1 (en) 2012-05-15

Family

ID=46134507

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100092252A KR101146015B1 (en) 2010-09-20 2010-09-20 Image processing method for backlight image judgment and image compensation on cell phone camera

Country Status (1)

Country Link
KR (1) KR101146015B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016024668A1 (en) * 2014-08-11 2016-02-18 엘지전자 주식회사 Mobile terminal and control method therefor

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101801266B1 (en) 2016-02-01 2017-11-28 한양대학교 에리카산학협력단 Method and Apparatus for image classification

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4104936B2 (en) 2002-08-28 2008-06-18 株式会社東芝 Backlight correction control apparatus and backlight correction control method
KR100492120B1 (en) * 2003-02-13 2005-06-01 삼성전자주식회사 Photographing apparatus having function of back light compensation and control method thereof
JP4270001B2 (en) 2004-03-29 2009-05-27 日本電気株式会社 Mobile terminal device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016024668A1 (en) * 2014-08-11 2016-02-18 엘지전자 주식회사 Mobile terminal and control method therefor

Also Published As

Publication number Publication date
KR101146015B1 (en) 2012-05-15

Similar Documents

Publication Publication Date Title
US8994845B2 (en) System and method of adjusting a camera based on image data
KR101812807B1 (en) A method of adaptive auto exposure contol based upon adaptive region's weight
US8781225B2 (en) Automatic tone mapping method and image processing device
US20090027515A1 (en) Image pickup apparatus
CN100553301C (en) The modification method of brightness
CN102946513A (en) Method, device and terminal for starting HDR (high-dynamic range) function of shooting device
JP2007124087A (en) Imaging apparatus, gradation correction method, and program
CN104052933A (en) Method for determining dynamic range mode, and image obtaining apparatus
CN110930341A (en) Low-illumination image enhancement method based on image fusion
CN103516984A (en) Method and device for intelligently switching to HDR mode of camera
CN112950499B (en) Image processing method, device, electronic equipment and storage medium
CN112118388A (en) Image processing method, image processing device, computer equipment and storage medium
KR101113483B1 (en) Apparatus for enhancing visibility of color image
CN112261292B (en) Image acquisition method, terminal, chip and storage medium
CN103905740A (en) Method and device for improving automatic exposure effect realized through manual adjustment
CN112365550A (en) Display calibration method and device, terminal, calibration system and storage medium
KR101146015B1 (en) Image processing method for backlight image judgment and image compensation on cell phone camera
JP6632724B2 (en) Device and method for reducing exposure time set for high dynamic range video / imaging
JP2020102666A (en) Image processing device, imaging apparatus, image processing method, and program
JP6679321B2 (en) Image processing apparatus, image processing method, and program
CN106847150B (en) Device and method for adjusting brightness of display screen
JP2009004966A (en) Imaging apparatus
KR100752850B1 (en) Digital image photographing apparatus and method
JP2006093757A (en) Image processing apparatus, imaging apparatus, and image processing program
EP2658245A1 (en) System and method of adjusting camera image data

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20170410

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee