CN105678685B - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN105678685B
CN105678685B CN201511019142.3A CN201511019142A CN105678685B CN 105678685 B CN105678685 B CN 105678685B CN 201511019142 A CN201511019142 A CN 201511019142A CN 105678685 B CN105678685 B CN 105678685B
Authority
CN
China
Prior art keywords
pixel
color value
blocked
pending area
pixel point
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
CN201511019142.3A
Other languages
Chinese (zh)
Other versions
CN105678685A (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.)
Xiaomi Inc
Original Assignee
Xiaomi 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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201511019142.3A priority Critical patent/CN105678685B/en
Publication of CN105678685A publication Critical patent/CN105678685A/en
Application granted granted Critical
Publication of CN105678685B publication Critical patent/CN105678685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The disclosure is directed to a kind of image processing method and devices.Wherein, this method comprises: obtaining pending area, the pending area belongs to the region that is blocked of picture, and the edge of the pending area includes the pixel not being blocked;Using the color value of the pixel not being blocked, the color value of the central pixel point of the pending area is determined;Using the color value of the pixel not being blocked and the color value of the central pixel point, the color value of the residual pixel point in the pending area is determined.Such scheme can make the picture treatment process of disclosure scheme have more objectivity, additionally aid the smooth transition for realizing pixel color value, improve repairing effect, avoid the occurrence of barrage.

Description

