CN104679878A - NPsim matrix-based neighbour color search method and device - Google Patents

NPsim matrix-based neighbour color search method and device Download PDF

Info

Publication number
CN104679878A
CN104679878A CN201510108710.0A CN201510108710A CN104679878A CN 104679878 A CN104679878 A CN 104679878A CN 201510108710 A CN201510108710 A CN 201510108710A CN 104679878 A CN104679878 A CN 104679878A
Authority
CN
China
Prior art keywords
color
npsim
matrix
neighbour
orderly
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
Application number
CN201510108710.0A
Other languages
Chinese (zh)
Other versions
CN104679878B (en
Inventor
王功明
徐迎庆
付心仪
魏文
严娴
张映雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN201510108710.0A priority Critical patent/CN104679878B/en
Publication of CN104679878A publication Critical patent/CN104679878A/en
Application granted granted Critical
Publication of CN104679878B publication Critical patent/CN104679878B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Spectrometry And Color Measurement (AREA)
  • Image Analysis (AREA)

Abstract

The invention particularly relates to an NPsim matrix-based neighbour color search method and device. The method comprises the steps: acquiring color ColName0 needing to search neighbour colors; according to a prebuilt orderly NPsim matrix and a preset number K of the neighbour colors to be searched, selecting front K elements, corresponding to the color ColName0, in the orderly NPsim matrix; according to the selected K elements, determining neighbour colors ColNamet of the color ColName0, wherein t is equal to 1, 2 to K. Spectral information is adopted to express colors, so nondeterminacy caused by a metamerism phenomenon is avoided; meanwhile, the NPsim is adopted to calculate the similarity of color data in a color space, so the similarity calculation precision is improved, and the neighbour color search accuracy is improved; further, distance position relationships among colors are expressed by the orderly NPsim matrix, and K neighbour colors of a given color can be determined only by accessing the orderly NPsim matrix once, so the neighbour color search efficiency is greatly improved.

Description

Based on neighbour's color searching method and the device of NPsim matrix
Technical field
The present invention relates to neighbour's color search technique field, be specifically related to a kind of neighbour's color searching method based on NPsim (Normalized Partial Similarity, the similarity based on standardization local dimension certificate) matrix and device.
Background technology
The search of neighbour's color refers in given color space, and searching and given color similarity are in the color of former; The several color found, is called neighbour's color of given color.The search of neighbour's color has important effect in fields such as color reparation, colour planning, colour recognition.
In neighbour's color search technique field, conventional searching method comprises following two kinds:
(1) the neighbour's color based on tristimulus values representation is searched for.Tristimulus values representation is adopted to find neighbour's color of given color, first index tree to be set up according to the tristimulus values of all colours in color space, then the some leaf nodes closest with given color are searched by traversal index tree, the color of these leaf nodes representative is exactly neighbour's color of given color.Build and traversal index tree process in, usually represent the similarity of the two with three kinds of values component differences sum (i.e. manhatton distance) between given color and Node color.
(2) the neighbour's color based on spectrum presentation is searched for.Spectrum presentation is adopted to find neighbour's color of given color, first spectrum is considered as the vector of limited length, then the vector corresponding to all colours spectrum sets up index tree, the some leaf nodes closest with given color are searched subsequently by traversal index tree, the color of these leaf nodes representative is exactly neighbour's color of given color.Building and traveling through in the process of index tree, usually represent the similarity of the two with the Euclidean distance, included angle cosine, related coefficient etc. of spectral vector between given color and Node color.
But, when adopting above-mentioned two kinds of methods to carry out the search of neighbour's color, there is the shortcomings such as metamerism, similarity measurement low precision, index efficiency are low.
Summary of the invention
For there is metamerism, similarity measurement low precision, defect that index efficiency is low in existing neighbour's color searching method, the invention provides a kind of neighbour's color searching method based on NPsim matrix and device.
On the one hand, a kind of neighbour's color searching method based on NPsim matrix provided by the invention, comprising:
Obtain the color ColName needing to search for neighbour's color 0;
According to the quantity K of the orderly NPsim matrix set up in advance and preset search neighbour color, choose in described orderly NPsim matrix with described color ColName 0front K element of corresponding row;
According to described K the element chosen, determine described color ColName 0neighbour color ColName t, wherein t=1,2 ..., K.
Further, the quantity K of the orderly NPsim matrix that described basis is set up in advance and preset search neighbour color, choose in described orderly NPsim matrix with described color ColName 0before the step of front K element of corresponding row, also comprise:
The NPsim value in color space between any two kinds of color spectrum information vectors is adopted to build orderly NPsim matrix.
Further, the NPsim value in described employing color space between any two kinds of color spectrum information vectors builds the step of orderly NPsim matrix, comprising:
Obtain the spectral information of all colours in color space;
For each color in described color space, calculate the NPsim value of spectral information between whole color in this color and described color space;
NPsim matrix is set up according to described NPsim value, in wherein said color space, each Color pair answers a line of described NPsim matrix, and each element of described NPsim matrix comprises NPsim value three attribute between two kinds of color designation and described two kinds of colors;
By the element of a line every in described NPsim matrix, obtain orderly NPsim matrix according to described NPsim value descending order arrangement.
Further, described spectral information adopts following formula to represent:
S i={S i1,S i2,…,S ij,…,S in},i=1,2,…,M,j=1,2,…,n
Wherein, S ifor the spectral information of i-th kind of color in described color space, S ijfor the spectral reflectance of i-th kind of color at a jth wavelength place in described color space.
Further, described for each color in described color space, calculate the step of the NPsim value of spectral information between whole color in this color and described color space, be specially:
Adopt NPsim value described in following formulae discovery,
NPsim ( S p , S q ) = Σ j = 1 n 1 n · δ ( S pj , S qj ) · ( 1 - | S pj , S qj | m j - n j ) · E ( S p , S q ) n
Wherein, S pfor the spectral information of p kind color in described color space, S qfor the spectral information of q kind color in described color space; S pjand S qjbe respectively S pand S qin the value of jth dimension; δ (S pj, S qj) be discriminant function, work as S pjand S qjbe in same interval [n j, m j] time, δ (S pj, S qj)=1, otherwise, δ (S pj, S qj)=0; m jand n js pjand S qjjointly be subordinate to interval end points; E (S p, S q) be S pand S qbe in the number of dimensions between same zone.
On the other hand, the present invention also provides a kind of neighbour's color searcher based on NPsim matrix, comprising:
Acquisition module, for obtaining the color ColName needing to search for neighbour's color 0;
Choose module, for the quantity K according to the orderly NPsim matrix set up in advance and preset search neighbour color, choose in described orderly NPsim matrix with described color ColName 0front K element of corresponding row;
Determination module, for according to described K the element chosen, determines described color ColName 0neighbour color ColName t, wherein t=1,2 ..., K.
Further, described device also comprises structure module, builds orderly NPsim matrix for adopting the NPsim value in color space between any two kinds of color spectrum information vectors.
Further, build module specifically for:
Obtain the spectral information of all colours in color space;
For each color in described color space, calculate the NPsim value of spectral information between whole color in this color and described color space;
NPsim matrix is set up according to described NPsim value, in wherein said color space, each Color pair answers a line of described NPsim matrix, and each element of described NPsim matrix comprises NPsim value three attribute between two kinds of color designation and described two kinds of colors;
By the element of a line every in described NPsim matrix, obtain orderly NPsim matrix according to described NPsim value descending order arrangement.
Further, in described structure module, spectral information adopts following formula to represent:
S i={S i1,S i2,…,S ij,…,S in},i=1,2,…,M,j=1,2,…,n
Wherein, S ifor the spectral information of i-th kind of color in described color space, S ijfor the spectral reflectance of i-th kind of color at a jth wavelength place in described color space.
Further, described structure module further also for, adopt NPsim value described in following formulae discovery:
NPsim ( S p , S q ) = Σ j = 1 n 1 n · δ ( S pj , S qj ) · ( 1 - | S pj , S qj | m j - n j ) · E ( S p , S q ) n
Wherein, S pfor the spectral information of p kind color in described color space, S qfor the spectral information of q kind color in described color space; S pjand S qjbe respectively S pand S qin the value of jth dimension; δ (S pj, S qj) be discriminant function, work as S pjand S qjbe in same interval [n j, m j] time, δ (S pj, S qj)=1, otherwise, δ (S pj, S qj)=0; m jand n js pjand S qjjointly be subordinate to interval end points; E (S p, S q) be S pand S qbe in the number of dimensions between same zone.
A kind of neighbour's color searching method based on NPsim matrix provided by the invention and device, color is represented by adopting spectral information, the color character of color itself can be reflected, and set up one-to-one relationship between color, avoid the uncertainty that " metamerism " phenomenon causes; Meanwhile, adopt NPsim to calculate the similarity of color space color data, Sparse, isometry etc. " dimension disaster " impact on Similarity measures can be reduced, improve the precision of Similarity measures, and then improve the accuracy of neighbour's color search; Further by orderly NPsim matrix organization color space color data, accurately can represent the far and near position relationship between color, K neighbour's color of given color once can be determined by directly accessing orderly NPsim matrix, then need traversal index tree K time based on the neighbor search method of index tree in prior art, increase substantially the efficiency of neighbour's color search.
Accompanying drawing explanation
Can understanding the features and advantages of the present invention clearly by reference to accompanying drawing, accompanying drawing is schematic and should not be construed as and carry out any restriction to the present invention, in the accompanying drawings:
Fig. 1 is the schematic flow sheet based on neighbour's color searching method of NPsim matrix in one embodiment of the invention;
Fig. 2 is the schematic flow sheet setting up orderly NPsim matrix in one embodiment of the invention;
Fig. 3 is the structural representation of multi-optical spectrum imaging system in one embodiment of the invention;
Fig. 4 is the relative mistake result schematic diagram of independent same distribution IID data in one embodiment of the invention;
Fig. 5 is the relevant relative mistake result schematic diagram with distribution Uniform data in one embodiment of the invention;
Fig. 6 is the relative mistake result schematic diagram of dependent same distribution DID data in one embodiment of the invention;
Fig. 7 is based on the dependent of Psim and NPsim same distribution DID data comparative effectiveness schematic diagram in one embodiment of the invention;
Fig. 8 is the average response time result schematic diagram of neighbor search under three kinds of method different K values in one embodiment of the invention;
Fig. 9 is the structural representation based on neighbour's color searcher of NPsim matrix in one embodiment of the invention.
Embodiment
Now in conjunction with the accompanying drawings and embodiments technical solution of the present invention is further elaborated.
Existing neighbour's color search technique mainly comprises searches for based on neighbour's color search of tristimulus values representation and the neighbour's color based on spectrum presentation.Mainly there is following defect in above-mentioned two kinds of methods:
(1) metamerism.Color essence is self spectral reflectance curve, the different color of one group of spectral reflectance curve is observed at certain and has identical tristimulus values under lighting condition, produce identical visual effect, but there is not identical visual effect under other circumstances, be called " metamerism " phenomenon.So, there is the color not necessarily same color of same or similar tristimulus values; Therefore, adopt tristimulus values representation to find neighbour's color of given color, the spectral reflectance curve larger with given color distortion may be had.It can thus be appreciated that the neighbour's color searching method based on tristimulus values representation has certain uncertainty.
(2) similarity measurement low precision.Because spectrum presentation can avoid tristimulus values representation problem, the problem includes: " metamerism " problem, be used widely based on neighbour's color searching method of spectrum presentation.Spectrum is considered as vector, and the range of wavelengths corresponding due to spectrum is longer, and sampling interval is smaller, so vector length is not from hundreds of to several thousand etc., belongs to high dimension vector.Therefore, the basic operation of this neighbour's color searching method is the similarity calculating high dimension vector.At present, similarity calculation method conventional in the method comprises: Euclidean distance, included angle cosine, related coefficient, Hsim (Hamming Similarity, similarity based on Hamming distances), Gsim, Esim (E Similarity, similarity based on natural logarithm truth of a matter e), Psim (Partial Similarity, the similarity based on local dimension's certificate) etc.Wherein, Euclidean distance, included angle cosine, related coefficient are all the similarity calculation method being applicable to low-dimensional data, cannot overcome the isometry problem that high dimensional data is sparse, dimension disaster causes.Hsim, Gsim, Esim, Psim etc. are the similarity calculation method being applicable to high dimensional data, but also Shortcomings.Hsim performance is better than Euclidean distance, but does not consider relative difference and the noise profile of dimensional attribute; Gsim considers the relative difference of dimensional attribute, but does not consider its weight difference; Esim considers dimensional attribute size, but does not consider its noise profile; Psim considers the factor such as relative difference, noise profile, weight difference of dimensional attribute, but its codomain is relevant with vector dimension, and therefore the similarity of data under different dimensions does not have comparability, is unfavorable for Data Dimensionality Reduction.Above-mentioned defect reduces the precision of color spectrum similarity measurement, easily causes given color almost identical under many circumstances with distance adjacent farthest to its arest neighbors, cannot find satisfactory neighbour's color when carrying out the search of neighbour's color.
(3) index efficiency is low.At present, index tree is the index structure for the search of neighbour's color, and its essence is a kind of color space partition tree, is divided into some subspaces by whole color space, then continues to divide, until be divided into certain concrete color in each sub spaces.It can thus be appreciated that the leaf node of index tree represents the concrete color of color space, branch node representation space divides threshold value.In tree research, binary tree is the most ripe and perfect, so index tree is binary tree mostly.At present, the conventional index tree of neighbour's color search has R tree, VP tree, M tree, SA tree etc.Although above-mentioned index tree can be used in high dimensional data retrieval, efficiency is very low, and data are more than after tens dimensions, and its performance is even lower than the simplest sequential query algorithm.Its reason is that the distance between Arbitrary Digit strong point linearly increases along with the increase of dimension, and data point number constantly increases along with the increase of dimension; Therefore, cause Similarity measures time complexity and neighbor search scope all constantly to increase along with the raising of dimension, thus reduce the performance of high dimensional data neighbor search.It can thus be appreciated that, adopt index tree to carry out the color data in tissue color space, carry out when neighbour's color is searched for extremely consuming time.
As shown in Figure 1, for solving the low defect of above-mentioned metamerism, similarity measurement low precision and index efficiency, the present embodiment provides a kind of neighbour's color searching method based on NPsim matrix, comprising:
S11, obtains the color ColName needing to search for neighbour's color 0;
S12, according to the quantity K of the orderly NPsim matrix set up in advance and preset search neighbour color, choose in described orderly NPsim matrix with described color ColName 0front K element of corresponding row;
S13, according to described K the element chosen, determines described color ColName 0neighbour color ColName t, wherein t=1,2 ..., K.
Further, before described S12, also comprise:
The NPsim value in color space between any two kinds of color spectrum information vectors is adopted to build orderly NPsim matrix.
Concrete, as shown in Figure 2, the NPsim value in described employing color space between any two kinds of color spectrum information vectors builds the step of orderly NPsim matrix, comprising:
S21, obtains the spectral information of all colours in color space;
S22, for each color in described color space, calculates the NPsim value of spectral information between whole color in this color and described color space;
S23, NPsim matrix is set up according to described NPsim value, in wherein said color space, each Color pair answers a line of described NPsim matrix, and each element of described NPsim matrix comprises NPsim value three attribute between two kinds of color designation and described two kinds of colors;
Certainly, three attribute values of each element of described NPsim matrix also can be the NPsim values between the numbering of two kinds of colors and described two kinds of colors.
S24, by the element of a line every in described NPsim matrix, obtains orderly NPsim matrix according to described NPsim value descending order arrangement.
Wherein, the spectral information of color can adopt multi-optical spectrum imaging system or spectrometer to obtain.Such as, multi-optical spectrum imaging system is as shown in Figure 3 adopted to obtain the spectral information of all colors in color space in the present embodiment.
First place the known standard color card sample of some spectral reflectance R respectively in the left side of optical filter, obtain the corresponding g of digital signal of one group of digital camera; Then formula Q=gR is utilized +obtain the transition matrix Q of this multi-optical spectrum imaging system.During use, will the color colour atla obtaining spectral information be needed to be placed on the left of optical filter, adopt multi-optical spectrum imaging system to obtain the digital signal response g' of often kind of color, according to formula R'=Q +g' just can obtain the spectral reflectance R' of this color.Wherein, R +and Q +represent the generalized inverse (pseudoinverse) of R and Q respectively.
Described spectral information is the vector that color is formed in different wave length place spectral reflectance, and such as, in the color space comprising M kind color, each color is expressed as at the spectral information at n wavelength place:
S i={S i1,S i2,…,S ij,…,S in},i=1,2,…,M,j=1,2,…,n
Wherein, S ifor the spectral information of i-th kind of color in described color space, S ijfor the spectral reflectance of i-th kind of color at a jth wavelength place in described color space.
After getting the spectral information of each color in color space, calculate the NPsim value of the spectral information in each color and color space between whole color respectively, the following formulae discovery of concrete employing:
NPsim ( S p , S q ) = Σ j = 1 n 1 n · δ ( S pj , S qj ) · ( 1 - | S pj , S qj | m j - n j ) · E ( S p , S q ) n
Wherein, S pfor the spectral information of p kind color in described color space, S qfor the spectral information of q kind color in described color space; S pjand S qjbe respectively S pand S qin the value of jth dimension; δ (S pj, S qj) be discriminant function, work as S pjand S qjbe in same interval [n j, m j] time, δ (S pj, S qj)=1, calculates S pand S qin the similarity of jth dimension, otherwise δ (S pj, S qj)=0, thinks S pand S qexcessive in the difference of jth dimension, jth dimension is noise dimension or sparse dimension, will not calculate S pand S qin the similarity of jth dimension; m jand n js pjand S qjjointly be subordinate to interval end points; E (S p, S q) be S pand S qbe in the number of dimensions between same zone.
For the ease of the search of follow-up neighbour's color, improve traversal efficiency, can also be numbered the color in described color space further, and the line number in the numbering of described color i.e. corresponding described orderly NPsim matrix.Set up the mapping relations one by one between line number in color designation and described orderly NPsim matrix.Build Matrix C olNameToNum, scale is M × 2 for this reason.Wherein, the effect of ColNameToNum is the line number being determined the described orderly NPsim matrix that this Color pair is answered by color designation, and this matrix the 1st row are the color designation according to lexicographic order arrangement, and the 2nd row are corresponding line numbers.
Accordingly, if three attribute values of each element of described orderly NPsim matrix are the NPsim values between the numbering of two kinds of colors and described two kinds of colors, build matrix N umToColName so further, scale is M × 2.Wherein, the effect of NumToColName is by color code determination color designation, and this matrix the 1st row are according to tactic color code from small to large, and the 2nd row are corresponding color designation.
Illustrated by following about the validity of NPsim in Similarity measures:
First, the normrnd () function of Matlab is adopted to generate three kinds of different distributions categorical data: independent same distribution IID, the relevant same Uniform that distributes, dependent with distributing DID.Every type respectively generates 1000 data according to dimension 10,30,50,100,150,200,250,300,350,400.Then, adopt manhatton distance, Euclidean distance respectively, similarity that Hsim, Gsim, Esim, Psim and NPsim calculate all data under different dimensions, and use D maxn, D minn, D avgnrepresent maximum, minimum, the average similarity of data at n-dimensional space respectively.Finally, according to the relative mistake of adjacent and arest neighbors farthest under the same dimension of following formulae discovery:
v = D max n - D min n D avgn
According to Similarity Measure result feature, above-mentioned computing method are divided into two classes.The first kind comprises manhatton distance, Euclidean distance, Hsim, Gsim, Esim; Equations of The Second Kind comprises Psim and NPsim.
Wherein, as shown in Figure 4, Fig. 4 a is the result of first kind method to the relative mistake result of independent same distribution IID data, and Fig. 4 b is the result of Equations of The Second Kind method; As shown in Figure 5, Fig. 5 a is the result of first kind method to the relevant relative mistake result with distribution Uniform data, and Fig. 5 b is the result of Equations of The Second Kind method; As shown in Figure 6, Fig. 6 a is the result of first kind method to the relative mistake result of dependent same distribution DID data, and Fig. 6 b is the result of Equations of The Second Kind method.
Can find out, Equations of The Second Kind method will exceed two to three orders of magnitude than the relative mistake of first kind method, so the performance of Equations of The Second Kind method is far superior to first kind method.
The effect of Equations of The Second Kind method can be compared by similarity codomain.Adopt Psim and NPsim respectively, under calculating different dimensions, dependent is with the similarity of distribution DID data, and as shown in Figure 7, wherein Fig. 7 a is the result of Psim for its maximal value, minimum value and mean value, and Fig. 7 b is the result of NPsim.Can find out, the codomain of Psim increases along with dimension n and increases, and is unfavorable for comparing the similarity of data under different dimensions; And the codomain of NPsim is [0,1], not by the impact of dimension n.
Under different dimensions, the number of Psim similarity more than 1 is as shown in table 1.Under each dimension, amount to and generate 1,000,*10,00=,100 ten thousand similaritys, adopt Psim method to have the result of 6% ~ 15% more than 1, cause the similarity under different dimensions not have comparability.But, adopt NPsim method but to there is not this problem, the similarity of data under different dimensions can be compared.
Table 1 under different dimensions, the number of Psim (X, Y) method similarity more than 1
Dimension 10 30 50 100 150 200 250 300 350 400
Number 159192 131236 112364 11456 97624 105570 74285 84341 50898 63114
Illustrate that the present embodiment adopts NPsim matrix to carry out the validity of neighbour's color search below by way of Meng Saier full gloss colour system.Meng Saier full gloss colour system comprises 1600 kinds of colors, and color naming form is that HV/C, H, V and C represent tone, brightness and saturation degree respectively.The spectroscopic data of all colours is from spectral color research centre (http://www.uef.fi/fi/spectral/home), measuring equipment is Perkin-Elmer Lambda 18UV/VIS spectrometer, measurement range is 380-780nm, and measuring step-length is 1nm.Therefore, test data set comprises 1600 spectrum, every bar spectrum to be all length be 401 vector.
By adopting the present embodiment method, testing based on neighbour's color searching method of KD tree and SR tree, and compare in speed and precision two.Experimental situation is as follows: processor A MD Athlon (tm) II X2250Processor 3.01GHz, internal memory 2G, operating system Windows XP SP3, development environment VS 2008, do not adopt parallel accelerate measure.
About precision: carry out neighbor search from Meng Saier colour system Stochastic choice color, compare the accuracy of three kinds of methods.For 5BG3/2, make K=6, the k nearest neighbor color that three kinds of algorithms obtain, as shown in table 2, table 3, table 4, in order to more its heterochromia of Objective measurement, also calculates this color and its k nearest neighbor color distance (RGB component difference absolute value sum) at rgb space.As can be seen from Meng Saier distance angle, the nearest neighbor distance obtained based on neighbour's color searching algorithm of NPsim matrix is less than other two kinds of methods, and (relative rank of nearest neighbor distance in neighbour's sequence is different from the relative rank of its sequence number to there is phenomenon of reverse order, i.e. certain neighbour forerunner in neighbour's sequence, neighbour itself, neighbour follow-up to inquiry color distance meet increases progressively relation) neighbour's color number also corresponding less, the backward neighbour of table 2 has 2 (10BG3/2 and 5BG3/1), the backward neighbour of table 3 has 4 (10BG3/2, 2.5BG3/2, 5B3/4 and 5G3/4), the backward neighbour of table 4 has 4 (10BG3/2, 2.5BG3/2, 7.5BG4/6 and 10G3/2).
Table 2 is based on neighbour's color searching algorithm result of NPsim matrix
Neighbour's color searching algorithm result that table 3 is set based on KD
Neighbour's color searching algorithm result that table 4 is set based on SR
About speed: select 1000 kinds of colors from color space, adopt 3 kinds of methods to carry out the search of neighbour's color under different K values, average performance times as shown in Figure 8.Can find out, based on neighbour's color searching algorithm response time order of magnitude of NPsim matrix 10 -6left and right, and the order of magnitude of other two kinds of method response times is 10 -2left and right, the speed of namely carrying out the search of neighbour's color by NPsim matrix is about 10,000 times of other two kinds of methods.
A kind of neighbour's color searching method based on NPsim matrix that the present embodiment provides, color is represented by adopting spectral information, the color character of color itself can be reflected, and set up one-to-one relationship between color, avoid the uncertainty that " metamerism " phenomenon causes; Meanwhile, adopt NPsim to calculate the similarity of color space color data, Sparse, isometry etc. " dimension disaster " impact on Similarity measures can be reduced, improve the precision of Similarity measures, and then improve the accuracy of neighbour's color search; Further by orderly NPsim matrix organization color space color data, accurately can represent the far and near position relationship between color, K neighbour's color of given color once can be determined by directly accessing orderly NPsim matrix, and need traversal index tree K time based on neighbour's color searcher rule of index tree in prior art, increase substantially the efficiency of neighbour's color search.
On the other hand, as shown in Figure 9, the present embodiment also provides a kind of neighbour's color searcher based on NPsim matrix, comprising:
Acquisition module 101, for obtaining the color ColName needing to search for neighbour's color 0;
Choose module 102, for the quantity K according to the orderly NPsim matrix set up in advance and preset search neighbour color, choose in described orderly NPsim matrix with described color ColName 0front K element of corresponding row;
Determination module 103, for determining described color ColName according to described K the element chosen 0neighbour color ColName t, wherein t=1,2 ..., K.
Further, described device also comprises structure module, builds orderly NPsim matrix for adopting the NPsim value in color space between any two kinds of color spectrum information vectors.
Further, build module specifically for:
Obtain the spectral information of all colours in color space;
For each color in described color space, calculate the NPsim value of spectral information between whole color in this color and described color space;
NPsim matrix is set up according to described NPsim value, in wherein said color space, each Color pair answers a line of described NPsim matrix, and each element of described NPsim matrix comprises NPsim value three attribute between two kinds of color designation and described two kinds of colors;
By the element of a line every in described NPsim matrix, obtain orderly NPsim matrix according to described NPsim value descending order arrangement.
Further, in described structure module, spectral information adopts following formula to represent:
S i={S i1,S i2,…,S ij,…,S in},i=1,2,…,M,j=1,2,…,n
Wherein, S ifor the spectral information of i-th kind of color in described color space, S ijfor the spectral reflectance of i-th kind of color at a jth wavelength place in described color space.
Further, described structure module further also for, adopt NPsim value described in following formulae discovery:
NPsim ( S p , S q ) = Σ j = 1 n 1 n · δ ( S pj , S qj ) · ( 1 - | S pj , S qj | m j - n j ) · E ( S p , S q ) n
Wherein, S pfor the spectral information of p kind color in described color space, S qfor the spectral information of q kind color in described color space; S pjand S qjbe respectively S pand S qin the value of jth dimension; δ (S pj, S qj) be discriminant function, work as S pjand S qjbe in same interval [n j, m j] time, δ (S pj, S qj)=1, otherwise, δ (S pj, S qj)=0; m jand n js pjand S qjjointly be subordinate to interval end points; E (S p, S q) be S pand S qbe in the number of dimensions between same zone.
A kind of neighbour's color searcher based on NPsim matrix that the present embodiment provides, color is represented by adopting spectral information, the color character of color itself can be reflected, and set up one-to-one relationship between color, avoid the uncertainty that " metamerism " phenomenon causes; Meanwhile, adopt NPsim to calculate the similarity of color space color data, Sparse, isometry etc. " dimension disaster " impact on Similarity measures can be reduced, improve the precision of Similarity measures, and then improve the accuracy of neighbour's color search; Further by orderly NPsim matrix organization color space color data, accurately can represent the far and near position relationship between color, K neighbour's color of given color once can be determined by directly accessing orderly NPsim matrix, and need traversal index tree K time based on neighbour's color searcher rule of index tree in prior art, increase substantially the efficiency of neighbour's color search.
Although describe embodiments of the present invention by reference to the accompanying drawings, but those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, such amendment and modification all fall into by within claims limited range.

Claims (10)

1., based on neighbour's color searching method of NPsim matrix, it is characterized in that, described method comprises:
Obtain the color ColName needing to search for neighbour's color 0;
According to the quantity K of the orderly NPsim matrix set up in advance and preset search neighbour color, choose in described orderly NPsim matrix with described color ColName 0front K element of corresponding row;
According to described K the element chosen, determine described color ColName 0neighbour color ColName t, wherein t=1,2 ..., K.
2. method according to claim 1, is characterized in that, the quantity K of the orderly NPsim matrix that described basis is set up in advance and preset search neighbour color, choose in described orderly NPsim matrix with described color ColName 0before the step of front K element of corresponding row, also comprise:
The NPsim value in color space between any two kinds of color spectrum information vectors is adopted to build orderly NPsim matrix.
3. method according to claim 2, is characterized in that, the NPsim value in described employing color space between any two kinds of color spectrum information vectors builds the step of orderly NPsim matrix, comprising:
Obtain the spectral information of all colours in color space;
For each color in described color space, calculate the NPsim value of spectral information between whole color in this color and described color space;
NPsim matrix is set up according to described NPsim value, in wherein said color space, each Color pair answers a line of described NPsim matrix, and each element of described NPsim matrix comprises NPsim value three attribute between two kinds of color designation and described two kinds of colors;
By the element of a line every in described NPsim matrix, obtain orderly NPsim matrix according to described NPsim value descending order arrangement.
4. method according to claim 3, is characterized in that, described spectral information adopts following formula to represent:
S i={S i1,S i2,…,S ij,…,S in},i=1,2,…,M,j=1,2,…,n
Wherein, S ifor the spectral information of i-th kind of color in described color space, S ijfor the spectral reflectance of i-th kind of color at a jth wavelength place in described color space.
5. method according to claim 4, is characterized in that, described for each color in described color space, calculates the step of the NPsim value of spectral information between whole color in this color and described color space, is specially:
Adopt NPsim value described in following formulae discovery,
NPsim ( S p , S q ) = Σ j = 1 n 1 n · δ ( S pj , S qj ) · ( 1 - | S pj - S qj | m j - n j ) · E ( S p , S q ) n
Wherein, S pfor the spectral information of p kind color in described color space, S qfor the spectral information of q kind color in described color space; S pjand S qjbe respectively S pand S qin the value of jth dimension; δ (S pj, S qj) be discriminant function, work as S pjand S qjbe in same interval [n j, m j] time, δ (S pj, S qj)=1, otherwise, δ (S pj, S qj)=0; m jand n js pjand S qjjointly be subordinate to interval end points; E (S p, S q) be S pand S qbe in the number of dimensions between same zone.
6., based on neighbour's color searcher of NPsim matrix, it is characterized in that, described device comprises:
Acquisition module, for obtaining the color ColName needing to search for neighbour's color 0;
Choose module, for the quantity K according to the orderly NPsim matrix set up in advance and preset search neighbour color, choose in described orderly NPsim matrix with described color ColName 0front K element of corresponding row;
Determination module, for according to described K the element chosen, determines described color ColName 0neighbour color ColName t, wherein t=1,2 ..., K.
7. device according to claim 6, is characterized in that, described device also comprises structure module, builds orderly NPsim matrix for adopting the NPsim value in color space between any two kinds of color spectrum information vectors.
8. device according to claim 7, is characterized in that, build module specifically for:
Obtain the spectral information of all colours in color space;
For each color in described color space, calculate the NPsim value of spectral information between whole color in this color and described color space;
NPsim matrix is set up according to described NPsim value, in wherein said color space, each Color pair answers a line of described NPsim matrix, and each element of described NPsim matrix comprises NPsim value three attribute between two kinds of color designation and described two kinds of colors;
By the element of a line every in described NPsim matrix, obtain orderly NPsim matrix according to described NPsim value descending order arrangement.
9. device according to claim 8, is characterized in that, in described structure module, spectral information adopts following formula to represent:
S i={S i1,S i2,…,S ij,…,S in},i=1,2,…,M,j=1,2,…,n
Wherein, S ifor the spectral information of i-th kind of color in described color space, S ijfor the spectral reflectance of i-th kind of color at a jth wavelength place in described color space.
10. device according to claim 9, is characterized in that, described structure module further also for, adopt NPsim value described in following formulae discovery:
NPsim ( S p , S q ) = Σ j = 1 n 1 n · δ ( S pj , S qj ) · ( 1 - | S pj - S qj | m j - n j ) · E ( S p , S q ) n
Wherein, S pfor the spectral information of p kind color in described color space, S qfor the spectral information of q kind color in described color space; S pjand S qjbe respectively S pand S qin the value of jth dimension; δ (S pj, S qj) be discriminant function, work as S pjand S qjbe in same interval [n j, m j] time, δ (S pj, S qj)=1, otherwise, δ (S pj, S qj)=0; m jand n js pjand S qjjointly be subordinate to interval end points; E (S p, S q) be S pand S qbe in the number of dimensions between same zone.
CN201510108710.0A 2015-03-12 2015-03-12 Neighbour's color searching method and device based on NPsim matrixes Active CN104679878B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510108710.0A CN104679878B (en) 2015-03-12 2015-03-12 Neighbour's color searching method and device based on NPsim matrixes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510108710.0A CN104679878B (en) 2015-03-12 2015-03-12 Neighbour's color searching method and device based on NPsim matrixes

Publications (2)

Publication Number Publication Date
CN104679878A true CN104679878A (en) 2015-06-03
CN104679878B CN104679878B (en) 2018-04-10

Family

ID=53314920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510108710.0A Active CN104679878B (en) 2015-03-12 2015-03-12 Neighbour's color searching method and device based on NPsim matrixes

Country Status (1)

Country Link
CN (1) CN104679878B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105818518A (en) * 2016-03-17 2016-08-03 江南大学 Gravure printing four-color ink color-blending method for thermal-printing technology
CN111537457A (en) * 2020-05-18 2020-08-14 云南中烟工业有限责任公司 Color difference analysis method based on ultraviolet and visible light similarity

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761237A (en) * 2013-12-04 2014-04-30 南京邮电大学 Collaborative filtering recommending method based on characteristics and credibility of users
CN104331447A (en) * 2014-10-29 2015-02-04 邱桃荣 Cloth color card image retrieval method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761237A (en) * 2013-12-04 2014-04-30 南京邮电大学 Collaborative filtering recommending method based on characteristics and credibility of users
CN104331447A (en) * 2014-10-29 2015-02-04 邱桃荣 Cloth color card image retrieval method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张阳 等: "基于近邻用户和近邻项目的协同过滤改进算法", 《沈阳大学学报(自然科学版)》 *
易莉桦: "高维数据聚类算法的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105818518A (en) * 2016-03-17 2016-08-03 江南大学 Gravure printing four-color ink color-blending method for thermal-printing technology
CN111537457A (en) * 2020-05-18 2020-08-14 云南中烟工业有限责任公司 Color difference analysis method based on ultraviolet and visible light similarity

Also Published As

Publication number Publication date
CN104679878B (en) 2018-04-10

Similar Documents

Publication Publication Date Title
CN110084212B (en) Spectral characteristic peak identification and positioning method based on improved sine and cosine algorithm
CN108520310B (en) Wind speed forecasting method of G-L mixed noise characteristic v-support vector regression machine
CN106778680A (en) A kind of hyperspectral image band selection method and device extracted based on critical bands
Chechik et al. Average distance queries through weighted samples in graphs and metric spaces: High scalability with tight statistical guarantees
CN105841723A (en) FBG sensor demodulation peak-searching method based on wavelet singularity detection
Zhang et al. MODIS NDVI time series clustering under dynamic time warping
CN105574265B (en) Entire assembly model quantitative description towards model index
CN116595208A (en) Classification method and device for hyperspectral images and electronic equipment
Walesiak et al. Selecting the optimal multidimensional scaling procedure for metric data with R environment
CN104679878A (en) NPsim matrix-based neighbour color search method and device
CN106023268A (en) Color image graying method based on two-step parameter subspace optimization
US20030187616A1 (en) Efficient near neighbor search (ENN-search) method for high dimensional data sets with noise
Frey et al. Most powerful rank tests for perfect rankings
CN106405683A (en) Wind speed forecasting method and device based on G-L mixed noise characteristic kernel ridge regression technology
CN113065037A (en) Label propagation community detection method and device based on density peak optimization
Mardare On isometric immersions of a Riemannian space with little regularity
CN105678229A (en) High spectral image retrieval method
CN116226468A (en) Service data storage management method based on gridding terminal
CN103049664A (en) Temperature interpolation method based on position classification
CN115659165A (en) Method, device, equipment and storage medium for constructing park load data sample
CN112861965B (en) Image matching method based on multi-feature cross consistency model
CN104978729A (en) Image hashing method based on data sensing
Okada et al. Multidimensional scaling of asymmetric proximities with a dominance point
Shvartsman On Lipschitz selections of affine-set valued mappings
Shen et al. Towards load balancing for LSH-based distributed similarity indexing in high-dimensional space

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant