CN103577993A - Color selecting method and device - Google Patents
Color selecting method and device Download PDFInfo
- Publication number
- CN103577993A CN103577993A CN201210278822.7A CN201210278822A CN103577993A CN 103577993 A CN103577993 A CN 103577993A CN 201210278822 A CN201210278822 A CN 201210278822A CN 103577993 A CN103577993 A CN 103577993A
- 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.)
- Granted
Links
Images
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention relates to a color selecting method and device. The method includes the following steps that a selected region with the highest conspicuousness degree is selected in an image and serves as a potential commodity main region. The conspicuousness degrees of all zones of the image corresponding to the picture data are boosted; an absolute main region is selected from the potential commodity main region; the ratio of each color in a self-adaption color set in the absolute main region is obtained; a standby main color set is obtained, an application main color set is obtained; the ratio of each color in the application main color set in the absolute main zone is obtained to carry out color selection. According to the color selecting method and device, background interference can be relieved and the problem of chromatic aberration in color discrimination in the prior art is solved.
Description
Technical field
The application relates to internet arena, is specifically related to a kind of color choosing method and color selecting device.
Background technology
In e-commerce field, the website of on-line search commodity and online shopping is provided such as Yi Tao, Taobao and day cat store etc., conventionally need to provide more commodity picture, so that consumer selects.In the commodity of picture presentation, the color of commodity is a kind of primary attributes of commodity.Consumer is when the form free choice of goods by browsing pictures, and the color that commodity main body presents is the key factor of consumer's consideration often.In addition, business platform also wishes by color recognition technology, replaces manually commodity color to identify, and afterwards commodity carried out to the classification of color mark, thereby the service of commodity being classified by color is provided, and is convenient to consumer and selects.
The main color of commodity and the identification of colour match are widely used in business platform, by color recognition technology, the color of commodity main body are identified.When consumer carries out the online free choice of goods, can, according to consumer's the record of browsing, for recommending Color Style, consumer meet the commodity of consumer's custom.
Prior art recognition value color is mainly by the fixing dominant color set that comprises hundreds of kind color for all picture settings, as main color candidate, on picture, add up afterwards the pixel count that belongs to each color, final according to the pixel count of every kind of color the accounting in picture in its entirety, the color of output accounting maximum, as the main color of picture.
But, prior art None-identified commodity main body, therefore the pixel count of every kind of color being chosen is the Zone Full based on whole picture, the main color finally presenting, may not be greatly the color of commodity main body, is the color of background parts on the contrary.Therefore,, because background parts chooses to color the interference that existence is larger, prior art cannot realize the extraction to the main color of commodity main body.
Summary of the invention
The application's object is to provide a kind of color choosing method and device, to solve prior art, cannot by computing machine, overcome the interference of background parts in commodity picture, causes the main color of commodity is extracted to inaccurate problem.
On the one hand, the application provides a kind of color choosing method, and described method comprises:
Significance according to different a plurality of selection areas in picture in described picture distributes, and obtains potential commodity body region;
In described potential commodity body region, choose absolute body region;
According to the selected adaptive color collection of described image data, and obtain described adaptive color and concentrate every kind of color in the accounting of the described absolute body region of choosing;
According to described adaptive color, concentrate every kind of color in the accounting of the described absolute body region of choosing, obtain alternative main color set;
According to the concentration degree of color in the colour system subclass of every kind of color in described alternative main color set, obtain the main color set of application;
Obtain in the main color set of described application the accounting of every kind of color in described absolute body region, to carry out color, choose.
On the other hand, the application provides a kind of color selecting device, and described device comprises:
A selecting device, is characterized in that, described device comprises:
The first acquiring unit, in order to the significance in described picture distributes according to different a plurality of selection areas in picture, obtains potential commodity body region;
Choose unit, in order to choose absolute body region in described potential commodity body region;
Second acquisition unit, in order to according to the selected adaptive color collection of described image data, and obtains described adaptive color and concentrates every kind of color in the accounting of the described absolute body region of choosing;
The 3rd acquiring unit, in order to concentrate every kind of color in the accounting of the described absolute body region of choosing according to described adaptive color, obtains alternative main color set;
The 4th acquiring unit, in order to according to the concentration degree of color in the colour system subclass of every kind of color in described alternative main color set, obtains the main color set of application;
The 5th acquiring unit, in order to obtain in the main color set of described application the accounting of every kind of color in described absolute body region, chooses to carry out color.
The application is by obtaining the significance of a plurality of selection areas in a described width picture, in selected described a plurality of selection areas, a highest selection area of significance is potential commodity body region, in described potential commodity body region, according to strengthening significance, choose absolute body region afterwards, to get commodity main body.After extracting commodity main body, every kind of color is in the accounting of the commodity main body of choosing, then according to the concentrated every kind of color of adaptive color the accounting in the described absolute body region of choosing, obtain alternative main color set, to reduce background interference.The concentration degree of color in the colour system subclass of every kind of color in alternative main color set, obtains the main color set of application again; In the main color set of application, every kind of color accounting in described absolute body region is chosen main color, the aberration problem that can avoid prior art to occur in color identification.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiment of the application, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The application architecture figure of the color choosing method that Fig. 1 provides for the embodiment of the present application;
Fig. 2 is the process flow diagram for a kind of picture significance acquisition methods;
The process flow diagram of one embodiment of the method that Fig. 3 chooses for a kind of color that the application provides;
Fig. 3 A is the process flow diagram of the application's significance distribution acquiring method;
Fig. 3 B is the process flow diagram of an embodiment of the process flow diagram of the acquisition methods of each region significance in step 3011 in Fig. 3 A;
Fig. 3 C is the detail flowchart of step 302 in Fig. 3;
Fig. 3 D is the process flow diagram that in Fig. 3, step 303 is obtained the adaptive color collection of picture;
Fig. 4 is the structural drawing of a kind of color selecting device of providing of the embodiment of the present application;
Fig. 4 A is the detailed structure view of the first acquiring unit in a kind of color selecting device;
Fig. 4 B chooses the detailed structure view of unit in a kind of color selecting device.
Embodiment
Below by drawings and Examples, the application's technical scheme is described in further detail.
The application's core concept is to compare by subregion in a width picture the extra quantity of information that surrounding enviroment provide, and obtains the significance in this region.And rely on the difference between zones of different significance, obtain the commodity body region in a width picture, in the commodity body region of obtaining by color accounting, choose the main color of commodity and according to color the accounting in commodity, the colour match of obtaining commodity.
Please refer to Fig. 1, the application scenarios Organization Chart of the color extracting method that it provides for the application.Wherein, described framework comprises consumption end display device 10, the business platform server 20He trade company end server 30 being connected in internet.
Wherein, business platform server 20 is to provide the platform of ecommerce, and the website of shopping online function can be provided such as Yi Tao, Taobao and day cat store etc., and by this platform, user can check commodity picture, businessman's prestige etc.Trade company holds server 30 to business platform server 20, to upload the picture of the commodity of selling with its wish, such as fruit, clothes, shoes, household articles etc. by trade company.After the picture processing that business platform server 20Jiang trade company uploads, the displaying of reaching the standard grade.Consumer logins business web site by internet, connects business platform server 20, and at described business web site interface, (such as Yi Taowang, Taobao etc.) searches its interested commodity.The picture that trade company uploads, often can not show that it wants outstanding commodity most, therefore the picture that business platform server 20 need to provide trade company is analyzed, after obtaining picture significance, obtain the colour match scheme of commodity, the displaying angle of adjusting commodity and the picture with best illustrated effect, as commodity representative picture, at business platform, show, so that consumer's its interested commodity of Obtaining Accurate more, or attracted by the commodity of trade company.
In business platform is shown, in the prior art often by commodity picture Zone Full is scanned, in the color set of appointment, every kind of color, in the accounting of whole picture, is judged the main color of commodity.But because background is often occupied larger area than commodity, the main color of therefore extracting is the color of background often, can not accurately reflect the color of commodity main body.But, the business platform such as such as Taobao,, washing in a pan, the color of commodity picture often consumer is chosen the significant consideration of commodity, and business platform is also classified to commodity by color differentiating.Therefore, the realization based on above-described embodiment, a kind of method that the application can provide color to choose.
In the color choosing method proposing in the embodiment of the present application, used the method for obtaining significance, so a kind of method of obtaining picture significance of paper, this kind of Fig. 2 obtains the process flow diagram of the method for picture significance, as seen from the figure, described method comprises:
Concrete, described color space C={c
1, c
2..., c
n, the whole color space of uniform fold, comprises hundreds of kind color;
Described color space also can be referred to as color model, refers to the abstract mathematics model that represents color with a class value.Conventional have three primary colors model and a Lab model.Wherein the former comprises tri-dimensions of RGB, and R is red, and G is green, and B is blue, and the latter is color-opposition model, and dimension L represents brightness, and a and b represent respectively red/green and yellow/blue channel opposing.
In a color space, conventionally use color distance, represent two difference degrees between color, in Lab model, suppose to be provided with color A (L1, a1, b1) and B (L1, a1, b1) in two Lab spaces, its Lab distance is defined as:
Concrete, first, add up in whole picture I and belong to the versicolor pixel count in described color space C, generate the color histogram of I, use H={p
1, p
2... p
n, p wherein
ifor color c
ithe accounting of ∈ C in I, namely belongs to color c in picture
ithe area ratio that accounts in whole picture of pixel.Be the probability distribution of I in color.
Afterwards, adopt window scanning strategy, according to step-length and the window size set, in picture, constantly choose different region R, the accounting probability distribution histogram H of each color of obtaining this region R in described color space
r={ r
1, r
2..., r
n, r wherein
ifor color c
ithe accounting of ∈ C in R.
Specifically can in R, belong to by obtaining the pixel count of each color, pixel count shared Area Ratio in whole Zone R territory according to certain color, accounting probability distribution as each color in selection area in described color space, generates histogram according to this probability distribution.
In the window scanning strategy of application, conventionally choose foursquare window, the becoming as 1/4 of the minor face of the minor face picture of picture of this square window, described scanning step is 1/2 of the described scanning window length of side.Each mobile step-length, until cover the Zone Full of whole picture.
The shape of above-mentioned scanning window, the length of side and scanning step are only a kind of embodiments, in actual applications, can select the step-length of other shape, size and scanning, should not be construed the restriction to the application.
Concrete, in picture, remove the complement that remaining area after selection area can be referred to as described selection area.For example, R
cthe complement of R, R
ccolor histogram be:
Q wherein
ifor color c
ithe accounting of ∈ C in R is at complement R
cin accounting, S is the area of picture in whole picture, and S
rarea for region R.
be the complement R of R
cprobability distribution in color;
Concrete, the significance sal (R) of region R from H from toward
the relative entropy of direction is determined:
Wherein, q
i=max (q
i, ε), ε is very little positive number.
In the present embodiment, obtain exactly a region that comprises more information amount with respect to its complement in a width picture, as the highest region of significance.
In the present embodiment, use the meaning of relative entropy to be: at known complement R
cthe situation of coding under, characterize the expectation of the extra code length that whole picture I needs.If this expectation is very little, so declare area R
cthe quantity of information comprising is close with whole picture I, from R
crecovering whole picture I does not need a lot of extra information, and the quantity of information that Zone R territory is removed in reflection is from the side very little.
Otherwise, if this expects much, prove R and R around
cwidely different, R comprises a lot of extra information.
By above-described embodiment, the width picture that computing machine can be uploaded according to trade company, analyzes, and the significance obtaining on this picture distributes, and is convenient to trade company's platform and chooses appropriate display location, and be conducive to picture searching.
Above-mentioned significance acquisition methods, can be applied at business platform server and extract the main color of commodity, and then obtains in the application of commodity colour match.
The application can provide a kind of based on significance, obtain carry out the method that color is chosen.In the method, first according to different a plurality of selection areas in picture, the significance in described picture distributes, and obtains potential commodity body region, in described potential commodity body region, chooses absolute body region; Afterwards, according to the selected adaptive color collection of described image data, obtaining described adaptive color concentrates every kind of color in the accounting of the described absolute body region of choosing, and according to described adaptive color, concentrate every kind of color in the accounting of the described absolute body region of choosing, obtain alternative main color set; Then, according to the concentration degree of color in the colour system subclass of every kind of color in described alternative main color set, obtain the main color set of application; Finally, obtain in the main color set of described application the accounting of every kind of color in described absolute body region, to carry out color, choose.
Preferably, the significance of a plurality of selection areas of described difference in described picture distributes and obtains according to following mode:
First, obtain the significance of a plurality of selection areas;
Afterwards, the described significance of a plurality of described selection areas is carried out to homogenization, to obtain the significance of a plurality of selection areas in described picture in described picture, distribute.
In said method, after obtaining potential commodity body region, also comprise:
Take the center of described potential commodity body region is the center of circle, and the described significance of the Zone Full of picture corresponding to described image data is strengthened;
From choosing absolute body region in described potential commodity body region, be specially:
According to the described significance after described enhancing, in described potential commodity body region, choose absolute body region.
In said method, the acquisition methods of adaptive color collection specifically comprises: obtain in described color space the accounting of every kind of color in the whole region of described picture, afterwards, the color that the accounting in the whole region of described picture in described color space is surpassed to setting range adds described adaptive color collection; Or the color that the distance with the concentrated arbitrary color of described adaptive color of described color space is surpassed to threshold value adds described adaptive color collection, until the concentrated number of color of described adaptive color reaches setting value.
In the application's preferred embodiment, obtain this adaptive color concentrate every kind of color in the accounting of the described absolute body region of choosing the pixel count by belonging to every kind of described color in obtaining described absolute body region at the shared Area Ratio of described absolute body region.
According to described adaptive color, concentrating every kind of color in the accounting of the described absolute body region of choosing, obtaining alternative main color set can add described alternative main color set by the color of concentrating every kind of color to be greater than setting threshold in the accounting of the described absolute body region of choosing according to described adaptive color.
In the application's preferred embodiment, in alternative main color set, the acquisition methods of the colour system subclass of every kind of color can be:
By described adaptive color concentrate with by with described alternative main color set in the nearest color of the color distance of every kind of color, add the colour system subclass of every kind of color in described alternative main color set.
In the application's preferred embodiment, described according to the concentration degree of color in the colour system subclass of every kind of color in described alternative main color set, obtain final main color set and be specially:
Choose a color in the color subclass of described every kind of color, as the subclass representative color of this color subclass.
In the application's preferred embodiment, described in obtain in the main color set of described application the accounting of every kind of color in described absolute body region and be specially:
Wherein, R
othe accounting sum that is each color in a color subclass in absolute body region, r
ibe the accounting of an i kind color in color subclass in absolute body region.
In the application's preferred embodiment, described center of take described potential commodity body region is the center of circle, and the described significance of the Zone Full of picture corresponding to described image data is strengthened and specifically comprised:
To the arbitrary pixel on the Zone Full of picture corresponding to described image data, according to the distance in described pixel and the described center of circle, the significance of described pixel is carried out to Gauss's weighting, to obtain the significance after the enhancing of described pixel, more specifically adopt following formula to be:
Wherein, S '
x,yfor the significance after strengthening, S
x, yfor strengthening front significance, the length that W is picture, W is picture width, x
cfor the X-axis coordinate in the center of circle, x is the X-axis coordinate of selected pixel, y
cfor the Y-axis coordinate in the center of circle, y is the Y-axis coordinate of selected pixel.
In the application's preferred embodiment, every kind of color accounting in described absolute body region in obtaining the main color set of described application, after color chooses, can also select the main color of described application and concentrate on the main color that the highest color of accounting in described absolute body region is described picture carrying out.
Embodiment mono-
Below in conjunction with accompanying drawing, the embodiment that color is chosen, is described in detail.Please refer to Fig. 3, the process flow diagram of a kind of embodiment of a kind of color choosing method that it provides for the application, described method comprises:
In this step 301, the significance distribution of a plurality of selection areas of described difference in described picture obtains according to mode as shown in Figure 3A:
In this step, obtaining of the significance of a plurality of selection areas in a width picture can be obtained by existing significance acquisition methods, or by the acquisition process of the significance that Fig. 3 B describes is below obtained.Significance acquisition methods shown in Fig. 3 B comprises:
In particular, the step 30111-step 30113 in the significance acquisition methods shown in Fig. 3 B can, with reference to the specific implementation method in the significance acquisition methods shown in figure 2, still be not limited to the mode shown in Fig. 2.
That summarizes says, can be according to the Zone Full in the scanning window size of the scanning step of setting and setting successively inswept described picture; Using the region of moving a scanning window size after a scanning step at every turn as a selection area, until scan complete picture, afterwards according to shown in Fig. 3 B step 30111-step 30113 in obtain the significance of each selection area, do not repeat them here.
It is to be noted, the method of getting in the present embodiment the significance of each selection area in picture equally can be with reference to the concrete methods of realizing of the significance acquisition methods shown in figure 2, but be not limited to the mode shown in Fig. 2, as long as can the method for Obtaining Accurate selection area significance can apply in the present embodiment in a width commodity picture.
Concrete, get the significance of a plurality of selection areas in step 3011 after, normalization refers to the given data unitization of going, the summation data of the same type divided by its place data obtains the proportion of these data in summation.
Concrete, in the picture of commodity, commodity main body may be placed in arbitrary position of Image Display picture, the normally the highest position of significance conventionally.In previous step, got the significance distribution situation of the shown picture of picture.
Therefore, by square scanning window, scan whole picture picture, add up pixel significance sum in each window, using a window of significance sum maximum as potential commodity body region.In order to increase as far as possible the scope of potential commodity body region, in the present embodiment, scanning window can be 1/4 of dimension of picture, and scanning step can be half of the scanning window length of side, that is to say that selection area area is 1/16 of described picture area, by this step, can get in commodity picture the potential site of commodity main body.
Step 302 is chosen absolute body region in described potential commodity body region;
Particularly, can be with reference to figure 3C, this step 302 further comprises:
Concrete, in the picture of commodity, commodity main body may be placed in arbitrary position of Image Display picture, the normally the highest position of significance conventionally.In previous step 301, got significance distribution situation and the potential commodity body region of the shown picture of picture, afterwards the center using the center of the highest selection area of significance as potential commodity body region.
In this step, the arbitrary pixel on the Zone Full of picture corresponding to described image data, carries out Gauss's weighting according to the distance in described pixel and the described center of circle to the significance of described pixel, to obtain the significance after the enhancing of described pixel.
Concrete, using the highest selection area of significance as potential commodity body region, the center O (x in selected this region
c, y
c) as the center of potential commodity body region.
Then, strengthen the intensity of the significance of O and neighboring area thereof, take O as the center of circle, to pixel corresponding to any position on the picture of Image Display, by the significance S of this position
x,yaccording to the distance short range degree with O, carry out Gauss's weighting:
Wherein, S '
x,yfor the significance after strengthening, S
x, yfor strengthening front significance, the length that W is picture, W is picture width, x
cfor the X-axis coordinate in the center of circle, x is the X-axis coordinate of selected pixel, y
cfor the Y-axis coordinate in the center of circle, y is the Y-axis coordinate of selected pixel.
More specifically, σ gets the width that 0.3, W is picture, the length that H is picture, S '
x,yfor the significance after point (x, y) enhancing.The probability that belongs to commodity main body due to the position near potential body region center is larger, can strengthen the significance in this part region by Gauss's weighting, thereby strengthens the integrality that commodity main body is extracted.
That is, this step is specially the arbitrary pixel on the Zone Full of picture corresponding to described image data, according to the distance in described pixel and the described center of circle, carries out the significance Gauss weighting to described pixel, to obtain the significance after the enhancing of described pixel
Concrete, after neighboring area, the center of circle is strengthened to significance, in selected potential commodity body region, the region labeling of choosing from high to low certain area according to significance is absolute body region.Conventionally selected absolute body region accounts for 1/10 of whole picture area.
Meanwhile, outside described potential commodity body region, according to significance, choose from low to high a part of region as absolute background area, the area of this part is also chosen to be 1/10 of whole picture area.
Specifically, when computing machine is processed picture, conventionally need to specify one in order to represent the color space of picture, such as rgb space.In rgb space, if there are 30 gradients in each color component, in whole color space, have 30*30*30=27000 kind color.Therefore, need data volume to be processed just very large, but in fact in a width picture, reduce some color gradients, can't to the sense organ of picture, exert an influence to people, therefore the object of this step is exactly for every pictures, only extracts and is no more than a color subset Θ of 256 kinds of colors compositions, and the color in full color space is all mapped on this subset Θ.
By the original picture of color reconstruct in this color subset, eye-observation difference is little.Like this, do not reduce under the prerequisite that color represents precision as far as possible, simplify number of colors, improve subsequent treatment efficiency.
In this step, adaptive color collection chooses referring to below the process shown in Fig. 3 D of description being obtained.
Particularly, in the whole picture area for input picture, add up it in certain color space, the accounting of every kind of color;
Color space is generally rgb space, and each color component has 30 gradients, totally 27000 kinds of colors.
The accounting of every kind of described color refers to that the pixel count that belongs to this color accounts for the ratio of the picture area of whole picture.
Particularly, by the color occurring in picture by accounting from high toward low order, whether judge it
Accounting in whole picture surpasses certain limit, for example, surpass 0.1%, and object is to choose the color that accounting is larger.Like this color that surpasses certain limit is formed to adaptive color collection
Concrete, if certain color and subset adaptive color concentrate the color distance of existing each color to be all greater than certain limit, for example, in Lab distance, surpassing threshold value is 7.Object is to choose the color differing greatly to enter adaptive color collection as far as possible.
According to said method, constantly choose that the color occurring in picture enters adaptive color collection until the concentrated color category number of adaptive color has reached setting value, for example 256 kinds, completed choosing adaptive color collection.
The handling principle of this disposal route is, in a width picture, the larger or distinguished color of accounting is more representational color in picture often.Compare classic method and all use a fixing dominant color set for any image, in the present embodiment, for every pictures, automatically generate the color set of a customization, in the situation that number of colors is limited, the color distribution of the original picture of true reflection, guarantees display precision as far as possible.The color that color in this set occurs in being original picture, while being chosen as the main color of commodity, there will not be the problem of aberration.
Concrete, obtaining the adaptive color collection Θ of picture and definitely after body region, add up in described absolute body region, belong to every kind of described color in adaptive color set Θ pixel count at the shared Area Ratio of described absolute body region.
According to accounting height, the part color occurring in picture is joined to alternative main color set Ω.Also threshold value can be set, the color that is greater than setting threshold according to every kind of color in adaptive color collection Θ in the accounting of the absolute body region of choosing adds described alternative main color set Ω, or the in the situation that of having there are more than one colors in Ω, existing color in the color occurring in picture and alternative main color set Ω is calculated to color distance, by with alternative main color set Ω in the color distance color that is greater than setting threshold add alternative main color set Ω.Color distance can adopt Lab distance, and threshold value can select 30, and object is to improve the color representativeness occurring in alternative main color set Ω.
In this step 305, first it should be noted that the colour system subclass of every kind of color in alternative main color set is determined by following description:
At definite alternative main color set Ω={ o
1, o
2... o
mafterwards, colors all in adaptive color collection Θ is sorted out by the chromatic series in alternative main color set Ω.Particularly, to each the color c in adaptive color collection Θ
p, find in alternative main color set Ω the nearest color of color distance with it.If c
p∈ Θ and o
qthe color of ∈ Ω is nearest for example, by c
padd o
qcorresponding subclass S set
qin.
This step is concrete, at each, has returned in the colour system subclass of class, chooses a best color of visual effect and represents whole colour system subclass.To any the color o in alternative main color set Ω, and corresponding colour system subclass S={s
1, s
2..., s
n, investigate the color intensity of this colour system subclass.
Wherein, wherein dist () is the color distance tolerance of two colors in S.D(s
i) implication be to choose s
iduring as the representative color of subclass S, the color intensity of S inside.And the representative color of colour system subclass S is
Wherein, o ' is the highest color of internal color intensity that makes colour system subclass S, so that this color is most suitable as the representative color of this colour system.If o '=o, the color o that initialization S is described is the final selected o ' that represents.If o ' ≠ o, repeats
For each the color o in alternative main color set Ω
k, and corresponding colour system subclass S
kaccording to said method, carry out iteration, choose the final representative color of each colour system subclass, until the number of times that the cluster centre of all colour system subclasses does not all move or iteration surpass to be set afterwards, stops iteration, obtain the main color set Ω ' of final application=o '
1, o '
2..., o '
m.
Concrete, in getting picture, apply main color set Ω '=o '
1, o '
2..., o '
mafterwards, to each apply main color set Ω '=o '
1, o '
2..., o '
min color and its corresponding colour system subclass S={s
1, s
2..., s
n, add up this colour system subclass S={s
1, s
2..., s
nin the whole accounting of commodity body region
wherein, R
oaccounting r for each color in S
isum.
Finally choose the colour system subclass of a whole accounting maximum in commodity body region, as final main color class S
mAX, this main color class S
mAXthe topmost colour system that commodity main body presents, S
mAXrepresentative color o
maxfor final main color, the most representative color in commodity main body namely.
That is to say, obtaining every kind of color after the accounting in described absolute body region, the most representative main color in commodity main body (the colour system subclass of accounting maximum) can be got, and according to each accounting of these colors, the colour match of commodity picture can be got.
After getting the colour match of commodity picture, can also comprise:
The selected main color of described application concentrates on the main color that the highest color of accounting in described absolute body region is described picture.
Therefore,, by above-described embodiment, business platform server can get colour match and the main color of the width commodity picture that trade company uploads.Thereby the Color Style that judgement commodity main body presents.For example Taobao, wash in a pan or day cat store in, when consumer searches commodity by color, can more accurately obtain the commodity of corresponding color.
In addition, business platform also can be according to user's the record of browsing, the color of judgement user preferences, and then automatically the commodity picture of corresponding color is recommended to consumer in the page, for its selection.
The method that framework described in corresponding diagram 1 and the color shown in Fig. 3 are extracted, the application also provides a kind of color selecting device, described device comprises: in order to according to different a plurality of selection areas in picture, the significance in described picture distributes, obtain the first acquiring unit of potential commodity body region, in order to choose the unit of choosing of absolute body region in described potential commodity body region, in order to according to the selected adaptive color collection of described image data, and obtain described adaptive color and concentrate every kind of color at the second acquisition unit of the accounting of the described absolute body region of choosing, in order to concentrate every kind of color in the accounting of the described absolute body region of choosing according to described adaptive color, obtain the 3rd acquiring unit of alternative main color set, in order to according to the concentration degree of color in the colour system subclass of every kind of color in described alternative main color set, obtain the 4th acquiring unit of the main color set of application, and in order to obtain in the main color set of described application the accounting of every kind of color in described absolute body region, the 5th acquiring unit of choosing to carry out color.
Preferably, described the first acquiring unit further comprises obtaining the obtaining subelement and be the chooser unit at potential commodity body region center in order to select the center of the described selection area that described significance is the highest of significance of a plurality of selection areas in the picture that image data is corresponding.
Preferably, described in, choosing unit further comprises:
In order to take the center of described potential commodity body region, it is the center of circle, the enhanson that the described significance of the Zone Full of picture corresponding to described image data is strengthened and in order to choose absolute body region in described potential commodity body region, and from choosing the subelement of choosing of background area outside described potential commodity body region.
Embodiment bis-
Below in conjunction with accompanying drawing, above-mentioned color extraction element is described in further detail.As shown in Figure 4, the described device that the embodiment of the present application provides comprises the first acquiring unit 401, chooses unit 402, second acquisition unit 403, the 3rd acquiring unit 404, the 4th acquiring unit 405 and the 5th acquiring unit 406.Wherein, according to different a plurality of selection areas in picture, the significance in described picture distributes the first acquiring unit 401, obtains potential commodity body region; Choose in the potential commodity body region that unit 402 gets from the first acquiring unit 401 and choose absolute body region; Second acquisition unit 403, according to the selected adaptive color collection of described image data, and is obtained from and adapts in color set every kind of color in the accounting of choosing the absolute body region of choosing unit 402; The 3rd acquiring unit 404 concentrates every kind of color in the accounting of the absolute body region of choosing according to described adaptive color, obtains alternative main color set; The 4th acquiring unit 405, the concentration degree of color in the colour system subclass of every kind of color in the alternative main color set obtaining according to the 3rd acquiring unit 404, obtains the main color set of application; Finally, by the 5th acquiring unit 406, obtain in the main color set of application that the 4th acquiring unit 405 gets the accounting of every kind of color in described absolute body region, to carry out color, choose.
The first acquiring unit 401 can be as shown in Figure 4 A, further comprise and obtain subelement 4011 and selected cell 4012, in order to obtain significance the latter of a plurality of selection areas in the picture that image data is corresponding, to select the center of the described selection area that described significance is the highest be potential commodity body region center for the former.
Choose unit 402 as shown in Figure 4 B, further comprise enhanson 4021 and choose subelement 4022, the former take the center of described potential commodity body region is the center of circle, the described significance of the Zone Full of picture corresponding to described image data is strengthened, the latter chooses absolute body region in described potential commodity body region, and chooses background area outside described potential commodity body region.
More than obtain the method for commodity main body, can, with reference to the method that adopts significance to obtain in previous embodiment, repeat no more.
After commodity main body in getting a width picture, second acquisition unit 403, obtain the adaptive color collection of described picture, and obtain this adaptive color and concentrate every kind of color in the accounting of the described absolute body region of choosing, afterwards, the 3rd acquiring unit 404, concentrates every kind of color in the accounting of the described absolute body region of choosing according to described adaptive color, obtains alternative main color set;
Concrete, obtaining the adaptive color collection of picture and definitely after body region, add up in described absolute body region, belong to every kind of described color in adaptive color set pixel count at the shared Area Ratio of described absolute body region.
According to accounting height, the part color occurring in picture is joined to alternative main color set.Also threshold value can be set, the color of concentrating every kind of color to be greater than setting threshold in the accounting of the absolute body region of choosing according to adaptive color adds described alternative main color set.
The 4th acquiring unit 405, after determining alternative main color set, concentrates all colors to sort out by the chromatic series in alternative main color set adaptive color.Particularly, each color that adaptive color is concentrated, finds in alternative main color set the nearest color of color distance with it, obtains colour system subclass.According to the concentration degree of color in the colour system subclass of every kind of color in alternative main color set, obtain the main color set of application;
The 5th acquiring unit 406, after applying main color set, applies color and its corresponding colour system subclass in main color set to each in getting picture, adds up each colour system subclass in the whole accounting of commodity body region.
Finally choose the colour system subclass of a whole accounting maximum in commodity body region, as final main color class, its representative color is chosen for final main color, namely the most representative color in commodity main body.
The accounting of each colour system subclass in commodity body region is exactly the colour match of commodity picture.
Aforesaid device is in order to realize the designed device of aforesaid method, so the title of each unit is only used to distinguish function.In fact, as long as can complete corresponding function, or several function carries out combination, in the scope that all should contain in the application, should not be construed as the restriction to the application.
In actual applications, after the function of aforesaid significance acquisition device, commodity main body acquisition device and color extraction element can being carried out to software or combination of hardware, design realizes different functions on same server or computing machine simultaneously, and those skilled in the art should be understood that.
Professional should further recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or the combination of the two, for the interchangeability of hardware and software is clearly described, composition and the step of each example described according to function in the above description in general manner.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought and exceeds the application's scope.
The software module that the method for describing in conjunction with embodiment disclosed herein or the step of algorithm can use hardware, processor to carry out, or the combination of the two is implemented.Software module can be placed in the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above-described embodiment; the application's object, technical scheme and beneficial effect are further described; institute is understood that; the foregoing is only the application's embodiment; and be not used in the protection domain that limits the application; all within the application's spirit and principle, any modification of making, be equal to replacement, improvement etc., within all should being included in the application's protection domain.
Claims (16)
1. a color choosing method, is characterized in that, described method comprises:
Significance according to different a plurality of selection areas in picture in described picture distributes, and obtains potential commodity body region;
In described potential commodity body region, choose absolute body region;
According to the selected adaptive color collection of described image data, obtain described adaptive color and concentrate every kind of color in the accounting of the described absolute body region of choosing;
According to described adaptive color, concentrate every kind of color in the accounting of the described absolute body region of choosing, obtain alternative main color set;
According to the concentration degree of color in the colour system subclass of every kind of color in described alternative main color set, obtain the main color set of application;
Obtain in the main color set of described application the accounting of every kind of color in described absolute body region, to carry out color, choose.
2. color choosing method as claimed in claim 1, is characterized in that, the significance of a plurality of selection areas of described difference in described picture distributes and obtain according to following mode:
Obtain the significance of a plurality of selection areas;
The described significance of a plurality of described selection areas is carried out to homogenization, to obtain the significance of a plurality of selection areas in described picture in described picture, distribute.
3. color choosing method as claimed in claim 2, is characterized in that, the significance of a plurality of selection areas of described acquisition further comprises:
Obtain each color in the selection area in the picture that image data is corresponding the first probability distribution histogram in color space;
Obtain each color of removing in the picture that image data is corresponding in remaining area after described selection area the second probability distribution histogram in described color space;
According to described the first probability distribution histogram and the histogrammic relative entropy of described the second probability distribution, determine the significance of described selection area.
4. color choosing method as claimed in claim 2, is characterized in that, described in obtain potential commodity body region after, also comprise:
Take the center of described potential commodity body region is the center of circle, and the described significance of the Zone Full of picture corresponding to described image data is strengthened;
From choosing absolute body region in described potential commodity body region, be specially:
According to the described significance after described enhancing, in described potential commodity body region, choose absolute body region.
5. color choosing method as claimed in claim 2, is characterized in that, also comprises:
The selected main color of described application concentrates on the main color that the highest color of accounting in described absolute body region is described picture.
6. color choosing method as claimed in claim 2, is characterized in that, the acquisition methods of described adaptive color collection specifically comprises:
Obtain in described color space the accounting of every kind of color in the whole region of described picture;
The color that accounting in the whole region of described picture in described color space is surpassed to setting range adds described adaptive color collection;
The color that the distance with the concentrated arbitrary color of described adaptive color of described color space is surpassed to threshold value adds described adaptive color collection, until the concentrated number of color of described adaptive color reaches setting value.
7. color choosing method as claimed in claim 2, is characterized in that, described in obtain this adaptive color and concentrate every kind of color to be specially in the accounting of the described absolute body region of choosing:
Obtain in described absolute body region, belong to every kind of described color pixel count at the shared Area Ratio of described absolute body region.
8. color choosing method as claimed in claim 2, is characterized in that, the described adaptive color of described foundation concentrates every kind of color in the accounting of the described absolute body region of choosing, and obtains alternative main color set and specifically comprises:
The color of concentrating every kind of color to be greater than setting threshold in the accounting of the described absolute body region of choosing according to described adaptive color adds described alternative main color set.
9. color choosing method as claimed in claim 2, is characterized in that, in described alternative main color set, the acquisition methods of the colour system subclass of every kind of color comprises:
By described adaptive color concentrate with by with described alternative main color set in the nearest color of the color distance of every kind of color, add the colour system subclass of every kind of color in described alternative main color set.
10. color choosing method as claimed in claim 2, is characterized in that, described according to the concentration degree of color in the colour system subclass of every kind of color in described alternative main color set, obtains final main color set and is specially:
Choose a color in the color subclass of described every kind of color, as the subclass representative color of this color subclass.
11. color choosing methods as claimed in claim 2, is characterized in that, described in obtain in the main color set of described application the accounting of every kind of color in described absolute body region and be specially:
Wherein, R
othe accounting sum that is each color in a color subclass in absolute body region, r
ibe the accounting of an i kind color in color subclass in absolute body region.
12. color choosing methods as claimed in claim 4, is characterized in that, described center of take described potential commodity body region is the center of circle, and the described significance of the Zone Full of picture corresponding to described image data is strengthened and specifically comprised:
Arbitrary pixel on the Zone Full of picture corresponding to described image data, carries out Gauss's weighting according to the distance in described pixel and the described center of circle to the significance of described pixel, to obtain the significance after the enhancing of described pixel.
13. color choosing methods as claimed in claim 12, it is characterized in that, described to the arbitrary pixel on the Zone Full of picture corresponding to described image data, according to the distance in described pixel and the described center of circle, carry out the significance Gauss weighting to described pixel, with the significance obtaining after the enhancing of described pixel, be specially:
Wherein, S '
x,yfor the significance after strengthening, S
x, yfor strengthening front significance, the length that W is picture, W is picture width, x
cfor the X-axis coordinate in the center of circle, x is the X-axis coordinate of selected pixel, y
cfor the Y-axis coordinate in the center of circle, y is the Y-axis coordinate of selected pixel.
14. 1 kinds of color selecting devices, is characterized in that, described device comprises:
The first acquiring unit, in order to the significance in described picture distributes according to different a plurality of selection areas in picture, obtains potential commodity body region;
Choose unit, in order to choose absolute body region in described potential commodity body region;
Second acquisition unit, in order to according to the selected adaptive color collection of described image data, and obtains described adaptive color and concentrates every kind of color in the accounting of the described absolute body region of choosing;
The 3rd acquiring unit, in order to concentrate every kind of color in the accounting of the described absolute body region of choosing according to described adaptive color, obtains alternative main color set;
The 4th acquiring unit, in order to according to the concentration degree of color in the colour system subclass of every kind of color in described alternative main color set, obtains the main color set of application;
The 5th acquiring unit, in order to obtain in the main color set of described application the accounting of every kind of color in described absolute body region, chooses to carry out color.
15. color selecting devices as claimed in claim 14, is characterized in that, described the first acquiring unit further comprises:
Obtain subelement, in order to obtain the significance of a plurality of selection areas in the picture that image data is corresponding;
Chooser unit is potential commodity body region center in order to select the center of the described selection area that described significance is the highest.
16. color selecting devices as described in claim 14-15, is characterized in that, described in choose unit and further comprise:
Enhanson, is the center of circle in order to take the center of described potential commodity body region, and the described significance of the Zone Full of picture corresponding to described image data is strengthened;
Choose subelement, in order to choose absolute body region in described potential commodity body region, and choose background area outside described potential commodity 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 true CN103577993A (en) | 2014-02-12 |
CN103577993B 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) |
Cited By (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 |
CN107248181A (en) * | 2017-06-16 | 2017-10-13 | 北京三快在线科技有限公司 | Image generating method and device, electronic equipment |
CN107318023A (en) * | 2017-06-21 | 2017-11-03 | 西安万像电子科技有限公司 | The compression method and device of picture frame |
CN107391661A (en) * | 2017-07-18 | 2017-11-24 | 海信集团有限公司 | Recommend word display methods and device |
CN108733640A (en) * | 2017-04-24 | 2018-11-02 | 珠海金山办公软件有限公司 | A kind of document scheme of colour generation method and device |
CN110825480A (en) * | 2019-11-06 | 2020-02-21 | 北京无限光场科技有限公司 | Picture display method and device, electronic equipment and computer readable storage medium |
CN113848736A (en) * | 2021-09-13 | 2021-12-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 |
CN101211356A (en) * | 2006-12-30 | 2008-07-02 | 中国科学院计算技术研究所 | Image inquiry method based on marking area |
CN101213576A (en) * | 2005-04-13 | 2008-07-02 | 富士胶片株式会社 | Album creating apparatus, album creating method and program therefor |
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 |
---|
王松: "基于信息熵的图像检索技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (10)
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 |
US11361475B2 (en) | 2017-04-24 | 2022-06-14 | Beijing Kingsoft Office Software, Inc. | Method and apparatus for generating file color scheme |
CN107248181A (en) * | 2017-06-16 | 2017-10-13 | 北京三快在线科技有限公司 | Image generating method and device, electronic equipment |
CN107318023A (en) * | 2017-06-21 | 2017-11-03 | 西安万像电子科技有限公司 | The compression method and device of picture frame |
CN107391661A (en) * | 2017-07-18 | 2017-11-24 | 海信集团有限公司 | Recommend word display methods 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 |
CN113848736A (en) * | 2021-09-13 | 2021-12-28 | 青岛海尔科技有限公司 | Clothes information processing method and equipment based on intelligent wardrobe |
CN113848736B (en) * | 2021-09-13 | 2024-06-28 | 青岛海尔科技有限公司 | Clothes information processing method and equipment based on intelligent wardrobe |
Also Published As
Publication number | Publication date |
---|---|
CN103577993B (en) | 2017-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103577993A (en) | Color selecting method and device | |
Chong et al. | A model of factor influences on Electronic Commerce adoption and diffusion in small-and medium-sized enterprises | |
CN101915769B (en) | Automatic optical inspection method for printed circuit board comprising resistance element | |
Cetinic et al. | Learning the principles of art history with convolutional neural networks | |
CN107016387A (en) | A kind of method and device for recognizing label | |
US20210072880A1 (en) | Method and electronic device for generating at least one data item from screenshot | |
CN104346370A (en) | Method and device for image searching and image text information acquiring | |
Aaldering et al. | Analyzing the impact of industry sectors on the composition of business ecosystem: A combined approach using ARM and DEMATEL | |
CN103578098B (en) | Method and device for extracting commodity body in commodity picture | |
CN103870516A (en) | Image retrieving method, real-time drawing prompting method and device thereof | |
CN103793717A (en) | Methods for determining image-subject significance and training image-subject significance determining classifier and systems for same | |
CN106021551A (en) | Consumption auxiliary decision making method based on screenshot information recognition | |
CN114581207B (en) | Commodity image big data accurate pushing method and system for E-commerce platform | |
CN107545049A (en) | Image processing method and related product | |
CN112883926A (en) | Identification method and device for table medical images | |
CN116109373A (en) | Recommendation method and device for financial products, electronic equipment and medium | |
Wilkins et al. | An industry stakeholder SWOT analysis of wine tourism in the Okanagan Valley, British Columbia | |
CN103353865A (en) | Barter electronic trading commodity recommendation method based on position | |
Qiao et al. | Spatial relationship-assisted classification from high-resolution remote sensing imagery | |
Lee et al. | Research trend analysis for sustainable qr code use-focus on big data analysis | |
Elbadawi et al. | Geography, supplier access, foreign market potential, and manufacturing exports in developing countries: an analysis of firm-level data | |
KR20230023600A (en) | Device and method for artwork trend data prediction using artificial intelligence | |
Lachaize et al. | Evidential split-and-merge: Application to object-based image analysis | |
CN109918482A (en) | A kind of Students' Innovation plan of starting an undertaking the system of analysis and appraisal | |
CN105354720A (en) | Visual clustering based consumption place mixed recommendation method |
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 |