Image processing method and device
Technical field
This disclosure relates to field of image processing more particularly to a kind of image processing method and device.
Background technique
In general, in order to identify the source of picture or video, provider can add on the specific position of picture or video Some significant patterns.For example, the upper left corner of video would generally show Sohu's video when user passes through Sohu's video-see video Significant pattern, may refer to the dashed region in exemplary embodiment shown in FIG. 1.
Significant pattern can cause to block to the image of the specific location of picture or video to a certain extent.Currently, can To repair the region that flagged property pattern shelters from by following the relevant technologies:
The rectangular area that flagged property pattern blocks is intercepted from picture, and replicates the adjacent next line in rectangular area bottom Pixel, that is to say, that the color value by the color value of the adjacent next line pixel in bottom, as bottom pixel point.It is this Repair mode may result in the region that is blocked and occur apparent barrage after repair, and repairing effect is poor, influences user To the perception of picture or video.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of image processing method and device.
According to the first aspect of the embodiments of the present disclosure, a kind of image processing method is provided, comprising: pending area is obtained, The pending area belongs to the region that is blocked of picture, and the edge of the pending area includes the pixel not being blocked Point;Using the color value of the pixel not being blocked, the color value of the central pixel point of the pending area is determined;Benefit With the color value of the color value of the pixel not being blocked and the central pixel point, determine in the pending area The color value of residual pixel point.
The technical scheme provided by this disclosed embodiment can include the following benefits: first with positioned at pending area The pixel not being blocked at edge determines the color value of the central pixel point of pending area, and then recycles and do not hidden The pixel and central pixel point of gear determine the color value of the residual pixel point of pending area.Such repair process, no matter It is the color value of central pixel point or the color value of residual pixel point, with the existing picture not being blocked of script in picture Based on the color value of vegetarian refreshments, the picture treatment process of disclosure scheme can be made to have more objectivity, additionally aid realization pixel The smooth transition of color value improves repairing effect, avoids the occurrence of barrage.
In the first possible embodiment of embodiment of the present disclosure first aspect, it is not blocked described in the utilization The color value of pixel determines the color value of the central pixel point of the pending area, comprising: from the picture not being blocked Spare pixel is chosen in vegetarian refreshments;By the mean value of the color value of the spare pixel, it is determined as the face of the central pixel point Color value.
Technical solution provided in this embodiment can include the following benefits: can be simple and convenient determine center picture The color value of vegetarian refreshments.In addition, based on the color value of the existing pixel not being blocked of script in picture, imago in acquisition The color value of vegetarian refreshments can also make the picture treatment process of disclosure scheme have more objectivity.
In second of possible embodiment of embodiment of the present disclosure first aspect, the first pixel belongs to described wait locate The residual pixel point in region is managed, then the color value using the pixel not being blocked and the central pixel point Color value determines the color value of the residual pixel point in the pending area, comprising: from the edge picture of the pending area In vegetarian refreshments, the second pixel is determined, second pixel is the central pixel point to the first pixel line Extended line, the pixel intersected with the edge of the pending area;Determine the weighted value w of the central pixel point1With it is described The weighted value w of second pixel2;Obtain the color value P of first pixel1=P0*w1+P2*w2, P0For the center pixel The color value of point, P2For the color value of second pixel.
Technical solution provided in this embodiment can include the following benefits: realization pixel face that can be simple and convenient The smooth transition of color value helps to optimize the repairing effect to the region that is blocked.
In conjunction with second of possible embodiment of embodiment of the present disclosure first aspect, in the third possible embodiment In, the weighted value w of the determination central pixel point1With the weighted value w of second pixel2, comprising:
Obtain the distance between the central pixel point and first pixel d1And first pixel and institute State distance d between the second pixel2;According to the d1With the d2, determine the w1With the w2If: d1>d2, then setting makes w1<w2, and w1+w2=1;If d1<d2, then setting makes w1>w2, and w1+w2=1;If d1=d2, then setting makes w1=w2, and w1 +w2=1.
Technical solution provided in this embodiment can include the following benefits: in general, neighbor pixel in picture it Between color value can seamlessly transit mostly, be generally not in color value mutation, therefore, can be according in disclosure scheme Positional relationship between one pixel, central pixel point and the second pixel three is determined to indicate central pixel point to first The influence degree w of pixel color value1, the second pixel is to the influence degree w of the first pixel color value2.According to point away from more Closely, w is arranged in the bigger principle of weighted value1And w2
It is possible at the 4th kind in conjunction with second of embodiment of the present disclosure first aspect or the third possible embodiment In embodiment, if the edge of the pending area includes the pixel being blocked, first picture is obtained described The color value P of vegetarian refreshments1Before, the method also includes: judge whether second pixel is the pixel being blocked;If Second pixel is the pixel being blocked, then from the edge pixel point of the pending area, determine with it is described The adjacent pixel not being blocked of second pixel, and using the color value for the pixel not being blocked determined, it obtains The color value P of second pixel2
Technical solution provided in this embodiment can include the following benefits: as a kind of possible embodiment, to The edge of processing region may include the pixel that flagged property pattern blocks, and corresponds to this, can determine the second pixel After point, first judge whether the second pixel is the pixel that is blocked, and then obtains the color of the second pixel according to judging result Value.If it is judged that indicating that the second pixel is the pixel being blocked, the face between neighbor pixel equally can use Color value is generally not in the principle of mutation, is determined from edge pixel point, adjacent with the second pixel not to be blocked Pixel, and using the pixel determined, the color value of the second pixel is obtained, for the subsequent face for calculating the first pixel It is used when color value.
According to the second aspect of an embodiment of the present disclosure, a kind of picture processing unit is provided, comprising: pending area obtains mould Block is configured as obtaining pending area, and the pending area belongs to the region that is blocked of picture, and the pending area Edge include the pixel not being blocked;Central pixel point color value determining module is configured as not being blocked using described Pixel color value, determine the color value of the central pixel point of the pending area;Residual pixel point color value determines Module is configured as the color value of the color value and the central pixel point using the pixel not being blocked, determines institute State the color value of the residual pixel point in pending area.
In the first possible embodiment of embodiment of the present disclosure second aspect, the central pixel point color value is true Cover half block is configured as choosing spare pixel from the pixel not being blocked;By the color of the spare pixel The mean value of value is determined as the color value of the central pixel point.
In second of possible embodiment of embodiment of the present disclosure second aspect, the first pixel belongs to described wait locate The residual pixel point in region is managed, then the residual pixel point color value determining module includes: the second pixel determining module, quilt It is configured to from the edge pixel point of the pending area, determines that the second pixel, second pixel are in described Extended line of the imago vegetarian refreshments to the first pixel line, the pixel that intersects with the edge of the pending area;Weight It is worth determining module, is configured to determine that the weighted value w of the central pixel point1With the weighted value w of second pixel2;First Pixel color value obtains module, is configured as obtaining the color value P of first pixel1=P0*w1+P2*w2, P0It is described The color value of central pixel point, P2For the color value of second pixel.
In conjunction with second of possible embodiment of embodiment of the present disclosure second aspect, in the third possible embodiment In, the weighted value determining module is configured as obtaining the distance between the central pixel point and first pixel d1、 And distance d between first pixel and second pixel2;According to the d1With the d2, determine the w1And institute State w2If: d1>d2, then setting makes w1<w2, and w1+w2=1;If d1<d2, then setting makes w1>w2, and w1+w2=1;If d1 =d2, then setting makes w1=w2, and w1+w2=1.
It is possible at the 4th kind in conjunction with second of embodiment of the present disclosure second aspect or the third possible embodiment In embodiment, if the edge of the pending area includes the pixel being blocked, the residual pixel point color value Determining module further include: judgment module is configured as obtaining the module acquisition P in the first pixel color value1Before, Judge whether second pixel is the pixel being blocked;Second pixel color value obtains module, is configured as in institute When stating judgment module and determining that second pixel is the pixel being blocked, from the edge pixel point of the pending area In, determine the pixel that is not blocked adjacent with second pixel, and utilize the pixel not being blocked determined The color value of point obtains the color value P of second pixel2
According to the third aspect of an embodiment of the present disclosure, a kind of picture processing unit is provided, comprising: processor;For storing The memory of processor-executable instruction;Wherein, the processor is configured to: obtain pending area, the pending district Domain belongs to the region that is blocked of picture, and the edge of the pending area includes the pixel not being blocked;Using it is described not The color value for the pixel being blocked determines the color value of the central pixel point of the pending area;It is not hidden using described The color value of the color value of the pixel of gear and the central pixel point determines the residual pixel point in the pending area Color value.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is the schematic diagram for the picture that flagged property pattern shown according to an exemplary embodiment blocks.
Fig. 2 is a kind of flow chart of image processing method shown according to an exemplary embodiment.
Fig. 3 is the flow chart of the method for the color value of the first pixel of determination shown according to an exemplary embodiment.
Fig. 4 is the schematic diagram of pending area shown according to an exemplary embodiment.
Fig. 5 is the flow chart of the method for the color value of the first pixel of determination shown according to another exemplary embodiment.
Fig. 6 is a kind of block diagram of picture processing unit shown according to an exemplary embodiment.
Fig. 7 is a kind of block diagram of the picture processing unit shown according to another exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 2 is a kind of flow chart of image processing method shown according to an exemplary embodiment.The image processing method It can be applied to smart machine.For example, smart machine can be smart phone, tablet computer, PC machine, laptop etc. Deng.The image processing method may comprise steps of:
In step 201, pending area is obtained, the pending area belongs to the region that is blocked of picture, and described The edge of pending area includes the pixel not being blocked.
Using technical solution provided by the present disclosure, the region that property pattern flagged in picture or video blocks can be carried out Repair process.It is to be appreciated that video was made of picture one by one, the area that property pattern flagged in video is blocked Domain carries out repair process, namely according to disclosure scheme, carries out repair process to every frame picture that video includes.
After getting the picture that flagged property pattern blocks, pending area can be first extracted from picture.The disclosure In scheme, pending area belongs to the region that is blocked of picture, and the edge of pending area includes the pixel not being blocked.
In conjunction with practical application, the region that is entirely blocked can be determined as pending area, that is, can be directly from picture The region that flagged property pattern blocks is intercepted, pending area is obtained;Alternatively, the region division that can will be blocked is at least two Point, and pending area is therefrom selected, disclosure scheme can be without limitation to this.It is to be appreciated that the region that is blocked can be with Regular shape is presented as, for example, rectangle, circle etc., that is, include the region that flagged property pattern blocks;Alternatively, by hiding Gear region can also be presented as the irregularity shape that the shape according to significant pattern is truncated to, and disclosure scheme can not to this It limits.
In disclosure scheme, the edge of pending area includes the pixel not being blocked it is to be understood that pending district The all pixels not being blocked of edge pixel point in domain, that is, each edge pixel point can be got directly from picture Color value.Alternatively, the edge of pending area may include two kinds of pixel: the pixel not being blocked Directly to get the color value of the pixel from picture;And the pixel being blocked, i.e., it cannot directly be obtained from picture The color value of the pixel is got, corresponds to this, may refer to introduce at following FIG. 5 illustrated embodiment, it herein wouldn't be detailed It states.
In step 202, using the color value of the pixel not being blocked, the center of the pending area is determined The color value of pixel.
In disclosure scheme, repair process is carried out it is to be understood that determining the region that is blocked respectively to the region that is blocked Including each pixel color value.
After getting pending area, the central pixel point of pending area can be first determined, and then utilize and do not hidden The color value of the pixel of gear determines the color value of central pixel point.
In a kind of possible embodiment, spare pixel is chosen in the pixel that can never be blocked;And it will be spare The mean value of the color value of pixel is determined as the color value of central pixel point.In conjunction with concrete application, can not be blocked all Pixel be chosen for spare pixel;Alternatively, predetermined number can also be randomly selected from all pixels not being blocked Spare pixel, the embodiment of the present disclosure can be without limitation to this.
The disclosure can calculate all standby when the color value using spare pixel determines the color value of central pixel point With the mean value of the color value of pixel, and by the color value of pixel centered on the mean value;Alternatively, can be to all spare pictures The color value arranged in sequence of vegetarian refreshments, and by the color value of pixel centered on median;Alternatively, all spare pictures can be counted The color value of vegetarian refreshments, by the color value of pixel centered on the most color value of frequency of occurrence.The embodiment of the present disclosure is to determination The scheme of the color value of central pixel point can be without limitation.
In step 203, using the color value of the pixel not being blocked and the color value of the central pixel point, Determine the color value of the residual pixel point in the pending area.
Such as introduction made above, disclosure scheme carries out repair process to the region that is blocked, that is, to be blocked The color value for each pixel that region includes.
After the color value for obtaining central pixel point in step 202, the color value for the pixel not being blocked can use With the color value of central pixel point, the color value of the residual pixel point in pending area is determined.It is repaired in disclosure scheme Pending area can be presented as the color value for obtaining central pixel point, and obtain the color value of residual pixel point.Further Ground, the region if pending area is as entirely blocked so just realize the purpose for repairing the region that is blocked;If wait locate Managing region is a part being entirely blocked in region, then can refer to disclosure embodiment illustrated in fig. 1, continue to be processed to other Region carries out repair process, the same purpose that can be achieved to repair the region that is blocked.
In technical solution provided by the present disclosure, first with the pixel not being blocked for being located at pending area edge, really The color value of the central pixel point of pending area is made, and then in conjunction with the pixel and central pixel point not being blocked, really The color value for making the residual pixel point of pending area, has repaired pending area.Such process, whether central pixel point Color value or residual pixel point color value, with the color value of the pixel not being blocked originally existing in picture Based on, so that the repair process of the disclosure is had more objectivity, additionally aid the smooth transition for realizing pixel color value, improvement is repaired Multiple effect, avoids the occurrence of barrage.
The method of residual pixel point color value determining in disclosure scheme is explained below.
Fig. 3 is the flow chart of the method for the color value of the first pixel of determination shown according to an exemplary embodiment.The The residual pixel point namely the first pixel that one pixel belongs in pending area can be any of pending area Residual pixel point.The method of the color value of first pixel of determination may comprise steps of:
In step 301, from the edge pixel point of the pending area, the second pixel is determined, described second Pixel is that the central pixel point intersects to the extended line of the first pixel line, with the edge of the pending area Pixel.
In disclosure scheme, it can use the color value of central pixel point and the color value of the second pixel, determine first The color value of pixel.Second pixel belongs to the pixel not being blocked, as an example, during the second pixel can be Extended line of the imago vegetarian refreshments to the first pixel line, the pixel that intersects with the edge of pending area.Fig. 4 is shown according to one Example property implements the schematic diagram of the pending area exemplified, wherein central pixel point point0, the first pixel are Point1 is point2 by the second pixel that extended line is determined.
In step 302, the weighted value w of the central pixel point is determined1With the weighted value w of second pixel2
In step 303, the color value P of first pixel is obtained1=P0*w1+P2*w2, P0For the center pixel The color value of point, P2For the color value of second pixel.
As an example, the disclosure can use the mode of weighted sum, the color value P based on central pixel point0With The color value P of second pixel2, obtain the color value P of the first pixel1.Corresponding to this, central pixel point can be first determined Weighted value w1, the second pixel weighted value w2, then it is based on formula P1=P0*w1+P2*w2Obtain the color value of the first pixel P1
In a kind of possible embodiment, can according to the distance of the first pixel to central pixel point, the second pixel, Determine w1And w2.For example, the distance between central pixel point and the first pixel d can be obtained first1, the first pixel and second Distance d between pixel2;Further according to d1And d2, determine w1And w2If: d1>d2, then setting makes w1<w2, and w1+w2=1;Such as Fruit d1<d2, then setting makes w1>w2, and w1+w2=1;If d1=d2, then setting makes w1=w2, and w1+w2=1.The disclosure is implemented Example is for w1And w2Value can without limitation, as an example, can be according to d1And d2Ratio, determine w1And w2Take Value.
In general, the color value between neighbor pixel in picture can seamlessly transit mostly, it is generally not in color value W can be arranged according to point away from closer, the bigger principle of weighted value in mutation, therefore, disclosure scheme1And w2.That is, first Pixel is closer in which pixel, then the weighted value of the pixel is with regard to larger, still shown in Fig. 4 for schematic diagram, and phase For point0, point1 is closer to point2, therefore may be configured as w2>w1
Furthermore it is possible to understand ground, make w1+w2=1, it helps to ensure that the flatness of the first pixel color value, avoids the occurrence of Color value mutation.
To sum up, the smooth transition of realization pixel color value that can be simple and convenient, facilitates optimization to the region that is blocked Repairing effect.
Such as introduction made above, the pixel that the edge pixel point of pending area all can not be blocked can also It is the pixel not being blocked with part.It, can be according to Fig. 5 institute if the edge of pending area includes the pixel being blocked Show that scheme determines the color value of the first pixel.
Fig. 5 is the flow chart of the method for the color value of the first pixel of determination shown according to another exemplary embodiment. The residual pixel point namely the first pixel that first pixel belongs in pending area can be any in pending area A residual pixel point.The method of the color value of first pixel of determination may comprise steps of:
In step 501, from the edge pixel point of the pending area, the second pixel is determined, described second Pixel is that the central pixel point intersects to the extended line of the first pixel line, with the edge of the pending area Pixel.
In step 502, judge whether second pixel is the pixel being blocked.
In step 503, if second pixel is the pixel being blocked, from the side of the pending area In edge pixel, the pixel that is not blocked adjacent with second pixel is determined, and do not hidden using what is determined The color value of the pixel of gear obtains the color value P of second pixel2
In the present solution, can first judge whether the second pixel is the pixel that is blocked after determining the second pixel, into And the color value of the second pixel is obtained according to judging result.If it is judged that indicating that the second pixel is the picture not being blocked Vegetarian refreshments then can directly extract the color value of the second pixel from picture, for the subsequent color value for calculating the first pixel When use;If it is judged that indicating that the second pixel is the pixel being blocked, then it can use the edge of pending area The pixel not being blocked in pixel determines the color value of the second pixel, for the subsequent face for calculating the first pixel It is used when color value.
As an example, it can be determined adjacent with the second pixel from the edge pixel point of pending area The pixel not being blocked recycles the color value for the pixel not being blocked determined, obtains the color of the second pixel Value.For example, the color value for the pixel not being blocked determined can be determined as the color value of the second pixel;Alternatively, The mean value of the color value for the pixel not being blocked determined can be determined as the color value of the second pixel;Alternatively, can With in the color value for the pixel not being blocked that will be determined, the most color value of frequency of occurrence is determined as the second pixel Color value, etc., the embodiment of the present disclosure can be without limitation to this.
Corresponding to this, repair pending area in disclosure scheme, can be presented as obtain central pixel point color value, It obtains the color value of residual pixel point and obtains the color value of the pixel that is blocked at pending area edge.
In step 504, the weighted value w of the central pixel point is determined1With the weighted value w of second pixel2
In step 505, the color value P of first pixel is obtained1=P0*w1+P2*w2, P0For the center pixel The color value of point, P2For the color value of second pixel.
In disclosure scheme, can judge whether the second pixel is to be blocked after determining the second pixel Pixel;Alternatively, w can also determined1And w2And then judge whether the second pixel is the pixel being blocked.? That is as long as utilizing formula P1=P0*w1+P2*w2Before the color value for calculating the first pixel, judgement is completed, this Open embodiment can be without limitation to this.
Fig. 6 is a kind of block diagram of picture processing unit shown according to an exemplary embodiment.Referring to Fig. 6, the device 600 It may include that pending area acquisition module 601, central pixel point color value determining module 602 and residual pixel point color value are true Cover half block 603.
The pending area obtains module 601, can be configured as acquisition pending area, the pending area belongs to The region that is blocked of picture, and the edge of the pending area includes the pixel not being blocked.
The central pixel point color value determining module 602 can be configured as and utilize the pixel not being blocked Color value determines the color value of the central pixel point of the pending area.
The residual pixel point color value determining module 603 can be configured as and utilize the pixel not being blocked The color value of color value and the central pixel point determines the color value of the residual pixel point in the pending area.
In conclusion central pixel point color value determines mould when carrying out picture processing by device provided by the disclosure Block 602 determines the central pixel point of pending area first with the pixel not being blocked for being located at pending area edge Color value;Residual pixel point color value determining module 603 recycles the pixel not being blocked and central pixel point, determines The color value of the residual pixel point of pending area.Such repair process, the whether color value of central pixel point, or residue The color value of pixel can make the disclosure based on the color value of the existing pixel not being blocked of script in picture The picture treatment process of scheme has more objectivity, additionally aids the smooth transition for realizing pixel color value, improves repairing effect, Avoid the occurrence of barrage.
In a kind of possible embodiment, which be can be configured as from described Spare pixel is chosen in the pixel not being blocked;It is determined as the mean value of the color value of the spare pixel in described The color value of imago vegetarian refreshments.
In a kind of possible embodiment, the first pixel belongs to the residual pixel point in the pending area, then should Residual pixel point color value determining module 603 includes: the second pixel determining module, be can be configured as from the pending district In the edge pixel point in domain, the second pixel is determined, second pixel is the central pixel point to first picture The extended line of vegetarian refreshments line, the pixel intersected with the edge of the pending area;Weighted value determining module can be configured For the weighted value w of the determination central pixel point1With the weighted value w of second pixel2;First pixel color value obtains Module can be configured as the color value P for obtaining first pixel1=P0*w1+P2*w2, P0For the central pixel point Color value, P2For the color value of second pixel.
In a kind of possible embodiment, which can be configured as and obtain the central pixel point The distance between first pixel d1And distance d between first pixel and second pixel2;According to The d1With the d2, determine the w1With the w2If: d1>d2, then setting makes w1<w2, and w1+w2=1;If d1<d2, then Setting makes w1>w2, and w1+w2=1;If d1=d2, then setting makes w1=w2, and w1+w2=1.
In a kind of possible embodiment, the edge of the pending area includes the pixel being blocked, then the residue Pixel color value determining module 603 further include: judgment module can be configured as and obtain in the first pixel color value Module obtains the P1Before, judge whether second pixel is the pixel being blocked;Second pixel color value obtains Module, can be configured as when the judgment module determines that second pixel is the pixel being blocked, from described In the edge pixel point of pending area, the pixel that is not blocked adjacent with second pixel is determined, and utilize The color value for the pixel not being blocked determined obtains the color value P of second pixel2
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 7 is a kind of block diagram of picture processing unit 700 shown according to an exemplary embodiment.For example, device 700 can To be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices are good for Body equipment, personal digital assistant etc..
Referring to Fig. 7, device 700 may include following one or more components: processing component 702, memory 704, electric power Component 706, multimedia component 708, audio component 710, the interface 712 of input/output (I/O), sensor module 714, and Communication component 716.
The integrated operation of the usual control device 700 of processing component 702, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 702 may include that one or more processors 720 refer to execute It enables, to complete all or part of the steps of above-mentioned image processing method.In addition, processing component 702 may include one or more Module, convenient for the interaction between processing component 702 and other assemblies.For example, processing component 702 may include multi-media module, To facilitate the interaction between multimedia component 708 and processing component 702.
Memory 704 is configured as storing various types of data to support the operation in device 700.These data are shown Example includes the instruction of any application or method for operating on device 700, contact data, and telephone book data disappears Breath, picture, video etc..Memory 704 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Electric power assembly 706 provides electric power for the various assemblies of device 700.Electric power assembly 706 may include power management system System, one or more power supplys and other with for device 700 generate, manage, and distribute the associated component of electric power.
Multimedia component 708 includes the screen of one output interface of offer between described device 700 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 708 includes a front camera and/or rear camera.When device 700 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 710 is configured as output and/or input audio signal.For example, audio component 710 includes a Mike Wind (MIC), when device 700 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 704 or via communication set Part 716 is sent.In some embodiments, audio component 710 further includes a loudspeaker, is used for output audio signal.
I/O interface 712 provides interface between processing component 702 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 714 includes one or more sensors, and the state for providing various aspects for device 700 is commented Estimate.For example, sensor module 714 can detecte the state that opens/closes of device 700, and the relative positioning of component, for example, it is described Component is the display and keypad of device 700, and sensor module 714 can be with 700 1 components of detection device 700 or device Position change, the existence or non-existence that user contacts with device 700,700 orientation of device or acceleration/deceleration and device 700 Temperature change.Sensor module 714 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 714 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 716 is configured to facilitate the communication of wired or wireless way between device 700 and other equipment.Device 700 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 716 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 716 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 700 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned image processing method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 704 of instruction, above-metioned instruction can be executed by the processor 720 of device 700 to complete above-mentioned picture processing side Method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic Band, floppy disk and optical data storage devices etc..
Those skilled in the art will readily occur to other embodiment party of the disclosure after considering specification and practicing the disclosure Case.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or adaptability Variation follows the general principles of this disclosure and including the undocumented common knowledge or usual skill in the art of the disclosure Art means.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following claim It points out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (9)

