CN106791433B - A kind of image processing method and electronic equipment - Google Patents

A kind of image processing method and electronic equipment Download PDF

Info

Publication number
CN106791433B
CN106791433B CN201710035901.8A CN201710035901A CN106791433B CN 106791433 B CN106791433 B CN 106791433B CN 201710035901 A CN201710035901 A CN 201710035901A CN 106791433 B CN106791433 B CN 106791433B
Authority
CN
China
Prior art keywords
image
area
electronic equipment
retroreflective regions
repair
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.)
Active
Application number
CN201710035901.8A
Other languages
Chinese (zh)
Other versions
CN106791433A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Vivo Mobile Communication Co Ltd Beijing Branch
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 Vivo Mobile Communication Co Ltd, Vivo Mobile Communication Co Ltd Beijing Branch filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710035901.8A priority Critical patent/CN106791433B/en
Publication of CN106791433A publication Critical patent/CN106791433A/en
Application granted granted Critical
Publication of CN106791433B publication Critical patent/CN106791433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

A kind of image processing method of present invention offer and electronic equipment, this method include:Obtain the first image and the second image corresponding to different shooting angles;According to described first image and second image, the retroreflective regions in described first image are determined;Image repair is carried out to the retroreflective regions in described first image.Image processing method provided by the invention, can to electronic equipment in the photo that glass is shot retroreflective regions carry out image repair, promoted electronic equipment shooting photo quality.

Description

