CN103577993B - Color choosing method and device - Google Patents
Color choosing method and device Download PDFInfo
- Publication number
- CN103577993B CN103577993B CN201210278822.7A CN201210278822A CN103577993B CN 103577993 B CN103577993 B CN 103577993B CN 201210278822 A CN201210278822 A CN 201210278822A CN 103577993 B CN103577993 B CN 103577993B
- Authority
- CN
- China
- Prior art keywords
- color
- body region
- picture
- significance
- accounting
- 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
Links
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The application is related to a kind of color choosing method and device, and methods described includes:It is potential commodity body region that significance highest selection area is selected in picture;The significance of the Zone Full of the corresponding picture of the image data is strengthened;Absolute body region is chosen from the potential commodity body region;Accounting of each color in absolute body region in acquisition self adaptation color set;Obtain alternative domain color collection;Obtain and apply domain color collection;Obtain application domain color and concentrate accounting of each color in the absolute body region, to carry out color selection.The application can reduce ambient interferences, and avoid the aberration problem that existing sum occurs in colour recognition.
Description
Technical field
The application is related to internet arena, and in particular to a kind of color choosing method and color selecting device.
Background technology
In e-commerce field, such as one washes in a pan, Taobao and day cat store etc. provide on-line search commodity and online shopping
Website, it usually needs more commodity picture is provided, is selected in order to consumer.In the commodity of picture presentation, commodity
Color is a kind of primary attribute of commodity.In the form free choice of goods by browsing pictures, commodity body is presented consumer
Color out is often the key factor that consumer considers.Additionally, business platform also is intended to by colour recognition technology, instead of
Artificial most commodity color is identified, and afterwards commodity is carried out with color mark classification, so as to provide be carried out to commodity by color
The service of classification, is easy to consumer to be selected.
The domain color of commodity and the identification of colour match, are widely used in business platform, by colour recognition technology,
Color to commodity body is identified.When consumer carries out the online free choice of goods, record can be browsed according to consumer,
For consumer recommends Color Style to meet the commodity of consumer's custom.
Prior art identification commodity color is mainly set comprising hundreds of kinds of masters of the fixation of color by for all of picture
Color table, used as domain color candidate, statistics belongs to the pixel count of each color on picture afterwards, finally according to each color
Pixel count exports the maximum color of accounting, as the domain color of picture in the accounting of picture in its entirety.
But, prior art None- identified commodity body, therefore it is based on whole figure that the pixel count of each color is chosen
The Zone Full of piece, the domain color for finally showing greatly may not be the color of commodity body, be on the contrary background parts
Color.Therefore, because background parts are chosen to color has larger interference, prior art cannot be realized to the main face of commodity body
The extraction of color.
The content of the invention
The purpose of the application is to provide a kind of color choosing method and device, cannot be by computer to solve prior art
Overcome the interference of background parts in commodity picture, cause to extract inaccurate problem to commodity domain color.
On the one hand, this application provides a kind of color choosing method, methods described includes:
According to significance distribution of the different multiple selection areas in the picture in picture, potential commodity body area is obtained
Domain;
Absolute body region is chosen from the potential commodity body region;
According to the adaptive color collection selected to the image data, and obtain the adaptive color concentration each color
In the accounting of the absolute body region of the selection;
Each color is concentrated in the accounting of the absolute body region of the selection according to the adaptive color, obtains alternative
Domain color collection;
The concentration degree of color in the colour system subclass of each color is concentrated according to the alternative domain color, domain color is applied in acquisition
Collection;
Obtain the application domain color and concentrate accounting of each color in the absolute body region, to carry out color choosing
Take.
On the other hand, the application provides a kind of color selecting device, and described device includes:
A kind of color selecting device, it is characterised in that described device includes:
First acquisition unit, to be distributed according to significance of the different multiple selection areas in the picture in picture,
Obtain potential commodity body region;
Unit is chosen, to choose absolute body region from the potential commodity body region;
Second acquisition unit, to the adaptive color collection that basis is selected to the image data, and obtains described adaptive
Answer accounting of each color in the absolute body region of the selection in color set;
3rd acquiring unit, to concentrate each color in the absolute body region of the selection according to the adaptive color
The accounting in domain, obtains alternative domain color collection;
4th acquiring unit, to the concentration of color in the colour system subclass that each color is concentrated according to the alternative domain color
Degree, obtains and applies domain color collection;
5th acquiring unit, is used to obtain the application domain color and concentrates each color in the absolute body region
Accounting, to carry out color selection.
The application by obtaining the significance of the multiple selection areas in the width picture, selected the multiple selected
One selection area of significance highest is potential commodity body region in region, afterwards in the potential commodity body region
Absolute body region is chosen according to enhancing significance, to get commodity body.Each color exists after commodity body is extracted
The accounting of the commodity body of selection, each color accounting in the absolute body region of the selection is concentrated further according to adaptive color
Than alternative domain color collection being obtained, to reduce ambient interferences.Color in the colour system subclass of each color is concentrated in alternative domain color again
Concentration degree, obtain apply domain color collection;Accounting of each color in the absolute body region is concentrated in application domain color
Domain color is chosen, the aberration problem that prior art occurs in colour recognition can be avoided.
Brief description of the drawings
In order to illustrate more clearly of the technical scheme in the embodiment of the present application, below will be to embodiment or description of the prior art
Needed for the accompanying drawing to be used be briefly described, it should be apparent that, drawings in the following description are only some of the application
Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these
Accompanying drawing obtains other accompanying drawings.
The application architecture figure of the color choosing method that Fig. 1 is provided for the embodiment of the present application;
It is a kind of flow chart of picture significance acquisition methods that Fig. 2 is;
A kind of flow chart of one embodiment of the method for color selection that Fig. 3 is provided for the application;
Fig. 3 A are the flow chart of the application significance distribution acquiring method;
Fig. 3 B are the stream of an embodiment of the flow chart of the acquisition methods of each region significance in step 3011 in Fig. 3 A
Cheng Tu;
Fig. 3 C are the detail flowchart of step 302 in Fig. 3;
Fig. 3 D are the flow chart of the adaptive color collection of step 303 acquisition picture in Fig. 3;
Fig. 4 is a kind of structure chart of color selecting device that the embodiment of the present application is provided;
Fig. 4 A are a kind of detailed structure views of first acquisition unit in color selecting device;
Fig. 4 B are a kind of detailed structure views of selection unit in color selecting device.
Specific embodiment
Below by drawings and Examples, the technical scheme to the application is described in further detail.
The core concept of the application is to compare the extra letter that surrounding enviroment are provided by subregion in a width picture
Breath amount obtains the significance in the region.And by the difference between different zones significance, obtain the business in a width picture
Product body region, by color accounting in the commodity body region for obtaining, chooses the domain color of commodity and according to color in business
Accounting in product, obtains the colour match of commodity.
Fig. 1 is refer to, the application scenarios Organization Chart of its color extraction method provided for the application.Wherein, the framework
Including the consumption terminal display device 10, business platform server 20 and the trade company's end server 30 that are connected in internet.
Wherein, business platform server 20 is to provide the platform of ecommerce, and such as one washes in a pan, Taobao and day cat store etc.
The website of shopping online function can be provided, by the platform, user can check commodity picture, businessman's prestige etc..Trade company leads to
Cross trade company's end server 30 and upload the picture with its commodity to be sold to business platform server 20, for example fruit, clothes,
Shoes, household articles etc..After the picture processing that business platform server 20 uploads trade company, displaying of reaching the standard grade is carried out.Consumer is led to
Cross internet and log in business web site, connection business platform server 20, in the business web site interface (such as one naughty net, Taobao
Net etc.) search its commodity interested.The picture that trade company uploads, can not often show the commodity of its most desired protrusion, therefore
Business platform server 20 needs the picture provided trade company to be analyzed, and obtains after picture significance, obtains the face of commodity
Color arranging scheme, the displaying angle of adjustment commodity and the picture with best illustrated effect, as commodity representative picture piece, in business
Business platform displaying, can more accurately obtain its commodity interested, or attracted by the commodity of trade company in order to consumer.
In business platform displaying, it is scanned often through to commodity picture Zone Full in the prior art, is being referred to
In fixed color set, each color judges the domain color of commodity in the accounting of whole picture.But, due to background often
Occupy bigger area than commodity, thus the domain color for extracting often background color, it is impossible to accurately reflect commodity body
Color.But, the business platform such as wash in a pan in Taobao, one, the color of commodity picture is often the weight that consumer chooses commodity
Consideration, business platform is wanted to be distinguished also by color and classified to commodity.Therefore, the realization based on above-described embodiment, this
Application can provide a kind of method that color is chosen.
Due in the color choosing method that proposes in the embodiment of the present application, having used the method for obtaining significance, therefore
A kind of method for obtaining picture significance is introduced first, and the flow chart of the method for Fig. 2 this kind acquisition picture significances can by figure
See, methods described includes:
Step 201, selectes color space, and the color space includes multiple color;
Specifically, the color space C={ c1,c2,…,cN, the whole color space of uniform fold, comprising hundreds of kinds of face
Color;
Described color space is also referred to as color model, refers to the abstract mathematics mould that color is represented using a class value
Type.Conventional has three primary colors model and Lab models.Wherein the former includes tri- dimensions of RGB, and R is red, and G greens, B is blue, Hou Zhewei
Color-opposition model, dimension L represents brightness, and a and b represents red green and yellow blue channel opposing respectively.
In a color space, usually using color distance, the difference degree between two colors is represented, in Lab moulds
In type, it is assumed that be provided with color A (L1, a1, b1) and B (L1, a1, b1) in two Lab spaces, the definition of its Lab distance is:
Step 202, obtains accounting probability of each color in the selection area in picture in the color space
Distribution histogram, is the first probability distribution histogram;
Specifically, first, the pixel count of the shades of colour in the color space C, generation are belonged in the whole picture I of statistics
The color histogram of I, with H={ p1,p2... ... pn, wherein piIt is color ciAccountings of the ∈ C in I, that is, belong in picture
Color ciThe area ratio that is accounted in whole picture of pixel.Probability distribution of the as I in color.
Afterwards, using window scanning strategy, according to the step-length and window size of setting, constantly choose different in picture
Region R, obtains accounting probability distribution histogram H of each color of region R in the color spaceR={ r1,
r2,…,rN, wherein riIt is color ciAccountings of the ∈ C in R.
The pixel count of each color can specifically be belonged in R by obtaining, according to the pixel count of certain color whole
Area ratio shared in individual Zone R domain, as accounting probability of each color in selection area in the color space point
Cloth, histogram is generated according to this probability distribution.
In the window scanning strategy of application, generally choose foursquare window, the square window is turned into picture
Most the 1/4 of short side picture most short side, the scanning step is the 1/2 of the scanning window length of side.Each mobile step-length, directly
To the Zone Full for covering whole picture.
The shape of above-mentioned scanning window, the length of side and scanning step are only a kind of implementation method, in actual applications,
The step-length of other shapes, size and scanning can be selected, the limitation to the application is should not be construed.
Step 203, each color is in institute during the remaining area after described selection area is removed in the acquisition picture
The accounting probability distribution histogram in color space is stated, is the second probability distribution histogram;
Specifically, the remaining area after selection area is removed in picture can be referred to as the complement of the selection area.Example
Such as, RCIt is the complement of R, RCColor histogram be:
Wherein qiIt is color ciAccountings of the ∈ C in R is in complement RCIn accounting, S is the area of picture in whole picture,
And SRIt is the area of region R.The complement R of as RCProbability distribution in color;
Step 204, according to the first probability distribution histogram and the histogrammic relative entropy of the second probability distribution, really
The significance of fixed described selection area;
Specifically, the significance sal (R) of region R from H from towardThe relative entropy in direction determines:
Wherein, qi=max (qi, ε), ε is the positive number of very little.
In the present embodiment, an area comprising more information amount relative to its complement is exactly obtained in a width picture
Domain, as significance highest region.
In the present embodiment, it is using the meaning of relative entropy:In known complement RCCoding in the case of, characterize whole figure
The expectation of the extra code length that piece I needs.If this expects very little, then illustrate region RCComprising information content with it is whole
Individual picture I is close, from RCRecover the information that whole picture I need not be much extra, the letter in Zone R domain is removed from side reflection
Breath amount very little.
, whereas if this expects much, it was demonstrated that R and surrounding RCIt is widely different, R includes many extra information.
By above-described embodiment, the width picture that computer can be uploaded according to trade company is analyzed, and obtains on the picture
Significance distribution, be easy to trade company platform to choose appropriate display location, and be conducive to picture searching.
Above-mentioned significance acquisition methods, can be applied to and extract commodity domain color in business platform server, and then
In the application of acquisition commodity colour match.
The application can provide a kind of method for carrying out color selection obtained based on significance.In the method, first
According to significance distribution of the different multiple selection areas in the picture in picture, potential commodity body region is obtained, from institute
State and absolute body region is chosen in potential commodity body region;Afterwards, according to the adaptive color selected to the image data
Collection, obtains the accounting that the adaptive color concentrates absolute body region of each color in the selection, and according to described
Adaptive color concentrates each color in the accounting of the absolute body region of the selection, obtains alternative domain color collection;Then, root
The concentration degree of color in the colour system subclass of each color is concentrated according to the alternative domain color, is obtained and is applied domain color collection;Finally, obtain
Take the application domain color and concentrate accounting of each color in the absolute body region, to carry out color selection.
Preferably, significance distribution of the different multiple selection areas in the picture is obtained according to following manner:
First, the significance of multiple selection areas is obtained;
Afterwards, the significance of multiple selection areas is uniformed, is selected with multiple in obtaining the picture
Determine significance distribution of the region in the picture.
In the above-mentioned methods, after potential commodity body region is obtained, also include:
Center with the potential commodity body region as the center of circle, by the Zone Full of the corresponding picture of the image data
The significance enhancing;
Absolute body region is chosen from the potential commodity body region to be specially:
According to the enhanced significance, absolute body region is chosen from the potential commodity body region.
In the above-mentioned methods, the acquisition methods of adaptive color collection are specifically included:Obtain every kind of face in the color space
Accounting of the color in the picture whole region, afterwards, by the accounting in the color space in the picture whole region
Color more than setting range adds the adaptive color collection;Or, by the color space and the adaptive color
The distance of any color is concentrated to add the adaptive color collection more than the color of threshold value, until what the adaptive color was concentrated
Number of color reaches setting value.
In the preferred embodiment of the application, the absolute master that the adaptive color concentrates each color in the selection is obtained
The accounting of body region belong to the pixel count of every kind of color in the absolute main body in the absolute body region by obtaining
Area ratio shared by region.
Concentrating each color in the accounting of the absolute body region of the selection according to the adaptive color, obtaining standby
Selecting domain color collection can concentrate each color accounting in the absolute body region of the selection by according to the adaptive color
Color more than given threshold than in adds the alternative domain color collection.
In the preferred embodiment of the application, can in the acquisition methods of the colour system subclass of alternative domain color concentration each color
Think:
The adaptive color is concentrated and with the alternative domain color color distance of each color will be concentrated nearest
Color, adds the alternative domain color to concentrate the colour system subclass of each color.
In the preferred embodiment of the application, in the colour system subclass according to the alternative domain color concentration each color
The concentration degree of color, obtains final domain color set and is specially:
A color in the colour system subclass of each color is chosen, color is represented as the subclass of the colour system subclass.
It is described to obtain the application domain color concentration each color in the absolute master in the preferred embodiment of the application
Accounting in body region is specially:
Wherein, RoIt is accounting sum of each color in a colour system subclass in absolute body region, riIt is a color
It is accounting of the i-th kind of color in subclass in absolute body region.
In the preferred embodiment of the application, the center with the potential commodity body region, will be described as the center of circle
The significance enhancing of the Zone Full of the corresponding picture of image data is specifically included:
To any pixel point on the Zone Full of the corresponding picture of the image data, according to the pixel with it is described
The distance in the center of circle carries out Gauss weighting to the significance of the pixel, to obtain the enhanced significance of the pixel,
It is more specific use below equation for:
Wherein, S'x,yIt is enhanced significance, Sx,yIt is significance before enhancing, H is the length of picture, and W is that picture is wide
Degree, xcIt is the X-axis coordinate in the center of circle, x is the X-axis coordinate of selected pixel, ycIt is the Y-axis coordinate in the center of circle, y is the Y of selected pixel
Axial coordinate.
In the preferred embodiment of the application, each color is concentrated in the absolute main body the application domain color is obtained
Accounting in region, after carrying out color selection, the application domain color can also be selected and concentrate on the absolute body region
Accounting highest color in domain is the domain color of the picture.
Embodiment one
Below in conjunction with accompanying drawing, the specific embodiment chosen to color is described in detail.Fig. 3 is refer to, it is this Shen
A kind of a kind of flow chart of embodiment of color choosing method that please be provided, methods described includes:
Step 301, according to significance distribution of the different multiple selection areas in the picture in picture, obtains potential business
Product body region;
In this step 301, significance of the different multiple selection areas in the picture is distributed according to such as Fig. 3 A institutes
The mode shown is obtained:
Step 3011, obtains the significance of multiple selection areas;
In this step, the acquisition of the significance of the multiple selection areas in a width picture can be by existing significance
Acquisition methods are obtained, or are obtained by the acquisition process of the significance for describing Fig. 3 B below.Shown in Fig. 3 B
Significance acquisition methods include:
Step 30111, obtains each color in the selection area in the corresponding picture of image data in color space
In the first probability distribution histogram;
Step 30112, obtain remove in the corresponding picture of image data it is every in the remaining area after the selection area
A kind of second probability distribution histogram of color in the color space;
Step 30113, according to the first probability distribution histogram and the histogrammic relative entropy of the second probability distribution,
Determine the significance of the selection area.
In particular, the step 30111- steps 30113 in the significance acquisition methods shown in Fig. 3 B may be referred to Fig. 2
Specific implementation method in shown significance acquisition methods, but it is not limited to the mode shown in Fig. 2.
Generally, can be according in the scanning step of setting and the scanning window size of the setting successively inswept picture
Zone Full;Using a region for scanning window size after each mobile scanning step as a selection area,
Until scan through whole picture, afterwards according to shown in Fig. 3 B the step of 30111- steps 30113 in obtain each selected area
The significance in domain, will not be repeated here.
It is pointed out that the method for taking the significance of each selection area in picture in the present embodiment equally may be used
With the concrete methods of realizing of the significance acquisition methods with reference to shown in Fig. 2, but the mode shown in Fig. 2 is not limited to, as long as
The method that selection area significance can be accurately obtained in a width commodity picture can be using in the present embodiment.
Step 3012, the significance of multiple selection areas is uniformed, many in the picture to obtain
Significance distribution of the individual selection area in the picture.
Specifically, after the significance for getting multiple selection areas in the step 3011, normalization refers to given
Data go unitization, the data of same type divided by the summation of data where it, obtain proportion of the data in summation.
Specifically, generally in the picture of commodity, commodity body may be placed in any position of picture display picture, lead to
It is often significance highest position.In a previous step, the significance distribution situation of the picture shown by picture has been got.
Therefore, whole graphic image is scanned by square scanning window, counts pixel significance sum in each window,
Using a maximum window of significance sum as potential commodity body region.In order to increase potential commodity body region as far as possible
Scope, in the present embodiment, scanning window can be the 1/4 of dimension of picture, and scanning step can be the scanning window length of side
Half, that is to say, that selection area area is the 1/16 of the picture area, and commodity picture can be got by this step
In, the potential site of commodity body.
Step 302, absolute body region is chosen from the potential commodity body region;
Specifically, Fig. 3 C are referred to, this step 302 is further included:
Step 3021, during the center for selecting selection area described in the significance highest is potential commodity body region
The heart;
Specifically, generally in the picture of commodity, commodity body may be placed in any position of picture display picture, lead to
It is often significance highest position.In previous step 301, the significance distribution feelings of the picture shown by picture have been got
Condition and potential commodity body region, afterwards using the center of significance highest selection area as in potential commodity body region
The heart.
Step 3022, with the potential commodity body regional center as the center of circle, by the corresponding picture of the image data
The significance enhancing of Zone Full;
In this step, to any pixel point on the Zone Full of the corresponding picture of the image data, according to described
Pixel carries out Gauss weighting with the distance in the center of circle to the significance of the pixel, to obtain the enhancing of the pixel
Significance afterwards.
Specifically, using one selection area of significance highest as potential commodity body region, selecting the region
Center O (xc,yc) as the center in potential commodity body region.
Then, the intensity of the significance of enhancing O and its neighboring area, with O as the center of circle, appointing on the picture shown to picture
Anticipate the corresponding pixel in a position, by the significance S of the positionx,yGauss weighting is carried out according to the distance degree with O:
Wherein, S'x,yIt is enhanced significance, Sx,yIt is significance before enhancing, H is the length of picture, and W is that picture is wide
Degree, xcIt is the X-axis coordinate in the center of circle, x is the X-axis coordinate of selected pixel, ycIt is the Y-axis coordinate in the center of circle, y is the Y of selected pixel
Axial coordinate.
More specifically, σ takes the width that 0.3, W is picture, and H is the length of picture, S 'x,yFor point (x, y) is enhanced significantly
Degree.Because the probability for belonging to commodity body near the position at potential body region center is larger, being weighted by Gauss to strengthen
The significance of this subregion, so as to strengthen the integrality of commodity body extraction.
That is, this step is specially any pixel point on the Zone Full to the corresponding picture of the image data, according to
The pixel carries out the significance Gauss weighting to the pixel with the distance in the center of circle, to obtain the pixel
Enhanced significance
Step 3023, according to enhanced significance, absolute body region is chosen in the potential commodity body region,
And choose background area from outside the potential commodity body region;
Specifically, after to center of circle neighboring area enhancing significance, according in selected potential commodity body region, pressing
The region labeling for choosing certain area from high to low according to significance is absolute body region.Generally selected absolute body region is accounted for
The 1/10 of whole picture area.
Meanwhile, a part of region is chosen from low to high according to significance outside the potential commodity body region as absolute
Background area, the area of the part is also chosen to be the 1/10 of whole picture area.
Step 303, according to the adaptive color collection selected to the image data, obtains the adaptive color and concentrates every
Plant accounting of the color in the absolute body region of the selection;
Specifically, in computer disposal picture, it usually needs specify a color space for being used to represent picture, than
Such as rgb space.In rgb space, if there are 30 gradients in each color component, 30* is had in whole color space
30*30=27000 kind colors.Accordingly, it would be desirable to the data volume for the treatment of is just very big, but actually in a width picture, reduce
Some color gradients, can't produce influence to people on the sense organ of picture, thus the step purpose aiming at every pictures,
Only extract and constitute a subset of colours Θ ' no more than 256 kinds of colors, and the color in full color space is both mapped into this height
On collection Θ '.
Original picture is reconstructed by the color in the subset of colours, eye-observation difference is little.So, do not reduced as far as possible
On the premise of color represents precision, simplify number of colors, improve subsequent treatment efficiency.
In this step, the selection of adaptive color collection is obtained referring to the process shown in Fig. 3 D being described below.
Step 3031, obtains accounting of each color in picture whole region in color space set;
Specifically, for being input into the whole picture area of picture, it is counted in certain color space, each color
Accounting;
Color space is usually rgb space, and each color component has 30 gradients, totally 27000 kinds of color
The accounting of described each color refer to belong to the color pixel count account for whole picture picture area ratio.
Step 3032, the accounting in the color space in the picture whole region is exceeded the color of setting range
Add the adaptive color collection;
Specifically, whether the color that will occur in picture, from high toward low order, judges it by accounting
Accounting in whole picture exceedes certain limit, such as more than 0.1%, it is therefore an objective to choose the larger face of accounting
Color.Adaptive color collection so will be formed more than a range of color
Step 3033, will concentrate the distance of any color to exceed threshold value in the color space with the adaptive color
Color add the adaptive color collection, until the number of color that the adaptive color is concentrated reaches setting value.
Specifically, if certain color concentrates the color distance of existing each color to be all higher than with subset adaptive color
Certain limit, such as be 7 more than threshold value in Lab distances.Purpose is to try to choose the color for differing greatly and enters self adaptation face
Color collection.
According to the above method, constantly choose the color occurred in picture and enter adaptive color collection until adaptive color collection
In color category number reached setting value, such as 256 kinds, that is, complete the selection to adaptive color collection.
The handling principle of the processing method is, accounting is larger in a width picture or distinguished color be often be figure
More representational color in piece.A fixed dominant color set is used for any image compared to conventional method, in this reality
Apply in example, automatically generate a color set for customization for every pictures, in the case where number of colors is limited, as far as possible very
The distribution of color of the real original picture of reflection, it is ensured that display precision.Color in this set is what is occurred in original picture
Color, is not in the problem of aberration when being chosen as commodity domain color.
Step 304, each color is concentrated in the accounting of the absolute body region of the selection according to the adaptive color,
Obtain alternative domain color collection;
Specifically, after the adaptive color collection Θ and absolute body region that have obtained picture, counting the absolute master
Belong to the pixel count of every kind of described color in adaptive color set Θ in body region shared by the absolute body region
Area ratio.
According to accounting just, the part colours that will occur in picture are added to alternative domain color collection Ω.Threshold can also be set
Value, the color of given threshold is more than according to each color in adaptive color collection Θ in the accounting of the absolute body region chosen
Add the alternative domain color collection Ω, or in the case of having there are more than one colors in Ω, by what is occurred in picture
Color and existing color calculates color distance in alternative domain color collection Ω, will be big with color distance in alternative domain color collection Ω
Alternative domain color collection Ω is added in the color of given threshold.Color distance can use Lab distances, threshold value to may be selected 30, it is therefore an objective to
Improve the color occurred in alternative domain color collection Ω representative.
Step 305, the concentration degree of color in the colour system subclass of each color is concentrated according to the alternative domain color, and obtaining should
Use domain color collection;
In this step 305, first it should be noted that it is by following that alternative domain color concentrates the colour system subclass of each color
Describe to determine:
It is determined that alternative domain color collection Ω={ o1,o2,……omAfter, by all of color in adaptive color collection Θ
Sorted out by the chromatic series in alternative domain color collection Ω.Specifically, to each color c in adaptive color collection Θp, look for
The nearest color of color distance therewith in alternative domain color collection Ω.If cp∈ Θ and oqThe color citing of ∈ Ω is nearest, then will
cpAdd oqCorresponding subclass set SqIn.
This step is specifically, in each colour system subclass for having returned class, choosing a best color of visual effect and representing
Whole colour system subclass.To any one color o in alternative domain color collection Ω, and its corresponding colour system subclass S={ s1,s2,…,
sn, investigate the color intensity of the colour system subclass.
More specifically, for S in a color si, according toCalculated.
Wherein, wherein dist () is two color distance measurements of color in S.D(si) be meant that, choose siAs
During the representative color of subclass S, the color intensity inside S.And most colour system subclass S represent color as
Wherein, o ' is to make the internal color intensity highest color of colour system subclass S, to cause that the color is best suitable for making
It is the representative color of the colour system.If o '=o, illustrate that the color o for initializing S is final selected representative o '.If o ' ≠
O, then repeat
It is each color o in alternative domain color collection Ωk, and its corresponding colour system subclass SkCarried out according to the above method
Iteration, chooses the final of each colour system subclass and represents color, until the cluster centre of all colour system subclasses is not moved or changed
In generation, exceedes the number of times of setting, afterwards, stops iteration, obtain final application domain color set omega '={ o'1,o'2,…,o'm}。
Step 306, obtains the application domain color and concentrates accounting of each color in the absolute body region, carries out
Color is chosen.
Specifically, in picture is got application domain color set omega '={ o'1,o'2,…,o'mAfter, should to each
With domain color set omega '={ o'1,o'2,…,o'mIn color colour system subclass S={ s corresponding with its1,s2,…,sn, system
Count colour system subclass S={ s1,s2,…,snIn the overall accounting R in commodity body regiono:Wherein, RoFor in S
The accounting r of each coloriSum.
It is final to choose a maximum colour system subclass of overall accounting in commodity body region, as final domain color class
SMAX, domain color class SMAXIt is topmost colour system that commodity body is showed, SMAXRepresentative color omaxIt is final master
Most representational color in color, that is, commodity body.
That is to say, obtaining each color after the accounting in the absolute body region, commodity master can be got
Most representational domain color (the maximum colour system subclass of accounting) in body, and according to each accounting of these colors, can obtain
Get the colour match of commodity picture.
After the colour match for getting commodity picture, can also include:
The accounting highest color that the selected application domain color concentrates in the absolute body region is the picture
Domain color.
Therefore, by above-described embodiment, business platform server can get a width commodity picture of trade company's upload
Colour match and domain color.So as to judge the Color Style that commodity body is showed.For example washed in a pan or day cat store in Taobao, one
In, when consumer passes through color lookup commodity, can more be accurately obtained the commodity of corresponding color.
Additionally, the color that browses record, judge user preferences of the business platform also dependent on user, and then automatically will correspondence
The commodity picture of color recommends consumer in the page, for its selection.
The method of the color extraction shown in framework and Fig. 3 described in corresponding diagram 1, the application also provides a kind of color and chooses dress
Put, described device includes:According to significance distribution of the different multiple selection areas in the picture in picture, to obtain latent
First acquisition unit in commodity body region, the choosing to choose absolute body region from the potential commodity body region
Unit, the adaptive color collection selected to the image data to basis are taken, and obtains the adaptive color and concentrate every kind of
Color the accounting of the absolute body region of the selection second acquisition unit, to concentrate every according to the adaptive color
Kind of color obtains the 3rd acquiring unit of alternative domain color collection, to basis in the accounting of the absolute body region of the selection
The concentration degree of color, obtains the 4th acquisition of application domain color collection in the colour system subclass of the alternative domain color concentration each color
Unit, and be used to obtain accounting of the application domain color concentration each color in the absolute body region, to carry out
The 5th acquiring unit that color is chosen.
Preferably, the first acquisition unit further includes to obtain the multiple choosings in the corresponding picture of image data
The center determined the acquisition subelement of the significance in region and be used to select selection area described in the significance highest is potential
The selection subelement of commodity body regional center.
Preferably, the selection unit is further included:
To with the center in the potential commodity body region as the center of circle, by the whole of the corresponding picture of the image data
The enhanced enhanson of the significance in region and to choose absolute body region from the potential commodity body region
Domain, and the selection subelement of background area is chosen from outside the potential commodity body region.
Embodiment two
Below in conjunction with accompanying drawing, above-mentioned color extraction device is described in further detail.As shown in figure 4, the application reality
Applying the described device of example offer includes first acquisition unit 401, chooses unit 402, the acquisition list of second acquisition unit the 403, the 3rd
First 404, the 4th acquiring unit 405 and the 5th acquiring unit 406.Wherein, first acquisition unit 401 is according to different more in picture
Significance distribution of the individual selection area in the picture, obtains potential commodity body region;Unit 402 is chosen to be obtained from first
Absolute body region is chosen in the potential commodity body region that unit 401 gets;Second acquisition unit 403, according to described
The selected adaptive color collection of image data, and it is exhausted choose that unit 402 chooses to obtain each color in self adaptation color set
To the accounting of body region;3rd acquiring unit 404 concentrates each color in the absolute master for choosing according to the adaptive color
The accounting of body region, obtains alternative domain color collection;4th acquiring unit 405, according to the alternative master that the 3rd acquiring unit 404 is obtained
In color set in the colour system subclass of each color color concentration degree, obtain apply domain color collection;Finally, by the 5th acquiring unit
406, obtain application domain color concentration each color the accounting in the absolute body region that the 4th acquiring unit 405 gets
Than to carry out color selection.
First acquisition unit 401 can be further included to obtain subelement 4011 and selection subelement as shown in Figure 4 A
4012, significance the latter that the former is used to obtain the multiple selection areas in the corresponding picture of image data selects the significance
The center of selection area described in highest is potential commodity body regional center.
Choose unit 402 as shown in Figure 4 B, further include enhanson 4021 and choose subelement 4022, the former with
The center in the potential commodity body region is the center of circle, by the described notable of the Zone Full of the corresponding picture of the image data
Degree enhancing, the latter chooses absolute body region from the potential commodity body region, and from the potential commodity body region
Outside choose background area.
The method for obtaining commodity body above, the method that may be referred to be obtained using significance in previous embodiment,
Repeat no more.
After the commodity body in getting a width picture, second acquisition unit 403 obtains the self adaptation face of the picture
Color collection, and the accounting that the adaptive color concentrates each color in the absolute body region of the selection is obtained, afterwards, the 3rd obtains
Unit 404 is taken, concentrates each color in the accounting of the absolute body region of the selection according to the adaptive color, obtained standby
Select domain color collection;
Specifically, after the adaptive color collection and absolute body region that have obtained picture, counting the absolute main body
Belong to the pixel count of every kind of described color in adaptive color set in region in the area shared by the absolute body region
Than.
According to accounting just, the part colours that will occur in picture are added to alternative domain color collection.Threshold value can also be set,
Each color is concentrated to be added more than the color of given threshold in the accounting of the absolute body region chosen according to adaptive color
The alternative domain color collection.
4th acquiring unit 405, it is determined that after alternative domain color collection, adaptive color is concentrated into all of color by standby
The chromatic series for selecting domain color to concentrate is sorted out.Specifically, each color concentrated to adaptive color, finds alternative main face
Color concentrates the nearest color of color distance therewith, obtains colour system subclass.Colour system of each color is concentrated according to alternative domain color
The concentration degree of color in class, obtains and applies domain color collection;
5th acquiring unit 406, after application domain color set in getting picture, domain color set is applied to each
In color colour system subclass corresponding with its, count overall accounting of each colour system subclass in commodity body region.
It is final to choose a maximum colour system subclass of overall accounting in commodity body region, as final domain color
Class, it represents color sorting and is taken as final domain color, that is, most representational color in commodity body.
Each accounting of colour system subclass in commodity body region, is exactly the colour match of commodity picture.
Foregoing device be in order to
The device designed by foregoing method is realized, therefore the title of each unit is used for the purpose of distinguishing function.Substantially, as long as can be complete
It is combined into corresponding function, or several functions, should be all should not be construed as to this in the range of the application covers
The limitation of application.
In actual applications, can be by foregoing significance acquisition device, commodity body acquisition device and color extraction
The function of device designed on same server or computer while realizing different work(after software or combination of hardware
Can, those skilled in the art should be understood that.
Professional should further appreciate that, each example described with reference to the embodiments described herein
Unit and algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, hard in order to clearly demonstrate
The interchangeability of part and software, generally describes the composition and step of each example according to function in the above description.
These functions are performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.
Professional and technical personnel can realize described function to each specific application using distinct methods, but this realization
It is not considered that exceeding scope of the present application.
The method that is described with reference to the embodiments described herein can use hardware, computing device the step of algorithm
Software module, or the two combination is implemented.Software module can be placed in random access memory (RAM), internal memory, read-only storage
(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
In any other form of storage medium well known to interior.
Above-described specific embodiment, purpose, technical scheme and beneficial effect to the application have been carried out further
Describe in detail, should be understood that the specific embodiment that the foregoing is only the application, be not used to limit the application
Protection domain, all any modification, equivalent substitution and improvements within spirit herein and principle, done etc. all should include
Within the protection domain of the application.
Claims (16)
1. a kind of color choosing method, it is characterised in that methods described includes:
According to significance distribution of the different multiple selection areas in the picture in picture, potential commodity body region is obtained;
Absolute body region is chosen from the potential commodity body region;
According to the adaptive color collection selected to the image data, obtain the adaptive color and concentrate each color described
The accounting of the absolute body region chosen;
Each color is concentrated in the accounting of the absolute body region of the selection according to the adaptive color, alternative main face is obtained
Color collection;
The concentration degree of color in the colour system subclass of each color is concentrated according to the alternative domain color, is obtained and is applied domain color collection;
Obtain the application domain color and concentrate accounting of each color in the absolute body region, to carry out color selection.
2. color choosing method as claimed in claim 1, it is characterised in that the different multiple selection areas are in the picture
In significance distribution according to following manner obtain:
Obtain the significance of multiple selection areas;
The significance of multiple selection areas is uniformed, with multiple selection areas in obtaining the picture in institute
State the significance distribution in picture.
3. color choosing method as claimed in claim 2, it is characterised in that the significance of the acquisition multiple selection areas enters
One step includes:
Obtain first probability point of each color in the selection area in the corresponding picture of image data in color space
Cloth histogram;
Each color removed in the remaining area after the selection area in the corresponding picture of image data is obtained described
The second probability distribution histogram in color space;
According to the first probability distribution histogram and the histogrammic relative entropy of the second probability distribution, the selected area is determined
The significance in domain.
4. color choosing method as claimed in claim 2, it is characterised in that after the potential commodity body region of acquisition,
Also include:
Center with the potential commodity body region as the center of circle, by the institute of the Zone Full of the corresponding picture of the image data
State significance enhancing;
Absolute body region is chosen from the potential commodity body region to be specially:
According to the enhanced significance, absolute body region is chosen from the potential commodity body region.
5. color choosing method as claimed in claim 2, it is characterised in that also include:
The accounting highest color that the selected application domain color is concentrated in the absolute body region is the master of the picture
Color.
6. color choosing method as claimed in claim 2, it is characterised in that the acquisition methods of the adaptive color collection are specific
Including:
Obtain accounting of each color in the picture whole region in the color space;
The color that accounting in color space in the picture whole region exceedes setting range is added into the self adaptation face
Color collection;
The color that the distance of any color exceedes threshold value is concentrated to add the color space and the adaptive color described
Adaptive color collection, until the number of color that the adaptive color is concentrated reaches setting value.
7. color choosing method as claimed in claim 2, it is characterised in that the acquisition adaptive color concentrates every kind of face
Color is specially in the accounting of the absolute body region of the selection:
Obtain and belong to the pixel count of every kind of color in the face shared by the absolute body region in the absolute body region
Product ratio.
8. color choosing method as claimed in claim 2, it is characterised in that described to concentrate every kind of according to the adaptive color
Color obtains alternative domain color collection and specifically includes in the accounting of the absolute body region of the selection:
Concentrate each color in the accounting of the absolute body region of the selection more than setting threshold according to the adaptive color
The color of value adds the alternative domain color collection.
9. color choosing method as claimed in claim 2, it is characterised in that the alternative domain color concentrates the color of each color
It is that the acquisition methods of subclass include:
The adaptive color is concentrated and the nearest color of the color distance of each color will be concentrated with the alternative domain color,
The alternative domain color is added to concentrate the colour system subclass of each color.
10. color choosing method as claimed in claim 1, it is characterised in that described to concentrate every according to the alternative domain color
The concentration degree of color in the colour system subclass of color is planted, acquisition is specially using domain color set:
A color in the colour system subclass of each color is chosen, color is represented as the subclass of the colour system subclass.
11. color choosing methods as claimed in claim 1, it is characterised in that the acquisition application domain color concentrates every
Accounting of the color in the absolute body region is planted to be specially:
Wherein, RoIt is accounting sum of each color in a colour system subclass in absolute body region, riIt is colour system
The accounting of i-th kind of color in class in absolute body region.
12. color choosing methods as claimed in claim 4, it is characterised in that described with the potential commodity body region
Center is the center of circle, and the significance enhancing of the Zone Full of the corresponding picture of the image data is specifically included:
To any pixel point on the Zone Full of the corresponding picture of the image data, according to the pixel and the center of circle
Distance Gauss weighting is carried out to the significance of the pixel, to obtain the enhanced significance of the pixel.
13. color choosing methods as claimed in claim 12, it is characterised in that described to the corresponding picture of the image data
Zone Full on any pixel point, carried out to the notable of the pixel with the distance in the center of circle according to the pixel
Degree Gauss weighting, is specially with the enhanced significance for obtaining the pixel:
Wherein, S'x,yIt is enhanced significance, Sx,yIt is significance before enhancing, H is the length of picture, and W is picture width, xcFor
The X-axis coordinate in the center of circle, x is the X-axis coordinate of selected pixel, ycIt is the Y-axis coordinate in the center of circle, y is that the Y-axis of selected pixel is sat
Mark, σ is constant.
14. a kind of color selecting devices, it is characterised in that described device includes:
First acquisition unit, according to significance distribution of the different multiple selection areas in the picture in picture, to obtain
Potential commodity body region;
Unit is chosen, to choose absolute body region from the potential commodity body region;
Second acquisition unit, to the adaptive color collection that basis is selected to the image data, and obtains the self adaptation face
Color concentrates each color in the accounting of the absolute body region of the selection;
3rd acquiring unit, to concentrate each color in the absolute body region of the selection according to the adaptive color
Accounting, obtains alternative domain color collection;
4th acquiring unit, to the concentration degree of color in the colour system subclass that each color is concentrated according to the alternative domain color,
Obtain and apply domain color collection;
5th acquiring unit, is used to obtain application domain color concentration each color the accounting in the absolute body region
Than to carry out color selection.
15. color selecting devices as claimed in claim 14, it is characterised in that the first acquisition unit is further included:
Subelement is obtained, is used to obtain the significance of the multiple selection areas in the corresponding picture of image data;
Selection subelement, is used to select the center of selection area described in the significance highest in potential commodity body region
The heart.
The 16. color selecting device as described in claims 14 or 15, it is characterised in that the selection unit is further included:
Enhanson, to the center in the potential commodity body region as the center of circle, by the corresponding figure of the image data
The significance enhancing of the Zone Full of piece;
Subelement is chosen, to choose absolute body region from the potential commodity body region, and from the potential commodity
Background area is chosen outside body region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210278822.7A CN103577993B (en) | 2012-08-07 | 2012-08-07 | Color choosing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210278822.7A CN103577993B (en) | 2012-08-07 | 2012-08-07 | Color choosing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103577993A CN103577993A (en) | 2014-02-12 |
CN103577993B true CN103577993B (en) | 2017-06-09 |
Family
ID=50049729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210278822.7A Active CN103577993B (en) | 2012-08-07 | 2012-08-07 | Color choosing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103577993B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106033547A (en) * | 2015-03-12 | 2016-10-19 | 阿里巴巴集团控股有限公司 | Color matching evaluation method and device, and dress collocation recommendation method and device |
CN108733640A (en) * | 2017-04-24 | 2018-11-02 | 珠海金山办公软件有限公司 | A kind of document scheme of colour generation method and device |
CN107248181A (en) * | 2017-06-16 | 2017-10-13 | 北京三快在线科技有限公司 | Image generating method and device, electronic equipment |
CN112954355B (en) * | 2017-06-21 | 2022-12-09 | 西安万像电子科技有限公司 | Image frame processing method and device |
CN107391661B (en) * | 2017-07-18 | 2020-06-16 | 海信集团有限公司 | Recommended word display method and device |
CN110825480A (en) * | 2019-11-06 | 2020-02-21 | 北京无限光场科技有限公司 | Picture display method and device, electronic equipment and computer readable storage medium |
CN113848736B (en) * | 2021-09-13 | 2024-06-28 | 青岛海尔科技有限公司 | Clothes information processing method and equipment based on intelligent wardrobe |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6778697B1 (en) * | 1999-02-05 | 2004-08-17 | Samsung Electronics Co., Ltd. | Color image processing method and apparatus thereof |
CN101213576A (en) * | 2005-04-13 | 2008-07-02 | 富士胶片株式会社 | Album creating apparatus, album creating method and program therefor |
CN101211356A (en) * | 2006-12-30 | 2008-07-02 | 中国科学院计算技术研究所 | Image inquiry method based on marking area |
CN101216830A (en) * | 2007-12-28 | 2008-07-09 | 腾讯科技(深圳)有限公司 | Method and system for search commercial articles according to colors |
CN101231757A (en) * | 2007-12-07 | 2008-07-30 | 北京搜狗科技发展有限公司 | Apparatus and method for analyzing picture dominant hue as well as application in picture searching thereof |
CN102184557A (en) * | 2011-06-17 | 2011-09-14 | 电子科技大学 | Salient region detection method for complex scene |
-
2012
- 2012-08-07 CN CN201210278822.7A patent/CN103577993B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6778697B1 (en) * | 1999-02-05 | 2004-08-17 | Samsung Electronics Co., Ltd. | Color image processing method and apparatus thereof |
CN101213576A (en) * | 2005-04-13 | 2008-07-02 | 富士胶片株式会社 | Album creating apparatus, album creating method and program therefor |
CN101211356A (en) * | 2006-12-30 | 2008-07-02 | 中国科学院计算技术研究所 | Image inquiry method based on marking area |
CN101231757A (en) * | 2007-12-07 | 2008-07-30 | 北京搜狗科技发展有限公司 | Apparatus and method for analyzing picture dominant hue as well as application in picture searching thereof |
CN101216830A (en) * | 2007-12-28 | 2008-07-09 | 腾讯科技(深圳)有限公司 | Method and system for search commercial articles according to colors |
CN102184557A (en) * | 2011-06-17 | 2011-09-14 | 电子科技大学 | Salient region detection method for complex scene |
Non-Patent Citations (1)
Title |
---|
基于信息熵的图像检索技术研究;王松;《中国优秀硕士学位论文全文数据库 信息科技辑》;20030915(第3期);第22页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103577993A (en) | 2014-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103577993B (en) | Color choosing method and device | |
CN103578098B (en) | Method and device for extracting commodity body in commodity picture | |
CN104424230B (en) | A kind of cyber recommended method and device | |
CN102841946B (en) | Commodity data retrieval ordering and Method of Commodity Recommendation and system | |
Cetinic et al. | Learning the principles of art history with convolutional neural networks | |
US20150262371A1 (en) | Segmentation of an image based on color and color differences | |
CN108052765A (en) | Scheme of colour automatic generation method and device based on personality impression | |
CN106127507A (en) | A kind of commodity the analysis of public opinion method and system based on user's evaluation information | |
CN107016387A (en) | A kind of method and device for recognizing label | |
CN106898026A (en) | The dominant hue extracting method and device of a kind of picture | |
CN106033547A (en) | Color matching evaluation method and device, and dress collocation recommendation method and device | |
CN107330750A (en) | A kind of recommended products figure method and device, electronic equipment | |
CN106919543A (en) | Determine the method and device of merchandise items title text | |
CN108415913A (en) | Crowd's orientation method based on uncertain neighbours | |
CN105787490A (en) | Commodity fashion identification method and device based on deep learning | |
CN107545049A (en) | Image processing method and related product | |
CN108345624A (en) | Generate the method and device of the page | |
Peng et al. | Contour-enhanced CycleGAN framework for style transfer from scenery photos to Chinese landscape paintings | |
CN107832359A (en) | A kind of picture retrieval method and system | |
CN108984576A (en) | A kind of patent document acquisition methods and system based on convolutional neural networks | |
CN113034238A (en) | Commodity brand feature extraction and intelligent recommendation management method based on electronic commerce platform transaction | |
CN107305677A (en) | Product information method for pushing and device | |
CN102999576B (en) | For the method and apparatus determining the page-describing information corresponding to target pages | |
Yelizaveta et al. | Analysis and retrieval of paintings using artistic color concepts | |
CN106295673A (en) | Item Information processing method and processing means |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1193224 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: GR Ref document number: 1193224 Country of ref document: HK |