CN103440658B - Automatically remove method and the device of photo purple boundary - Google Patents

Automatically remove method and the device of photo purple boundary Download PDF

Info

Publication number
CN103440658B
CN103440658B CN201310386933.4A CN201310386933A CN103440658B CN 103440658 B CN103440658 B CN 103440658B CN 201310386933 A CN201310386933 A CN 201310386933A CN 103440658 B CN103440658 B CN 103440658B
Authority
CN
China
Prior art keywords
purple boundary
look
photo
brightness value
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.)
Expired - Fee Related
Application number
CN201310386933.4A
Other languages
Chinese (zh)
Other versions
CN103440658A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201310386933.4A priority Critical patent/CN103440658B/en
Publication of CN103440658A publication Critical patent/CN103440658A/en
Application granted granted Critical
Publication of CN103440658B publication Critical patent/CN103440658B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

Automatically remove the method for photo purple boundary, relate to a kind of method of automatically removing photo purple boundary in the process of taking pictures, the method, by setting up functional module construction, is completed by computer program instructions control computer system, and these computer program instructions are stored in computer-readable recording medium. First it find out the purple boundary region that needs to remove purple boundary in described photo, then use in parameter look-up table described in the correction value correction of corresponding parameter the corresponding parameter values of each pixel in purple boundary region, described parameter look-up table comprise possible value that parameter described in each is all and with each possible value correction value one to one. Method of the present invention is realized by the mode of software, do not need to change the hardware of digital camera, avoided the problem that cost is high and the R&D cycle is long of bringing by changing hardware.

Description