A kind of image processing method and electronic equipment
Technical field
The present invention relates to field of photographing technology more particularly to a kind of image processing methods and electronic equipment.
Background technology
With the development of image processing techniques and electronic equipment, mobile phone, tablet computer and camera etc. have camera function Electronic equipment has become tool indispensable in people's daily life.User, can by having the electronic equipment of camera function To shoot the scenes such as scenery or the object of wanting record at one's side at any time, to bring more enjoyment for life.Therefore, people couple Also become higher and higher in the requirement of the photographic quality of electronic equipment shooting.However, when user is behind glass shooting glass Scene when, such as:Across scene of the glass for vehicle window outside car shooting vehicle, or across window-glass outside indoor shot room Scene etc., often because of the reflective areas that is reflective and occurring dotted box portion as shown in Figure 1 in the photo of shooting of glass Domain causes the photographic quality of shooting to decline.As it can be seen that current electronic equipment is in the photo shot across glass, there are ropy Problem.
Invention content
The embodiment of the present invention provides the operating method and electronic equipment of a kind of electronic equipment, to solve current electronic equipment In the photo shot across glass, there are ropy problems.
In a first aspect, an embodiment of the present invention provides a kind of image processing method, set applied to the electronics including camera It is standby, including:
Obtain the first image and the second image corresponding to different shooting angles;
According to described first image and second image, the retroreflective regions in described first image are determined;
Image repair is carried out to the retroreflective regions in described first image.
Second aspect, the embodiment of the present invention also provide a kind of electronic equipment, including:
Image collection module, for obtaining the first image and the second image corresponding to different shooting angles;
Retroreflective regions determining module, for according to described first image and second image, determining described first image In retroreflective regions;
Image repair module, for carrying out image repair to the retroreflective regions in described first image.
In this way, in the embodiment of the present invention, by comparing corresponding to the first image and second obtained under different shooting angles Image, it may be determined that the retroreflective regions in the first image, to be repaired to the retroreflective regions in the first image.It in this way can be with To electronic equipment, retroreflective regions carry out image repair in the photo that glass is shot, and promote the matter of the photo of electronic equipment shooting Amount.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, needed in being described below to the embodiment of the present invention Attached drawing to be used is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, For those of ordinary skill in the art, without having to pay creative labor, it can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is the photo shot in the prior art across glass;
Fig. 2 is a kind of flow chart of image processing method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another image processing method provided in an embodiment of the present invention;
Fig. 4 A are the schematic diagrames of the retroreflective regions of the photo shot under first angle provided in an embodiment of the present invention;
Fig. 4 B are the schematic diagrames of the retroreflective regions of the photo shot under second angle provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram provided in an embodiment of the present invention that image is repaired using cellular automata;
Fig. 6 is that the embodiment of the present invention provides the design sketch after being repaired to photo in Fig. 1;
Fig. 7 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of retroreflective regions determining module in a kind of electronic equipment provided in an embodiment of the present invention;
Fig. 9 is the structural schematic diagram of image collection module in a kind of electronic equipment provided in an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram of mobile terminal provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts Example, shall fall within the protection scope of the present invention.
It is the flow chart of image processing method provided in an embodiment of the present invention referring to Fig. 2, Fig. 2, is applied to include camera Electronic equipment, as shown in Fig. 2, including the following steps:
Step 201 obtains the first image and the second image for corresponding to different shooting angles.
In the embodiment of the present invention, the acquisition of above-mentioned first image and the second image can determine electronic equipment in user In when taking pictures across glass, the camera of electronic equipment corresponds to the image being continuously shot under different shooting angles, either Electronic equipment is in the image corresponded under different shooting angles intercepted under dynamic interface.Wherein, above-mentioned first image is to use Family needs the image obtained.In addition, it is necessary to explanation, above-mentioned first image and the second image can be electronic equipments in dynamic The realtime graphic for obtaining and caching under preview interface can also be to be stored in corresponding under different shooting angles in electronic equipment Non-real-time images.
Step 202, according to described first image and second image, determine the retroreflective regions in described first image.
It is same due to the variation of shooting angle according to the image-forming principle of camera in electronic equipment in the embodiment of the present invention Object the first image in the second image position and/or shape can change, simultaneously as glass and window to be captured Outer object is different at a distance from camera, and the object outside window of shooting is with the retroreflective regions because of glass generation in the first image and second The variable quantity of position and/or shape in image is all different.Since glass is closer apart from electronic equipment, retroreflective regions exist First image and the variable quantity of position and/or shape in the second image can be respectively greater than outside window object in the first image and the The variable quantity of position and/or shape in two images.
Meanwhile the change of shooting angle can't change when camera is taken pictures that aperture and light intensity etc. can be with influence diagrams The factor that the gray value of pixel changes as in, then being averaged between the region with same object in the first image and the second image Gray value is identical or difference is smaller, and the coverage of the first image and the second image is constant, i.e. the first image and the second figure As coordinate having the same is distributed.
It therefore, in embodiments of the present invention, can be by edge detection by the first image and second according to above principle Image segmentation obtains the difference with average gray value in the second image in the first image at the subregion with different average gray values Value is less than or equal to two sub-regions of predetermined threshold value as target area pair, compares the sub-district of the first image of target area centering The variable quantity of position and/or shape between domain and the subregion of the second image, when the variable quantity is more than corresponding threshold value, then Determine that the subregion of the first image is retroreflective regions.
Step 203 carries out image repair to the retroreflective regions in described first image.
In the embodiment of the present invention, when above-mentioned steps 202 determine the retroreflective regions in the first image, electronic equipment can profit The image of retroreflective regions is repaired with various image repair methods.Wherein, above-mentioned image repair method can be:Missing figure As various image repair algorithms such as complementing method, interpolation method and cellular automata algorithms, due to above-mentioned image repair method Realization principle is known to those skilled in the art, is no longer repeated herein.
In the embodiment of the present invention, above-mentioned electronic equipment any can have the electronic equipment of camera, such as:Mobile phone is put down Plate computer (Tablet Personal Computer), laptop computer (Laptop Computer), personal digital assistant (personal digital assistant, abbreviation PDA), mobile Internet access device (Mobile Internet Device, MID) Or the mobile terminals and camera etc. such as wearable device (Wearable Device).
The image processing method of the embodiment of the present invention, by comparing the first image for being obtained under different shooting angles and the Two images, it may be determined that the retroreflective regions in the first image, to be repaired to the retroreflective regions in the first image.In this way may be used With retroreflective regions carry out image repair in the photo that glass is shot to electronic equipment, the photo of electronic equipment shooting is promoted Quality.
It is the flow chart of image processing method provided in an embodiment of the present invention referring to Fig. 3, Fig. 3, is applied to include camera Electronic equipment, as shown in figure 3, including the following steps:
Step 301 obtains the first image and the second image for corresponding to different shooting angles.
In the embodiment of the present invention, the acquisition of above-mentioned first image and the second image can determine electronic equipment in user In when taking pictures across glass, the image that the camera of electronic equipment is continuously shot under two different shooting angles, either Electronic equipment is in the image under two different shooting angles intercepted under dynamic interface, is not defined herein.Wherein, on It is that user needs the image obtained to state the first image.
In addition, be in dynamic previewing interface in electronic equipment, and when camera gets the first image, electronic equipment can be shown Show prompt message, to prompt user to adjust the shooting angle of camera in preset time, is completed when user adjusts shooting angle When, camera obtains the second image.In this way, electronic equipment can obtain corresponding to different angle within a preset time interval One image and the second image avoid the longer object variation outside window for causing to shoot in the first image and the second image of time interval Greatly, so that it is guaranteed that the accuracy of image repair.
Step 302, the average gray value for detecting described first image and all area to be tested in second image.
In the embodiment of the present invention, when above-mentioned steps 301 get the first image and the second image, electronic equipment can lead to Cross image segmentation algorithm using the first image and the second image be divided into respectively multiple regions with different average gray values as Area to be tested, and detect the average gray value of each area to be tested in the first image and the second image.Wherein, above-mentioned image point It may include the partitioning algorithm based on threshold value, the partitioning algorithm based on edge and the partitioning algorithm etc. based on region to cut algorithm, The realization principle of each algorithm is known to those skilled in the art, is no longer repeated herein.
Step 303, the target area pair for determining pending comparison according to testing result, wherein the target area is to packet The second area for including the first area for belonging to the first image and belonging to the second image, and the average gray value of the first area with The difference of the average gray value of the second area is less than or equal to predetermined threshold value.
In the embodiment of the present invention, the above-mentioned target area pair for determining pending comparison according to testing result, Ke Yishi:By Each area to be tested is compared with each area to be tested in the second image successively respectively in one image, is obtained in the first image Area to be tested has the target that the difference of average gray value is less than or equal to predetermined threshold value with area to be tested in the second image Region pair, then the area to be tested of first image of target area centering is first area, and the area to be tested of the second image is Second area.
Certainly, the above-mentioned target area pair for determining pending comparison according to testing result can also be:Electronic equipment is based on The average gray value of each area to be tested in first image and the second image establishes area to be tested and the second figure in the first image The relation mapping table of area to be tested as in, in the relation mapping table there are area to be tested in the first image of mapping relations and The difference of the average gray value of area to be tested is less than or equal to predetermined threshold value in second image, and there are mapping relations for setting Area to be tested in two figures is target area pair, and the area to be tested of the first image of target area centering is first area, The area to be tested of second image is second area.
It should be noted that since the first image and the second image are the image being continuously shot, the first image and the second figure The average gray value of same target is roughly the same as in, in this way, it may be determined that the first area and second of each target area centering Region has same object.Wherein, the same object that above-mentioned first area and second area have can be understood as object outside window Or the reflective hot spot of composition retroreflective regions.
Step 304 is compared the first area and the second area, determines described first based on comparative result Region is retroreflective regions.
It is same due to the variation of shooting angle according to the image-forming principle of camera in electronic equipment in the embodiment of the present invention Object the first image in the second image position and/or shape can change, simultaneously as glass and window to be captured Outer object is different at a distance from camera, and the object outside window of shooting is with the retroreflective regions because of glass generation in the first image and second The variable quantity of position and/or shape in image is all different.Since glass is closer apart from electronic equipment, retroreflective regions exist First image and the variable quantity of position and/or shape in the second image can be respectively greater than outside window object in the first image and the The variable quantity of position and/or shape in two images.
Optionally, above-mentioned steps 304 may include:Judge that the center between the first area and the second area is sat Whether the difference of scale value is more than first threshold, if so, determining that the first area is retroreflective regions.
In the embodiment of the present invention, as shown in Figure 4 A, shot under the first angle that electronic equipment A is formed between glass B The first image C is obtained, and C includes the first area D due to the reflective formation of glass surface;As shown in Figure 4 B, electronic equipment A with Shooting obtains the second image C ' under the second angle formed between glass B, and C ' includes the secondth area of the reflective formation of glass surface Domain D ', and can determine that first area D and second area D ' is target area pair by above-mentioned steps 303, electronic equipment can obtain The difference for taking the centre coordinate value between first area D and second area D ', when the difference is more than first threshold, it is determined that the One region D is retroreflective regions.
Wherein, above-mentioned first threshold can be preset fixed value, can also be to preset and taken with camera Focal length when scape is preset with the corresponding fixed value of the focal length under that is, each focal length, works as camera shooting there are the dynamic value of mapping relations When the focal length variations of head, first threshold also changes, and the shorter first threshold of focal length is smaller, and focal length is longer, and first threshold is bigger.
Optionally, above-mentioned steps 304 may include:Judge the area surface between the first area and the second area Whether long-pending difference is more than second threshold, if so, determining that the first area is retroreflective regions.
In the embodiment of the present invention, in Fig. 4 A and Fig. 4 B, electronic equipment can obtain between first area D and second area D ' Region area difference, when the difference be more than second threshold when, it is determined that first area D be retroreflective regions.Wherein, above-mentioned Two threshold values can be preset fixed value, can also be focal length presence mapping pass when presetting and finding a view with camera The dynamic value of system is preset with the corresponding fixed value of the focal length under that is, each focal length, when the focal length variations of camera, the second threshold Value also changes, and the shorter second threshold of focal length is smaller, and focal length is longer, and first threshold is bigger.
Step 305 carries out image repair to the retroreflective regions in described first image.
In the embodiment of the present invention, in the embodiment of the present invention, when above-mentioned steps 202 determine the retroreflective regions in the first image When, electronic equipment can carry out image repair using the retroreflective regions in the first image of image repair method pair.Wherein, above-mentioned figure As restorative procedure may include the image repairs algorithm such as missing image complementing method and interpolation method.Such as:Utilize missing image Complementing method repairs the retroreflective regions in the first image, can be by by area identical with the retroreflective regions position in the second image In the object map in domain to the retroreflective regions.
Optionally, above-mentioned steps 305 may include:By cellular automata algorithm to the reflective areas in described first image Domain carries out image repair.
In the embodiment of the present invention, cellular automata is the model that iteration is updated using neighborhood, at random from eight neighbours In select one it is non-missing cellular replace missing cellular, the image of retroreflective regions is repaiied using cellular automata algorithm Multiple, by the object map in region adjacent with retroreflective regions in the first image to retroreflective regions, rule is as follows:
If cellular x is the cellular of non-missing image part, the t+1 moment extracts a non-missing from 8 neighbours at random Partial cellular replaces:
Kt+i=random (St), St ∈ f (kt),
Wherein, k is the cellular of lack part, and S is the cellular of non-lack part, and f (kt) is neighbours' cellular of kt;
Using asynchronous refresh, cellular is from left to right gradually replaced from bottom to top according to the sequence of scanning;Lack part Cellular become the part of non-missing after non-missing neighbours substitute, it is and another if certain missing cellular x is replaced in t moment Missing cellular y is the neighbours of x, and when y is when being replaced at the t+1 moment, x is considered to belong to the cellular of non-missing in y neighbours;It loses The cellular asynchronous refresh of image, all cellular updates are once used as an iteration.
Assuming that the first image is divided into grid, as shown in figure 5, the gray area of label 5 is missing image part in Fig. 5 Cellular i.e. the first image in retroreflective regions, the region of label 1 to 4 and label 6 to 9 is cellular i.e. first of non-certain part Non- retroreflective regions in image, according to above-mentioned rule, random selection reflects one in label 1 to 4 and the corresponding cellular of label 6 to 9 Label 5 is incident upon to one cellular, the object of photosensitive region is replaced by the object outside window of the shooting of adjacent area, realizes to the The reparation of retroreflective regions in one image.In this way, by successive ignition, the image of retroreflective regions shown in FIG. 1 can be repaiied It is multiple, the effect after being repaired as shown in Figure 6.
Optionally, described first image and second image buffer storage be in the electronic equipment, above-mentioned steps 305 it Afterwards, it can also include the second image-erasing that will be cached.In this way, electronic equipment can be by the first image of caching and second The comparison of image obtains the retroreflective regions in the first image, and deletes the second image of caching, realizes the photograph to shooting The image of retroreflective regions is repaired in real time in piece, and saves the memory space of electronic equipment.
The image processing method of the embodiment of the present invention, by detecting the first image for being obtained under different shooting angles and the The average gray value of all area to be tested of two images determines the target area pair of pending comparison according to testing result, right The first area and the second area are compared, and determine that the first area is retroreflective regions based on comparative result. In this way can to electronic equipment in the photo that glass is shot retroreflective regions carry out image repair, promoted electronic equipment shooting The quality of photo.
It is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention referring to Fig. 7, Fig. 7, as shown in fig. 7, should Electronic equipment 700 includes image collection module 701, retroreflective regions determining module 702 and image repair module 703:
Image collection module 701, for obtaining the first image and the second image corresponding to different shooting angles;
Retroreflective regions determining module 702, for according to described first image and second image, determining first figure Retroreflective regions as in;
Image repair module 703, for carrying out image repair to the retroreflective regions in described first image.
Optionally, as shown in figure 8, the retroreflective regions determining module 702 may include:
Average gray value detection unit 7021, it is all to be checked in described first image and second image for detecting Survey the average gray value in region;
Target area is to determination unit 7022, the target area pair for determining pending comparison according to testing result, institute Target area is stated to including belonging to the first area of the first image and belonging to the second area of the second image, and the first area The difference of average gray value of average gray value and the second area be less than or equal to predetermined threshold value;
Retroreflective regions determination unit 7023, for being compared to the first area and the second area, based on than Relatively result determines that the first area is retroreflective regions.
Optionally, the retroreflective regions determination unit 7023 can be also used for judging the first area and secondth area Whether the difference of the centre coordinate value between domain is more than first threshold, if so, determining that the first area is retroreflective regions.
Optionally, the retroreflective regions determination unit 7023 can be also used for judging the first area and secondth area Whether the difference of the region area between domain is more than second threshold, if so, determining that the first area is retroreflective regions.
Optionally, described image repair module 703 can be also used for through cellular automata algorithm to described first image In retroreflective regions carry out image repair.
Optionally, described first image and second image buffer storage are in the electronic equipment, as shown in figure 9, described Electronic equipment 700 can also include:
Image-erasing module 704, for described image repair module 703 to the retroreflective regions in described first image into After row image repair, by the second image-erasing of caching.
Electronic equipment 700 can realize each process that electronic equipment is realized in the embodiment of the method for Fig. 1 to Fig. 6, to keep away Exempt to repeat, which is not described herein again.
The electronic equipment 700 of the embodiment of the present invention, by comparing the first image for being obtained under different shooting angles and the Two images, it may be determined that the retroreflective regions in the first image, to be repaired to the retroreflective regions in the first image.In this way may be used With retroreflective regions carry out image repair in the photo that glass is shot to electronic equipment, the photo of electronic equipment shooting is promoted Quality.
It is a kind of structural schematic diagram of mobile terminal provided in an embodiment of the present invention referring to Figure 10, Figure 10, as shown in Figure 10, Mobile terminal 1000 includes:At least one processor 1010, memory 1020, at least one network interface 1040 and user interface 1030.Various components in mobile terminal 1000 are coupled by bus system 1050.It is understood that bus system 1050 is used Connection communication between realizing these components.Bus system 1050 further includes power bus, control in addition to including data/address bus Bus and status signal bus in addition processed.But for the sake of clear explanation, various buses are all designated as bus system in Fig. 10 1050.Mobile terminal 1000 further includes camera 1060.In addition, camera 1060 passes through bus system 1050 and mobile terminal Various components connect.
Wherein, user interface 1030 may include display, keyboard or pointing device (for example, mouse, trace ball (trackball), touch-sensitive plate or touch screen etc..
It is appreciated that the memory 1020 in the embodiment of the present invention can be volatile memory or non-volatile memories Both device, or may include volatile and non-volatile memory.Wherein, nonvolatile memory can be read-only memory (Read-Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), erasable programmable are only Read memory (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, ) or flash memory EEPROM.Volatile memory can be random access memory (Random Access Memory, RAM), use Make External Cache.By exemplary but be not restricted explanation, the RAM of many forms is available, such as static random-access Memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random-access Memory (Synchronous DRAM, SDRAM), double data speed synchronous dynamic RAM (Double Data Rate SDRAM, DDRSDRAM), it is enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronous Connect dynamic random access memory (Synch Link DRAM, SLDRAM) and direct rambus random access memory (Direct Rambus RAM, DRRAM).The memory 1020 of system and method described herein be intended to including but not limited to this A little and any other suitable type memory.
In some embodiments, memory 1020 stores following element, executable modules or data structures, or Their subset of person or their superset:Operating system 1021 and application program 1022.
Wherein, operating system 1021, including various system programs, such as ccf layer, core library layer, driving layer etc., are used for Realize various basic businesses and the hardware based task of processing.Application program 1022, including various application programs, such as media Player (Media Player), browser (Browser) etc., for realizing various applied business.Realize the embodiment of the present invention The program of method may be embodied in application program 1022.
In embodiments of the present invention, by the program for calling memory 1020 to store or instruction, specifically, can be application The program stored in program 1022 or instruction, processor 1010 are used for:Obtain corresponding to different shooting angles the first image and Second image;According to described first image and second image, the retroreflective regions in described first image are determined;To described Retroreflective regions in one image carry out image repair.
The method that the embodiments of the present invention disclose can be applied in processor 1010, or real by processor 1010 It is existing.Processor 1010 may be a kind of IC chip, the processing capacity with signal.During realization, the above method Each step can be completed by the instruction of the integrated logic circuit of the hardware in processor 1010 or software form.Above-mentioned Processor 1010 can be general processor, digital signal processor (Digital Signal Processor, DSP), special Integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general Processor can be microprocessor or the processor can also be any conventional processor etc..In conjunction with institute of the embodiment of the present invention The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.The storage medium is located at The step of memory 1020, processor 1010 reads the parameter in memory 1020, the above method is completed in conjunction with its hardware.
It is understood that embodiments described herein can use hardware, software, firmware, middleware, microcode or its It combines to realize.For hardware realization, processing unit may be implemented in one or more application-specific integrated circuit (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor, In controller, microcontroller, microprocessor, other electronic units for executing herein described function or combinations thereof.
For software implementations, it can be realized herein by executing the module (such as process, function etc.) of function described herein The technology.Software code is storable in memory and is executed by processor.Memory can in the processor or It is realized outside processor.
Optionally, processor 1010 executes described according to described first image and second image, determines described first Retroreflective regions in image, including:
Detect the average gray value of described first image and all area to be tested in second image;
The target area pair of pending comparison is determined according to testing result, wherein the target area is to including belonging to the The first area of one image and the second area for belonging to the second image, and the average gray value of the first area and described second The difference of the average gray value in region is less than or equal to predetermined threshold value;
The first area and the second area are compared, determine that the first area is anti-based on comparative result Light region.
Optionally, processor 1010 execute it is described the first area and the second area are compared, based on than Relatively result determines that the first area is retroreflective regions, including:
Judge whether the difference of the centre coordinate value between the first area and the second area is more than first threshold, If so, determining that the first area is retroreflective regions.
Optionally, processor 1010 execute it is described the first area and the second area are compared, based on than Relatively result determines that the first area is retroreflective regions, including:
Judge whether the difference of the region area between the first area and the second area is more than second threshold, if It is, it is determined that the first area is retroreflective regions.
Optionally, processor 1010 executes the retroreflective regions in described first image and carries out image repair, including:
Image repair is carried out to the retroreflective regions in described first image by cellular automata algorithm.
Optionally, processor 1010 executes described first image and second image buffer storage in the electronic equipment, After the retroreflective regions in described first image carry out image repair, further include:
By the second image-erasing of caching.
The mobile terminal 1000 of the embodiment of the present invention, by comparing the first image for being obtained under different shooting angles and the Two images, it may be determined that the retroreflective regions in the first image, to be repaired to the retroreflective regions in the first image.In this way may be used With retroreflective regions carry out image repair in the photo that glass is shot to electronic equipment, the photo of electronic equipment shooting is promoted Quality.
Those of ordinary skill in the art may realize that lists described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, depends on the specific application and design constraint of technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only A kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, device or unit It connects, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the embodiment of the present invention Purpose.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be expressed in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes:USB flash disk, mobile hard disk, ROM, RAM, magnetic disc or CD etc. are various can to store program code Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (6)

1. a kind of image processing method, applied to the electronic equipment for including camera, which is characterized in that including:
Obtain the first image and the second image corresponding to different shooting angles;
Detect the average gray value of described first image and all area to be tested in second image;
The target area pair of pending comparison is determined according to testing result, wherein the target area is to including belonging to the first figure The first area of picture and the second area for belonging to the second image, and the average gray value of the first area and the second area Average gray value difference be less than or equal to predetermined threshold value;
Judge whether the difference of the centre coordinate value between the first area and the second area is more than first threshold, or Judge whether the difference of the region area between the first area and the second area is more than second threshold, if so, really The fixed first area is retroreflective regions;
Image repair is carried out to the retroreflective regions in described first image.
2. the method as described in claim 1, which is characterized in that the retroreflective regions in described first image carry out image It repairs, including:
Image repair is carried out to the retroreflective regions in described first image by cellular automata algorithm.
3. method as claimed in claim 1 or 2, which is characterized in that described first image and second image buffer storage are in institute It states in electronic equipment, after the retroreflective regions in described first image carry out image repair, further includes:
By the second image-erasing of caching.
4. a kind of electronic equipment, which is characterized in that including:
Image collection module, for obtaining the first image and the second image corresponding to different shooting angles;
Average gray value detection unit, for detecting all area to be tested in described first image and second image Average gray value;
Target area is to determination unit, the target area pair for determining pending comparison according to testing result, the target area Domain is to including belonging to the first area of the first image and belonging to the second area of the second image, and the average ash of the first area Angle value and the difference of the average gray value of the second area are less than or equal to predetermined threshold value;
Retroreflective regions determination unit, the difference for judging the centre coordinate value between the first area and the second area Whether it is more than first threshold, or judges whether the difference of region area between the first area and the second area is big In second threshold, if so, determining that the first area is retroreflective regions;
Image repair module, for carrying out image repair to the retroreflective regions in described first image.
5. electronic equipment as claimed in claim 4, which is characterized in that described image repair module is for passing through cellular automata Algorithm carries out image repair to the retroreflective regions in described first image.
6. electronic equipment as described in claim 4 or 5, which is characterized in that described first image and second image buffer storage In the electronic equipment, the electronic equipment further includes:
Image-erasing module, for carrying out image repair to the retroreflective regions in described first image in described image repair module Later, by the second image-erasing of caching.
CN201710035901.8A 2017-01-18 2017-01-18 A kind of image processing method and electronic equipment Active CN106791433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710035901.8A CN106791433B (en) 2017-01-18 2017-01-18 A kind of image processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710035901.8A CN106791433B (en) 2017-01-18 2017-01-18 A kind of image processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN106791433A CN106791433A (en) 2017-05-31
CN106791433B true CN106791433B (en) 2018-10-19

Family

ID=58944401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710035901.8A Active CN106791433B (en) 2017-01-18 2017-01-18 A kind of image processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN106791433B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109961455B (en) 2017-12-22 2022-03-04 杭州萤石软件有限公司 Target detection method and device
CN110910491A (en) * 2019-11-27 2020-03-24 广西科技大学 Three-dimensional human body modeling optimization method and system
CN111275983B (en) * 2020-02-14 2022-11-01 阿波罗智联(北京)科技有限公司 Vehicle tracking method, device, electronic equipment and computer-readable storage medium
CN111510623B (en) * 2020-04-02 2022-02-15 维沃移动通信有限公司 Shooting method and electronic equipment
CN112819854B (en) * 2021-02-02 2023-06-13 歌尔光学科技有限公司 Ghost detection method, ghost detection device, and readable storage medium
EP4050555A1 (en) * 2021-02-25 2022-08-31 Beijing Xiaomi Mobile Software Co., Ltd. Method for removing image artifacts and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101472114A (en) * 2007-12-26 2009-07-01 索尼株式会社 Image processing device and method, and program
WO2011061940A1 (en) * 2009-11-18 2011-05-26 パナソニック株式会社 Image processing method, and image processing device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4740602B2 (en) * 2005-01-19 2011-08-03 イーストマン コダック カンパニー Auto white balance device and white balance adjustment method
EP1906674A4 (en) * 2005-07-13 2011-06-22 Nec Corp Color correction method and color correction device
JP4771539B2 (en) * 2006-07-26 2011-09-14 キヤノン株式会社 Image processing apparatus, control method therefor, and program
CN101472036A (en) * 2007-12-29 2009-07-01 明基电通信息技术有限公司 Image processing method capable of removing flaw and device applied the method
US9324136B2 (en) * 2014-06-12 2016-04-26 Htc Corporation Method, electronic apparatus, and computer readable medium for processing reflection in image
CN105046250B (en) * 2015-09-06 2018-04-20 广州广电运通金融电子股份有限公司 The glasses removing method of recognition of face
CN105959543B (en) * 2016-05-19 2019-04-30 努比亚技术有限公司 It is a kind of to remove reflective filming apparatus and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101472114A (en) * 2007-12-26 2009-07-01 索尼株式会社 Image processing device and method, and program
WO2011061940A1 (en) * 2009-11-18 2011-05-26 パナソニック株式会社 Image processing method, and image processing device

Also Published As

Publication number Publication date
CN106791433A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106791433B (en) A kind of image processing method and electronic equipment
US9661228B1 (en) Robust image feature based video stabilization and smoothing
US9578248B2 (en) Method for generating thumbnail image and electronic device thereof
JP6224251B2 (en) Bowl shape imaging system
CN107527360B (en) A kind of image alignment method and mobile terminal
CN105847674B (en) A kind of preview image processing method and mobile terminal based on mobile terminal
CN109116541A (en) Microscope focusing method, device, computer equipment and storage medium
CN102891960B (en) Method and camera for determining an image adjustment parameter
CN106060406A (en) Photographing method and mobile terminal
WO2018058934A1 (en) Photographing method, photographing device and storage medium
CN110705532B (en) Method, device and equipment for identifying copied image
CN110460769B (en) Image correction method, image correction device, computer equipment and storage medium
CN106131397A (en) A kind of method that multi-medium data shows and electronic equipment
CN111741214A (en) Image processing method and device and electronic equipment
CN110213479B (en) Anti-shake method and device for video shooting
CN105827987B (en) A kind of picture shooting method and mobile terminal
CN106060404A (en) Photographing mode selection method and terminal
CN105872378A (en) Control method, control device and electronic device
CN104994288A (en) Shooting method and user terminal
CN105007410A (en) Large viewing angle camera control method and user terminal
CN106338807B (en) A kind of Atomatic focusing method, device and terminal
CN112560615A (en) Method and system for judging viewing screen and electronic equipment
CN104994282A (en) Large view angle camera control method and user terminal
CN105791670A (en) Image acquisition method and device
CN116456191A (en) Image generation method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20171107

Address after: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Applicant after: VIVO MOBILE COMMUNICATION CO., LTD.

Applicant after: Wewo Mobile Communication Co. Ltd. Beijing branch

Address before: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Applicant before: VIVO MOBILE COMMUNICATION CO., LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200515

Address after: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Patentee after: VIVO MOBILE COMMUNICATION Co.,Ltd.

Address before: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Co-patentee before: Wewo Mobile Communication Co. Ltd. Beijing branch

Patentee before: VIVO MOBILE COMMUNICATION Co.,Ltd.

TR01 Transfer of patent right