CN108875759A - A kind of image processing method, device and server - Google Patents
A kind of image processing method, device and server Download PDFInfo
- Publication number
- CN108875759A CN108875759A CN201710326076.7A CN201710326076A CN108875759A CN 108875759 A CN108875759 A CN 108875759A CN 201710326076 A CN201710326076 A CN 201710326076A CN 108875759 A CN108875759 A CN 108875759A
- Authority
- CN
- China
- Prior art keywords
- fritter
- value
- colour system
- target
- mask
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 16
- 238000012545 processing Methods 0.000 claims abstract description 44
- 238000000034 method Methods 0.000 claims description 60
- 238000005286 illumination Methods 0.000 claims description 53
- 238000012549 training Methods 0.000 claims description 20
- 238000012706 support-vector machine Methods 0.000 claims description 3
- 238000003860 storage Methods 0.000 description 12
- 238000004458 analytical method Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 5
- 238000010801 machine learning Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 5
- 238000013459 approach Methods 0.000 description 4
- 238000011156 evaluation Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000007781 pre-processing Methods 0.000 description 3
- 239000003086 colorant Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000013499 data model Methods 0.000 description 2
- 238000009432 framing Methods 0.000 description 2
- 230000002070 germicidal effect Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a kind of image processing method, device and servers, interfere caused by foreground target for reducing the background image in Mask.The embodiment of the present invention is during image processing, bounding box comprising foreground target Mask is divided into multiple fritters, determines the colour system of each fritter, for every kind of colour system, the corresponding zoom factor of the colour system is determined, by the brightness value of each pixel in the fritter for belonging to the colour system multiplied by the zoom factor.Mask can be divided into multiple fritters by the embodiment of the present invention, classify according to colour system to fritter, different processing modes can be used in the fritter of every one kind, of a sort piecemeal is adopted to be uniformly processed in a like fashion, the biggish fritter of the color data error of foreground target and background image in Mask can be distinguished with this, and different processing is carried out to it, to reduce in Mask background image to interference caused by foreground target.
Description
Technical field
This application involves field of image processing more particularly to a kind of image processing methods, device and server.
Background technique
With scheme to search the video analysis such as figure application in, accurately obtain the whole or part thereof of color value of target
It is very crucial technology to extract feature or do corresponding processing.
But the mask (Mask) currently used for determining target not yet can entirely accurate confine the profile of target, in Mask in addition to
It inevitably include a part of background image outside foreground target.In some cases, before these background images are for determination
The color of scape target will cause very big noise jamming.
But current technology can not be effectively removed the background image in Mask, all more or less include before removing in Mask
Background image other than scape target.Therefore, in the case where accurate Mask can not be obtained, in the enhancing processing of image, Mask
In background image noise jamming inevitably is caused to foreground target.
Summary of the invention
The embodiment of the invention provides a kind of image processing method, device and server, the background in Mask can reduce
Image is interfered caused by foreground target.
The application first aspect provides a kind of image processing method, and this approach includes the following steps:
Bounding box comprising foreground target Mask is divided into multiple fritters, includes at least one pixel in each fritter;
The colour system of each fritter in the fritter of the Mask occupancy is determined again;For every kind of colour system, the corresponding scaling of the colour system is determined
Coefficient, by the brightness value of each pixel in the above-mentioned fritter for belonging to the colour system multiplied by the zoom factor, to every kind of colour system
Fritter handled respectively.
When the color data error of prospect target and background image is very big, background image to the interference effect of foreground target compared with
Greatly.Image processing method in the embodiment of the present invention based on the above principles, by will include foreground target Mask bounding box
Piecemeal is carried out, i.e., piecemeal has been carried out to Mask, later, classified according to colour system to the fritter being divided into, to distinguish prospect
Different processing modes, same class can be used in the fritter of the biggish fritter of color data error in target and background image, every one kind
Fritter adopt and be uniformly processed in a like fashion, realized with this when the color data error of foreground target and background image is larger,
Different processing is carried out to foreground target and background image, is done to reduce background image in Mask to caused by foreground target
It disturbs.
Optionally, the corresponding zoom factor of every kind of colour system specifically can be a preconfigured scaling preset value, the contracting
Putting preset value is the empirical value obtained by experimental data or data model training.
Optionally, the corresponding zoom factor of every kind of colour system can be obtains according to the calculating of the average brightness value of the fritter of the colour system
, specific calculating process is:First determine the corresponding brightness desired value of the colour system, calculating belongs to the picture that the fritter of the colour system is included
The average brightness value (the first average brightness value) of element;The ratio between the first average brightness value and brightness desired value is calculated to obtain
The corresponding zoom factor of the colour system.
Optionally, determining the method for colour system of each fritter in fritter that Mask is occupied can be:For the Mask
Each fritter in the fritter of occupancy, according to the background value of the fritter, the brightness value of the target part of the fritter, institute
At least one of intensity value and the tone value of target part of the fritter for stating the target part of fritter, determine described small
The colour system of block.Wherein, the background value of the fritter refers to multiple pixels in the bounding box in addition to the Mask
Average brightness value, the target part of the fritter refer to the part for belonging to the Mask in the fritter.
Specifically, determining the colour system of the fritter according to the brightness value of the background value of fritter and the target part of fritter
Mode be:First obtain the corresponding relationship of background value and illumination tensor;The back of the fritter is determined according to the corresponding relationship
The corresponding illumination tensor of scape brightness value (first object illumination tensor), then by the brightness value of the target part of the fritter multiplied by
One target illumination tensor is to obtain the first adjustment brightness value;The colour system of the fritter is determined further according to the first adjustment brightness value.
Wherein, the colour system for determining the fritter according to the first adjustment brightness value is specially:By judging the first adjustment brightness value
It is the color determined in the corresponding range of luminance values of which colour system (dark colour system, white light tone system or coloured colour system) belonging to it
System.
Specifically, determining the colour system of the fritter according to the brightness value of the background value of fritter and the target part of fritter
Mode be:First obtain preset background luminance preset value;It calculates between background luminance preset value and the background value of fritter
Ratio to obtain the second target illumination tensor;By the brightness value of the target part of fritter multiplied by the second target illumination tensor to obtain
To second adjustment brightness value;The colour system of the fritter is determined according to second adjustment brightness value.Wherein, according to second adjustment brightness value
The method of the method and the above-mentioned colour system that fritter is determined according to the first adjustment brightness value that determine the colour system of fritter can be identical.
Specifically, being determined according to the tone value of the intensity value of the target part of fritter and the target part of fritter described small
The method of the colour system of block is:Judge the target part of the fritter tone value whether some colour system (the first colour system) tone threshold
It is worth in range;And judge the fritter target part intensity value whether in the saturation degree threshold range of first colour system;
If the tone value of the target part of the fritter is within the scope of the hue threshold of the first colour system, and the saturation of the target part of the fritter
Angle value is in the saturation degree threshold range of the first colour system, it is determined that the colour system of the fritter belongs to the first colour system.
It should be noted that this method together can judge the colour system of fritter in conjunction with other methods.
Specifically, according to the background value of fritter, the brightness value of the target part of fritter, fritter target part it is full
With the tone value of angle value and the target part of fritter, determine that the colour system of the fritter includes:By the background value of the fritter, this is small
The tone value of the target part of the brightness value of the target part of block, the intensity value of the target part of the fritter and the fritter inputs
In parameter model, to obtain the colour system of the fritter.
Optionally, the method for determining parameter model can be:Obtain multiple groups model training parameter, every group model training parameter
Determine that parameter and the colour system determine the corresponding colour system value of parameter including colour system, wherein colour system determines that parameter includes background image
Brightness value, the brightness value of selected foreground target, the intensity value of selected foreground target and the tone value of selected foreground target;It will be upper
It states multiple groups model training parameter input SVM and obtains parameter model.
Second aspect, the embodiment of the present invention also provide a kind of image processing apparatus, and specific implementation corresponds to above-mentioned first party
The function for the image processing method that face provides.The function can also be executed corresponding by hardware realization by hardware
Software program is realized.Hardware and software includes one or more unit modules corresponding with above-mentioned function, the unit module
It can be software and/or hardware.
In a kind of possible design, described image processing unit includes:
Fritter division unit includes at least one pixel, institute in each fritter for bounding box to be divided into multiple fritters
State the exposure mask Mask in bounding box comprising foreground target;
Colour system judging unit, the colour system of each fritter in fritter for determining the Mask occupancy;
Zoom factor determination unit determines the corresponding zoom factor of the colour system for being directed to every kind of colour system;
Brightness adjustment unit, the brightness value of each pixel in fritter for that will belong to the colour system is multiplied by the scaling
Coefficient.
The third aspect, the embodiment of the invention provides a kind of server, specific implementation corresponds to above-mentioned first aspect and provides
Image processing method function.Server in the embodiment of the present invention may include:
Processor, memory and network interface;Wherein, memory is deposited described in processor calling for storing program code
Program code in reservoir, all or part of the steps in image processing method to execute above-mentioned first aspect.
Fourth aspect, the application's provides a kind of computer readable storage medium, the computer readable storage medium
In be stored with instruction, when run on a computer, so that computer executes method described in above-mentioned first aspect.
The another aspect of the application provides a kind of computer program product comprising instruction, when it runs on computers
When, so that computer executes method described in above-mentioned first aspect.
As can be seen from the above technical solutions, because only that the color data error when prospect target and background image is very big
When, background image is larger to the interference effect of foreground target, and the foreground target and background image in Mask are to a certain extent
It can be distinguished by fritter.Therefore, in the image processing process of the embodiment of the present invention, first bounding box is divided into multiple small
Block classifies the Mask fritter occupied according to colour system, biggish with the color data error to foreground target and background image
Fritter distinguishes.And then it is directed to every kind of colour system, it determines the corresponding zoom factor of the colour system, will belong in the fritter of the colour system
The brightness value of each pixel is uniformly processed multiplied by the zoom factor with adopting to of a sort fritter in a like fashion, and every
A kind of fritter can use different processing modes, with this realize in Mask foreground target and background image difference value compared with
The different disposal of big pixel.So as to reduce in Mask background image to interference caused by foreground target.
Detailed description of the invention
Fig. 1 a is the bounding box schematic diagram of target pedestrian in the embodiment of the present invention;
Fig. 1 b is the Mask schematic diagram of the target pedestrian in the embodiment of the present invention in Fig. 1 a;
Fig. 2 is the image processing system schematic diagram in the embodiment of the present invention;
Fig. 3 is the image processing method flow chart in the embodiment of the present invention;
Fig. 4 is the piecemeal schematic diagram of the Mask to the target pedestrian in Fig. 1 b in the embodiment of the present invention;
Fig. 5 is the framing image for judging to use when colour system in the embodiment of the present invention;
Fig. 6 is a kind of functional module structure schematic diagram of the image processing apparatus in the embodiment of the present invention;
Fig. 7 is the hardware structural diagram of the server in the embodiment of the present invention.
Specific embodiment
The embodiment of the present invention is further elaborated below in conjunction with attached drawing.
It include inevitably ambient noise, ambient noise is to remove in Mask in Mask other than comprising foreground target
Background image other than foreground target.Due to including ambient noise in Mask, and it is difficult to be effectively removed these ambient noises.
In some cases, such as:Foreground target is black or white, and the brightness value of the brightness value of background image and foreground target
When differing greatly, these ambient noises are for determining that the color of foreground target has very big interference.
Such as the bounding box (Bounding Box) that Fig. 1 a is the target pedestrian (i.e. foreground target) in a frame image, wherein
Bounding box refers to the rectangle frame comprising foreground target, typically, it is the minimum rectangle frame of the Mask comprising foreground target.Fig. 1 b
For the Mask of the target pedestrian in Fig. 1 a.From in Fig. 1 b as can be seen that containing background and foot between two leg of pedestrian in Mask
Under shadow, these background images should not be included in Mask in, these background images can become ambient noise, to determine target
The color of pedestrian interferes.
For example, the pixel value of the single pixel point of approaching target pedestrian foot is (0,0,1), if the back for including in Mask
The pixel quantity ratio that the pixel on scape ground (closing near foot) and pedestrian close on foot is 1:3, then these pixels
The average pixel value of point may be (48,47,50), what this much deviateed due average pixel value of target pedestrian foot sheet
(0,0,1) will lead to very big deviation.
Therefore, the purpose of the application is in the case where including ambient noise in the not accurate enough Mask of Mask, as far as possible
Ambient noise is reduced to interfere caused by image enhancement processing.
When the color data error of foreground target and background image in Mask is little, shadow of the ambient noise to foreground target
Ringing can be very limited, it is likely that needs not distinguish between;Only when the color data error of prospect target and background image is very big, background is made an uproar
Sound is larger to the interference effect of foreground target.Therefore it may only be necessary to biggish to the color data error of foreground target and background image
Pixel distinguishes, and carries out noise reduction process, it can avoid interference of the background image to foreground target.
Image processing method in the embodiment of the present invention based on the above principles, by by Mask pixel carry out piecemeal,
Multiple fritters are divided into, piecemeal (i.e. fritter) are classified according to colour system, to distinguish foreground target and background image
Different processing modes can be used in the middle biggish piecemeal of color data error, the piecemeal of every one kind, and of a sort piecemeal is using identical
Mode be uniformly processed, realized with this when the color data error of foreground target and background image is larger, to foreground target and back
Scape image carries out different processing, to reduce in Mask background image to interference caused by foreground target.
Image processing method in the embodiment of the present invention can be executed by the network equipment, and the network equipment specifically can be various
The computer equipment of form, including server, server cluster or with the terminal device of communication function.
The embodiment of the present invention is for convenience, real to the present invention by taking the network equipment is server or server cluster as an example
The method applied in example is illustrated.
Realize that the image processing system of image processing method mainly includes clothes in the embodiment of the present invention as shown in Fig. 2, realizing
Business two network elements of device and client device.
Server in Fig. 2 can be individual server, be also possible to the server cluster of distributed deployment.Client is set
Standby can be various forms of computer equipments or user equipment, such as:Mobile phone, tablet computer, PC (Personal
Computer, PC) etc. terminal devices.
Client device is communicated by network with server, and client device sends image procossing to server and asks
It asks.The embodiment of the present invention is illustrated so that image processing requests are to the image procossing in video as an example, in practical application, image
Processing request is not necessarily and handles the image in video, can also be individual stored in memory or multiple images into
Row processing.
Server is when carrying out video image processing, at the image by video content management program execution client device
Reason request, image processing requests can be image enhancement processing or lighting process etc..Later, server is by video content management
The processing result image of module returns to client device.
As shown in Fig. 2, the video content management program in server includes management module and analysis module.
Wherein, management module is responsible for executing the functions such as scheduling request, resource management and data retrieval.
Analysis module is used to execute the function of video analysis, and it includes image pre-processing modules.Image preprocessing mould
Block includes removal ambient noise module and colour system judgment module, removes ambient noise module and colour system judgment module is specifically used for holding
Method and step in row the present processes embodiment.
Image pre-processing module by analysis module from the image that memory module is read pre-processed and return it is pre- from
The result of reason to the core analysis module in analysis module, pretreated result via analysis module core analysis
After module is further processed, processing result is obtained, processing result is returned to client device by last server.
It should be noted that image processing system shown in Fig. 2 is only a kind of example, in practical applications, at image
The network element of reason system forms and deployment way can be depending on specific application scenarios.In addition, the video content pipe in Fig. 2
The functional module managed in program divides also a kind of only example, only for illustrating the process of video image processing.
It describes in detail below with reference to Fig. 3 to the image processing method in the embodiment of the present invention.
301, the bounding box of the Mask comprising foreground target is divided into multiple fritters, includes at least one in each fritter
Pixel;
Due to illumination, foreground target fold and block, will lead to the picture of the different location of the same color of foreground target
The value differences of vegetarian refreshments are larger, judged based on pixel colour system and handled to will lead to very big deviation, so that image
Obvious distortion.Therefore, the fritter based on multiple pixels composition is that the judgement of basic unit progress colour system is proper.
So the bounding box for confining foreground target is divided into the fritter of n × m by the embodiment of the present invention, wherein can be by
Bounding box is divided into n column in the horizontal direction, is divided into m row, in the vertical direction to be divided into the fritter of n × m.Each fritter
In include at least one pixel.
In this way, the Mask in bounding box is divided into multiple fritters.Some fritters in Mask all belong to foreground target;
Some fritters all belong to background image;Some fritter a part belong to foreground target, and a part belongs to background image.
For shown in Fig. 1 a including the bounding box of target pedestrian, Fig. 4 is the lower half for intercepting the target pedestrian in Fig. 1 a
The bounding box of the lower part of the body is divided into multiple fritters by the bounding box of body.It is bounding box shown in 401, under profile shown in 402 is
The Mask of half body.What label was is each fritter for the prospect that all belongs in the Mask of the lower part of the body;What it is labeled as G is whole categories
In each fritter of background;What it is labeled as S1 is each fritter that half or more belongs to background;Labeled as more than half of S2
Belong to each fritter of prospect;Remaining unlabelled fritter in bounding box other than Mask be all belong to background part it is small
Block.In general, label can be far fewer than the small number of blocks for being labeled as H for the small number of blocks with S2 in Mask.
After bounding box is divided fritter, Mask is divided into fritter.It should be noted that being not required in practical step
It marks, it is to belong to prospect to still fall within background that fritter is marked in Fig. 4, is intended merely to better understood when the prospect in Mask
Partially (i.e. foreground target) and background parts (i.e. background image) can be distinguished to a certain extent by fritter.
It should be noted that because the purpose of the application is that the ambient noise reduced in Mask as far as possible makes foreground target
At interference.Therefore, bounding box is divided the essence of fritter is that Mask is divided into fritter.Because bounding box is the square of rule
Shape, and Mask is irregular shape, therefore, to the minimum rectangle frame comprising Mask be divided into fritter ratio Mask is divided into it is small
Block is more suitable.
But to the fritter in bounding box in the process of processing (i.e. in step 302 and step 303), actually can be with
Only fritter involved in Mask is handled, to the fritter being not directed in Mask in bounding box can without step 302 and
Processing in step 303, other than the fritter being not directed in Mask can be refering to Mask in such as Fig. 4, not labeled belongs to background
The fritter of image.
Fritter involved in Mask is the fritter that Mask is occupied herein, i.e., the fritter of Mask is all belonged in bounding box, and
A part belongs to the fritter of Mask.
302, the colour system of each fritter in the fritter of the Mask occupancy is determined;
After bounding box is divided into multiple fritters, to each fritter that Mask in bounding box is occupied, its institute is judged respectively
The colour system of category.Colour system includes one of dark colour system, coloured colour system, white light tone system.
Wherein, dark colour system refers to black, grey black, dark blue and hiding colors and the similar color such as black, their main feature
First is that image tone value (Hue, H) remain unchanged perhaps vary less or intensity of illumination not excessively in the case where, it is bright
The value for spending (Value, V) component is smaller, and the value range of V is also smaller, such as V value is from 0.02 to 0.18.
Coloured colour system refers to the colors such as red, orange, yellow, green, green, blue and purple and similar color, their main feature
First is that image is in the case where H value is remained unchanged or varied less, V component can have a very big value range, and V
Value can be smaller or larger, such as from 0.2 to 0.8.
Bai Liangse system refers to white or similar color, their main feature first is that image is remained unchanged in H value
Or in the case where varying less, the value range of V component is smaller (for relatively coloured colour system), but V value is larger, such as V takes
Value is from 0.7 to 0.9.
Optionally, the method for determining colour system belonging to each fritter can be:According to the background value of fritter, fritter
At least one of the brightness value of target part, the intensity value of the target part of fritter and tone value of target part of fritter
To determine the colour system of fritter.
Wherein, the target part of fritter refers to the part for belonging to the Mask of foreground target in the fritter, that is, belongs in Mask
Pixel.If entire fritter is all located in Mask to Mr. Yu's fritter, then the target part of the fritter is all in entire fritter
Pixel;If a part is located in Mask to Mr. Yu's fritter, a part is located at other than Mask, then the target part of the fritter is position
That one part of pixel in Mask.The brightness value of the target part of fritter refers to the brightness for belonging to the pixel in Mask in fritter
Average value;The intensity value of the target part of fritter refers to the saturation degree average value for belonging to the pixel in Mask in fritter;Fritter
The tone value of target part refer to the tone average value for belonging to the pixel in Mask in fritter.
The background value of fritter is the average brightness of multiple pixels in addition to the Mask of foreground target in bounding box, tool
Body can be the part in the average brightness value or bounding box of whole pixels in bounding box in addition to Mask in addition to Mask
The average brightness value of pixel, wherein partial pixel can be the one part of pixel of the close region positioned at current fritter.
According to the background value of fritter, the brightness value of the target part of fritter, fritter target part intensity value
The concrete mode for determining the colour system of fritter at least one of the tone value of target part of fritter includes:It can be according to small
The brightness value of the target part of the background value and fritter of block determines the colour system of fritter;It can also be directly according to the target of fritter
Partial brightness value determines the colour system of fritter;It can also be according to the intensity value of the foreground target of fritter and the foreground target of fritter
Tone value, determine the colour system of fritter.
Optionally, the method for determining colour system belonging to each fritter is also possible that by by multiple groups parameter (every group of parameter packet
Include colour system value and H, S and/or V value for determining the colour system value) input machine learning model be trained to obtain parameter model,
The colour system value of the fritter can be obtained by inputting H, S and/or V value of a certain fritter in the parameter model.
303, it is directed to every kind of colour system, the corresponding zoom factor of the colour system is determined, each of the fritter of the colour system will be belonged to
The brightness value of pixel is multiplied by the zoom factor.
Determined after colour system, Mask is occupied belonging to each fritter that Mask is occupied all fritters according to colour system into
Row classification, determines all fritters for belonging to same colour system.
For belonging to each fritter of same colour system, " being uniformly processed " is carried out to it." being uniformly processed " is to inhibit
Noise avoids causing the biggish distortion of image and apparent block effect, reduces the apparent difference of foreground target, such as reduce
Caused apparent difference under different illumination, the brightness value of the pixel in bounding box is adjusted to the brightness under normal illumination environment
Value.
The method being uniformly processed is:For every kind of colour system, by the brightness value of each pixel in the fritter for belonging to the colour system
Same multiple is scaled, i.e., multiplied by a zoom factor.
Optionally, which can be preconfigured scaling preset value, which can be according to reality
It tests data or data model trains an obtained empirical value.Such as:The value range of the corresponding zoom factor of dark colour system can
With in the section [0.5-5], the value range of the corresponding zoom factor of coloured colour system can be in the section [0.625-2], white light tone system
The value range of corresponding zoom factor can be in the section [0.98-1.25].
Optionally, which can be to be calculated according to the brightness value of the fritter of the colour system in bounding box and obtain.It calculates
The step of a certain colour system corresponding zoom factor is specially:Determine the corresponding brightness desired value V of the colour system0, calculate and belong to the color
The average brightness value (claiming the first average brightness value) for the pixel (i.e. pixel) that the fritter of system includesCalculate the first average brightness
Ratio between value and brightness desired valueTo obtain the corresponding zoom factor of the colour system in bounding box.Citing is such as
Under:
For example, certain class fritter is calculatedAccording to the range of the brightness value of each colour system it is found that this is dark
The fritter of colour system, and the environment that its present illumination is darker, the brightness desired value V of dark colour system0=0.16, it calculatesThen the brightness value of each of such fritter pixel is all multiplied by 4.
Fritter in every kind of colour system, after the corresponding zoom factor of the colour system, obtained actual effect is will to be in
Illumination carries out image enhancement compared with the image fritter of dark situation, makes the brightness value of itself and the dark colour system image under normal illumination environment
It is closer.
Thereby realize the independent process of the pixel of dark colour system, white light tone system and coloured colour system.Because in Mask
Foreground part and background parts can be distinguished to a certain extent by fritter, therefore, the embodiment of the present invention is by bounding box
In image carry out piecemeal.After carrying out piecemeal to image, piecemeal is classified according to colour system, therefore can be to foreground target
It is distinguished with the biggish pixel of color data error of background image.And then of a sort piecemeal is adopted and is unified in a like fashion
The piecemeal of processing, every one kind can use different processing modes, be realized with this larger to foreground target and background image difference
Pixel different disposal, so as to reduce in Mask background image to interference caused by foreground target.
The colour system for how determining each fritter is described in detail below.
One, colour system is judged by fuzzy differentiating approach:
It, can be according to the bright of the target part of the background value and fritter of the fritter in some specific embodiments
Angle value judges the colour system of the fritter.Specifically judgment method is:
The corresponding relationship of pre-set background value and illumination tensor is obtained, which can be by a large amount of
Experimental data obtain;Then according to the corresponding relationship of background value and illumination tensor, the background value of the fritter is determined
Corresponding target illumination tensor (referred to as first object illumination tensor);By the brightness value of the target part of the fritter multiplied by the first mesh
Mark illumination tensor obtains the first adjustment brightness value, and the brightness value that the pixel of Mask is belonged in the fritter is adjusted to normal illumination
Under brightness value;The colour system of the fritter is determined further according to the first adjustment brightness value.
Wherein, the colour system of the fritter is determined according to the first adjustment brightness value specifically, by judging the first adjustment brightness value
It is V value range corresponding in dark colour system, or in the corresponding V value range of coloured colour system, or respectively corresponded in white light tone system
V value range determine its affiliated colour system.
When the first adjustment brightness value is in corresponding V value range (can be set as 0.02-0.18) of dark colour system, the fritter
Affiliated colour system be dark colour system;When the first adjustment brightness value V (can be set as 0.2- in the corresponding V value range of coloured colour system
0.8) when, the affiliated colour system of the fritter is coloured colour system;When the first adjustment brightness value V is that corresponding V value range (can in white light tone
To be set as 0.7-0.9) when, the affiliated colour system of the fritter is dark colour system.
Further, if the first adjustment brightness value is located at the critical value between two colour systems (such as:Between 0.18-0.2),
It, then can be in conjunction with the colour systems of one or more fritters and its brightness adjusted closed on when can not determine the colour system of current fritter
Value, judges the colour system of current fritter.
It, can if the pixel that certain fritter includes is entirely located in the Mask of foreground target in some specific embodiments
To determine the colour system of the fritter according to the brightness value of the target part of the fritter.Specifically judgment method is:It calculates in the fritter
Pixel average brightness value (claim the second average brightness value), the colour system of the fritter is determined according to the second average brightness value.
Wherein, the method for the colour system of the fritter and described according to the first adjustment brightness value is determined according to the second average brightness value
The method for determining the colour system of fritter is identical:When the second average brightness value V (can be set as in the corresponding V value range of dark colour system
When 0.02-0.18), the affiliated colour system of the fritter is dark colour system;When the second average brightness value V is in the corresponding V value of coloured colour system
When range (can be set as 0.2-0.8), the affiliated colour system of the fritter is coloured colour system;When the second average brightness value V is white bright
When corresponding V value range (can be set as 0.7-0.9) of colour system, the affiliated colour system of the fritter is dark colour system.
It is illustrated below with specific data:
Based on to multiple samples to be processed (such as:5000 samples) data observation, obtain background value and light
According to the corresponding relationship of coefficient, as shown in table 1, by background luminance according to the size of V value, be divided into it is dark, darker, normal, brighter and
Bright five ranges, each range have corresponding background luminance V value and illumination tensor.
Table 1
Background V value | Background light and shade judging result | Illumination tensor (this example value) |
V<=0.3 | Secretly | 2.0 |
0.3<V<=0.44 | It is darker | 1.4 |
0.44<V<=0.54 | Normally | 1.1 |
0.54<V<=0.65 | It is brighter | 0.9 |
V>0.65 | It is bright | 0.8 |
Illumination tensor is used to adjust the V value of the foreground target of different illumination, makes it closer to the V in the case of normal illumination
Value.For example, if the V value of the background luminance of current fritter is 0.4, according to the background V value range and the judgement of background light and shade in table 1
As a result, background luminance is judged as darker, corresponding illumination tensor is 1.4.If the brightness of the target part of fritter is
0.16, then it is adjusted to 1.4*0.16=0.224,0.224 belongs to the interval range of the brightness value 0.2-0.8 of coloured colour system,
Therefore, being then based on V value 0.224 adjusted judges colour system belonging to the fritter for coloured colour system.
It carries out judging that colour system is carried out by fuzzy differentiating approach in the embodiment of the present invention with one group of specific image data below
Explanation.
One group of specific frame image such as Fig. 5 shows, in this group of picture frame, each frame image is one (preceding comprising target pedestrian
Scape target be pedestrian) bounding box, in order to more intuitively describe how to judge colour system, the embodiment of the present invention is to bounding box
Piecemeal be divided into n × m=1 × 2=2 fritter, be divided into above the waist and two fritters of the lower part of the body for be illustrated.
It should be noted that in practical applications, bounding box should be divided into more fritters, so that preferably passing through
Fritter distinguishes the foreground part and background parts in Mask.
The picture name for the framing image (image 1 to 10) that Fig. 5 shows be respectively 0.001png, 0.002png,
0.003png ... 0.010png calculates the V value (V of the upper part of the body of each frame imageOn), the V value (V of the lower part of the bodyUnder) and background V
It is worth (VBackground), numerical value is as follows:
Wherein, in citing shown in Fig. 5, the V value (V of the upper part of the bodyOn) it is the bright of the target part of corresponding fritter above the waist
Angle value, the i.e. average brightness value of pixel in the Mask of the upper part of the body;V value (the V of the lower part of the bodyUnder) be the corresponding fritter of the lower part of the body mesh
Mark the brightness value of part, the i.e. average brightness value of pixel in the Mask of the lower part of the body;In the citing, it is believed that the upper part of the body and lower half
Illumination locating for body is average, therefore, VBackgroundBe the fritter of the upper part of the body background value and the lower part of the body fritter back
Scape brightness value, the VBackgroundValue can be the average value of the brightness of the pixel other than the Mask of the upper part of the body and the lower part of the body that take.
According to the corresponding relationship of background V value and illumination tensor in table 1, V is determinedBackgroundCorresponding illumination tensor, by illumination system
Number is multiplied by corresponding VOnThe brightness value of the upper part of the body after being adjusted, by illumination tensor multiplied by corresponding VUnderUnder after being adjusted
The brightness value of half body.V after each frame Image AdjustingOnAnd VUnderAs shown in table 2 and table 3:
Table 2
Table 3
Brightness value after pre-adjustment is compared with 0.18, both less than 0.18, therefore may determine that this 10 frame image
The lower part of the body belongs to dark colour system;The upper half of image 1,4,8,9 and 10 is as coloured colour system.And the upper half of image 2,3,5,6 and 7
Body brightness is located at the critical value of dark color system and coloured colour system:The interval range of 0.18-0.2, therefore, it is necessary to further pass through it
His method judges the colour system of the upper part of the body of image 2,3,5,6 and 7.
It further, can be small in conjunction with closing on when the brightness value by adjusting after can not determine the colour system of the upper part of the body
Block --- the i.e. corresponding lower part of the body is judged.Because above the waist, light environment locating for the lower part of the body is substantially close, and the lower part of the body
Brightness value is judged as dark colour system, and brightness value adjusted still very little, and brightness value adjusted is greater than above the waist
0.18, it is possible to judge that picture 2,3,5,6 and 7 is not dark color, be consequently belonging to coloured colour system.
Further, if still can not determine its affiliated colour system in conjunction with the lower part of the body, to prevent from judging by accident, two classification can be done
Processing, that is, judge that it is both dark colour system and coloured colour system, then handled respectively by two kinds of colour systems, and erroneous judgement is avoided to cause
Handle mistake.
Two, colour system is judged by the specific combination of HS
In some specific embodiments, this can be directly determined according to the specific combination of the HS of the target part of fritter
The affiliated colour system of fritter determines that is, according to the tone value of the intensity value of the target part of fritter and the target part of the fritter
The colour system of the fritter.This method is specifically:Judge the tone value of the target part of the fritter whether in some colour system (the first color
System) hue threshold within the scope of;And judge the fritter target part intensity value whether the colour system saturation degree threshold value
In range;If the tone value of the target part of the fritter is within the scope of the hue threshold of the colour system, and the target part of the fritter
Intensity value in the saturation degree threshold range of the colour system, it is determined that the colour system of the fritter belongs to the colour system, that is, belongs to first
Colour system.Wherein, the first colour system is one of dark colour system, coloured colour system and white light tone system colour system.The saturation degree of some colour system
Threshold range and hue threshold range are based on Germicidal efficacy, the corresponding specific saturation degree range of the obtained colour system and tone
Range.
Such as:Based on Germicidal efficacy, in coloured colour system, red H and S have specific combination range, when H [0.9,
1] section, and correspondingly S is also at [0.9,1] section, although V value is entirely different, can determine that the color of the fritter is red
Color belongs to coloured colour system.
It should be noted that judging that the method for colour system can be used alone by the specific combination of HS, it is also possible to combine
Other colour system judgment methods are used together.Such as:Following HSV data are to the upper part of the body as shown in Figure 5 as a fritter,
The HSV data being calculated are:
Picture name HOn SOn VOn VBackground
0011.png 0.982 0.936 0.095 0.292
Fuzzy differentiating approach in through the embodiment of the present invention can not determine the colour system of the picture 0.011, because according to VBackground
And the corresponding relationship of background value shown in table 1 and illumination tensor, determine that its illumination tensor is 2.0, the target portion of the upper part of the body
The brightness value V dividedOnIt is 0.19 multiplied by the V value adjusted that illumination tensor obtains, then is located just at dark colour system and coloured colour system
Critical value section (0.18-0.2), its colour system of bad determination.And the specific combination of HS is combined, the H value and S value of the frame image are equal
Positioned at [0.9,1] section, it can determine that the color of the fritter for red, belongs to coloured colour system.
Three, colour system is judged by comprehensive evaluation
In some specific embodiments, the colour system of fritter can also be determined using comprehensive evaluation.Comprehensive evaluation tool
Body process includes:Obtain preset background luminance preset value, wherein preset background luminance preset value can be by according to big
The calculated background luminance average value of the background value of the picture of amount;The background luminance preset value and current fritter are calculated again
Ratio between background value is to obtain the second target illumination tensor;It is directed to each fritter again, by the foreground target of the fritter
Brightness value obtains second adjustment brightness value multiplied by the second obtained target illumination tensor, and the brightness value of the fritter is adjusted to just
Brightness value of the ordinary light according under determines the colour system of the fritter further according to the second adjustment brightness value.Wherein, the background of current fritter is bright
Angle value is the average brightness value of multiple pixels in bounding box in addition to Mask, and multiple pixels in bounding box in addition to Mask can
To be the partial pixel in whole pixels or the bounding box in bounding box in addition to Mask in addition to Mask, wherein partially picture
Element can be the one part of pixel of the close region positioned at current fritter.
Wherein, the method for the colour system of the fritter and described according to the first adjustment brightness value is determined according to second adjustment brightness value
The method for determining the colour system of fritter is identical:I.e. when second adjustment brightness value V (can be set in the corresponding V value range of dark colour system
When for 0.02-0.18), the affiliated colour system of the fritter is dark colour system;When second adjustment brightness value V is in the corresponding V of coloured colour system
When value range (can be set as 0.2-0.8), the affiliated colour system of the fritter is coloured colour system;When second adjustment brightness value V is white
When light tone is corresponding V value range (can be set as 0.7-0.9), the affiliated colour system of the fritter is dark colour system.
It carries out judging that colour system is carried out by comprehensive evaluation in the embodiment of the present invention with one group of specific image data below
Explanation.
Millions of pictures in existing database are obtained first, calculate the mean value of the background luminance of these pictures, if calculating
As a result it is 0.491, is set to preset background luminance preset value.
Then the background luminance of each fritter and 0.491 ratio are calculated, calculated result is known as the illumination tensor of the fritter.
Illumination tensor is obtained to the adjustment brightness value of the foreground target of the fritter multiplied by the brightness value of the target part of the fritter, then with
The threshold value of each colour system of setting is compared, to determine the affiliated colour system of the fritter.
Four, colour system is judged by machine learning method
In some specific embodiments, parameter model can also be established by machine learning method, by by fritter
Relevant parameter input parameter model obtains the colour system of fritter.Concrete implementation method is:
Parameter model is determined, for each fritter, by the parameter of the background value of the fritter and the target part of fritter
(H, S and V value of the target part of fritter) inputs the parameter model, obtains the colour system of the fritter.
The specific method for determining parameter model is:Multiple groups model training parameter is obtained, every group model training parameter includes color
It is to determine that parameter and the colour system determine the corresponding colour system value of parameter, the colour system determines that parameter includes the brightness of background image
Brightness value, the intensity value of the selected foreground target and the tone value of the selected foreground target of value, selected foreground target;
Multiple groups model training parameter input machine learning model is obtained into the parameter model.
Specifically, SVM model can be used by carrying out the machine learning model of model training, it can be used what Matlab was carried
SVM model is trained.Data are labeled first, such as dark colour system, coloured colour system and white light tone system are respectively set
Its label value is -1,0 and 1.Then by the V value and annotation results of H, S and V value of selected foreground target and background image
Label value as parameter input, be trained.It is trained the result is that a parameter model, the parameter model that training be obtained are used
In the fritter not marked manually excessively, export the result is that a label value.Based on this label value (dark colour system, coloured colour system
With the label value of white light tone system be respectively -1,0 and 1) can the true fritter colour system.
It should be noted that each colour system judgment method in the embodiment of the present invention can be used alone, when using therein
When a kind of method can not judge the colour system of certain fritter, it can judge together in conjunction with other methods.
It is the introduction to the embodiment of the method in the embodiment of the present invention above, below from functional module angle to the present invention
Image processing apparatus in embodiment is introduced.
As shown in fig. 6, the image processing apparatus includes following functional unit:
Fritter division unit 601, for will include that the bounding box of Mask of foreground target is divided into multiple fritters, Mei Ge little
It include at least one pixel in block;
Colour system judging unit 602, the colour system of each fritter in fritter for determining Mask occupancy;
Zoom factor determination unit 603 determines the corresponding zoom factor of the colour system for being directed to every kind of colour system;
Brightness adjustment unit 604, the brightness value of each pixel for that will belong in the fritter of colour system is multiplied by zoom factor.
Optionally, in some specific embodiments, zoom factor determination unit 603 is specifically used for determining that colour system is corresponding
Brightness desired value;Calculate the first average brightness value for belonging to the pixel that the fritter of colour system includes;Calculate the first average brightness value
Ratio between brightness desired value is to obtain the corresponding zoom factor of the colour system in bounding box.
Optionally, in some specific embodiments, colour system judging unit 602 is more specifically for occupying for Mask
Each fritter in a fritter, according to the background value of the fritter, the brightness value of the target part of the fritter, the fritter mesh
The intensity value of part and at least one of the tone value of target part of the fritter are marked, determines the colour system of the fritter;Wherein,
The background value of fritter includes the average brightness value of multiple pixels in bounding box in addition to Mask, the target portion subpackage of fritter
Include the part for belonging to Mask in fritter.
Optionally, in some specific embodiments, colour system judging unit 602, be specifically used for obtain background value with
The corresponding relationship of illumination tensor;According to the corresponding relationship of background value and illumination tensor, the background luminance of current fritter is determined
It is worth corresponding first object illumination tensor;The brightness value of the target part of the fritter is obtained multiplied by first object illumination tensor
One adjustment brightness value;The colour system of the fritter is determined according to the first adjustment brightness value.
Optionally, in some specific embodiments, colour system judging unit 602 is bright specifically for the preset background of acquisition
Spend preset value;The ratio between background luminance preset value and the background value of current fritter is calculated to obtain the second target light photograph
Coefficient;The brightness value of the target part of the fritter is obtained into second adjustment brightness value multiplied by the second target illumination tensor;According to
Two adjustment brightness values determine the colour system of the fritter.
Optionally, in some specific embodiments, colour system judging unit 602, specifically for judging the target portion of fritter
Whether the tone value divided is within the scope of the hue threshold of the first colour system;Judge the intensity value of the target part of fritter whether
In the saturation degree threshold range of one colour system;If the tone value of the target part of fritter within the scope of the hue threshold of the first colour system,
And the intensity value of the target part of fritter is in the saturation degree threshold range of the first colour system, it is determined that the colour system of the fritter belongs to
First colour system.
Optionally, in some specific embodiments, colour system judging unit 602, specifically for by the background luminance of fritter
Value, the brightness value of target part of fritter, fritter target part intensity value and fritter target part tone value it is defeated
Enter in parameter model, to obtain the colour system of fritter.
Optionally, which further includes:Model training unit (not shown), for obtaining multiple groups model training ginseng
Number, every group model training parameter includes that colour system determines that parameter and colour system determine the corresponding colour system value of parameter, and colour system determines parameter packet
Include the brightness value of background image, the brightness value of selected foreground target, the intensity value of selected foreground target and selected foreground target
Tone value;Multiple groups model training parameter input support vector machines are obtained into parameter model.
In images above processing unit the information exchange between each unit can (Fig. 1 be extremely refering to above method embodiment
Embodiment shown in fig. 5), the application does not repeat them here.
Image processing apparatus shown in fig. 6 in practical applications, can pass through specific integrated circuit (application-
Specific integrated circuit, ASIC) realize or programmable logic device (programmable logic
Device, PLD) it realizes.Above-mentioned PLD can be Complex Programmable Logic Devices (complex programmable logic
Device, CPLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general array is patrolled
Collect (generic array logic, GAL) or any combination thereof.
Image processing apparatus shown in fig. 6 in practical applications, can be server.Fig. 7 is that the embodiment of the present invention provides
A kind of server hardware structural schematic diagram, which can generate bigger difference because configuration or performance are different, can be with
Including one or more processors (central processing units, CPU) 722, memory 730 and one or one
A above wired or wireless network interface 750.Wherein, be stored on memory 730 one or more application programs 742,
Data 744 and one or more operating systems 741, be stored in memory 730 application program 742 may include one or
More than one module, each module may include a series of instruction operation.
It may include video content management program shown in Fig. 2 in the embodiment of the present invention, in application program 742, processing
The video content management program stored in 720 run memory 730 of device, for realizing above method embodiment (Fig. 1 to Fig. 5 institute
The embodiment shown) in all or part of the steps.
The data 744 stored in memory 730 may include video, image and possible video or image hashing, rope
The information such as draw.
In addition, server can also include one or more power supplys 726, one or more input/output interfaces
758。
It should be noted that server shown in Fig. 7 can be the server cluster of distributed deployment, on memory 730
Application program, data 744 etc. can be with distributed storage in each server of server cluster.
Server shown in Fig. 7 corresponds to the server in image processing system framework shown in Fig. 2, client device and clothes
It is interacted between business device, server executes the request of client device by video content management module and returns to accordingly result
To client device.
It should be noted that in the above-described embodiments, can wholly or partly by software, hardware, firmware or its
Any combination is realized.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter
When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can
To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited
Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium
Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center
Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website
Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit
Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set
It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead
Body medium (such as solid state hard disk (Solid State Disk, SSD)) etc..
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.
The description and claims of this application and term " first ", " second ", " third " " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein
Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that
Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit
In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce
The other step or units of product or equipment inherently.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (Read-Only Memory,
ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. are various can store program
The medium of code.
The above, above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although referring to before
Embodiment is stated the application is described in detail, those skilled in the art should understand that:It still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.
Claims (17)
1. a kind of image processing method, which is characterized in that the method includes:
Bounding box is divided into multiple fritters, includes at least one pixel in each fritter, includes prospect mesh in the bounding box
Target exposure mask Mask;
Determine the colour system of each fritter in the fritter of the Mask occupancy;
For every kind of colour system, the corresponding zoom factor of the colour system is determined, by each pixel in the fritter for belonging to the colour system
Brightness value multiplied by the zoom factor.
2. the method according to claim 1, wherein the corresponding zoom factor of the determination colour system includes:
Determine the corresponding brightness desired value of the colour system;
Calculate the first average brightness value for belonging to the pixel that the fritter of the colour system includes;
The ratio between first average brightness value and the brightness desired value is calculated to obtain the corresponding scaling of the colour system
Coefficient.
3. method according to claim 1 or 2, which is characterized in that every in the fritter that the determination Mask is occupied
The colour system of a fritter includes:
The each fritter in fritter occupied for the Mask, according to the background value of the fritter, the mesh of the fritter
It marks in the tone value of the target part of the brightness value of part, the intensity value of the target part of the fritter and the fritter extremely
It is one few, determine the colour system of the fritter;
Wherein, the background value of the fritter includes the average bright of multiple pixels in the bounding box in addition to the Mask
Angle value, the target part of the fritter include the part for belonging to the Mask in the fritter.
4. according to the method described in claim 3, it is characterized in that, the background value according to fritter and the fritter
The brightness value of target part determines that the colour system of the fritter includes:
Obtain the corresponding relationship of background value and illumination tensor;
According to the corresponding relationship of the background value and illumination tensor, the background value of the fritter corresponding first is determined
Target illumination tensor;
By the brightness value of the target part of the fritter multiplied by the first object illumination tensor to obtain the first adjustment brightness value;
The colour system of the fritter is determined according to the first adjustment brightness value.
5. according to the method described in claim 3, it is characterized in that, the background value according to fritter and the fritter
The brightness value of target part determines that the colour system of the fritter includes:
Obtain preset background luminance preset value;
The ratio between the background luminance preset value and the background value of the fritter is calculated to obtain the second target light photograph
Coefficient;
By the brightness value of the target part of the fritter multiplied by the second target illumination tensor to obtain second adjustment brightness value;
The colour system of the fritter is determined according to the second adjustment brightness value.
6. method according to any one of claim 3 to 5, which is characterized in that the target portion according to the fritter
The tone value of the target part of the intensity value and the fritter divided, determines that the colour system of the fritter includes:
Judge the tone value of the target part of the fritter whether within the scope of the hue threshold of the first colour system;
Judge the intensity value of the target part of the fritter whether in the saturation degree threshold range of first colour system;
If the tone value of the target part of the fritter is within the scope of the hue threshold of first colour system, and the mesh of the fritter
The intensity value of part is marked in the saturation degree threshold range of first colour system, it is determined that the colour system of the fritter belongs to described
First colour system.
7. method according to any one of claim 3 to 5, which is characterized in that the background value according to fritter,
The brightness value of the target part of the fritter, the fritter target part intensity value and the fritter target part
Tone value determines that the colour system of the fritter includes:
By the background value of the fritter, the brightness value of the target part of the fritter, the fritter target part it is full
In the tone value of angle value and the target part of fritter input parameter model, to obtain the colour system of the fritter.
8. the method according to the description of claim 7 is characterized in that the method also includes:
Multiple groups model training parameter is obtained, every group model training parameter includes that colour system determines that parameter and the colour system determine parameter pair
The colour system value answered, the colour system determine that parameter includes the brightness value, described selected of the brightness value of background image, selected foreground target
The tone value of the intensity value of foreground target and the selected foreground target;
Multiple groups model training parameter input support vector machines are obtained into the parameter model.
9. a kind of image processing apparatus, which is characterized in that described device includes:
Fritter division unit includes at least one pixel, the side in each fritter for bounding box to be divided into multiple fritters
It include the exposure mask Mask of foreground target in boundary's frame;
Colour system judging unit, the colour system of each fritter in fritter for determining the Mask occupancy;
Zoom factor determination unit determines the corresponding zoom factor of the colour system for being directed to every kind of colour system;
The brightness value of brightness adjustment unit, each pixel in fritter for that will belong to the colour system is multiplied by the scaling
Number.
10. device according to claim 9, which is characterized in that
The zoom factor determination unit is specifically used for determining the corresponding brightness desired value of the colour system;Calculating belongs to the color
First average brightness value of the pixel that the fritter of system includes;It calculates between first average brightness value and the brightness desired value
Ratio to obtain the corresponding zoom factor of the colour system described in the bounding box.
11. device according to claim 9 or 10, which is characterized in that
The colour system judging unit, specifically for each fritter in multiple fritters for Mask occupancy, according to described
The background value of fritter, the brightness value of the target part of the fritter, the fritter target part intensity value and institute
At least one of the tone value of target part for stating fritter, determines the colour system of the fritter;Wherein, the background of the fritter is bright
Angle value includes the average brightness value of multiple pixels in the bounding box in addition to the Mask, the target portion subpackage of the fritter
Include the part for belonging to the Mask in the fritter.
12. device according to claim 11, which is characterized in that
The colour system judging unit, specifically for obtaining the corresponding relationship of background value and illumination tensor;According to the background
The corresponding relationship of brightness value and illumination tensor determines the corresponding first object illumination tensor of the background value of the fritter;It will
The brightness value of the target part of the fritter is multiplied by the first object illumination tensor to obtain the first adjustment brightness value;According to institute
State the colour system that the first adjustment brightness value determines the fritter.
13. device according to claim 11, which is characterized in that
The colour system judging unit, specifically for obtaining preset background luminance preset value;Calculate the background luminance preset value
Ratio between the background value of the fritter is to obtain the second target illumination tensor;By the target part of the fritter
Brightness value is multiplied by the second target illumination tensor to obtain second adjustment brightness value;It is determined according to the second adjustment brightness value
The colour system of the fritter.
14. device described in any one of 1 to 13 according to claim 1, which is characterized in that
The colour system judging unit, specifically for judge the fritter target part tone value whether the first colour system color
It adjusts in threshold range;Judge the target part of the fritter intensity value whether first colour system saturation degree threshold value model
In enclosing;If the tone value of the target part of the fritter is within the scope of the hue threshold of first colour system, and the fritter
The intensity value of target part is in the saturation degree threshold range of first colour system, it is determined that the colour system of the fritter belongs to institute
State the first colour system.
15. device described in any one of 1 to 13 according to claim 1, which is characterized in that
The colour system judging unit, specifically for by the brightness of the background value of the fritter, the target part of the fritter
Value, the fritter target part intensity value and the fritter target part tone value input parameter model in, with
Obtain the colour system of the fritter.
16. device according to claim 15, which is characterized in that described device further includes:
Model training unit, for obtaining multiple groups model training parameter, every group model training parameter include colour system determine parameter and
The colour system determines the corresponding colour system value of parameter, and the colour system determines that parameter includes the brightness value of background image, selected prospect mesh
The tone value of target brightness value, the intensity value of the selected foreground target and the selected foreground target;By the multiple groups mould
Type training parameter input support vector machines obtain the parameter model.
17. a kind of server, which is characterized in that including:
Processor, memory and network interface;
The memory is for storing program code, and the processor calls the said program code in the memory, to hold
The following operation of row:
Bounding box is divided into multiple fritters, includes at least one pixel in each fritter, includes prospect mesh in the bounding box
Target exposure mask Mask;Determine the colour system of each fritter in the fritter of the Mask occupancy;For every kind of colour system, the color is determined
It is corresponding zoom factor, by the brightness value of each pixel in the fritter for belonging to the colour system multiplied by the zoom factor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710326076.7A CN108875759B (en) | 2017-05-10 | 2017-05-10 | Image processing method and device and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710326076.7A CN108875759B (en) | 2017-05-10 | 2017-05-10 | Image processing method and device and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108875759A true CN108875759A (en) | 2018-11-23 |
CN108875759B CN108875759B (en) | 2022-05-24 |
Family
ID=64287631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710326076.7A Active CN108875759B (en) | 2017-05-10 | 2017-05-10 | Image processing method and device and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108875759B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110189354A (en) * | 2019-04-18 | 2019-08-30 | 北京迈格威科技有限公司 | Image processing method and image processor, image processing equipment and medium |
CN110659581A (en) * | 2019-08-29 | 2020-01-07 | 腾讯科技(深圳)有限公司 | Image processing method, device, equipment and storage medium |
CN111275648A (en) * | 2020-01-21 | 2020-06-12 | 腾讯科技(深圳)有限公司 | Face image processing method, device and equipment and computer readable storage medium |
CN111861869A (en) * | 2020-07-15 | 2020-10-30 | 广州光锥元信息科技有限公司 | Image processing method and device for beautifying portrait and preventing background distortion |
CN114419560A (en) * | 2022-04-01 | 2022-04-29 | 苏州万店掌网络科技有限公司 | Method, device and medium for detecting target object |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040091173A1 (en) * | 2002-07-17 | 2004-05-13 | Hiroshi Akimoto | Method, apparatus and system for the spatial interpolation of color images and video sequences in real time |
CN101790023A (en) * | 2009-01-22 | 2010-07-28 | 夏普株式会社 | Method for compressing image, image compressing device and image processing system |
US20110243372A1 (en) * | 2010-03-31 | 2011-10-06 | Xerox Corporation | Method and system for document annotation |
CN102292991A (en) * | 2009-05-15 | 2011-12-21 | 夏普株式会社 | Image processing device and image processing method |
CN103116763A (en) * | 2013-01-30 | 2013-05-22 | 宁波大学 | Vivo-face detection method based on HSV (hue, saturation, value) color space statistical characteristics |
CN103414841A (en) * | 2013-07-29 | 2013-11-27 | 西北工业大学 | Image encryption and decryption method for utilizing gray system theory to confirm ICA output |
CN103945089A (en) * | 2014-04-18 | 2014-07-23 | 上海复控华龙微***技术有限公司 | Dynamic target detection method based on brightness flicker correction and IP camera |
CN104364825A (en) * | 2012-04-09 | 2015-02-18 | 华为技术有限公司 | Visual conditioning for augmented-reality-assisted video conferencing |
CN104809245A (en) * | 2015-05-13 | 2015-07-29 | 信阳师范学院 | Image retrieval method |
US20160125245A1 (en) * | 2014-10-29 | 2016-05-05 | Behavioral Recognition Systems, Inc. | Foreground detector for video analytics system |
CN105761267A (en) * | 2016-03-08 | 2016-07-13 | 重庆邮电大学 | Image processing method and device |
CN106251286A (en) * | 2015-12-30 | 2016-12-21 | 深圳超多维科技有限公司 | Image processing method, device and equipment |
CN106504241A (en) * | 2016-10-25 | 2017-03-15 | 西安交通大学 | A kind of apparatus and method of checking colors automatically |
-
2017
- 2017-05-10 CN CN201710326076.7A patent/CN108875759B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040091173A1 (en) * | 2002-07-17 | 2004-05-13 | Hiroshi Akimoto | Method, apparatus and system for the spatial interpolation of color images and video sequences in real time |
CN101790023A (en) * | 2009-01-22 | 2010-07-28 | 夏普株式会社 | Method for compressing image, image compressing device and image processing system |
CN102292991A (en) * | 2009-05-15 | 2011-12-21 | 夏普株式会社 | Image processing device and image processing method |
US20110243372A1 (en) * | 2010-03-31 | 2011-10-06 | Xerox Corporation | Method and system for document annotation |
CN104364825A (en) * | 2012-04-09 | 2015-02-18 | 华为技术有限公司 | Visual conditioning for augmented-reality-assisted video conferencing |
CN103116763A (en) * | 2013-01-30 | 2013-05-22 | 宁波大学 | Vivo-face detection method based on HSV (hue, saturation, value) color space statistical characteristics |
CN103414841A (en) * | 2013-07-29 | 2013-11-27 | 西北工业大学 | Image encryption and decryption method for utilizing gray system theory to confirm ICA output |
CN103945089A (en) * | 2014-04-18 | 2014-07-23 | 上海复控华龙微***技术有限公司 | Dynamic target detection method based on brightness flicker correction and IP camera |
US20160125245A1 (en) * | 2014-10-29 | 2016-05-05 | Behavioral Recognition Systems, Inc. | Foreground detector for video analytics system |
CN104809245A (en) * | 2015-05-13 | 2015-07-29 | 信阳师范学院 | Image retrieval method |
CN106251286A (en) * | 2015-12-30 | 2016-12-21 | 深圳超多维科技有限公司 | Image processing method, device and equipment |
CN105761267A (en) * | 2016-03-08 | 2016-07-13 | 重庆邮电大学 | Image processing method and device |
CN106504241A (en) * | 2016-10-25 | 2017-03-15 | 西安交通大学 | A kind of apparatus and method of checking colors automatically |
Non-Patent Citations (1)
Title |
---|
唐世伟等: "一种地震属性图像配色阈值选取算法", 《计算机与数字工程》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110189354A (en) * | 2019-04-18 | 2019-08-30 | 北京迈格威科技有限公司 | Image processing method and image processor, image processing equipment and medium |
CN110189354B (en) * | 2019-04-18 | 2021-12-28 | 北京迈格威科技有限公司 | Image processing method, image processor, image processing apparatus, and medium |
CN110659581A (en) * | 2019-08-29 | 2020-01-07 | 腾讯科技(深圳)有限公司 | Image processing method, device, equipment and storage medium |
CN110659581B (en) * | 2019-08-29 | 2024-02-20 | 腾讯科技(深圳)有限公司 | Image processing method, device, equipment and storage medium |
CN111275648A (en) * | 2020-01-21 | 2020-06-12 | 腾讯科技(深圳)有限公司 | Face image processing method, device and equipment and computer readable storage medium |
CN111275648B (en) * | 2020-01-21 | 2024-02-09 | 腾讯科技(深圳)有限公司 | Face image processing method, device, equipment and computer readable storage medium |
CN111861869A (en) * | 2020-07-15 | 2020-10-30 | 广州光锥元信息科技有限公司 | Image processing method and device for beautifying portrait and preventing background distortion |
CN111861869B (en) * | 2020-07-15 | 2024-02-02 | 广州光锥元信息科技有限公司 | Image processing method and device for beautifying human images and preventing background distortion |
CN114419560A (en) * | 2022-04-01 | 2022-04-29 | 苏州万店掌网络科技有限公司 | Method, device and medium for detecting target object |
Also Published As
Publication number | Publication date |
---|---|
CN108875759B (en) | 2022-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108875759A (en) | A kind of image processing method, device and server | |
US11488294B2 (en) | Method for detecting display screen quality, apparatus, electronic device and storage medium | |
CN109859171A (en) | A kind of flooring defect automatic testing method based on computer vision and deep learning | |
CN110675368B (en) | Cell image semantic segmentation method integrating image segmentation and classification | |
CN108717524B (en) | Gesture recognition system based on double-camera mobile phone and artificial intelligence system | |
CN107491771A (en) | Method for detecting human face and device | |
CN110009556A (en) | Image background weakening method, device, storage medium and electronic equipment | |
CN107403421A (en) | A kind of image defogging method, storage medium and terminal device | |
CN106920221A (en) | Take into account the exposure fusion method that Luminance Distribution and details are presented | |
CN109635825A (en) | Vehicle attribute detection method, device and storage medium | |
CN112347887A (en) | Object detection method, object detection device and electronic equipment | |
CN110135421A (en) | Licence plate recognition method, device, computer equipment and computer readable storage medium | |
CN109993806A (en) | A kind of color identification method, device and electronic equipment | |
CN115660647B (en) | Maintenance method for building outer wall | |
CN112561813A (en) | Face image enhancement method and device, electronic equipment and storage medium | |
CN110990617B (en) | Picture marking method, device, equipment and storage medium | |
CN114360064B (en) | Office place personnel behavior lightweight target detection method based on deep learning | |
CN116543433A (en) | Mask wearing detection method and device based on improved YOLOv7 model | |
CN117557784B (en) | Target detection method, target detection device, electronic equipment and storage medium | |
CN109661671A (en) | Improvement using boundary bitmap to image classification | |
CN105574844B (en) | Rdaiation response Function Estimation method and apparatus | |
CN113052923A (en) | Tone mapping method, tone mapping apparatus, electronic device, and storage medium | |
CN108932703A (en) | Image processing method, picture processing unit and terminal device | |
CN107945186A (en) | Method, apparatus, computer-readable recording medium and the terminal device of segmentation figure picture | |
CN109658360B (en) | Image processing method and device, electronic equipment and computer 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |