[go: up one dir, main page]

CN104299188A - Image correction method and image correction system - Google Patents

Image correction method and image correction system Download PDF

Info

Publication number
CN104299188A
CN104299188A CN201310301477.9A CN201310301477A CN104299188A CN 104299188 A CN104299188 A CN 104299188A CN 201310301477 A CN201310301477 A CN 201310301477A CN 104299188 A CN104299188 A CN 104299188A
Authority
CN
China
Prior art keywords
area
glare
ghost
minimum enclosing
pixel
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201310301477.9A
Other languages
Chinese (zh)
Other versions
CN104299188B (en
Inventor
吴海洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiashan Weitang Asset Management Co ltd
Original Assignee
Shenzhen Futaihong Precision Industry Co Ltd
Chi Mei Communication Systems Inc
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 Shenzhen Futaihong Precision Industry Co Ltd, Chi Mei Communication Systems Inc filed Critical Shenzhen Futaihong Precision Industry Co Ltd
Priority to CN201310301477.9A priority Critical patent/CN104299188B/en
Publication of CN104299188A publication Critical patent/CN104299188A/en
Application granted granted Critical
Publication of CN104299188B publication Critical patent/CN104299188B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

本发明提供一种图像修正方法,该方法包括步骤:获取图像;获取所述图像中亮度值大于一个预设亮度值的像素点,根据该像素点确定一个最小包围区域,并根据该最小包围区域确定所述图像中鬼影和/或炫光所在的区域;及修正所述鬼影和/或炫光所在的区域。本发明还提供一种图像修正系统。利用本发明可以在电子设备中修正图像的鬼影和炫光。

The present invention provides an image correction method, which comprises the steps of: acquiring an image; acquiring a pixel point in the image whose luminance value is greater than a preset luminance value, determining a minimum enclosing area according to the pixel point, and determining a minimum enclosing area according to the minimum enclosing area Determining areas of the image where ghosts and/or flares are located; and Correcting areas where the ghosting and/or flares are located. The invention also provides an image correction system. The invention can correct image ghost and glare in electronic equipment.

Description

图像修正方法及系统Image correction method and system

技术领域 technical field

本发明涉及一种图像处理方法及系统,尤其是涉及一种在电子设备中修正图像的方法及系统。 The invention relates to an image processing method and system, in particular to a method and system for correcting images in electronic equipment.

背景技术 Background technique

随着手机性能的提高,消费者对手机中摄像头的要求也在逐步提升,而该提升主要体现在摄像头的成像效果上。由于强光源以及摄像头的镜头等因素,摄像头拍摄的图像经常会产生鬼影和/或炫光。 With the improvement of mobile phone performance, consumers' requirements for cameras in mobile phones are also gradually increasing, and this improvement is mainly reflected in the imaging effect of the camera. Due to factors such as strong light sources and camera lenses, images captured by the camera often produce ghost images and/or glare.

在逆光拍摄时,所述鬼影和炫光最为常见。通常,由强光造成的图像发白、形成光晕的现象称作炫光。当太阳光或点光源进入摄像头的镜头,经过多次反射之后,在光源的相对位置形成的有如幽灵一般的清晰亮点,称之为鬼影。 The ghosting and flare described are most common when shooting against the light. Generally, the phenomenon of whitening and haloing of the image caused by strong light is called glare. When sunlight or a point light source enters the lens of the camera, after multiple reflections, a clear bright spot like a ghost is formed at the relative position of the light source, which is called a ghost image.

对鬼影和炫光的解决能力直观反映了摄像头成像系统的性能好坏。目前各大厂商对于鬼影和炫光的处理主要停留在硬件上,包括改变摄像头的镜头设计等方法。采用硬件的方法来解决鬼影和炫光,存在成本高且应用不方便等问题。因此需要寻找一种可以方便、低成本地修正摄像头所拍摄图像的鬼影和炫光的方法。 The ability to resolve ghosting and glare intuitively reflects the performance of the camera imaging system. At present, major manufacturers mainly focus on hardware to deal with ghosting and glare, including changing the lens design of the camera and other methods. Using hardware to solve ghosting and glare has problems such as high cost and inconvenient application. Therefore, it is necessary to find a method for correcting the ghost and glare of the image captured by the camera conveniently and at low cost.

发明内容 Contents of the invention

鉴于以上内容,有必要提供一种图像修正方法及系统,可以利用软件的方式修正图像的鬼影和炫光。 In view of the above, it is necessary to provide an image correction method and system, which can use software to correct image ghosting and glare.

一种图像修正方法,运行于电子设备中,该方法包括步骤:(a)获取图像;(b)获取所述图像中亮度值大于一个预设亮度值的像素点,根据该像素点确定一个最小包围区域,根据该最小包围区域确定所述图像中鬼影和/或炫光所在的区域;及(c)修正所述鬼影和/或炫光所在的区域。 An image correction method, running in an electronic device, comprising the steps of: (a) acquiring an image; (b) acquiring a pixel point in the image whose brightness value is greater than a preset brightness value, and determining a minimum pixel point according to the pixel point An enclosing area, determining the area where the ghost and/or glare in the image is located according to the minimum enclosing area; and (c) correcting the area where the ghost and/or glare are located.

一种图像修正系统,应用于电子设备中,该系统包括:获取模块,用于获取图像;确定模块,用于获取所述图像中亮度值大于一个预设亮度值的像素点,根据该像素点确定一个最小包围区域,并根据该最小包围区域确定所述图像中鬼影和/或炫光所在的区域;及修正模块,用于修正所述鬼影和/或炫光所在的区域。 An image correction system, applied to electronic equipment, the system includes: an acquisition module, used to acquire an image; a determination module, used to acquire a pixel point in the image whose brightness value is greater than a preset brightness value, and according to the pixel point Determine a minimum enclosing area, and determine the area where the ghost and/or glare in the image is located according to the minimum enclosing area; and a correction module, used to correct the area where the ghost and/or glare are located.

相较于现有技术,本发明所提供的图像修正方法及系统,可以根据图像中各像素点的亮度值来确定图像中鬼影和/或炫光所在的区域,并利用开操作、闭操作、及区域填充等方法对所述区域进行处理,以利用软件的方式修正图像中的鬼影和炫光,无需通过硬件的方法来修正,应用方便,并且成本低。 Compared with the prior art, the image correction method and system provided by the present invention can determine the area where the ghost and/or glare in the image is located according to the brightness value of each pixel in the image, and use the open operation and close operation , and area filling and other methods to process the area, to correct the ghost and glare in the image by software, without using hardware to correct, easy to apply, and low cost.

附图说明 Description of drawings

图1是本发明图像修正系统较佳实施例的硬件架构图。 FIG. 1 is a hardware architecture diagram of a preferred embodiment of the image correction system of the present invention.

图2是本发明图像修正方法较佳实施例的作业流程图。 Fig. 2 is a flow chart of the preferred embodiment of the image correction method of the present invention.

图3包括图3A、图3B、图3C和图3D,是本发明确定鬼影和/或炫光所在的区域的示意图。 FIG. 3 includes FIG. 3A , FIG. 3B , FIG. 3C and FIG. 3D , which is a schematic view of the area where the ghost and/or glare is determined according to the present invention.

主要元件符号说明 Description of main component symbols

电子设备Electronic equipment 100100 图像修正系统image correction system 1010 获取模块get module 1111 判断模块judgment module 1212 确定模块Determine the module 1313 修正模块Modification module 1414 摄像单元camera unit 2020 存储单元storage unit 3030

如下具体实施方式将结合上述附图进一步说明本发明。 The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings.

具体实施方式 Detailed ways

参阅图1所示,是本发明图像修正系统较佳实施例的硬件架构图。该图像修正系统10运行于电子设备100中,该电子设备100可以是手机、平板电脑、掌上电脑(Personal Digital Assistant,PDA)、摄像机、照相机等电子装置。所述电子电子设备100可以包括一个摄像单元20。该摄像单元20用于拍摄被摄物体的图像,该被摄物体可以为人物、动物、植物等。该电子设备100还包括部件,如存储单元30。该存储单元30用于存储摄像单元20拍摄所得图像或者从其它数据源获取的图像,例如从外接的存储设备获取的图像或者从网络下载的图像。移动设备的部件10-30通过系统总线进行通信。 Referring to FIG. 1 , it is a hardware architecture diagram of a preferred embodiment of the image correction system of the present invention. The image correction system 10 runs in an electronic device 100, which may be a mobile phone, a tablet computer, a PDA (Personal Digital Assistant, PDA), a video camera, a camera and other electronic devices. The electronic device 100 may include a camera unit 20 . The camera unit 20 is used to capture images of objects, which may be people, animals, plants, and the like. The electronic device 100 also includes components such as a storage unit 30 . The storage unit 30 is used to store images captured by the camera unit 20 or images obtained from other data sources, such as images obtained from an external storage device or images downloaded from a network. The components 10-30 of the mobile device communicate via the system bus.

所述图像修正系统10用于从存储单元30获取图像,并根据该图像中各像素点的亮度值来确定图像中鬼影和/或炫光所在的区域,及利用开操作、闭操作、及区域填充对所述区域进行处理,以修正图像中的鬼影和炫光。 The image correction system 10 is used to obtain an image from the storage unit 30, and determine the area where the ghost and/or glare in the image is located according to the brightness value of each pixel in the image, and use the open operation, close operation, and Area fill processes the area to correct ghosting and flare in the image.

该图像修正系统10包括获取模块11、判断模块12、确定模块13、及修正模块14。模块11-14包括计算机化程序指令。 The image correction system 10 includes an acquisition module 11 , a judgment module 12 , a determination module 13 , and a correction module 14 . Modules 11-14 include computerized program instructions.

获取模块11用于从存储单元30中获取图像或者直接从拍摄单元20处获取图像。所述图像包括多个像素点,每个像素点均对应有一个亮度值。 The acquiring module 11 is used for acquiring images from the storage unit 30 or directly acquiring images from the photographing unit 20 . The image includes multiple pixels, and each pixel corresponds to a brightness value.

判断模块12用于判断所述图像中是否存在鬼影和/或炫光。在本较佳实施例中,判断模块12判断所述图像中是否有亮度值大于一个预设亮度值的像素点。该预设亮度值由系统或用户根据鬼影和炫光对应的亮度值进行设置,例如为50lux(勒克斯)。当所述图像中有亮度值大于所述预设亮度值的像素点时,判断模块12判定所述图像中存在鬼影和/或炫光。当所述图像中没有亮度值大于所述预设亮度值的像素点时,判断模块12判定所述图像中不存在鬼影和炫光。 The judging module 12 is used for judging whether ghost and/or glare exist in the image. In this preferred embodiment, the judging module 12 judges whether there are pixels in the image whose luminance value is greater than a preset luminance value. The preset brightness value is set by the system or the user according to the brightness values corresponding to ghost images and glare, for example, 50 lux (lux). When there are pixels in the image whose luminance value is greater than the preset luminance value, the judging module 12 judges that ghost and/or glare exist in the image. When there is no pixel in the image whose luminance value is greater than the preset luminance value, the judging module 12 judges that there is no ghost or glare in the image.

需要说明的是,鬼影和炫光均发生在强光(例如室内的灯光、太阳光等)的周围,而强光的周围是所述图像中亮度值最高的地方。判断模块12通过侦测所述图像中各像素点的亮度值,来判断强光所在的位置,以此来确定所述图像中是否存在鬼影和/或炫光。 It should be noted that both ghosting and glare occur around strong light (such as indoor lights, sunlight, etc.), and the surrounding of strong light is the place with the highest brightness value in the image. The judging module 12 judges the location of the strong light by detecting the brightness value of each pixel in the image, so as to determine whether there is ghost and/or glare in the image.

当所述图像中存在鬼影和/或炫光时,确定模块13用于在所述图像中确定鬼影和/或炫光所在的区域。在本较佳实施例中,确定模块13根据所述亮度值大于预设亮度值的像素点(下文将简称为亮像素点)来确定一个最小包围区域。本实施例中,确定模块13将所有亮像素点两两相连形成多个闭合区域,其中,能够包围所有亮像素点的最大区域即为所述最小包围区域。如图3A中共有9个亮像素点,如图3B所示,将该9个像素点两两相连,得到的由6个亮像素点A’、B’、C’、D’、E’及F’形成的六边形能够包围所有9个亮像素点,则该六边形为图3A所对应的最小包围区域。 When there are ghosts and/or glares in the image, the determining module 13 is configured to determine an area where the ghosts and/or glares are located in the image. In this preferred embodiment, the determining module 13 determines a minimum enclosing area according to the pixels whose luminance values are greater than a preset luminance value (hereinafter referred to as bright pixels for short). In this embodiment, the determining module 13 connects all the bright pixel points in pairs to form multiple closed areas, wherein the largest area that can enclose all the bright pixel points is the minimum enclosing area. There are 9 bright pixels in Fig. 3A. As shown in Fig. 3B, the 9 pixels are connected in pairs to obtain 6 bright pixels A', B', C', D', E' and The hexagon formed by F' can enclose all 9 bright pixels, and this hexagon is the minimum enclosing area corresponding to FIG. 3A .

确定模块13提取该最小包围区域的边界上的亮像素点,并在该最小包围区域之外为每个提取的亮像素点查找一个距离最近的像素点。如图3C所示,像素点A、B、C、D、E、F为图3B中的六边形的顶点,即亮像素点A’、B’、C’、D’、E’及F’分别对应的距离最近的像素点。之后,确定模块13计算所述提取的亮像素点的亮度值与查找到的对应像素点的亮度值的差值,并判断是否有差值小于一个预设差值。该预设差值由系统或用户预设,如为5lux。 The determination module 13 extracts the bright pixel points on the boundary of the minimum enclosing area, and searches for a nearest pixel point for each extracted bright pixel point outside the minimum enclosing area. As shown in Figure 3C, pixel points A, B, C, D, E, and F are vertices of the hexagon in Figure 3B, that is, bright pixel points A', B', C', D', E', and F 'Respectively corresponding to the nearest pixel. Afterwards, the determination module 13 calculates the difference between the brightness value of the extracted bright pixel point and the brightness value of the found corresponding pixel point, and judges whether any difference value is smaller than a preset difference value. The preset difference is preset by the system or the user, for example, 5lux.

在本较佳实施例中,当有提取的亮像素点的亮度值与查找到的对应像素点的亮度值的差值小于所述预设差值时,确定模块13根据该亮度值的差值小于预设差值的像素点及所述亮像素点来重新确定一个最小包围区域,并确定该重新确定的最小包围区域为鬼影和/或炫光所在的区域。如图3D所示,所述像素点A、C、F为亮度值的差值小于预设差值的像素点,重新确定一个由像素点A、C、D’、E’及F组成一个五边形的最小包围区域。当没有提取的亮像素点的亮度值与查找到的对应像素点的亮度值的差值小于所述预设差值时,确定模块13将所述根据亮像素点确定的最小包围区域确定为鬼影和/或炫光所在的区域。 In this preferred embodiment, when the difference between the brightness value of the extracted bright pixel point and the brightness value of the found corresponding pixel point is smaller than the preset difference value, the determination module 13 determines according to the difference value of the brightness value Pixels smaller than the preset difference value and the bright pixels are used to redefine a minimum enclosing area, and the re-determined minimum enclosing area is determined as the area where ghosts and/or glares are located. As shown in Figure 3D, the pixel points A, C, and F are pixels whose brightness value difference is less than the preset difference value, and a five-point pixel point composed of pixel points A, C, D', E', and F is re-determined. The minimum enclosing area of a polygon. When the difference between the luminance value of the unextracted bright pixel and the luminance value of the found corresponding pixel is smaller than the preset difference, the determining module 13 determines the minimum enclosing area determined according to the bright pixel as ghost areas where shadows and/or glare are present.

需要说明的是,如上所述的确定模块13在根据亮像素点确定最小包围区域后,查找该最小包围区域外是否有像素点符合要求,以确定是否需要重新确定最小包围区域,可以避免在修正鬼影和/或炫光所在区域后,因为最小包围区域外的像素点亮度值过大,而引起的亮度相差明显的现象。其他实施例中,可以将根据亮像素点确定最小包围区域直接确定为鬼影和/或炫光所在的区域,而不需要查找该最小包围区域外是否有像素点符合要求,以而重新确定最小包围区域。 It should be noted that, after determining the minimum enclosing area according to the bright pixels, the above-mentioned determination module 13 searches whether there are pixels outside the minimum enclosing area that meet the requirements, so as to determine whether the minimum enclosing area needs to be re-determined, which can avoid After the area where the ghost and/or glare is located, the brightness of the pixels outside the minimum enclosing area is too large, resulting in an obvious difference in brightness. In other embodiments, the minimum enclosing area determined according to the bright pixels can be directly determined as the area where the ghost and/or glare is located, without the need to find whether there are pixels outside the minimum enclosing area that meet the requirements, so as to re-determine the minimum enclosing area. Surround the area.

修正模块14用于修正所述鬼影和/或炫光所在的区域。该修正后的图像可以存储于存储单元30中。在本较佳实施例中,修正模块14利用闭操作来处理所述鬼影和/或炫光所在的区域中亮度值大于一个预设阈值的像素点,及利用开操作来处理所述鬼影和/或炫光所在的区域中亮度值不大于所述预设阈值的像素点。该预设阈值由上述预设亮度值及预设差值决定,为预设亮度值及预设差值的差值,例如为45lux。所述闭操作用于融合像素点中狭窄的间断,并且消融像素点中小的空洞。所述开操作与闭操作相反,用于断开像素点中狭窄的间断,并且消除像素点中细的突出物。之后,修正模块14对所述鬼影和/或炫光所在的区域中的所有像素点进行填充,即在像素点的空洞及细的突出物中填充颜色或图案。 The correction module 14 is used for correcting the area where the ghost and/or glare are located. The corrected image can be stored in the storage unit 30 . In this preferred embodiment, the correction module 14 uses the close operation to process the pixels in the region where the ghost and/or glare is located, whose luminance value is greater than a preset threshold, and uses the open operation to process the ghost And/or the pixels in the area where the glare is located have a luminance value not greater than the preset threshold. The preset threshold is determined by the preset brightness value and the preset difference value, and is the difference between the preset brightness value and the preset difference value, for example, 45 lux. The closing operation is used to fuse narrow discontinuities in pixels and ablate small holes in pixels. The opening operation is opposite to the closing operation, and is used to break the narrow discontinuities in the pixels and eliminate the thin protrusions in the pixels. Afterwards, the correction module 14 fills all the pixels in the area where the ghost and/or glare is located, that is, fills the holes and thin protrusions of the pixels with colors or patterns.

参阅图2所示,是本发明图像修正方法较佳实施例的流程图。 Referring to FIG. 2 , it is a flow chart of a preferred embodiment of the image correction method of the present invention.

步骤S10,获取模块11从存储单元30中获取图像或者直接从拍摄单元20处获取图像。所述图像包括多个像素点,每个像素点均对应有一个亮度值。 Step S10 , the acquiring module 11 acquires images from the storage unit 30 or directly acquires images from the photographing unit 20 . The image includes multiple pixels, and each pixel corresponds to a brightness value.

步骤S20,判断模块12判断所述图像中是否存在鬼影和/或炫光。当所述图像中存在鬼影和/或炫光时,执行步骤S30。当所述图像中不存在鬼影和炫光时,直接结束流程。 In step S20, the judging module 12 judges whether ghosts and/or glare exist in the image. When there are ghosts and/or glares in the image, step S30 is performed. When there is no ghost and glare in the image, the process is directly ended.

在本较佳实施例中,判断模块12判断所述图像中是否有亮度值大于一个预设亮度值的像素点。该预设亮度值由系统或用户根据鬼影和炫光对应的亮度值进行设置,例如为50lux(勒克斯)。当所述图像中有亮度值大于所述预设亮度值的像素点时,判断模块12判定所述图像中存在鬼影和/或炫光。当所述图像中没有亮度值大于所述预设亮度值的像素点时,判断模块12判定所述图像中不存在鬼影和炫光。 In this preferred embodiment, the judging module 12 judges whether there are pixels in the image whose luminance value is greater than a preset luminance value. The preset brightness value is set by the system or the user according to the brightness values corresponding to ghost images and glare, for example, 50 lux (lux). When there are pixels in the image whose luminance value is greater than the preset luminance value, the judging module 12 judges that ghost and/or glare exist in the image. When there is no pixel in the image whose luminance value is greater than the preset luminance value, the judging module 12 judges that there is no ghost or glare in the image.

步骤S30,确定模块13在所述图像中确定鬼影和/或炫光所在的区域。在本较佳实施例中,确定模块13根据所述亮度值大于预设亮度值的亮像素点来确定一个最小包围区域。确定模块13将所述亮像素点两两相连形成多个闭合区域,其中,包围所有亮像素点的最大区域即为所述最小包围区域。 In step S30, the determination module 13 determines the area where the ghost and/or glare is located in the image. In this preferred embodiment, the determination module 13 determines a minimum enclosing area according to the bright pixels whose luminance values are greater than a preset luminance value. The determining module 13 connects the bright pixel points two by two to form multiple closed areas, wherein the largest area surrounding all the bright pixel points is the minimum enclosing area.

确定模块13提取该最小包围区域的边界上的亮像素点,并在该最小包围区域之外为每个提取的亮像素点查找一个距离最近的像素点。之后,确定模块13计算所述提取的亮像素点的亮度值与查找到的对应像素点的亮度值的差值,并判断是否有差值小于一个预设差值。该预设差值由系统或用户预设,如为5lux。 The determination module 13 extracts the bright pixel points on the boundary of the minimum enclosing area, and searches for a nearest pixel point for each extracted bright pixel point outside the minimum enclosing area. Afterwards, the determination module 13 calculates the difference between the brightness value of the extracted bright pixel point and the brightness value of the found corresponding pixel point, and judges whether any difference value is smaller than a preset difference value. The preset difference is preset by the system or the user, for example, 5lux.

在本较佳实施例中,当有提取的亮像素点的亮度值与查找到的对应像素点的亮度值的差值小于所述预设差值时,确定模块13根据该亮度值的差值小于预设差值的像素点及所述亮像素点来重新确定一个最小包围区域,并确定该重新确定的最小包围区域为鬼影和/或炫光所在的区域。当没有提取的亮像素点的亮度值与查找到的对应像素点的亮度值的差值小于所述预设差值时,确定模块13将所述根据亮像素点确定的最小包围区域确定为鬼影和/或炫光所在的区域。 In this preferred embodiment, when the difference between the brightness value of the extracted bright pixel point and the brightness value of the found corresponding pixel point is smaller than the preset difference value, the determination module 13 determines according to the difference value of the brightness value Pixels smaller than the preset difference value and the bright pixels are used to redefine a minimum enclosing area, and the re-determined minimum enclosing area is determined as the area where ghosts and/or glares are located. When the difference between the luminance value of the unextracted bright pixel and the luminance value of the found corresponding pixel is smaller than the preset difference, the determining module 13 determines the minimum enclosing area determined according to the bright pixel as ghost areas where shadows and/or glare are present.

步骤S40,修正模块14修正所述鬼影和/或炫光所在的区域。该修正后的图像可以存储于存储单元30中。在本较佳实施例中,修正模块14利用闭操作来处理所述鬼影和/或炫光所在的区域中亮度值大于一个预设阈值的像素点,及利用开操作来处理所述鬼影和/或炫光所在的区域中亮度值不大于所述预设阈值的像素点。该预设阈值由预设亮度值及预设差值决定,为预设亮度值及预设差值的差值,例如为45lux。之后,修正模块14对所述鬼影和/或炫光所在的区域中的所有像素点进行填充。 In step S40, the correction module 14 corrects the area where the ghost and/or glare is located. The corrected image can be stored in the storage unit 30 . In this preferred embodiment, the correction module 14 uses the close operation to process the pixels in the region where the ghost and/or glare is located, whose luminance value is greater than a preset threshold, and uses the open operation to process the ghost And/or the pixels in the area where the glare is located have a luminance value not greater than the preset threshold. The preset threshold is determined by the preset brightness value and the preset difference value, and is the difference between the preset brightness value and the preset difference value, for example, 45 lux. Afterwards, the correction module 14 fills all the pixels in the area where the ghost and/or glare are located.

最后所应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照以上较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换,而不脱离本发明技术方案的精神和范围。 Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention without limitation, although the present invention has been described in detail with reference to the above preferred embodiments, those of ordinary skill in the art should understand that the present invention can be The technical solution shall be modified or equivalently replaced without departing from the spirit and scope of the technical solution of the present invention.

Claims (8)

1.一种图像修正方法,运行于电子设备中,其特征在于,该方法包括: 1. A method for image correction, which operates in electronic equipment, is characterized in that the method comprises: 获取步骤:获取图像; Acquisition step: acquire image; 确定步骤:获取所述图像中亮度值大于一个预设亮度值的像素点,根据该像素点确定一个最小包围区域,并根据该最小包围区域确定所述图像中鬼影和/或炫光所在的区域;及 Determining step: acquiring a pixel point in the image whose luminance value is greater than a preset luminance value, determining a minimum enclosing area according to the pixel point, and determining where the ghost and/or glare in the image is located according to the minimum enclosing area area; and 修正步骤:修正所述鬼影和/或炫光所在的区域。 Correction step: correct the area where the ghost and/or glare is located. 2.如权利要求1所述的图像修正方法,其特征在于,所述最小包围区域通过将所获取的像素点两两相连形成多个闭合区域,其中包围所有所获取的像素点的最大区域为所述最小包围区域。 2. The image correction method according to claim 1, wherein the minimum enclosing area forms a plurality of closed areas by connecting the acquired pixel points in pairs, wherein the maximum area surrounding all the acquired pixel points is The minimum enclosing area. 3.如权利要求1所述的图像修正方法,其特征在于,所述确定步骤通过以下步骤确定所述鬼影和/或炫光所在的区域: 3. The image correction method according to claim 1, wherein the determining step determines the region where the ghost and/or glare is located by the following steps: 提取该最小包围区域的边界上的像素点,并在该最小包围区域之外为每个提取的像素点查找一个距离最近的像素点; Extract the pixels on the boundary of the minimum enclosing area, and find a nearest pixel for each extracted pixel outside the minimum enclosing area; 计算所述提取的像素点的亮度值与查找到的对应像素点的亮度值的差值,并判断是否有差值小于一个预设差值; calculating the difference between the brightness value of the extracted pixel and the brightness value of the found corresponding pixel, and judging whether any difference is smaller than a preset difference; 当有提取的像素点的亮度值与查找到的对应像素点的亮度值的差值小于所述预设差值时,根据该亮度值的差值小于预设差值的像素点及所获取的像素点来重新确定一个最小包围区域,并确定该重新确定的最小包围区域为鬼影和/或炫光所在的区域;及 When the difference between the brightness value of the extracted pixel point and the brightness value of the found corresponding pixel point is less than the preset difference value, according to the pixels whose brightness value difference is smaller than the preset difference value and the acquired pixels to re-determine a minimum enclosing area, and determine that the re-determined minimum enclosing area is the area where the ghost and/or glare is located; and 当没有提取的像素点的亮度值与查找到的对应像素点的亮度值的差值小于所述预设差值时,将根据所获取的像素点确定的最小包围区域确定为鬼影和/或炫光所在的区域。 When the difference between the luminance value of the pixel that is not extracted and the luminance value of the found corresponding pixel is smaller than the preset difference, the minimum enclosing area determined according to the acquired pixel is determined as a ghost and/or The area where the glare is located. 4.如权利要求1所述的图像修正方法,其特征在于,所述修正步骤包括: 4. The image correction method according to claim 1, wherein the correction step comprises: 利用闭操作处理所述鬼影和/或炫光所在的区域中亮度值大于一个预设阈值的像素点,及利用开操作处理所述鬼影和/或炫光所在的区域中亮度值不大于所述预设阈值的像素点;及 Use the close operation to process the pixels whose luminance value is greater than a preset threshold in the area where the ghost and/or glare is located, and use the open operation to process the luminance value in the area where the ghost and/or glare is not greater than the pixels of the preset threshold; and 对所述鬼影和/或炫光所在的区域中的所有像素点进行填充。 All pixels in the region where the ghost and/or glare are located are filled. 5.一种图像修正系统,应用于电子设备中,其特征在于,该系统包括: 5. An image correction system applied in electronic equipment, characterized in that the system comprises: 获取模块,用于获取图像; An acquisition module for acquiring images; 确定模块,用于获取所述图像中亮度值大于一个预设亮度值的像素点,根据该像素点确定一个最小包围区域,并根据该最小包围区域确定所述图像中鬼影和/或炫光所在的区域;及 A determining module, configured to obtain a pixel point in the image whose luminance value is greater than a preset luminance value, determine a minimum enclosing area according to the pixel point, and determine ghosting and/or glare in the image according to the minimum enclosing area the area in which it is located; and 修正模块,用于修正所述鬼影和/或炫光所在的区域。 The correction module is used to correct the area where the ghost and/or glare are located. 6.如权利要求5所述的图像修正系统,其特征在于,所述最小包围区域通过将所获取的像素点两两相连形成多个闭合区域,其中包围所有所获取的像素点的最大区域为所述最小包围区域。 6. The image correction system as claimed in claim 5, wherein the minimum enclosing area forms a plurality of closed areas by connecting the acquired pixel points in pairs, wherein the maximum area surrounding all the acquired pixel points is The minimum enclosing area. 7.如权利要求5所述的图像修正系统,其特征在于,所述确定模块通过以下步骤确定所述鬼影和/或炫光所在的区域: 7. The image correction system according to claim 5, wherein the determination module determines the area where the ghost and/or glare is located by the following steps: 提取该最小包围区域的边界上的像素点,并在该最小包围区域之外为每个提取的像素点查找一个距离最近的像素点; Extract the pixels on the boundary of the minimum enclosing area, and find a nearest pixel for each extracted pixel outside the minimum enclosing area; 计算所述提取的像素点的亮度值与查找到的对应像素点的亮度值的差值,并判断是否有差值小于一个预设差值; calculating the difference between the brightness value of the extracted pixel and the brightness value of the found corresponding pixel, and judging whether any difference is smaller than a preset difference; 当有提取的像素点的亮度值与查找到的对应像素点的亮度值的差值小于所述预设差值时,根据该亮度值的差值小于预设差值的像素点及所获取的像素点来重新确定一个最小包围区域,并确定该重新确定的最小包围区域为鬼影和/或炫光所在的区域;及 When the difference between the brightness value of the extracted pixel point and the brightness value of the found corresponding pixel point is less than the preset difference value, according to the pixels whose brightness value difference is smaller than the preset difference value and the acquired pixels to re-determine a minimum enclosing area, and determine that the re-determined minimum enclosing area is the area where the ghost and/or glare is located; and 当没有提取的像素点的亮度值与查找到的对应像素点的亮度值的差值小于所述预设差值时,将根据所获取的像素点确定的最小包围区域确定为鬼影和/或炫光所在的区域。 When the difference between the luminance value of the pixel that is not extracted and the luminance value of the found corresponding pixel is smaller than the preset difference, the minimum enclosing area determined according to the acquired pixel is determined as a ghost and/or The area where the glare is located. 8.如权利要求5所述的图像修正系统,其特征在于,所述修正模块通过以下步骤修正所述鬼影和/或炫光所在的区域: 8. The image correction system according to claim 5, wherein the correction module corrects the region where the ghost and/or glare is located by the following steps: 利用闭操作处理所述鬼影和/或炫光所在的区域中亮度值大于一个预设阈值的像素点,及利用开操作处理所述鬼影和/或炫光所在的区域中亮度值不大于所述预设阈值的像素点;及 Use the close operation to process the pixels whose luminance value is greater than a preset threshold in the area where the ghost and/or glare is located, and use the open operation to process the luminance value in the area where the ghost and/or glare is not greater than the pixels of the preset threshold; and 对所述鬼影和/或炫光所在的区域中的所有像素点进行填充。 All pixels in the region where the ghost and/or glare are located are filled.
CN201310301477.9A 2013-07-18 2013-07-18 Image correcting method and system Active CN104299188B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310301477.9A CN104299188B (en) 2013-07-18 2013-07-18 Image correcting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310301477.9A CN104299188B (en) 2013-07-18 2013-07-18 Image correcting method and system

Publications (2)

Publication Number Publication Date
CN104299188A true CN104299188A (en) 2015-01-21
CN104299188B CN104299188B (en) 2018-10-30

Family

ID=52318909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310301477.9A Active CN104299188B (en) 2013-07-18 2013-07-18 Image correcting method and system

Country Status (1)

Country Link
CN (1) CN104299188B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631883A (en) * 2015-12-31 2016-06-01 青岛海信移动通信技术股份有限公司 Method and device for determining target regions in image
CN106210555A (en) * 2016-07-29 2016-12-07 广东欧珀移动通信有限公司 Anti-glazing optical processing method, device and electronic equipment
WO2019085023A1 (en) * 2017-10-31 2019-05-09 武汉华星光电技术有限公司 Method and system for improving ghosting in display picture
CN109993715A (en) * 2019-04-11 2019-07-09 杨勇 A kind of robot vision image preprocessing system and image processing method
CN110135235A (en) * 2019-03-13 2019-08-16 北京车和家信息技术有限公司 A kind of dazzle processing method, device and vehicle
CN110557575A (en) * 2019-08-28 2019-12-10 维沃移动通信有限公司 method for eliminating glare and electronic equipment
CN112819854A (en) * 2021-02-02 2021-05-18 歌尔光学科技有限公司 Ghost detection method, ghost detection apparatus, and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1993707A (en) * 2004-07-30 2007-07-04 佳能株式会社 Image processing method and apparatus, image sensing apparatus, and program
US20070286533A1 (en) * 2006-05-17 2007-12-13 Sony Corporation Image correction circuit, image correction method and image display
CN101909131A (en) * 2009-06-05 2010-12-08 佳能株式会社 Recording-medium imaging device and image forming apparatus
CN101978680A (en) * 2008-03-18 2011-02-16 富士通株式会社 Computer readable storage medium, image correction apparatus, and image correction method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1993707A (en) * 2004-07-30 2007-07-04 佳能株式会社 Image processing method and apparatus, image sensing apparatus, and program
US20070286533A1 (en) * 2006-05-17 2007-12-13 Sony Corporation Image correction circuit, image correction method and image display
CN101978680A (en) * 2008-03-18 2011-02-16 富士通株式会社 Computer readable storage medium, image correction apparatus, and image correction method
CN101909131A (en) * 2009-06-05 2010-12-08 佳能株式会社 Recording-medium imaging device and image forming apparatus

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
周孝宽: "彩色图象光斑的识别及分割", 《北京航空航天大学学报》 *
孙欣欣 等: "基于最佳分析窗口的高光检测", 《计算机工程与设计》 *
王超群, 朱方文: "一种去除单张图片中高光的方法", 《上海大学学报(自然科学版)》 *
黎淑梅: "基于双目视觉的大尺寸工件在机三维测量", 《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631883A (en) * 2015-12-31 2016-06-01 青岛海信移动通信技术股份有限公司 Method and device for determining target regions in image
CN105631883B (en) * 2015-12-31 2018-08-07 青岛海信移动通信技术股份有限公司 A kind of method and apparatus of target area in determining image
CN106210555A (en) * 2016-07-29 2016-12-07 广东欧珀移动通信有限公司 Anti-glazing optical processing method, device and electronic equipment
CN106210555B (en) * 2016-07-29 2017-11-24 广东欧珀移动通信有限公司 Anti-glazing light processing method, apparatus and electronic equipment
WO2019085023A1 (en) * 2017-10-31 2019-05-09 武汉华星光电技术有限公司 Method and system for improving ghosting in display picture
US10515608B2 (en) 2017-10-31 2019-12-24 Wuhan China Star Optoelectronics Technology Co., Ltd. Method and system for improving ghosting in display screen
CN110135235A (en) * 2019-03-13 2019-08-16 北京车和家信息技术有限公司 A kind of dazzle processing method, device and vehicle
CN110135235B (en) * 2019-03-13 2022-04-19 北京车和家信息技术有限公司 Glare processing method and device and vehicle
CN109993715A (en) * 2019-04-11 2019-07-09 杨勇 A kind of robot vision image preprocessing system and image processing method
CN110557575A (en) * 2019-08-28 2019-12-10 维沃移动通信有限公司 method for eliminating glare and electronic equipment
CN110557575B (en) * 2019-08-28 2021-04-27 维沃移动通信有限公司 Method for eliminating glare and electronic equipment
CN112819854A (en) * 2021-02-02 2021-05-18 歌尔光学科技有限公司 Ghost detection method, ghost detection apparatus, and readable storage medium

Also Published As

Publication number Publication date
CN104299188B (en) 2018-10-30

Similar Documents

Publication Publication Date Title
CN104299188B (en) Image correcting method and system
CN108668093B (en) HDR image generation method and device
US20200043225A1 (en) Image processing apparatus and control method thereof
US8913156B2 (en) Capturing apparatus and method of capturing image
CN106851122B (en) Calibration method and device for automatic exposure parameters based on double-camera system
JP5980294B2 (en) Data processing apparatus, imaging apparatus, and data processing method
JP6472869B2 (en) Image adjustment based on ambient light
WO2015180686A1 (en) Image acquisition device, image acquisition method and terminal
CN109922275B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
US10382671B2 (en) Image processing apparatus, image processing method, and recording medium
WO2014106445A1 (en) Method and apparatus for detecting backlight
CN105049728A (en) Method and device for acquiring shot image
JP2013501264A5 (en)
CN115866394B (en) Method and electronic device for switching between a first lens and a second lens
US9613404B2 (en) Image processing method, image processing apparatus and electronic device
CN110650288B (en) Focus control method and apparatus, electronic device, computer-readable storage medium
US20150365612A1 (en) Image capture apparatus and image compensating method thereof
US11483463B2 (en) Adaptive glare removal and/or color correction
US9319653B2 (en) White balance compensation method and electronic apparatus using the same
WO2019080061A1 (en) Camera device-based occlusion detection and repair device, and occlusion detection and repair method therefor
CN112261292B (en) Image acquisition method, terminal, chip and storage medium
TWI524760B (en) Camera array correction method
CN103440658B (en) Automatically remove method and the device of photo purple boundary
CN106817575A (en) Image capture equipment and method for generating depth information and method for automatically correcting image capture equipment
TWI604413B (en) Image processing method and image processing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191121

Address after: Room 2, west of the second floor, No. 355, Huanbei West Road, Weitang street, Jiashan County, Jiaxing City, Zhejiang Province

Patentee after: Jiashan Weitang Asset Management Co.,Ltd.

Address before: 518109 F3 building, Foxconn science and Technology Industrial Park, Longhua Town, Shenzhen, Guangdong, A, China

Co-patentee before: Chi Mei Communication Systems, Inc.

Patentee before: Shenzhen Futaihong Precision Industry Co.,Ltd.

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Image correction method and system

Effective date of registration: 20210531

Granted publication date: 20181030

Pledgee: Weitang sub branch of Zhejiang Jiashan Rural Commercial Bank Co.,Ltd.

Pledgor: Jiashan Weitang Asset Management Co.,Ltd.

Registration number: Y2021980004130

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20231018

Granted publication date: 20181030

Pledgee: Weitang sub branch of Zhejiang Jiashan Rural Commercial Bank Co.,Ltd.

Pledgor: Jiashan Weitang Asset Management Co.,Ltd.

Registration number: Y2021980004130

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Image correction methods and systems

Effective date of registration: 20231127

Granted publication date: 20181030

Pledgee: Weitang sub branch of Zhejiang Jiashan Rural Commercial Bank Co.,Ltd.

Pledgor: Jiashan Weitang Asset Management Co.,Ltd.

Registration number: Y2023330002807

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20181030

Pledgee: Weitang sub branch of Zhejiang Jiashan Rural Commercial Bank Co.,Ltd.

Pledgor: Jiashan Weitang Asset Management Co.,Ltd.

Registration number: Y2023330002807