CN109784379A - The update method and device in textile picture feature library - Google Patents

The update method and device in textile picture feature library Download PDF

Info

Publication number
CN109784379A
CN109784379A CN201811609396.4A CN201811609396A CN109784379A CN 109784379 A CN109784379 A CN 109784379A CN 201811609396 A CN201811609396 A CN 201811609396A CN 109784379 A CN109784379 A CN 109784379A
Authority
CN
China
Prior art keywords
value
sample image
vector
color
picture
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
CN201811609396.4A
Other languages
Chinese (zh)
Other versions
CN109784379B (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.)
GUANGZHOU HUAXUN NETWORK TECHNOLOGY Co Ltd
Original Assignee
GUANGZHOU HUAXUN NETWORK TECHNOLOGY Co Ltd
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 GUANGZHOU HUAXUN NETWORK TECHNOLOGY Co Ltd filed Critical GUANGZHOU HUAXUN NETWORK TECHNOLOGY Co Ltd
Priority to CN201811609396.4A priority Critical patent/CN109784379B/en
Publication of CN109784379A publication Critical patent/CN109784379A/en
Application granted granted Critical
Publication of CN109784379B publication Critical patent/CN109784379B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application involves a kind of update method in textile picture feature library, device, computer equipment and storage mediums, and wherein method includes: to obtain the textile picture that it fails to match;If the number for the textile picture that it fails to match mixes using each textile picture that it fails to match as sample image with the sample image in current textile picture feature library beyond quantity threshold is updated, obtains new samples image set;Obtain the total characteristic vector of each sample image in new samples image set;It, will be in the grouping of the new class cluster centroid feature vector of the sample image clustering in new samples image set to the second predetermined number according to total characteristic vector;According to the sample image in the grouping of each new class cluster centroid feature vector and each new class cluster centroid feature vector, the textile picture feature library of update is generated.It can be promoted while guaranteeing textile picture feature library to textile picture match success rate using this method and update efficiency.

Description