Automatically remove method and the device of photo purple boundary
Technical field
The present invention relates to a kind of method of automatically removing photo purple boundary in the process of taking pictures, the method, by setting up functional module construction, is completed by computer program instructions control computer system, and these computer program instructions are stored in computer-readable recording medium.
Background technology
Use digital camera to take pictures in process, if the scene brightness contrast being taken is large, easily occur color spot at the intersection in highlight area and low light region, this color spot is commonly referred to purple boundary. Signal processing algorithm that imaging area is too small and camera is inner of the appearance of purple boundary and the dispersion of camera lens, CCD etc. is relevant, even high-end digital camera can not solve the problem that occurs purple boundary completely.
Present common way is the appearance of purple boundary while avoiding taking pictures by the structure of change camera or camera lens, and to reach the object of removing photo purple boundary, the way cost of this change hardware configuration is high, the R&D cycle is long, and while actual effect is uncertain good.
Summary of the invention
The object of this invention is to provide one and need not change hardware configuration, and the method for the automatic removal photo purple boundary that cost is low, the R&D cycle is short and effective.
For achieving the above object, the invention provides following technical scheme.
Automatically the method for removing photo purple boundary, comprises the following steps:
A. find out the purple boundary region that needs to remove purple boundary in described photo;
B. use in parameter look-up table described in the correction value correction of corresponding parameter the corresponding parameter values of each pixel in purple boundary region, described parameter look-up table comprise possible value that parameter described in each is all and with each possible value correction value one to one.
Further, further comprising the steps of before steps A and step B:
C. calculate the shared ratio of pixel that brightness value in described photo is greater than luminance threshold, determine whether to perform step accordingly A and step B.
Wherein, in steps A, comprise the following steps:
A1. generate the masterplate picture identical with described photo size, obtain the brightness value of each pixel in described photo, if the brightness value of pixel is greater than high brightness setting value, the brightness value of pixel identical with this location of pixels in masterplate picture is adjusted into the first brightness value, otherwise the brightness value of pixel identical with this location of pixels in masterplate picture is adjusted into the second brightness value;
A2. obtain brightness value in masterplate picture and be the line of demarcation between the pixel that the pixel of the first brightness value and brightness value are the second brightness value;
A3. in masterplate picture by each point on described line of demarcation towards around expand the extension width region that is expanded, in described photo, the region of corresponding described extended area is described purple boundary region.
Wherein, described parameter comprises Y, U and the V of YUV color space.
Wherein, described parameter look-up table comprises UV look-up table and Y look-up table, UV look-up table and Y look-up table include all combinations between all possible values of U and all possible values of V, UV look-up table also comprise with described all combinations in each combine the correction value of U and V one to one, Y look-up table also comprise with described all combinations in each combine the correction value of Y one to one.
The invention has the beneficial effects as follows: method of the present invention is realized by the mode of software, do not need to change the hardware of digital camera, avoided the problem that cost is high and the R&D cycle is long of bringing by changing hardware; There is deviation in the parameter that purple boundary shows as the pixel in purple boundary region, therefore removes photo purple boundary by the pixel parameter in correction photo purple boundary region effective; In addition, add judgement to select step to determine whether the operating procedure of comparison film operation removal purple boundary, avoid the maloperation in the photo that does not need to remove purple boundary and the delay of taking pictures.
Brief description of the drawings
Fig. 1 is the flow chart of the method for automatic removal photo of the present invention purple boundary.
Detailed description of the invention
Below in conjunction with drawings and Examples, the present invention is elaborated.
Take pictures and occur that the reason of purple boundary has a variety of with digital camera, but purple boundary is embodied in the abnormal parameters of the pixel in purple boundary region, therefore the method for removal photo of the present invention purple boundary just reaches by revising the anomaly parameter of purple boundary area pixel the object of removing photo purple boundary.
The method of automatic removal photo of the present invention purple boundary, is described in detail as follows:
First, judge whether photo needs to remove the operation of purple boundary, concrete determination methods is: according to the histogram of lightness value, statistics or calculate the shared ratio of pixel that brightness value in described photo is greater than luminance threshold, the operation of only just removing purple boundary in the situation that this ratio is greater than triggering ratio, this luminance threshold can be set according to actual conditions. Because purple boundary appears in the photo that in photo, zones of different difference in brightness is larger conventionally, therefore adopt this determination methods can identify the photo that purple boundary may appear in major part, only to occurring that the photo of purple boundary removes the operation of purple boundary, avoid so on the one hand the photo to not there is purple boundary to remove the maloperation that purple boundary operates, also avoided on the other hand operation removal purple boundary in the photo that does not occur purple boundary to operate the delay of taking pictures bringing.
Then, judgement need to be removed after purple boundary operation, just need to determine the region that may occur purple boundary, this region namely needs to remove the purple boundary region of purple boundary, searching the concrete method in purple boundary region is: first generate a masterplate picture identical with photo size, obtain the brightness value of each pixel in photo, if the brightness value of pixel is greater than high brightness setting value, the brightness value of pixel identical with this location of pixels in masterplate picture is adjusted into the first brightness value, otherwise the brightness value of pixel identical with this location of pixels in masterplate picture is adjusted into the second brightness value, in the present embodiment, brightness span is [0, 255], the first brightness value is 255, the second brightness value is 0, then obtain brightness value in masterplate picture and be the line of demarcation between the pixel that the pixel of the first brightness value and brightness value are the second brightness value, finally in masterplate picture by each point on described line of demarcation towards around expand the extension width region that is expanded, in described photo, the region of corresponding described extended area is described purple boundary region. purple boundary appears in photo near light and shade has a common boundary conventionally, and therefore described line of demarcation is the place that purple boundary may occur in certain limit around. purple boundary only occurs at the regional area of photo, to not occurring that the region of purple boundary removes the operation of purple boundary, may make picture distortion, therefore finds out purple boundary region just necessary.
Determine purple boundary region, can remove the operation of purple boundary to purple boundary region with that, the concrete grammar of removing purple boundary is: by the corresponding parameter values of each pixel in purple boundary region described in the correction value correction of corresponding parameter in parameter look-up table, described parameter look-up table comprise possible value that parameter described in each is all and with each may value correction value one to one, in the present embodiment, the YUV color space that operates in of removing purple boundary carries out, therefore described parameter comprises the Y of YUV color space, U and V, Y, the span [0 of U and V, 255] integer between, described parameter look-up table comprises UV look-up table and Y look-up table, UV look-up table and Y look-up table include all combinations between all possible values of U and all possible values of V, UV look-up table also comprise with described all combinations in each combine the correction value of U and V one to one, Y look-up table also comprise with described all combinations in each combine the correction value of Y one to one. correction value in the present embodiment in UV look-up table is the standard value of U and V, and the value concrete grammar of revising U and V is directly to use the correction value of U and V to replace the value of original U and V, correction value in Y look-up table is before revising and the difference of the rear Y value of correction, and the concrete grammar of revising Y value is that the Y value (being original Y value) before revising is added to the correction value of (or deducting) Y value obtains revised Y value. the present embodiment is removed the operation of purple boundary at YUV color space instead of rgb color space, because the color of YUV color space can separate with brightness, so it is little a lot of that the capacity of the parameter look-up table of YUV is compared the capacity of parameter look-up table of RGB, can not take too many resource.
Wherein, the method for making parameter look-up table is, first uses image processing software, and such as Photoshop goes purple boundary processing to a photo that occurs purple boundary, after recording processing, this photo every Photoshop parameter in Photoshop is reference parameter; Then the YUV parameter of choosing a pixel comprises the picture of the combination between all Y, U and V, this picture is processed with Photoshop, this picture every Photoshop parameter in Photoshop is all adjusted into described reference parameter, obtain in the combination of all U values and V value, go the value of purple boundary Y after treatment, U and V, will go purple boundary process front and go the value of purple boundary Y after treatment, U and V to be made into parameter look-up table.
In sum, in conjunction with Fig. 1, the method for automatic removal photo of the present invention purple boundary can be summed up as the step that following order is carried out:
S1. judge whether to remove the operation of purple boundary: calculate the shared ratio of pixel that brightness value in described photo is greater than luminance threshold, this ratio is greater than triggering ratio and performs step S2 and step S3, otherwise does not perform step S2 and step S3;
S2. search the purple boundary region that needs to remove purple boundary in described photo;
S3. remove photo purple boundary: by the corresponding parameter values of each pixel in purple boundary region described in the correction value correction of corresponding parameter in parameter look-up table, described parameter look-up table comprise possible value that parameter described in each is all and with each possible value correction value one to one.
The method of removal photo of the present invention purple boundary is mainly used in camera and takes pictures in process, certainly, also can go purple boundary processing for the later stage of photo by the method for removal photo of the present invention purple boundary.
The method providing herein, all or part of step wherein can, by setting up functional module construction, be completed by computer program instructions control computer system. These computer program instructions are stored in computer-readable recording medium.
Finally should be noted that; above embodiment is only in order to illustrate technical scheme of the present invention; but not limiting the scope of the invention; although the present invention has been done to explain with reference to preferred embodiment; those of ordinary skill in the art is to be understood that; can modify or be equal to replacement technical scheme of the present invention, and not depart from essence and the scope of technical solution of the present invention.