1. a kind of image processing method characterized by comprising
Pending area is obtained, the pending area belongs to the region that is blocked of picture, and the edge of the pending area Including the pixel not being blocked;
Using the color value of the pixel not being blocked, the color value of the central pixel point of the pending area is determined;
Using the color value of the pixel not being blocked and the color value of the central pixel point, the pending district is determined The color value of residual pixel point in domain.
2. the method according to claim 1, wherein the color using the pixel not being blocked Value, determines the color value of the central pixel point of the pending area, comprising:
Spare pixel is chosen from the pixel not being blocked;
By the mean value of the color value of the spare pixel, it is determined as the color value of the central pixel point.
3. the method according to claim 1, wherein the first pixel belongs to the residue in the pending area Pixel, then
The color value of the pixel not being blocked described in and the color value of the central pixel point determine described wait locate Manage the color value of the residual pixel point in region, comprising:
From the edge pixel point of the pending area, determine that the second pixel, second pixel are the center Extended line of the pixel to the first pixel line, the pixel that intersects with the edge of the pending area;
Determine the weighted value w of the central pixel point1With the weighted value w of second pixel2
Obtain the color value P of first pixel1=P0*w1+P2*w2, P0For the color value of the central pixel point, P2For institute The color value of the second pixel is stated,
If the edge of the pending area includes the pixel being blocked, in the face for obtaining first pixel Color value P1Before, the method also includes:
Judge whether second pixel is the pixel being blocked;
If second pixel is the pixel being blocked, from the edge pixel point of the pending area, determine The pixel that is not blocked adjacent with second pixel out, and utilize the color for the pixel not being blocked determined Value obtains the color value P of second pixel2
4. according to the method described in claim 3, it is characterized in that, the weighted value w of the determination central pixel point1And institute State the weighted value w of the second pixel2, comprising:
Obtain the distance between the central pixel point and first pixel d1And first pixel and described the Distance d between two pixels2
According to the d1With the d2, determine the w1With the w2:
If d1>d2, then setting makes w1<w2, and w1+w2=1;
If d1<d2, then setting makes w1>w2, and w1+w2=1;
If d1=d2, then setting makes w1=w2, and w1+w2=1.
5. a kind of picture processing unit characterized by comprising
Pending area obtains module, is configured as obtaining pending area, the pending area belongs to being blocked for picture Region, and the edge of the pending area includes the pixel not being blocked;
Central pixel point color value determining module is configured as determining institute using the color value of the pixel not being blocked State the color value of the central pixel point of pending area;
Residual pixel point color value determining module, be configured as using the pixel not being blocked color value and it is described in The color value of imago vegetarian refreshments determines the color value of the residual pixel point in the pending area.
6. device according to claim 5, which is characterized in that
The central pixel point color value determining module is configured as choosing spare pixel from the pixel not being blocked Point;By the mean value of the color value of the spare pixel, it is determined as the color value of the central pixel point.
7. device according to claim 5, which is characterized in that the first pixel belongs to the residue in the pending area Pixel, then the residual pixel point color value determining module include:
Second pixel determining module is configured as from the edge pixel point of the pending area, determines the second pixel Point, second pixel be extended line from the central pixel point to the first pixel line, with the pending district The pixel of the edge intersection in domain;
Weighted value determining module is configured to determine that the weighted value w of the central pixel point1With the weight of second pixel Value w2
First pixel color value obtains module, is configured as obtaining the color value P of first pixel1=P0*w1+P2*w2, P0For the color value of the central pixel point, P2For the color value of second pixel,
If the edge of the pending area includes the pixel being blocked, the residual pixel point color value determining module Further include:
Judgment module is configured as obtaining the module acquisition P in the first pixel color value1Before, judge described second Whether pixel is the pixel being blocked;
Second pixel color value obtains module, is configured as determining that second pixel is to be blocked in the judgment module Pixel when, from the edge pixel point of the pending area, determine adjacent with second pixel not hidden The pixel of gear, and using the color value for the pixel not being blocked determined, obtain the color value of second pixel P2
8. device according to claim 7, which is characterized in that
The weighted value determining module is configured as obtaining the distance between the central pixel point and first pixel d1、 And distance d between first pixel and second pixel2;According to the d1With the d2, determine the w1And institute State w2If: d1>d2, then setting makes w1<w2, and w1+w2=1;If d1<d2, then setting makes w1>w2, and w1+w2=1;If d1 =d2, then setting makes w1=w2, and w1+w2=1.
9. a kind of picture processing unit characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Pending area is obtained, the pending area belongs to the region that is blocked of picture, and the edge of the pending area Including the pixel not being blocked;
Using the color value of the pixel not being blocked, the color value of the central pixel point of the pending area is determined;
Using the color value of the pixel not being blocked and the color value of the central pixel point, the pending district is determined The color value of residual pixel point in domain.
CN201511019142.3A 2015-12-29 2015-12-29 Image processing method and device Active CN105678685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511019142.3A CN105678685B (en) 2015-12-29 2015-12-29 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511019142.3A CN105678685B (en) 2015-12-29 2015-12-29 Image processing method and device

Publications (2)

Publication Number Publication Date
CN105678685A CN105678685A (en) 2016-06-15
CN105678685B true CN105678685B (en) 2019-02-22

Family

ID=56297987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511019142.3A Active CN105678685B (en) 2015-12-29 2015-12-29 Image processing method and device

Country Status (1)

Country Link
CN (1) CN105678685B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106488139A (en) * 2016-12-27 2017-03-08 深圳市道通智能航空技术有限公司 Image compensation method, device and unmanned plane that a kind of unmanned plane shoots
CN108320265B (en) * 2018-01-31 2021-09-21 努比亚技术有限公司 Image processing method, terminal and computer readable storage medium
CN108551552B (en) * 2018-05-14 2020-09-01 Oppo广东移动通信有限公司 Image processing method, device, storage medium and mobile terminal
CN111080546B (en) * 2019-12-11 2024-06-18 Oppo广东移动通信有限公司 Picture processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116688A (en) * 2012-12-13 2013-05-22 中国航空无线电电子研究所 Multi-source abnormal sensor target track correlation method for airborne avionic system
CN103618905A (en) * 2013-12-09 2014-03-05 清华大学深圳研究生院 Content drawing method for station caption area in video

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003259112A (en) * 2001-12-25 2003-09-12 Canon Inc Watermark information extracting device and its control method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116688A (en) * 2012-12-13 2013-05-22 中国航空无线电电子研究所 Multi-source abnormal sensor target track correlation method for airborne avionic system
CN103618905A (en) * 2013-12-09 2014-03-05 清华大学深圳研究生院 Content drawing method for station caption area in video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Automatic TV logo removal using statistical based logo detection and frequency selective inpainting;Katrin Meisinger 等;《2005 13th European Signal Processing Conference》;20050908;1-4