The update method and device in textile picture feature library
Technical field
This application involves technical field of image processing, more particularly to a kind of textile picture feature library update method, Device, computer equipment and storage medium.
Background technique
Textile automatic identification technology has in fields such as textile buying, textile storage transport, textile electronic commercial affairs Extensive purposes.Textile automatic identification belongs to the application of area of pattern recognition, handles and analyzes dependent on picture.With large size For textiles wholesalers market, trade company is numerous in wholesale market, and commodity are many and diverse, and travelling trader relies primarily on artificial lookup, askes when purchasing It asks and identifies, artificial searching modes inefficiency, if it is possible to realize sample looking into automatically to commodity using picture match technology It looks for, procurement efficiency will be greatlyd improve.
Traditional textile images matching process, the general textile picture feature library by establishing, will need matched The sample image stored in textile picture and textile picture feature library is matched, and matching result is obtained.However in reality In, due to the quick update iteration of businessman and textile goods, there is as time goes by that textile picture feature library is not The case where part picture effectively being identified and be matched, causes to reduce the success rate of textile picture match.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of textile picture match success rate of being able to ascend Update method, device, computer equipment and the storage medium in textile picture feature library.
A kind of update method in textile picture feature library, includes the following steps:
Obtain the textile picture that it fails to match;
If the number for the textile picture that it fails to match is beyond quantity threshold is updated, by each textile that it fails to match Picture is mixed as sample image with the sample image in current textile picture feature library, obtains new samples image set;
Obtain the total characteristic vector of each sample image in new samples image set;Wherein, total characteristic vector is complete according to color Office's feature vector, color local feature vectors and gray scale texture local feature vectors generate;
According to total characteristic vector, by the new of the sample image clustering in new samples image set to the second predetermined number In the grouping of class cluster centroid feature vector;
According to the sample in the grouping of each new class cluster centroid feature vector and each new class cluster centroid feature vector This image generates the textile picture feature library of update.
A kind of updating device in textile picture feature library, described device include:
Picture to be updated obtains module, for obtaining the textile picture that it fails to match;
New samples image set obtains module, if the number for the textile picture that it fails to match is beyond update number threshold Value, then using each textile picture that it fails to match as the sample image in sample image and current textile picture feature library Mixing, obtains new samples image set;
Total characteristic vector obtains module, for obtaining the total characteristic vector of each sample image in new samples image set;Its In, total characteristic vector is generated according to color global characteristics vector, color local feature vectors and gray scale texture local feature vectors;
New samples image clustering division module is used for according to total characteristic vector, by the sample image in new samples image set Clustering is into the grouping of the new class cluster centroid feature vector of the second predetermined number;
Textile picture feature library update module, for according to each new class cluster centroid feature vector and each new Sample image in the grouping of class cluster centroid feature vector generates the textile picture feature library of update.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing Device performs the steps of when executing the computer program
Obtain the textile picture that it fails to match;If the number for the textile picture that it fails to match is beyond update number threshold Value, then using each textile picture that it fails to match as the sample image in sample image and current textile picture feature library Mixing, obtains new samples image set;Obtain the total characteristic vector of each sample image in new samples image set;Wherein, total characteristic Vector is generated according to color global characteristics vector, color local feature vectors and gray scale texture local feature vectors;According to total spy Vector is levied, by the new class cluster centroid feature vector of the sample image clustering in new samples image set to the second predetermined number Grouping in;According to the sample in the grouping of each new class cluster centroid feature vector and each new class cluster centroid feature vector This image generates the textile picture feature library of update.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
Obtain the textile picture that it fails to match;If the number for the textile picture that it fails to match is beyond update number threshold Value, then using each textile picture that it fails to match as the sample image in sample image and current textile picture feature library Mixing, obtains new samples image set;Obtain the total characteristic vector of each sample image in new samples image set;Wherein, total characteristic Vector is generated according to color global characteristics vector, color local feature vectors and gray scale texture local feature vectors;According to total spy Vector is levied, by the new class cluster centroid feature vector of the sample image clustering in new samples image set to the second predetermined number Grouping in;According to the sample in the grouping of each new class cluster centroid feature vector and each new class cluster centroid feature vector This image generates the textile picture feature library of update.
Update method, device, computer equipment and the storage medium in above-mentioned textile picture feature library, by textile picture The textile picture that it fails to match in matching process, as sample image to be updated, in the record textile that it fails to match When the number of picture is beyond quantity threshold is updated, the textile picture that it fails to match is added in former textile picture feature library Mixing, and carry out primary fully textile picture feature library and rebuild, guaranteeing textile picture feature library to textile picture The number for reducing the update operation in textile picture feature library while successful match rate to the greatest extent, is promoted and updates efficiency.
Detailed description of the invention
Fig. 1 is the applied environment figure of the update method in textile picture feature library in one embodiment;
Fig. 2 is the flow diagram of the update method in textile picture feature library in one embodiment;
Fig. 3 is the flow diagram of sample image clustering step in one embodiment;
Fig. 4 is flow diagram the step of establishing textile picture feature library in one embodiment;
Fig. 5 is that segmentation obtains the schematic diagram of textile sample image unit in one embodiment;
The flow diagram for the step of Fig. 6 is textile picture match in one embodiment;
Fig. 7 is the structural block diagram of the updating device in textile picture feature library in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
The update method in textile picture feature provided by the present application library, can be applied to application environment as shown in Figure 1 In.Wherein, terminal 102 is communicated by network with server 104.Server 104 is established textile picture feature library and is deposited It is stored in server 104, server 104 also executes the update method in the textile picture feature library of the application any embodiment Step is updated the textile picture feature library of storage.Terminal 102 sends matching request to server 104, matching request The middle information for carrying textile picture to be matched, server 104 obtain textile picture to be matched according to matching request, will The textile picture of acquisition is matched with the sample image in textile picture feature library currently stored in server 104, The matching result of textile picture is obtained, and returns to matching result to terminal 102.Wherein, terminal 102 can be, but not limited to be each Kind personal computer, laptop, smart phone, tablet computer and portable wearable device, server 104 can be with solely The server clusters of the either multiple servers compositions of vertical server is realized.
In one embodiment, as shown in Fig. 2, a kind of update method in textile picture feature library is provided, with the party Method is applied to be illustrated for the server in Fig. 1, comprising the following steps:
S202 obtains the textile picture that it fails to match;
In the embodiment of the present application, it in the case where having had built up textile picture feature library in the server, is servicing When device receives the matching request of terminal, by the sample in the textile picture obtained in matching request and textile picture feature library This image is matched.And in the matching process of textile picture, in fact it could happen that certain textile picture is special in textile picture It can not find matched sample image in sign library, this textile picture is the textile picture that it fails to match.
It in practical applications, can be by the weaving in the textile picture match failure that server each time receives Product picture is included in textile picture match failure record table.In this step, the spinning that server can be stored from server Fabric picture match failure record table reads one or more textile pictures that it fails to match of record, then gets spinning The number for the textile picture that it fails to match is recorded in fabric picture match failure record table.
S204, if the number of the textile picture that it fails to match, beyond updating quantity threshold, it fails to match by each Textile picture is mixed as sample image with the sample image in current textile picture feature library, obtains new samples image Collection;
Wherein, updating quantity threshold can be set according to actual needs, and the suitable quantity threshold that updates, which is arranged, to be limited The renewal frequency in textile picture feature library avoids server operation caused by the excessively frequent updating of textile picture feature library from providing The occupancy and consuming in source.
In this step, if the number that server reads the textile picture that it fails to match in step S202 exceeds Update quantity threshold, all textiles that it fails to match that server will record in current textile picture match failure record table Picture is mixed as sample image to be updated with existing sample image in current textile picture feature library, forms new samples Image set realizes that the update to textile picture feature library is grasped to generate new textile picture feature library for subsequent reconstruction Make.
In addition, in this step that each textile picture that it fails to match is special as sample image and current textile picture Sample image in sign library is mixed to get after new samples image set, and server can empty textile picture match failure record The textile picture that it fails to match is recorded in table, or can be marked to the textile picture that it fails to match has been updated Note, to avoid repeating to update the bring wasting of resources.
S206 obtains the total characteristic vector of each sample image in new samples image set;Wherein, total characteristic vector is according to face Color global characteristics vector, color local feature vectors and gray scale texture local feature vectors generate;
In new samples image set, a part of sample image is the sample in the textile picture feature library currently not yet updated This image has been computed these sample images in textile picture feature library foundation or upper primary renewal process Total characteristic vector;Another part sample image is the textile picture that it fails to match, this part sample image is in the matching process Also it has been computed the total characteristic vector of this part sample image.Therefore, each sample image has been in new samples image set Associated record has corresponding total characteristic vector.
In this step, server can be directly from reading each sample image in new samples image set in server Total characteristic vector.
S208, according to the total characteristic vector of sample image each in new samples image set, by the sample in new samples image set This image clustering is divided in the grouping of new class cluster centroid feature vector of the second predetermined number;
Wherein, the second predetermined number of class cluster centroid feature vector can be arranged according to the actual situation, in new samples image In the case where concentrating sample image sum to determine, second predetermined number setting is fewer, and packet count is fewer, then in textile picture It is more that matched sample image is participated in being individually grouped when matching, will lead to the increase of later period matching operation amount;And conversely, this second Predetermined number setting is more, and packet counts are more, then in textile picture match, determine that grouping belonging to textile picture needs to spend Take more operation time, and it is higher that the fewer probability that it fails to match of matched sample image is participated in single grouping, therefore needs The number of packet of suitable new class cluster centroid feature vector is set.
In this step, server can determine suitable new class according to the sum of sample image in new samples image set Second predetermined number of the grouping of cluster centroid feature vector.Then according to the color global characteristics vector of each sample image, face Euclidean distance between color local feature vectors and gray scale texture local feature vectors and each class cluster centroid feature vector, by sample This image clustering is divided in the grouping of new class cluster centroid feature vector of second predetermined number.
S210, according in the grouping of each new class cluster centroid feature vector and each new class cluster centroid feature vector Sample image, generate the textile picture feature library of update.
In step S208 by the new class cluster centroid feature vector of sample image clustering to the second predetermined number Grouping in the case where, in this step, the textile picture feature library of update can be generated in server, generate update Each new class cluster centroid feature vector and each new class cluster centroid feature vector are recorded in textile picture feature library The relevant information of sample image in grouping.
The update method in above-mentioned textile picture feature library, by the textile that it fails to match during textile picture match Picture exceeds in the number of the record textile picture that it fails to match as sample image to be updated and updates quantity threshold When, the textile picture that it fails to match is added in former textile picture feature library and is mixed, and once fully weave Product picture feature library is rebuild, when rebuilding textile picture feature library, acquire respectively the color global characteristics of sample image to Amount, color local feature vectors and gray scale texture local feature vectors, the feature combined by global characteristics with local feature It extracts, can guarantee that similar textile picture can be identified to the maximum extent and improve the success of textile picture match Rate.Textile picture feature library is reduced to the greatest extent while guaranteeing textile picture feature library to textile picture match success rate Update operation number, promoted update efficiency.
In one embodiment, as shown in figure 3, S208 according to the total characteristic of sample image each in new samples image set to Amount, by point of the new class cluster centroid feature vector of the sample image clustering in new samples image set to the second predetermined number In group, comprising:
S301 chooses the total characteristic vector of the sample image of the second predetermined number as initial from new samples image set Class cluster centroid feature vector;Wherein, total characteristic vector is according to color global characteristics vector, color local feature vectors and gray scale line Local feature vectors are managed to generate;
Before this step S301, need first to be arranged the basic parameter of clustering, such as class cluster centroid feature vector Second predetermined number k '.The total characteristic vector of each sample image in the new samples image set obtained in S206, wherein newly Sample graph image set can be expressed as L '={ L1、L2、…、Li、…、Lz, LiI-th of sample image in new samples image set is represented, The wherein total characteristic vector of each sample imageM is the size of total characteristic vector, is 409;Class cluster matter Second predetermined number k of heart feature vector can be determined according to the sum of sample image, typically, since feature quantity (global, local1, local2 characteristic summation) has reached 409, therefore wraps in the grouping of each class cluster centroid feature vector The sample image quantity contained is typically no less than 409, as illustratively, can use k '=sum (Li)/1000 set k ' value (sum(Li) indicate new samples image set in sample image sum).
As illustratively, in this step, the total characteristic vector S of a sample image of k ' can be randomly selectedj(j=1, 2 ... k ') it is used as initial classes cluster centroid feature vector.
S302 calculates the total characteristic vector of each sample image in new samples image set to initial classes cluster centroid feature vector Between Euclidean distance;
As illustratively, in this step, each sample image is calculated separately in new samples image set to a class cluster of this k ' The distance of centroid feature vector, distance are calculated using Euclidean distance:
Above in formula, LiIndicate i-th of sample image, SjIndicate j-th of class cluster centroid feature vector,It indicates i-th T-th of characteristic value of sample image,Indicate t-th of characteristic value of j-th of class cluster centroid feature vector.
S303 sample image each in new samples image set is respectively divided minimum to the Euclidean distance with the sample image Initial classes cluster centroid feature vector grouping in;
As illustratively, in this step, if sample image is from class cluster centroid feature vector SiRecently, then this sample This image belongs to SiPoint group can be divided into such cluster centroid feature vector SiGrouping in;If arriving multiple class cluster centroid features Vector is equidistant, then can be divided into the grouping of any class cluster centroid feature vector:
label(Li)=arg min1≤j≤k{dist(Li, Sj)};
S304 calculates the total characteristic vector mean value of the sample image in the grouping of each initial classes cluster centroid feature vector;
As illustratively, in this step, after having divided group to all sample images by distance, calculate in each grouping (fairly simple method is exactly that the characteristic value of sample image each dimension is asked to be averaged to the mean value of the total characteristic vector of sample image Value), as new class cluster centroid feature vector:
Above in formula,Indicate j-th of new class cluster centroid feature vector, NjJ-th of class cluster mass center belonging to indicating The quantity of the sample image of feature vector, li∈C(Sj) indicate the sample image for belonging to j-th of class cluster centroid feature vector.
S305 judges whether that the total characteristic vector of the sample image in the grouping of all initial classes cluster centroid feature vectors is equal Euclidean distance between value and the initial classes cluster centroid feature vector is respectively less than distance threshold;
Wherein, distance threshold δ can be arranged according to the actual situation, and the smaller cluster calculation amount of δ value is bigger.
If S305 judging result be it is yes, then follow the steps S307;
If S305 judging result be it is no, then follow the steps S306, will be in the grouping of each initial classes cluster centroid feature vector Total characteristic vector mean value respectively as update initial classes cluster centroid feature vector;It is returned to step after executing step S306 S302;
S307 obtains the sample in the grouping of current initial classes cluster centroid feature vector sum initial classes cluster centroid feature vector This image, the sample in the grouping of the class cluster centroid feature vector new as the new class cluster centroid feature vector sum of clustering Image.
The technical solution of above-described embodiment is carried out more on the basis of server existing textile picture feature library Newly, and in the initial stage, need first to establish textile picture feature library.In one embodiment, as shown in figure 4, the present embodiment The update method in textile picture feature library further include the steps that establishing textile picture feature library, specifically include:
S402 obtains the sample image of default classification number;
Wherein, sample image is the textile sample image for representing a type of textiles;In practical applications, may be used To determine the sample image for needing to be included in textile picture feature library according to different textile models, different businessmans etc., Such as a kind of textile of model for a certain businessman, one or more sample images can be set, can to the businessman and The initial woven product sample image that the textile of model is sampled, then definitely pre- place is carried out to initial woven product sample image Reason obtains sample image.
Wherein, initial woven product sample image can be acquired by way of manually shooting, later by the initial spinning of acquisition It is recorded in fabric sample image typing server.In this step, initial woven product sample image of the server to acquisition It is pre-processed to obtain the sample image of default classification number.
S404 obtains gray value, hsv color spatial value and the coordinate value of pixel in sample image;
Wherein, sample image can be the image with default resolution ratio, and the image is by presetting the picture element matrix of resolution ratio Composition, each of picture element matrix pixel includes multiple channel values of a certain color space, which can be Such as RGB color (including tri- red R, green G and blue B channel values), YUV color space (including brightness Y, coloration U With tri- channel values of coloration V, coloration U and coloration V indicate saturation degree and coloration jointly), hsv color space it is (including tone H, full With degree tri- channel values of S and brightness V) etc..
Wherein, gray value can be calculated according to the channel value of color space.
Wherein, hsv color spatial value can have different acquisition modes.If sample image is hsv color space representation, Hsv color spatial value directly can be read from sample image, and if sample image is indicated with other color spaces, can be with Hsv color spatial value is obtained by color space conversion.
Wherein, coordinate value indicates the information of the relative position of pixel in the picture, can there is different specific manifestation sides Formula, such as the coordinate of some pixel p in sample image can be denoted as (x, y), wherein x is columns, and y is line number.
In this step, server can be handled the sample image of acquisition, according to the color space of sample image Channel value, calculate obtain sample image in each pixel gray value, hsv color spatial value and coordinate value.
S406, according to gray value, hsv color spatial value and coordinate value, calculate sample image color global characteristics vector, Color local feature vectors and gray scale texture local feature vectors;
In this step, the color global characteristics vector of sample image can be according to the hsv color of pixel in sample image Spatial value is calculated, and the color local feature vectors of sample image can be according to the hsv color space of pixel in sample image Value and coordinate value are calculated, and the gray scale texture local feature vectors of sample image then can be according to pixel in sample image Gray value is calculated.
S408, according to the color global characteristics vector of each sample image, color local feature vectors and gray scale texture office Portion's feature vector, will be in the grouping of the class cluster centroid feature vector of sample image clustering to the first predetermined number;
Wherein, the first predetermined number of class cluster centroid feature vector can be arranged according to the actual situation, total in sample image In the case that number determines, first predetermined number setting is fewer, and packet count is fewer, then is individually grouped in textile picture match The middle matched sample image of participation is more, will lead to the increase of later period matching operation amount;And conversely, first predetermined number setting is got over More packet counts are more, then in textile picture match, when determining that grouping belonging to textile picture needs to spend more operation Between, and it is higher in single grouping to participate in the fewer probability that it fails to match of matched sample image, it is therefore desirable to suitable class is set The number of packet of cluster centroid feature vector.
In this step, server can determine point of suitable class cluster centroid feature vector according to the sum of sample image First predetermined number of group.Then according to color global characteristics vector, color local feature vectors and the ash of each sample image The Euclidean distance between texture local feature vectors and each class cluster centroid feature vector is spent, sample image clustering extremely should In the grouping of the class cluster centroid feature vector of first predetermined number.
S410, according to the sample graph in the grouping of each class cluster centroid feature vector and each class cluster centroid feature vector Picture generates textile picture feature library.
In step S208 by point of the class cluster centroid feature vector of sample image clustering to the first predetermined number In the case where in group, in this step, textile picture feature library is can be generated in server, in the textile picture feature of generation The correlation of the sample image in the grouping of each class cluster centroid feature vector and each class cluster centroid feature vector is recorded in library Information.
In the present embodiment, when establishing textile picture feature library, the color global characteristics of sample image are acquired respectively Vector, color local feature vectors and gray scale texture local feature vectors, the spy combined by global characteristics with local feature Sign is extracted, and can be guaranteed that similar textile picture can be identified to the maximum extent and be improved the success of textile picture match Rate.The dimension of global characteristics and local feature is lowered, and reduces calculation amount.Pass through the sample image in textile picture feature library Clustering operation, by similar sample image Clustering, ginseng can be reduced when carrying out textile picture match in this way The matching of textile picture is promoted to reduce operand under the premise of guaranteeing matching accuracy with matched sample size Efficiency.
In one embodiment, S402 obtains the sample image of default classification number, comprising: obtains the initial of default classification number Textile sample image;The textile sample image list of default resolution ratio is partitioned into from each initial woven product sample image Member, by the setting contrast of textile sample image unit to default contrast value, the textile sample image list that is adjusted Member;Using the textile sample image unit of adjustment as sample image.
As illustratively, server, can be according to matching after the initial woven product samples pictures for receiving terminal transmission It needs, initial woven product picture is processed into the original textile sample image of default resolution ratio.
For example, as shown in figure 5, by taking default resolution ratio is 512 × 512 as an example, the initial woven product sample graph of terminal acquisition As needing not less than 512 × 512 pixels, server, will be initial after the initial woven product sample image for having received terminal acquisition Textile sample image is uniformly adjusted to 512 × 512 pixels.Specifically, if point of the initial woven product sample image of acquisition Resolution is bigger than 512 × 512, then can be cut out 512 × 512 since such as upper left corner of initial woven product sample image region Textile sample image unit of the subgraph of pixel as segmentation.
Later, the brightness and contrast of the adjustable textile sample image unit of server, so that weaving adjusted The image parameter of the image parameter of product sample image unit is consistent, for use in the matching of textile images.
Wherein, contrast variation is also referred to as contrast enhancing or histogram transformation or contrast enhancing (stretching), is a kind of Change the contrasts of image picture elements by changing the brightness value of pixel, so as to improve the image processing method of picture quality, with For textile sample image unit is indicated with RGB color, the range of the value in tri- channels R, G, B is [0,255], then may be used To calculate the color value of each pixel of textile sample image unit adjusted using following formula:
R'=r+ (r-127) × 2, g '=g+ (g-127) × 2, b'=b+ (b-127) × 2;
Wherein, r ', g ', b ' are r, g, b value adjusted.For any one in r ', g ', b ', if passing through above formula The result of calculating exceeds [0,255] range, then if r ', g ', b ' calculated result are greater than 255, takes 255;If r ', g ', b ' Calculated result then takes 0 less than 0.
After having adjusted the color value of each pixel of textile sample image unit, server can be by adjustment Textile sample image unit is as sample image.
In one embodiment, the color global characteristics vector of calculating sample image includes: in S406
It calculates separately in the hsv color spatial value of pixel in sample image, the mean value of H channel value, the mean value of channel S value, V The mean value of channel value, the variance of H channel value, the variance of channel S value, the variance of V channel value, the third moment of H channel value, channel S The third moment of value and the third moment of V channel value;It is logical according to the mean value of H channel value, the mean value of channel S value, the mean value of V channel value, H The variance of road value, the variance of channel S value, the variance of V channel value, the third moment of H channel value, the third moment of channel S value and the channel V The third moment of value generates the color global characteristics vector of sample image.
As illustratively, the mean μ of H channel valueh, channel S value mean μs, V channel value mean μv, H channel value side Poor σh, channel S value variances sigmas, V channel value variances sigmav, H channel value third moment τh, channel S value third moment τsWith the channel V The third moment τ of valuevIt can be calculated respectively by following formula:
Wherein, hi、si、viRespectively represent the H channel value, channel S value, V channel value of ith pixel in sample image, n generation The sum of all pixels of table sample image, if the resolution ratio of sample image is 512 × 512, n=262144.After calculating, obtain To 9 global characteristics value μ of this imageh、μs、μv、σh、σs、σv、τh、τs、τv.It is global special to generate the color comprising 9 characteristic values Levy vector global:
Global=(μh, μs, μv, σh, σs, σv, τh, τs, τv)。
In the present embodiment, the sample image mean value of each channel value, variance and three in hsv color spatial value are extracted respectively Rank square generates color global characteristics vector, can reflect the global color feature of entire sample image.
In one embodiment, the color local feature vectors of calculating sample image include: in S406
H channel value, channel S value and V channel value dimensionality reduction in the hsv color spatial value of pixel each in sample image is raw At single dimension color value;Single dimension color value is quantified as the color grade value of third predetermined number color grade;According to sample Pixel distance value between pixel each in sample image and other pixels is quantified as by the coordinate value of each pixel in image The pixel distance grade point of four predetermined number distance level scales;According to the color grade value of pixel each in sample image and pixel away from From grade point, the two-dimensional matrix comprising third predetermined number multiplied by the element of the 4th predetermined number is generated;Wherein, in two-dimensional matrix The value of each element represent color grade value under a color grade and distance level scale and pixel distance grade point Quantity;Two-dimensional matrix is unfolded, obtains the color local feature vectors of sample image.
As illustratively, hsv color spatial value can be quantized into multiple grades first, it is big to reduce feature space Small, the number of degrees of each channel value quantization can determine according to actual needs.H channel value is quantified as 8 grades, channel S value amount 3 grades are turned to, V channel value is quantified as 4 grades, hsv color spatial value can be quantified as follows:
Wherein, h represents the H channel value before quantization, the channel S value before behalf quantization, and v represents the V channel value before quantization, hnewH channel value after representing quantization, snewChannel S value after representing quantization, vnewV channel value after representing quantization.
The single dimension color value hsv that dimensionality reduction degree synthesizes a dimension is carried out to tri- channel values of H, S, V after quantization, such as Shown in following formula:
Hsv=12hnew+4snew+vnew
Wherein, [0,1 ..., 95] hsv ∈.
A feature vector Local can be generated with quantizing pixel point distance for 4 grades [0,1,2,3]1, Local1Size It is 4 × 96, that is, includes 384 features, calculation method is as follows:
By taking sample image resolution ratio is 512 × 512 as an example, the image pixel coordinates of 512 × 512 pixels can be quantified as 4 grades, facilitate calculating distance, such as the coordinate of some pixel p is (x, y) x, y ∈ [0,511], then new coordinate (x ', Y ') are as follows:
It is being the single channel of 96 grades by image hsv color space quantization, and pixel coordinate is quantified as 4 etc. After grade, as illustratively, the calculating of color local feature vectors local1 can pass through following Implementation of pseudocode:
The size of two-dimensional array Local1 is 4 × 96, and initializing all array elements is 0;
After calculating, by counted Local1 array be unfolded, formed comprising 384 characteristic values color local feature to Local1 is measured, this 384 characteristic values actually represent the color autocorrelation of sample image.
In one embodiment, the gray scale texture local feature vectors of calculating sample image include: in S406
Obtain the different convolution mask matrixes of the 5th predetermined number;Using each convolution mask matrix, respectively with sample The gray scale value matrix of the gray value composition of each pixel carries out convolutional calculation and obtains the convolution value of each pixel in image;According to each The convolution value of each pixel, generates the corresponding convolution of each convolution mask matrix in the sample image that a convolution mask matrix calculates Image;For each convolved image, the mean value and variance of the gray value of pixel in the convolved image are calculated separately;According to the 5th The mean value and variance of the gray value of the convolved image of predetermined number generate the gray scale texture local feature vectors of sample image.
As illustratively, gray scale texture local feature vectors can be calculated by the gray value of sample image, specifically It may include steps of:
Convolution algorithm, the following institute of 8 convolution mask matrixes are carried out to image using preset 8 convolution mask matrixes first Show:
For each convolution mask matrix, the gray value of sample image is subjected to convolution algorithm with it, generates trellis diagram Picture.Wherein, convolution algorithm is considered as the process of weighted sum, make each pixel in the image-region of sample image respectively with Each element of convolution kernel (weight matrix) is corresponding to be multiplied, new value of all sum of products as regional center pixel.The volume of generation Product image size is consistent with the resolution ratio of sample image, such as sample image resolution ratio is 512 × 512, then the trellis diagram generated The resolution ratio of picture is also 512 × 512.Each sample image can be generated 8 convolved image AM1, AM2, AM3, AM4, AM5, AM6、AM7、AM8。
For each convolved image, useCalculate the trellis diagram As whole mean value and variance, wherein n represents total number of pixels in convolved image, grayiRepresent i-th of picture in convolved image The gray value of element.8 convolved images of each final sample image generate 16 characteristic value μ g1, σ g1, μ g2, σ g2, μ g3, σ G3, μ g4, σ g4, μ g5, σ g5, μ g6, σ g6, μ g7, σ g7, μ g8, σ g8 generate the gray scale texture local feature vectors of sample image Local2:
Local2=(μ g1, σ g1, μ g2, σ g2, μ g3, σ g3, μ g4, σ g4, σ g5, σ g5, μ g6, σ g6, μ g7, σ g7, μ g8, σg8)。
By the calculation method of above three embodiments, the available sample image feature database L comprising z sample image ={ L1、L2、…、Li、…、Lz, wherein any one sample image LiTool there are three feature vector global, local1 and Local2, sample image LiTotal characteristic vector can be denoted asWherein,Representative sample image Li's T-th of characteristic value in total characteristic vector, m are the characteristic value sum in total characteristic vector, include 9 characteristic values with global, Local1 includes 384 characteristic values, for local2 includes 16 characteristic values, then m=409.
In one embodiment, as shown in fig. 6, the update method in the textile picture feature library of the present embodiment further includes spinning It the step of fabric picture match, specifically includes:
S602 obtains textile picture to be matched;
In this step, the matching request that server is sent according to terminal obtains textile picture to be matched;
Specifically, terminal, which can be sent, needs matched original textile picture to server, and server is to received original Beginning textile picture is handled, and is obtained for matched textile picture.Wherein, original textile picture can be taken the photograph by terminal As head shoots to obtain, or by directly reading to obtain in terminal memory such as photograph album etc..
In this step, for server when handling received original textile picture, what is handled is to be matched Textile picture need to be consistent with the resolution ratio of the sample image in textile picture feature library and contrast etc..
S604 obtains gray value, hsv color spatial value and the coordinate value of pixel in textile picture;
In this step, server can using with that the gray value of pixel, hsv color in sample image are obtained in S404 is empty Between identical with the coordinate value method of value, the textile picture of acquisition is handled, according to the color space of textile picture Channel value calculates gray value, hsv color spatial value and the coordinate value for obtaining each pixel in textile picture.
S606, according to gray value, hsv color spatial value and coordinate value, calculate the color global characteristics of textile picture to Amount, color local feature vectors and gray scale texture local feature vectors;
In this step, server can be using empty with the gray value, hsv color in S406 according to pixel in sample image Between value and coordinate value calculate sample image color global characteristics vector, color local feature vectors and gray scale texture local feature The identical method of vector calculates textile according to the gray value of pixel, hsv color spatial value and coordinate value in textile picture Color global characteristics vector, color local feature vectors and the gray scale texture local feature vectors of picture.
S608, according to each class cluster matter in the color global characteristics vector of textile picture and textile picture feature library The first Euclidean distance between the color global characteristics vector of heart feature vector determines the spy of class cluster mass center belonging to textile picture Levy the grouping of vector;
Wherein, established textile picture feature library is prestored in server, is prestored in the textile picture feature library There are multiple class cluster centroid feature vectors, and the sample image being classified under the grouping of each class cluster centroid feature vector.One Euclidean distance between the total characteristic vector of each sample image under a grouping and the class cluster centroid feature vector of the grouping is small In distance threshold.In each class cluster centroid feature vector comprising one group of color global characteristics vector, color local feature to Amount and gray scale texture local feature vectors.
In this step, server can calculate color global characteristics vector and the weaving of the textile picture currently obtained The first Euclidean distance between the color global characteristics vector of each class cluster centroid feature vector in product picture feature library, and select Select point wherein with the smallest class cluster centroid feature vector of the first Euclidean distance of the color global characteristics vector of textile picture Group, the grouping as class cluster centroid feature vector belonging to the textile picture.
S610 is determined according to color global characteristics vector, color local feature vectors and gray scale texture local feature vectors Textile picture matched sample image in the grouping of class cluster centroid feature vector.
Wherein, each sample image in textile picture feature library, equal associated record have the color of the sample image complete Office's feature vector, color local feature vectors and gray scale texture local feature vectors.
In this step, the grouping of class cluster centroid feature vector belonging to textile picture is had determined in step S608 In the case of, server can be directly by each sample under the grouping of class cluster centroid feature vector belonging to textile picture and this Image carries out match cognization, according to color global characteristics vector, color local feature vectors and the gray scale texture of textile picture Color global characteristics vector, color local feature vectors and the gray scale line of each sample image in local feature vectors, with grouping Local feature vectors are managed, analyzes and determines textile picture matched sample image in the grouping of such cluster centroid feature vector.
In the present embodiment, when being matched to textile picture, according to the ash of pixel in textile picture to be matched Angle value, hsv color spatial value and coordinate value calculate separately color global characteristics vector, the color local feature of textile picture Vector sum gray scale texture local feature vectors determine textile figure according to color global characteristics vector first when being matched Textile picture match with the sample image in grouping by piece grouping affiliated in textile picture feature library later To the sample image of textile picture match, matched sample image quantity is participated in so as to effectively reduce, reduces operand, Promote the accuracy and efficiency of textile picture match.
It should be understood that although each step in the flow chart of Fig. 2,3,4,6 is successively shown according to the instruction of arrow, But these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these There is no stringent sequences to limit for the execution of step, these steps can execute in other order.Moreover, in Fig. 2,3,4,6 At least part step may include multiple sub-steps perhaps these sub-steps of multiple stages or stage be not necessarily Synchronization executes completion, but can execute at different times, and the execution sequence in these sub-steps or stage also need not Be so successively carry out, but can at least part of the sub-step or stage of other steps or other steps in turn or Person alternately executes.
In one embodiment, as shown in fig. 7, providing a kind of updating device 700 in textile picture feature library, packet Include: picture to be updated obtains module 702, new samples image set obtains module 704, total characteristic vector obtains module 706, new samples Image clustering division module 708 and textile picture feature library update module 77, in which:
Picture to be updated obtains module 702, for obtaining the textile picture that it fails to match;
New samples image set obtains module 704, if the number for the textile picture that it fails to match is beyond update number Threshold value, then using each textile picture that it fails to match as the sample graph in sample image and current textile picture feature library As mixing, new samples image set is obtained;
Total characteristic vector obtains module 706, for obtaining the total characteristic vector of each sample image in new samples image set; Wherein, total characteristic vector is raw according to color global characteristics vector, color local feature vectors and gray scale texture local feature vectors At;
New samples image clustering division module 708 is used for according to total characteristic vector, by the sample graph in new samples image set As the new class cluster centroid feature vector of clustering to the second predetermined number grouping in;
Textile picture feature library update module 710, for according to each new class cluster centroid feature vector and each Sample image in the grouping of new class cluster centroid feature vector, generates the textile picture feature library of update.
In one embodiment, new samples image clustering division module 708 is used for:
S1 chooses the total characteristic vector of the sample image of the second predetermined number as initial classes from new samples image set Cluster centroid feature vector;
S2, calculate new samples image set in each sample image total characteristic vector to initial classes cluster centroid feature vector it Between Euclidean distance;
Sample image each in new samples image set is respectively divided to the smallest with the Euclidean distance of the sample image S3 In the grouping of initial classes cluster centroid feature vector;
S4 calculates the total characteristic vector mean value of the sample image in the grouping of each initial classes cluster centroid feature vector;
S5, if the total characteristic vector mean value of the sample image in the grouping of all initial classes cluster centroid feature vectors is first with this Euclidean distance between beginning class cluster centroid feature vector is less than distance threshold, thens follow the steps S7;
S6, if it exists the total characteristic vector mean value in the grouping of arbitrary initial class cluster centroid feature vector and the initial classes cluster Euclidean distance between centroid feature vector is not less than distance threshold, then will be in the grouping of each initial classes cluster centroid feature vector Total characteristic vector mean value respectively as the initial classes cluster centroid feature vector of update, and step S2, S3 and S4 are repeated, until institute There are the total characteristic vector mean value and the initial classes cluster centroid feature of the sample image in the grouping of initial classes cluster centroid feature vector Euclidean distance between vector is less than distance threshold, thens follow the steps S7;
S7 obtains the sample in the grouping of current initial classes cluster centroid feature vector sum initial classes cluster centroid feature vector Image, the sample graph in the grouping of the class cluster centroid feature vector new as the new class cluster centroid feature vector sum of clustering Picture.
In one embodiment, the updating device 700 in textile picture feature library further includes textile picture feature library Module is established, the module of establishing in textile picture feature library includes:
Sample image obtains module, for obtaining the sample image of default classification number;
Sampled pixel value obtains module, for obtaining the gray value of pixel in sample image, hsv color spatial value and coordinate Value;
Sampling feature vectors computing module, for calculating sample graph according to gray value, hsv color spatial value and coordinate value Color global characteristics vector, color local feature vectors and the gray scale texture local feature vectors of picture;
Sample image clustering module, for the color global characteristics vector according to each sample image, color part Feature vector and gray scale texture local feature vectors, by the class cluster centroid feature of sample image clustering to the first predetermined number In the grouping of vector;
Textile picture feature library generation module, for according to each class cluster centroid feature vector and each class cluster mass center Sample image in the grouping of feature vector generates textile picture feature library.
In one embodiment, sampling feature vectors computing module is used for: calculating separately the HSV face of pixel in sample image In color space values, the mean value of H channel value, the mean value of channel S value, the mean value of V channel value, the variance of H channel value, channel S value Variance, the variance of V channel value, the third moment of H channel value, the third moment of channel S value and V channel value third moment;According to the channel H The side of the mean value of value, the mean value of channel S value, the mean value of V channel value, the variance of H channel value, the variance of channel S value, V channel value Difference, the third moment of H channel value, the third moment of channel S value and V channel value third moment, the color for generating sample image is global special Levy vector.
In one embodiment, sampling feature vectors computing module is used for: by the hsv color of pixel each in sample image H channel value, channel S value and V channel value dimensionality reduction in spatial value generate single dimension color value;Single dimension color value is quantified as The color grade value of three predetermined number color grades;It, will be each in sample image according to the coordinate value of pixel each in sample image Pixel distance value between a pixel and other pixels is quantified as the pixel distance grade point of the 4th predetermined number distance level scale;Root According to the color grade value and pixel distance grade point of pixel each in sample image, generate comprising third predetermined number multiplied by the 4th The two-dimensional matrix of the element of predetermined number;Wherein, the value of each of two-dimensional matrix element represent a color grade and The quantity of color grade value and pixel distance grade point under distance level scale;Two-dimensional matrix is unfolded, obtains the color of sample image Local feature vectors.
In one embodiment, sampling feature vectors computing module is used for: obtaining the different convolution of the 5th predetermined number Pattern matrix;Using each convolution mask matrix, respectively with the gray value of pixel each in sample image composition gray value square Battle array carries out convolutional calculation and obtains the convolution value of each pixel;Each picture in the sample image calculated according to each convolution mask matrix The convolution value of element, generates the corresponding convolved image of each convolution mask matrix;For each convolved image, the volume is calculated separately The mean value and variance of the gray value of pixel in product image;According to the mean value of the gray value of the convolved image of the 5th predetermined number and side Difference generates the gray scale texture local feature vectors of sample image.
In one embodiment, the updating device 700 in textile picture feature library further includes textile picture match module, Textile picture match module includes:
Textile picture obtains module, for obtaining textile picture to be matched;
Picture pixels value obtains module, for obtaining the gray value of pixel in textile picture, hsv color spatial value and seat Scale value;
Picture feature vector calculation module, for calculating textile according to gray value, hsv color spatial value and coordinate value Color global characteristics vector, color local feature vectors and the gray scale texture local feature vectors of picture;
Class cluster mass center is grouped determining module, for the color global characteristics vector and textile picture according to textile picture The first Euclidean distance between the color global characteristics vector of each class cluster centroid feature vector in feature database, determines textile The grouping of class cluster centroid feature vector belonging to picture;
Images match module, for according to color global characteristics vector, color local feature vectors and gray scale texture part Feature vector determines textile picture matched sample image in the grouping of class cluster centroid feature vector.
The specific restriction of updating device about textile picture feature library may refer to above for textile picture The restriction of the update method of feature database, details are not described herein.Each mould in the updating device in above-mentioned textile picture feature library Block can be realized fully or partially through software, hardware and combinations thereof.Above-mentioned each module can be embedded in the form of hardware or independence In processor in computer equipment, it can also be stored in a software form in the memory in computer equipment, in order to Processor, which calls, executes the corresponding operation of the above modules.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, the processor realize the update in the textile picture feature library of any embodiment as above when executing computer program The step of method.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program realizes the step of update method in textile picture feature library of any embodiment as above when being executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of update method in textile picture feature library, which comprises
Obtain the textile picture that it fails to match;
If the number of the textile picture that it fails to match is beyond quantity threshold is updated, by each textile that it fails to match Picture is mixed as sample image with the sample image in current textile picture feature library, obtains new samples image set;
Obtain the total characteristic vector of each sample image in new samples image set;Wherein, total characteristic vector is global special according to color Vector, color local feature vectors and gray scale texture local feature vectors are levied to generate;
According to the total characteristic vector, by the sample image clustering in the new samples image set to the second predetermined number In the grouping of new class cluster centroid feature vector;
According to the sample graph in the grouping of each new class cluster centroid feature vector and each new class cluster centroid feature vector Picture generates the textile picture feature library of update.
2. the method according to claim 1, wherein according to the total characteristic vector, by the new samples image The sample image clustering of concentration is into the grouping of the new class cluster centroid feature vector of the second predetermined number, comprising:
S1 chooses the total characteristic vector of the sample image of the second predetermined number as initial classes cluster matter from new samples image set Heart feature vector;
S2 calculates the total characteristic vector of each sample image in new samples image set between initial classes cluster centroid feature vector Euclidean distance;
Sample image each in new samples image set is respectively divided to the smallest initial with the Euclidean distance of the sample image S3 In the grouping of class cluster centroid feature vector;
S4 calculates the total characteristic vector mean value of the sample image in the grouping of each initial classes cluster centroid feature vector;
S5, if the total characteristic vector mean value of the sample image in the grouping of all initial classes cluster centroid feature vectors and the initial classes Euclidean distance between cluster centroid feature vector is less than distance threshold, thens follow the steps S7;
S6, if it exists the total characteristic vector mean value in the grouping of arbitrary initial class cluster centroid feature vector and the initial classes cluster mass center Euclidean distance between feature vector is not less than distance threshold, then will be total in the grouping of each initial classes cluster centroid feature vector Feature vector mean value respectively as update initial classes cluster centroid feature vector, and repeat step S2, S3 and S4, until it is all just The total characteristic vector mean value of sample image in the grouping of beginning class cluster centroid feature vector and the initial classes cluster centroid feature vector Between Euclidean distance be less than distance threshold, then follow the steps S7;
S7 obtains the sample graph in the grouping of current initial classes cluster centroid feature vector sum initial classes cluster centroid feature vector Picture, the sample graph in the grouping of the class cluster centroid feature vector new as the new class cluster centroid feature vector sum of clustering Picture.
3. the method according to claim 1, wherein further include:
Obtain the sample image of default classification number;
Obtain the gray value of pixel in the sample image, hsv color spatial value and coordinate value;
According to the gray value, hsv color spatial value and coordinate value, calculate the sample image color global characteristics vector, Color local feature vectors and gray scale texture local feature vectors;
According to color global characteristics vector, color local feature vectors and the gray scale texture local feature of each sample image to Amount, will be in the grouping of the class cluster centroid feature vector of the sample image clustering to the first predetermined number;
According to the sample image in the grouping of each class cluster centroid feature vector and each class cluster centroid feature vector, generates and spin Fabric picture feature library.
4. according to the method described in claim 3, it is characterized in that, the color global characteristics for calculating the sample image to Amount includes:
It calculates separately in the hsv color spatial value of pixel in the sample image, the mean value of H channel value, the mean value of channel S value, V The mean value of channel value, the variance of H channel value, the variance of channel S value, the variance of V channel value, the third moment of H channel value, channel S The third moment of value and the third moment of V channel value;
According to the mean value of the H channel value, the mean value of channel S value, the mean value of V channel value, the variance of H channel value, channel S value Variance, the variance of V channel value, the third moment of H channel value, the third moment of channel S value and V channel value third moment, described in generation The color global characteristics vector of sample image.
5. according to the method described in claim 3, it is characterized in that, the color local feature for calculating the sample image to Amount includes:
H channel value, channel S value and V channel value dimensionality reduction in the hsv color spatial value of pixel each in the sample image is raw At single dimension color value;The single dimension color value is quantified as the color grade value of third predetermined number color grade;
It, will be between pixel each in the sample image and other pixels according to the coordinate value of pixel each in the sample image Pixel distance value be quantified as the pixel distance grade point of the 4th predetermined number distance level scale;
According to the color grade value and pixel distance grade point of pixel each in the sample image, generate comprising third default Count the two-dimensional matrix of the element multiplied by the 4th predetermined number;Wherein, the value of each of described two-dimensional matrix element represents The quantity of color grade value and pixel distance grade point under one color grade and distance level scale;
The two-dimensional matrix is unfolded, obtains the color local feature vectors of the sample image.
6. according to the method described in claim 3, it is characterized in that, calculate the gray scale texture local feature of the sample image to Amount includes:
Obtain the different convolution mask matrixes of the 5th predetermined number;
Using each convolution mask matrix, respectively in the sample image each pixel gray value composition gray value Matrix carries out convolutional calculation and obtains the convolution value of each pixel;
The convolution value of each pixel, generates each convolution mask matrix in the sample image calculated according to each convolution mask matrix Corresponding convolved image;
For each convolved image, the mean value and variance of the gray value of pixel in the convolved image are calculated separately;
According to the mean value and variance of the gray value of the convolved image of the 5th predetermined number, the gray scale texture of sample image is generated Local feature vectors.
7. according to claim 1 to method described in 6 any one, which is characterized in that further include:
Obtain textile picture to be matched;
Obtain the gray value, hsv color spatial value and coordinate value of pixel in the textile picture;
According to the gray value, hsv color spatial value and coordinate value, calculate the color global characteristics of the textile picture to Amount, color local feature vectors and gray scale texture local feature vectors;
It is special according to each class cluster mass center in the color global characteristics vector of the textile picture and textile picture feature library The first Euclidean distance between the color global characteristics vector of vector is levied, determines the spy of class cluster mass center belonging to the textile picture Levy the grouping of vector;
According to the color global characteristics vector, color local feature vectors and gray scale texture local feature vectors, determine described in Textile picture matched sample image in the grouping of the class cluster centroid feature vector.
8. a kind of updating device in textile picture feature library, which is characterized in that described device includes:
Picture to be updated obtains module, for obtaining the textile picture that it fails to match;
New samples image set obtains module, if the number for the textile picture that it fails to match is beyond update number threshold Value, then using each textile picture that it fails to match as the sample image in sample image and current textile picture feature library Mixing, obtains new samples image set;
Total characteristic vector obtains module, for obtaining the total characteristic vector of each sample image in new samples image set;Wherein, always Feature vector is generated according to color global characteristics vector, color local feature vectors and gray scale texture local feature vectors;
New samples image clustering division module is used for according to the total characteristic vector, by the sample in the new samples image set Image clustering is divided in the grouping of new class cluster centroid feature vector of the second predetermined number;
Textile picture feature library update module, for according to each new class cluster centroid feature vector and each new class cluster Sample image in the grouping of centroid feature vector generates the textile picture feature library of update.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201811609396.4A 2018-12-27 2018-12-27 Updating method and device of textile picture feature library Active CN109784379B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811609396.4A CN109784379B (en) 2018-12-27 2018-12-27 Updating method and device of textile picture feature library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811609396.4A CN109784379B (en) 2018-12-27 2018-12-27 Updating method and device of textile picture feature library

Publications (2)

Publication Number Publication Date
CN109784379A true CN109784379A (en) 2019-05-21
CN109784379B CN109784379B (en) 2021-03-30

Family

ID=66497802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811609396.4A Active CN109784379B (en) 2018-12-27 2018-12-27 Updating method and device of textile picture feature library

Country Status (1)

Country Link
CN (1) CN109784379B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065447A (en) * 2021-03-29 2021-07-02 南京掌控网络科技有限公司 Method and equipment for automatically identifying commodities in image set
CN116955669A (en) * 2023-09-19 2023-10-27 江苏洁瑞雅纺织品有限公司 Updating system of textile picture feature library

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551823A (en) * 2009-04-20 2009-10-07 浙江师范大学 Comprehensive multi-feature image retrieval method
CN103430179A (en) * 2011-02-07 2013-12-04 英特尔公司 Method, system and computer-readable recording medium for adding new image and information on new image to image database
CN106022063A (en) * 2016-05-27 2016-10-12 广东欧珀移动通信有限公司 Unlocking method and mobile terminal
CN104219996B (en) * 2012-02-06 2017-04-05 因赛泰克有限公司 Reference library extension during locomotor imaging
US9720934B1 (en) * 2014-03-13 2017-08-01 A9.Com, Inc. Object recognition of feature-sparse or texture-limited subject matter
CN107766563A (en) * 2017-11-07 2018-03-06 广东欧珀移动通信有限公司 Method, apparatus, storage medium and the electronic equipment updated the data
CN108124478A (en) * 2017-12-05 2018-06-05 深圳前海达闼云端智能科技有限公司 Picture searching method and apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551823A (en) * 2009-04-20 2009-10-07 浙江师范大学 Comprehensive multi-feature image retrieval method
CN103430179A (en) * 2011-02-07 2013-12-04 英特尔公司 Method, system and computer-readable recording medium for adding new image and information on new image to image database
CN103430179B (en) * 2011-02-07 2017-04-05 英特尔公司 Add method, system and the computer-readable recording medium of new images and its relevant information in image data base
CN104219996B (en) * 2012-02-06 2017-04-05 因赛泰克有限公司 Reference library extension during locomotor imaging
US9720934B1 (en) * 2014-03-13 2017-08-01 A9.Com, Inc. Object recognition of feature-sparse or texture-limited subject matter
CN106022063A (en) * 2016-05-27 2016-10-12 广东欧珀移动通信有限公司 Unlocking method and mobile terminal
CN107766563A (en) * 2017-11-07 2018-03-06 广东欧珀移动通信有限公司 Method, apparatus, storage medium and the electronic equipment updated the data
CN108124478A (en) * 2017-12-05 2018-06-05 深圳前海达闼云端智能科技有限公司 Picture searching method and apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
裴新超: "基于内容的图像检索算法及其并行化研究", 《中国优秀硕士学位论文全文数据库 信息科科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065447A (en) * 2021-03-29 2021-07-02 南京掌控网络科技有限公司 Method and equipment for automatically identifying commodities in image set
CN116955669A (en) * 2023-09-19 2023-10-27 江苏洁瑞雅纺织品有限公司 Updating system of textile picture feature library
CN116955669B (en) * 2023-09-19 2023-12-22 江苏洁瑞雅纺织品有限公司 Updating system of textile picture feature library

Also Published As

Publication number Publication date
CN109784379B (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN106778928B (en) Image processing method and device
US20210012093A1 (en) Method and apparatus for generating face rotation image
CN111833237B (en) Image registration method based on convolutional neural network and local homography transformation
CN110097609B (en) Sample domain-based refined embroidery texture migration method
CN112651438A (en) Multi-class image classification method and device, terminal equipment and storage medium
CN112967174B (en) Image generation model training, image generation method, image generation device and storage medium
US11557149B2 (en) Image synthesis for balanced datasets
CN109711472B (en) Training data generation method and device
CN107563978A (en) Face deblurring method and device
CN110232326A (en) A kind of D object recognition method, device and storage medium
CN110378250B (en) Training method and device for neural network for scene cognition and terminal equipment
CN112927279A (en) Image depth information generation method, device and storage medium
CN111291768A (en) Image feature matching method and device, equipment and storage medium
CN111383232A (en) Matting method, matting device, terminal equipment and computer-readable storage medium
CN109741380A (en) Textile picture fast matching method and device
CN113112542A (en) Visual positioning method and device, electronic equipment and storage medium
CN109784379A (en) The update method and device in textile picture feature library
CN116030498A (en) Virtual garment running and showing oriented three-dimensional human body posture estimation method
CN109657083A (en) The method for building up and device in textile picture feature library
CN105740867B (en) The selection method of image texture window shape and scale
CN116740261A (en) Image reconstruction method and device and training method and device of image reconstruction model
CN111080754B (en) Character animation production method and device for connecting characteristic points of head and limbs
CN110827309B (en) Super-pixel-based polaroid appearance defect segmentation method
CN109934132B (en) Face recognition method, system and storage medium based on random discarded convolution data
CN111695592A (en) Image identification method and device based on deformable convolution and computer equipment

Legal Events

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