Claims (8)

1. the method for automatically removing photo purple boundary, is characterized in that:
Comprise the following steps:
A. find out the purple boundary region that needs to remove purple boundary in described photo;
B. use in parameter look-up table described in the correction value correction of corresponding parameter the corresponding parameter values of each pixel in purple boundary region, described parameter look-up table comprise possible value that parameter described in each is all and with each possible value correction value one to one;
Further comprising the steps of before steps A and step B:
C. calculate the shared ratio of pixel that brightness value in described photo is greater than luminance threshold, determine whether to perform step accordingly A and step B.
2. the method for automatic removal photo according to claim 1 purple boundary, is characterized in that, in steps A, comprises the following steps:
A1. generate the masterplate picture identical with described photo size, obtain the brightness value of each pixel in described photo, if the brightness value of pixel is greater than high brightness setting value, the brightness value of pixel identical with this location of pixels in masterplate picture is adjusted into the first brightness value, otherwise the brightness value of pixel identical with this location of pixels in masterplate picture is adjusted into the second brightness value;
A2. obtain brightness value in masterplate picture and be the line of demarcation between the pixel that the pixel of the first brightness value and brightness value are the second brightness value;
A3. in masterplate picture by each point on described line of demarcation towards around expand the extension width region that is expanded, in described photo, the region of corresponding described extended area is described purple boundary region.
3. the method for automatic removal photo according to claim 1 purple boundary, is characterized in that: described parameter comprises Y, U and the V of YUV color space.
4. the method for automatic removal photo according to claim 3 purple boundary, it is characterized in that: described parameter look-up table comprises UV look-up table and Y look-up table, UV look-up table and Y look-up table include all combinations between all possible values of U and all possible values of V, UV look-up table also comprise with described all combinations in each combine the correction value of U and V one to one, Y look-up table also comprise with described all combinations in each combine the correction value of Y one to one.
5. the device of automatically removing photo purple boundary, is characterized in that:
Comprise with lower device:
It needs to remove the purple boundary region of purple boundary device A. for finding out described photo;
Device B its by the corresponding parameter values of each pixel in purple boundary region described in the correction value correction of corresponding parameter in parameter look-up table, described parameter look-up table comprise possible value that parameter described in each is all and with each possible value correction value one to one;
Also be included in operation before device A and device B with lower device:
It calculates the shared ratio of pixel that brightness value in described photo is greater than luminance threshold device C, whether determines accordingly running gear A and device B.
6. the device of automatic removal photo according to claim 5 purple boundary, is characterized in that, device A comprises with lower device:
It generates the masterplate picture identical with described photo size device A1., and obtain the brightness value of each pixel in described photo, if the brightness value of pixel is greater than high brightness setting value, the brightness value of pixel identical with this location of pixels in masterplate picture is adjusted into the first brightness value, otherwise the brightness value of pixel identical with this location of pixels in masterplate picture is adjusted into the second brightness value;
It obtains the line of demarcation between the pixel that pixel that brightness value in masterplate picture is the first brightness value and brightness value are the second brightness value device A2.;
Device A3. its in masterplate picture by each point on described line of demarcation towards around expand the extension width region that is expanded, in described photo, the region of corresponding described extended area is described purple boundary region.
7. the device of automatic removal photo according to claim 5 purple boundary, is characterized in that: described parameter comprises Y, U and the V of YUV color space.
8. the device of automatic removal photo according to claim 7 purple boundary, it is characterized in that: described parameter look-up table comprises UV look-up table and Y look-up table, UV look-up table and Y look-up table include all combinations between all possible values of U and all possible values of V, UV look-up table also comprise with described all combinations in each combine the correction value of U and V one to one, Y look-up table also comprise with described all combinations in each combine the correction value of Y one to one.
CN201310386933.4A 2013-08-30 2013-08-30 Automatically remove method and the device of photo purple boundary Expired - Fee Related CN103440658B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310386933.4A CN103440658B (en) 2013-08-30 2013-08-30 Automatically remove method and the device of photo purple boundary

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310386933.4A CN103440658B (en) 2013-08-30 2013-08-30 Automatically remove method and the device of photo purple boundary

Publications (2)

Publication Number Publication Date
CN103440658A CN103440658A (en) 2013-12-11
CN103440658B true CN103440658B (en) 2016-05-11

Family

ID=49694351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310386933.4A Expired - Fee Related CN103440658B (en) 2013-08-30 2013-08-30 Automatically remove method and the device of photo purple boundary

Country Status (1)

Country Link
CN (1) CN103440658B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430231B (en) * 2015-11-24 2018-09-04 努比亚技术有限公司 Image processing apparatus and method
CN106657946B (en) 2017-01-12 2019-03-01 深圳岚锋创视网络科技有限公司 System and method are eliminated in image purple boundary
CN107864365B (en) * 2017-10-31 2020-03-31 上海集成电路研发中心有限公司 Method for eliminating purple border of image
CN109978961B (en) * 2019-03-15 2021-03-12 湖南国科微电子股份有限公司 Image color edge eliminating method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983330A (en) * 2005-12-15 2007-06-20 王韬 Digital-photo purple boundary eliminating software
CN102237025A (en) * 2010-04-22 2011-11-09 冠捷投资有限公司 Lookup table generation method used in display color correction

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8644640B2 (en) * 2009-05-27 2014-02-04 Microsoft Corporation Purple fringing artifact reduction within a digital image with guidance from a green channel

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983330A (en) * 2005-12-15 2007-06-20 王韬 Digital-photo purple boundary eliminating software
CN102237025A (en) * 2010-04-22 2011-11-09 冠捷投资有限公司 Lookup table generation method used in display color correction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马玫娟 等.基于自适应局部非线性回归的颜色校正算法.《计算机工程与应用》.2010,第46卷(第13期),第165页第1-3节. *

Also Published As

Publication number Publication date
CN103440658A (en) 2013-12-11

Similar Documents

Publication Publication Date Title
CN111028189B (en) Image processing method, device, storage medium and electronic equipment
CA2996751C (en) Calibration of defective image sensor elements
US9936152B2 (en) Image sensor and sensor module
CN103957362B (en) A kind of method and system of adjust automatically camera exposure effect
CN106534677B (en) Image overexposure optimization method and device
US11689785B2 (en) Dual-spectrum image automatic exposure method and apparatus, and dual-spectrum image camera and machine storage medium
CN103440658B (en) Automatically remove method and the device of photo purple boundary
JP2015532070A (en) Scene recognition method and apparatus
US20180061029A1 (en) Image processing apparatus, imaging apparatus, image processing method, and storage medium storing image processing program of image processing apparatus
US9860507B2 (en) Dynamic frame skip for auto white balance
EP3452980A1 (en) Methods and apparatus for automated noise and texture optimization of digital image sensors
CN106550227B (en) A kind of image saturation method of adjustment and device
CN104299188A (en) Image correction method and image correction system
JP5575567B2 (en) Imaging signal processing circuit and imaging signal processing method
CN105791710B (en) A kind of signal lamp image enhancement processing method
CN111970501A (en) Pure color scene AE color processing method and device, electronic equipment and storage medium
CN105704363B (en) Image data processing method and device
JP2008292541A (en) Automatic focus adjustment device and automatic focus adjustment method
US20150381870A1 (en) Dynamic Noise Reduction For High Dynamic Range In Digital Imaging
JP6315239B2 (en) Imaging apparatus, imaging method, image processing apparatus, imaging program
KR20050071726A (en) Image processing device and method thereof
CN117541502A (en) Image defogging method and video defogging method
CN110072050B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
US10469761B2 (en) Image capturing apparatus
TW201634999A (en) Auto focus method and apparatus using the same method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160511

CF01 Termination of patent right due to non-payment of annual fee