Also Published As

Publication number Publication date
CN105678685A (en) 2016-06-15

Similar Documents

Publication Publication Date Title
JP6392468B2 (en) Region recognition method and apparatus
EP3200125B1 (en) Fingerprint template input method and device
CN105631797B (en) Watermark adding method and device
CN105975156B (en) Application interface display methods and device
CN105069786A (en) Straight line detection method and straight line detection device
CN104243819A (en) Photo acquiring method and device
CN105678685B (en) Image processing method and device
CN103916468B (en) Method for upgrading system, terminal, server and upgrade-system
CN104506443A (en) Router setting interface display method and device
CN104918107A (en) Video file identification processing method and device
CN104598131A (en) Method and device for adjusting page display mode
CN109375967A (en) Application Program Interface display methods and device, mobile terminal and storage medium
CN106101433B (en) Notification message display methods and device
EP3322227A1 (en) Methods and apparatuses for controlling wireless connection, computer program and recording medium
CN107911576A (en) Image processing method, device and storage medium
CN105139378A (en) Card boundary detection method and apparatus
CN104837181A (en) Network access method and device
CN104216525A (en) Method and device for mode control of camera application
CN107330391A (en) Product information reminding method and device
CN104461358B (en) Light the method and device of screen
CN105517144A (en) Equipment positioning method and device
CN105100622B (en) Zoom implementation method and device, electronic equipment
CN108122020A (en) Two-dimensional code generation method and device and two-dimensional code identification method and device
CN107219989A (en) Icon processing method, device and terminal
CN104298576B (en) terminal test method and 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