WO2020151529A1 - Clothing image classification and image classification methods and apparatuses, and device - Google Patents

Clothing image classification and image classification methods and apparatuses, and device Download PDF

Info

Publication number
WO2020151529A1
WO2020151529A1 PCT/CN2020/071925 CN2020071925W WO2020151529A1 WO 2020151529 A1 WO2020151529 A1 WO 2020151529A1 CN 2020071925 W CN2020071925 W CN 2020071925W WO 2020151529 A1 WO2020151529 A1 WO 2020151529A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
images
clothing
color
features
Prior art date
Application number
PCT/CN2020/071925
Other languages
French (fr)
Chinese (zh)
Inventor
赵永飞
龙一民
袁炜
徐博文
吴剑
胡露露
张民英
神克乐
刘志敏
陈新
尹宁
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020151529A1 publication Critical patent/WO2020151529A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Definitions

  • the embodiments of the present application relate to the field of computer application technology, and in particular to a clothing image classification, an image classification method, device, and equipment.
  • garment processing factories may process different garments at the same time, in order to obtain the processing quantity of different garments, it is necessary to count the number of different garments processed.
  • a camera is used to collect images of clothing, and the sift feature points, textures, edge contours and other features of the image are extracted as image features. Then the images can be clustered based on the image features to obtain images of different types, and then confirm a certain type The image corresponds to the processing of the garment.
  • the collected clothing images may contain clothing images with richer textures, such as images collected for clothing with richer patterns, or clothing images with relatively simple textures, for example, for pure colors.
  • the texture and contour features of these clothing images are too complex or too simple.
  • the embodiments of the present application provide a clothing image classification, an image classification method, device, and equipment to solve the technical problem of insufficient accuracy of multiple image classification results in the prior art.
  • an embodiment of the present application provides a clothing image classification method, including:
  • the plurality of image sets respectively correspond to the number of images of at least one clothing image.
  • an image classification method is provided in an embodiment of the present application, including:
  • an embodiment of the present application provides a clothing image classification device, including:
  • the first acquisition module is used to acquire multiple clothing images
  • the first division module is configured to divide the clothing image into multiple regional images for any clothing image
  • the first extraction module is configured to extract the color histogram features of the multiple regional images respectively;
  • the first weighting module is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the clothing image;
  • the first clustering module is configured to cluster the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets;
  • the first determining module is configured to determine the number of images corresponding to at least one clothing image in each of the plurality of image sets.
  • an image classification device including:
  • the second acquisition module is used to acquire multiple images to be processed
  • the second division module is configured to divide the to-be-processed image into multiple regional images for any one to-be-processed image;
  • the second extraction module is used to extract the color histogram features of the multiple regional images respectively;
  • the second weighting module is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the image to be processed;
  • the second clustering module is configured to classify the multiple to-be-processed images based on the image features of the multiple to-be-processed images to obtain multiple image sets;
  • the second determining module is configured to determine the image type to which at least one image to be processed respectively corresponding to the multiple image sets belongs;
  • the third determining module is used to determine the image quantity of at least one image to be processed corresponding to each image category.
  • an embodiment of the present application provides a clothing image classification device, including: a storage component and a processing component, the storage component stores one or more computer instructions, and the one or more computer instructions are used for the processing The component is called and executed;
  • the processing component is used for:
  • an embodiment of the present application provides an image classification device, including: a storage component and a processing component, the storage component stores one or more computer instructions, and the one or more computer instructions are provided to the processing component Call and execute
  • the processing component is used for:
  • the clothing image after extracting multiple clothing images, the clothing image can be divided into multiple regional images for any clothing image, and then the color histogram feature of each regional image can be extracted separately.
  • the color histogram characteristics of the image can reflect the local color characteristics of the clothing image in the region; the color histograms of multiple regional images are weighted to generate the image characteristics of the clothing image, and the obtained image characteristics can realize the overall color characteristics of the product image
  • the histogram feature of each area image is actually obtained by counting the color histogram of each pixel. Therefore, the color histogram of multiple area images is weighted
  • the image characteristics obtained by processing can also characterize the characteristics of the image from the texture.
  • the image features of multiple clothing images when multiple clothing images are clustered, accurate classification results can be obtained. Since the image features of each clothing image can represent the color and texture features of the clothing image locally and as a whole, the classification error of multiple image sets obtained is small, and it can be accurately determined that multiple image sets correspond to at least one clothing image. The number of images can be used to accurately monitor the clothing production process through the number of clothing images.
  • Fig. 1 shows a flowchart of an embodiment of a clothing image classification method provided by the present application
  • Figure 2 shows a flowchart of another embodiment of a clothing image classification method provided by the present application
  • Fig. 3 shows a flowchart of an embodiment of a picture classification method provided by the present application
  • Fig. 4 shows a schematic structural diagram of an embodiment of a clothing image classification device provided by the present application
  • FIG. 5 shows a schematic structural diagram of an embodiment of a clothing image classification device provided by the present application
  • FIG. 6 shows a schematic structural diagram of an embodiment of a picture classification device provided by this application.
  • Fig. 7 shows a schematic structural diagram of an embodiment of a picture classification device provided by the present application.
  • the embodiments of the present invention can be applied to digital factory management, through the intelligent monitoring of the clothing production process, so as to know the production progress of the clothing at any time and improve production efficiency.
  • a camera can be used to collect images of clothing, and image features such as texture and contour of the image can be extracted, and the collected multiple images can be classified based on the image features, so as to obtain images belonging to different types, and then determine different The production schedule of the garment corresponding to the type of image.
  • image features such as texture and contour
  • the result of image classification is not accurate enough, and classification errors are prone to occur.
  • the clothing image after extracting multiple clothing images, the clothing image can be divided into multiple regional images for any clothing image, and then can be extracted separately
  • the color histogram features of each regional image are weighted to obtain the image features of the clothing image.
  • the clothing image is divided into multiple regional images, and the color histogram of each regional image is extracted to extract the local features of the clothing image. Because the color histogram features of multiple regional images are weighted, the clothing image is realized
  • the overall characteristics of the clothing image can be fully characterized from a spatial perspective; in addition, the histogram feature can represent the characteristics of the image from the color and texture, and is not easily affected by the clothing itself and the image collection environment.
  • the weighted processing of the color histograms of the multiple region images is used to generate the image features of the clothing images.
  • accurate classification results can be obtained.
  • the obtained multiple image sets have relatively small classification errors, and the number of images corresponding to at least one clothing image in each of the multiple image sets can be accurately determined, and the clothing production process can be accurately monitored through the number of clothing images.
  • FIG. 1 it is a flowchart of an embodiment of a clothing image classification method provided by an embodiment of the present invention.
  • the method may include the following steps:
  • each clothing image can correspond to one clothing, and the clothing corresponding to each image is different.
  • garment images can be collected for garments that have been produced and are in the quality inspection program.
  • images collected by different cameras may have different sizes.
  • multiple images collected by different cameras can be normalized To obtain multiple clothing images.
  • the aspect ratio of the original image can be maintained, and then multiple clothing images with the same aspect ratio and normalized size can be obtained.
  • the clothing image in order to obtain a balanced division result, for any clothing image, the clothing image may be divided into multiple area images according to the preset area position and the preset area size.
  • the area position may refer to the center position of the area image
  • the area size may refer to the image size of the area image, specifically it may refer to the number of horizontal pixels and the number of vertical pixels of the area image.
  • any clothing image in order to make the clothing image evenly divided and to collect color features at different positions, any clothing image can be divided into multiple regional images according to the number of N*M.
  • N can be equal to M, and the number of horizontal and vertical divisions of the clothing image is the same. Therefore, the area size of each area image is the same.
  • N is greater than 1, less than the number of pixels in the clothing image.
  • N can take a value of 3, that is, the clothing image can be evenly divided into 9 regional images of the same size.
  • the clothing image is divided into blocks to obtain the color histogram features of each region image respectively, so as to extract the local features of the clothing image and pay attention to the local features of the clothing image.
  • the color histogram feature of each region image can be expressed in the form of a color feature matrix.
  • the color histogram features of multiple regional images can be weighted according to a predetermined weighting rule to obtain the image features of the clothing image.
  • the predetermined weighting rule may actually mean that the color histogram feature of each regional image is weighted according to the feature weight and weighted position corresponding to each regional image to obtain the image feature of the clothing image.
  • the weight of the color histogram feature of each region image in order to balance the features of each region on the image features of the clothing image, so that the obtained image features are more accurate, the weight of the color histogram feature of each region image can be set to 1.
  • performing weighting processing on the color histogram features of the multiple region images to obtain the image features of the clothing image may include: according to each region image in the clothing image Determine the weighting order of the color histogram features of each regional image; combine multiple color feature matrices in horizontal or vertical matrix according to their corresponding weighting order, and the obtained feature matrix is the image feature of the clothing image.
  • the feature weight of each region image can be set the same, for example, set to 1.
  • the color histogram features corresponding to the multiple regional images can be directly stitched to obtain the image features of the clothing image. For example, assuming that the color histogram features corresponding to the three adjacent area images A1, A2, and A3 are B1, B2, and B3, the clothing image corresponding to the area images A1, A2, and A3 may have the feature B1B2B3.
  • Each clothing image can represent a clothing, and the image feature of each clothing image can represent the feature of the clothing. If the clothing image is the same, it means that the clothing corresponding to the clothing image is the same. For the same type of clothing, the image features of the clothing image are the same. Based on the respective image features of multiple clothing images, clustering multiple clothing images to obtain multiple image sets can specifically be to divide the respective image features of multiple clothing images and classify clothing images with higher feature similarity into the same category Image, get multiple image collections.
  • a clustering algorithm is used to cluster multiple clothing images to obtain multiple image sets.
  • a clustering algorithm may be used to perform feature clustering on respective image features of multiple clothing images, and then clothing images corresponding to feature classes with the same image features are used as an image set to obtain multiple image sets.
  • each image set may correspond to at least one clothing image, and the clothing corresponding to the at least one clothing image is of the same type of clothing.
  • Each image collection can correspond to at least one clothing image, and the number of at least one clothing image can be counted to obtain the number of images, that is, to obtain the number of images corresponding to each image collection.
  • the multiple image sets and the number of images corresponding to each image set may also be output to facilitate the user to view.
  • the clothing image after extracting multiple clothing images, can be divided into multiple regional images for any clothing image, and then the color histogram features of each regional image can be extracted separately.
  • the color histogram characteristics of the image can reflect the local color characteristics of the clothing image in the region; the color histograms of multiple regional images are weighted to generate the image characteristics of the clothing image, and the obtained image characteristics can realize the overall color characteristics of the product image s concern.
  • the histogram feature of each area image is actually obtained by counting the color histogram of each pixel. Therefore, the color histogram of multiple area images is weighted.
  • Image features can also characterize image characteristics from texture.
  • the image features of multiple clothing images when multiple clothing images are clustered, accurate classification results can be obtained. Since the image features of each clothing image can represent the color and texture features of the clothing image locally and as a whole, the classification error of multiple image sets obtained is small, and it can be accurately determined that multiple image sets correspond to at least one clothing image. The number of images can be used to accurately monitor the clothing production process through the number of clothing images.
  • the color histogram feature may include a color feature matrix, that is, the color histogram feature expresses the characteristics of the image in the form of a color feature matrix.
  • the performing weighting processing on the color histogram features of the multiple regional images to obtain the image features of the clothing image may include:
  • the horizontal splicing processing of any two color feature matrices may specifically refer to splicing any row of the first color feature matrix and a row corresponding to the second color feature matrix to obtain a horizontal splicing matrix of two color feature matrices. For example, suppose the first color feature matrix is [101; 100], the second color feature matrix is [202; 200], and the horizontal mosaic matrix obtained by horizontally splicing two color feature matrices is [101202; 100200].
  • the vertical splicing processing of any two color feature matrices may specifically refer to longitudinal splicing of the first color feature matrix and the second color feature matrix based on the last row of the first color feature matrix and the first row of the second color feature matrix to obtain Vertical mosaic matrix of two color feature matrices.
  • the vertical stitching matrix obtained by vertically stitching the two color feature matrices may be [101; 100; 202; 200].
  • FIG. 2 it is a flowchart of another embodiment of a clothing image classification method provided by an embodiment of the present invention.
  • the difference from the embodiment shown in FIG. 1 lies in that it is determined in step 106 that the multiple After the image sets respectively correspond to the number of images of at least one clothing image, the method may further include:
  • Each image collection can correspond to at least one clothing image, and clothing images belonging to the same image belong to the same clothing type. Therefore, at least one clothing image corresponding to each image collection belongs to the same clothing type. It can be determined that multiple image collections correspond to each other. At least one clothing type of clothing image.
  • the determining the clothing type of at least one clothing image corresponding to each of the multiple image sets may include:
  • each training image corresponds to a clothing type
  • the clothing types of the training images respectively corresponding to the multiple image sets are used as clothing types where at least one clothing image corresponding to the multiple image sets is located.
  • the image feature acquisition method of the training image is the same as the feature acquisition method of the embodiment shown in FIGS. 1 to 2.
  • the color histogram features of the multiple training region images are weighted to obtain the image features of the multiple training images.
  • each regional image is different.
  • the color histogram feature of the regional image can be weighted according to the regional location to obtain the image feature of the clothing image.
  • the above step 104: weighting the color histogram features of the multiple region images, and obtaining the image features of the clothing image may include:
  • the color histogram features of the multiple regional images are weighted according to the regional positions of the multiple regional images to obtain the image features of the clothing image.
  • Performing weighting processing according to the regional positions of multiple regional images can specifically refer to determining the weighted position of the regional image according to the regional position of any regional image, and according to the corresponding weighted position of the regional image, the corresponding color histogram feature
  • the feature stitching is performed to obtain the image features of the clothing image when the feature stitching of the color histogram features of the multiple regional images is completed.
  • the color histogram feature is a color feature matrix
  • the feature splicing of the color histogram feature can refer to the matrix splicing of the color histogram matrix.
  • the step 103 extracts The color histogram features of the multiple regional images may include:
  • the color histogram features of each area image in multiple color channels can be extracted sequentially. Based on multiple color channels, the color histogram features of multiple regional images can be extracted respectively.
  • each color channel can represent different color characteristics, and the characteristics of different pixels in different color spaces can be obtained by converting to the corresponding color channel.
  • the respectively extracting the color histogram features of the multiple region images in multiple color channels may include:
  • the channel histogram features corresponding to the multiple color channels are weighted to obtain the color histogram feature of the regional image.
  • the channel histogram feature can refer to the channel feature matrix.
  • Weighting the channel histogram features corresponding to multiple color channels to obtain the color histogram feature of the regional image may include: performing horizontal or vertical matrix stitching processing on the multiple channel feature matrices to obtain the color histogram feature of the regional image . It is also possible to determine the respective weighting order of multiple color channels through the channel order of multiple color channels, and perform horizontal or vertical splicing of multiple channel feature matrices according to their respective weighting order.
  • the feature matrix obtained is the color histogram of the regional image. Figure features.
  • the color histogram features of the regional image are obtained by extracting the channel histogram features corresponding to the multiple color histogram channels of the regional image, and weighting the multiple channel histogram features.
  • each channel histogram feature may be weighted to generate the color histogram of the regional image.
  • extracting the channel histogram features corresponding to the multiple color channels of the regional image includes:
  • the channel histogram characteristics of the region image in the color channel are determined.
  • the clothing image classification method described above may further include:
  • Multiple color channels formed by three color channels corresponding to at least one color space model are determined.
  • At least one color space module can be set in advance, and multiple color channels can be obtained through three color channels corresponding to at least one color space model.
  • the determination of multiple color channels may specifically be to obtain three corresponding to at least one color space model set in advance. Multiple color channels formed by color channels, thereby improving processing efficiency.
  • the channel histogram corresponding to the multiple color channels of the regional image can be extracted. Specifically, the respective pixel values of multiple pixels of the regional image can be converted to multiple color channels to obtain the corresponding multiple of each pixel. The channel value of each color channel, and for each color channel, the channel value corresponding to multiple pixels in each area image can be obtained, and then channel histogram statistics can be performed for any color channel.
  • each color channel can be divided into histogram statistical intervals, so that different color channels can be counted according to the histogram statistical intervals.
  • the at least one color space includes RGB color space, HSV color space, and YcbCr color space;
  • the RGB color space corresponds to the R color channel, the G color channel, and the B color channel
  • the HSV color space corresponds to the H color channel
  • the S color channel corresponds to the V color channel
  • the YcbCr color space corresponds to the Y color channel, Cb color channel, and Cv color. aisle.
  • each color channel can be divided into multiple histogram statistical intervals according to the number of divisions.
  • the R color channel can be divided into 24 histogram statistical intervals
  • the G color channel can be divided into 24 histogram statistical intervals
  • the B color channel can be divided into 24 histogram statistical intervals.
  • the HSV color space corresponds to The H color channel is divided into 32 histogram statistics intervals
  • the S color channel is divided into 32 histogram statistics intervals
  • the V color channel corresponds to 8 histogram statistics intervals
  • the YcbCr color space corresponds to the Y color channel is divided into 24 histogram statistics intervals.
  • the Cb color channel is divided into 16 histogram statistical intervals
  • the Cv color channel is divided into 16 statistical intervals.
  • the channel values of multiple pixels in the G color channel can be counted, the number of occurrences in each statistical interval, and then G The distribution numbers of the color channels corresponding to each of the 24 statistical intervals, the channel histogram feature of the G color channel is obtained, and the feature is 1*24 dimensional data.
  • the histogram features corresponding to color channels such as R, B, H, S, V, Y, Cb, Cr can also be obtained, and the dimensions of their features are 1*24, 1*24, 1*32, 1*, respectively 32, 1*8, 1*24, 1*16, 1*16.
  • the channel histogram features corresponding to the multiple color channels can be weighted to obtain the color histogram features of the regional image, and the feature weighting can be performed in this way, for example, the channel histogram features corresponding to each channel Perform weighting directly to obtain a 1*200-dimensional color feature histogram.
  • each clothing channel is divided into 9 regional images on average, and the corresponding color histogram features of multiple regional images are subjected to feature weighting processing, such as simple feature stitching, to obtain 1*1800 dimensional image features of clothing images.
  • the method further includes:
  • At least one clothing image corresponding to the multiple image sets is sequentially outputted according to the respective output order of the multiple image sets.
  • sorting the number of images to determine the output order of each image collection may specifically refer to ascending or descending order of the number of images according to the number of images to determine the output order of each image collection.
  • FIG. 3 it is a flowchart of another embodiment of an image classification method provided by an embodiment of the present invention.
  • the method may include the following steps:
  • the image classification method provided by the embodiment of the present invention is the same as the image processing method used in the clothing image classification method shown in FIG. 1 to FIG. 2, and will not be repeated here.
  • the image to be processed after extracting multiple images to be processed, can be divided into multiple regional images for any image to be processed, and then the color histogram feature of each regional image can be extracted separately.
  • the color histogram features of multiple regional images are weighted to obtain the image features of the image to be processed.
  • the color histogram features of the regional image can reflect the local features of the image to be processed. Weighting the color histogram features of multiple regional images can realize the attention to the overall features of the image to be processed; in addition, the histogram features can be based on color and texture. The above characterizes the characteristics of the image, and is not easily affected by the clothing itself and the image collection environment.
  • the weighted processing of the color histograms of the multiple regional images is used to generate the image characteristics of the image to be processed, and when the multiple images to be processed are clustered, accurate classification results can be obtained.
  • the classification error of the obtained multiple image sets is small, and the number of images of the multiple image sets corresponding to at least one image to be processed can be accurately determined, and the clothing production process can be accurately monitored through the number of images to be processed.
  • FIG. 4 it is a schematic structural diagram of another embodiment of a clothing image classification apparatus provided by an embodiment of the present invention.
  • the apparatus may include the following modules:
  • the first acquiring module 401 is used to acquire multiple clothing images
  • the first division module 402 is configured to divide the clothing image into multiple regional images for any clothing image
  • the first extraction module 403 is configured to extract the color histogram features of the multiple regional images respectively;
  • the first weighting module 404 is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the clothing image;
  • the first clustering module 405 is configured to cluster the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets;
  • the first determining module 406 is configured to determine the number of images corresponding to at least one clothing image in each of the multiple image sets.
  • the color histogram features of the regional image can reflect the local features of the clothing image, and weighting the color histogram features of multiple regional images can realize the attention to the overall features of the clothing image; in addition, the histogram features
  • the characteristics of the image can be characterized from the color and texture, and it is not easily affected by the clothing itself and the image collection environment.
  • the weighted processing of the color histograms of the multiple region images is used to generate the image features of the clothing images.
  • accurate classification results can be obtained.
  • the classification error of the obtained multiple image sets is small, and the number of images corresponding to at least one clothing image in the multiple image sets can be accurately determined, and the clothing production process can be accurately monitored through the number of clothing images.
  • the device shown in FIG. 4 may further include:
  • the fourth determining module is used to determine the clothing type of at least one clothing image corresponding to the multiple image sets.
  • Each image collection can correspond to at least one clothing image, and clothing images belonging to the same image belong to the same clothing type. Therefore, at least one clothing image corresponding to each image collection belongs to the same clothing type. It can be determined that multiple image collections correspond to each other. At least one clothing type of clothing image.
  • the device shown in FIG. 4 may further include:
  • a sorting module used to sort the number of images to determine the output order of each image set
  • the output module is configured to sequentially output at least one clothing image corresponding to each of the multiple image sets according to the respective output order of the multiple image sets.
  • the color histogram feature of the regional image can be weighted according to its regional location to obtain the image features of the clothing image as another implementation
  • the first weighting module includes:
  • the first weighting unit is configured to perform weighting processing on the color histogram features of the multiple regional images according to the regional positions of the multiple regional images to obtain the image features of the clothing image.
  • the first extraction module include:
  • the first extraction unit is configured to extract the color histogram features of the multiple regional images in multiple color channels.
  • the first extraction unit includes:
  • the first extraction subunit is configured to extract the channel histogram features corresponding to each of the multiple color channels of the regional image for any one of the multiple regional images;
  • the first weighting subunit is used for weighting the channel histogram features corresponding to the multiple color channels to obtain the color histogram feature of the regional image.
  • the first extraction subunit may specifically include:
  • the channel histogram characteristics of the region image in the color channel are determined.
  • it further includes:
  • the channel determining module is used to determine multiple color channels formed by three color channels corresponding to at least one color space model.
  • the color histogram feature includes a color feature matrix
  • the first weighting module may include:
  • the second weighting module is configured to perform horizontal or vertical matrix splicing processing on the respective color feature matrices of the multiple regional images to obtain the image features of the clothing image.
  • the at least one color space includes RGB color space, HSV color space, and YcbCr color space;
  • the RGB color space corresponds to the R color channel, the G color channel, and the B color channel
  • the HSV color space corresponds to the H color channel
  • the S color channel corresponds to the V color channel
  • the YcbCr color space corresponds to the Y color channel, Cb color channel, and Cv color. aisle.
  • each color channel can be divided into multiple histogram statistical intervals according to the number of divisions.
  • the device described in FIG. 4 can execute the clothing image classification method described in the embodiments shown in FIG. 1 to FIG. 2, and its implementation principles and technical effects will not be described in detail.
  • the specific manners of performing operations of the various modules and units of the clothing image classification device in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
  • an embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a computer, the clothing image classification method of the embodiments shown in FIGS. 1 to 2 can be implemented.
  • FIG. 5 it is a schematic structural diagram of another embodiment of a clothing image classification device provided by an embodiment of the present invention.
  • the device may include a storage component 501 and a processing component 502.
  • the storage component 501 stores one or Multiple computer instructions, the one or more computer instructions are for the processing component 502 to call and execute;
  • the processing component 502 can be used for:
  • the color histogram features of the regional image can reflect the local features of the clothing image, and weighting the color histogram features of multiple regional images can realize the attention to the overall features of the clothing image; in addition, the histogram features
  • the characteristics of the image can be characterized from the color and texture, and it is not easily affected by the clothing itself and the image collection environment.
  • the weighted processing of the color histograms of the multiple region images is used to generate the image features of the clothing images.
  • accurate classification results can be obtained.
  • the obtained multiple image sets have relatively small classification errors, and the number of images corresponding to at least one clothing image in each of the multiple image sets can be accurately determined, and the clothing production process can be accurately monitored through the number of clothing images.
  • processing component 501 may also be used for:
  • processing component 501 may also be used for:
  • At least one clothing image corresponding to the multiple image sets is sequentially outputted according to the respective output order of the multiple image sets.
  • the processing component Since the method of simply counting the pixel value of each pixel can represent the overall color characteristics of different pixels, but cannot display the characteristics of different pixels in different color spaces, therefore, as another embodiment, the processing component will The color histogram features of the multiple regional images are weighted, and the image features of the clothing image can be obtained by:
  • the color histogram features of the multiple regional images are weighted according to the regional positions of the multiple regional images to obtain the image features of the clothing image.
  • the processing component separately extracts the color histogram features of the multiple regional images, specifically:
  • the processing component separately extracting the color histogram features of the multiple regional images in the multiple color channels may specifically be: for any one of the multiple regional images, extracting the Channel histogram characteristics corresponding to multiple color channels of the regional image;
  • the channel histogram features corresponding to the multiple color channels are weighted to obtain the color histogram feature of the regional image.
  • the processing component extracts the channel histogram features corresponding to the multiple color channels of the regional image, specifically:
  • the channel histogram characteristics of the region image in the color channel are determined.
  • processing component 501 may also be used to:
  • Multiple color channels formed by three color channels corresponding to at least one color space model are determined.
  • the at least one color space determined by the processing component includes an RGB color space, an HSV color space, and a YcbCr color space;
  • the RGB color space corresponds to the R color channel, the G color channel, and the B color channel
  • the HSV color space corresponds to the H color channel
  • the S color channel corresponds to the V color channel
  • the YcbCr color space corresponds to the Y color channel, Cb color channel, and Cv color. aisle.
  • the device described in FIG. 5 can execute the clothing image classification method described in the embodiments shown in FIG. 1 to FIG. 2, and its implementation principles and technical effects will not be repeated.
  • the specific methods of processing components in the clothing image classification device in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
  • FIG. 6 it is a schematic structural diagram of another embodiment of an image classification apparatus provided by an embodiment of the present invention.
  • the apparatus may include the following modules:
  • the second acquisition module 601 is used to acquire multiple images to be processed
  • the second dividing module 602 is configured to divide the to-be-processed image into multiple regional images for any one to-be-processed image;
  • the second extraction module 603 is configured to extract the color histogram features of the multiple regional images respectively;
  • the second weighting module 604 is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the image to be processed;
  • the second clustering module 605 is configured to classify the multiple to-be-processed images based on the image features of the multiple to-be-processed images to obtain multiple image sets;
  • the second determining module 606 is configured to determine the image type to which at least one image to be processed respectively corresponding to the multiple image sets belongs;
  • the third determining module 607 is configured to determine the image quantity of at least one image to be processed corresponding to each image category.
  • the color histogram features of the regional image can reflect the local features of the image to be processed, and weighting the color histogram features of multiple regional images can realize the focus on the overall features of the image to be processed; in addition, the histogram Features can characterize image characteristics from color and texture, and are not easily affected by the clothing itself and the image collection environment. Furthermore, the weighted processing of the color histograms of the multiple regional images is used to generate the image characteristics of the image to be processed, and when the multiple images to be processed are clustered, accurate classification results can be obtained. The classification error of the obtained multiple image sets is small, and the number of images of the multiple image sets corresponding to at least one image to be processed can be accurately determined, and the clothing production process can be accurately monitored through the number of images to be processed.
  • the device described in FIG. 6 can execute the image classification method described in the embodiment shown in FIG. 3, and its implementation principles and technical effects will not be repeated.
  • the specific methods for performing operations of the various modules and units of the image classification device in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
  • an embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a computer, the image classification method of the embodiment shown in FIG. 3 can be implemented.
  • FIG. 7 it is a schematic structural diagram of another embodiment of an image classification device provided by an embodiment of the present invention.
  • the device may include a storage component 701 and a processing component 702.
  • the storage component 701 stores one or more Computer instructions, the one or more computer instructions are for the processing component 702 to call and execute;
  • the processing component 702 is used to:
  • the color histogram features of the regional image can reflect the local features of the image to be processed, and weighting the color histogram features of multiple regional images can realize the focus on the overall features of the image to be processed; in addition, the histogram Features can characterize image characteristics from color and texture, and are not easily affected by the clothing itself and the image collection environment. Furthermore, the weighted processing of the color histograms of the multiple regional images is used to generate the image characteristics of the image to be processed, and when the multiple images to be processed are clustered, accurate classification results can be obtained. The classification error of the obtained multiple image sets is small, and the number of images of the multiple image sets corresponding to at least one image to be processed can be accurately determined, and the clothing production process can be accurately monitored through the number of images to be processed.
  • the device described in FIG. 7 can execute the image classification method described in the embodiment shown in FIG. 3, and its implementation principles and technical effects will not be repeated.
  • the specific manners of processing components in the image classification device in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement without creative work.
  • each implementation manner can be implemented by software plus a necessary general hardware platform, and of course, it can also be implemented by hardware.
  • the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic A disc, an optical disc, etc., include a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)

Abstract

Embodiments of the present application provide clothing image classification and image classification methods and apparatuses, and a device. The clothing image classification method comprises: obtaining multiple clothing images; for any clothing image, dividing the clothing image into multiple region images; respectively extracting color histogram features of the multiple region images; performing weighting processing on the color histogram features of the multiple region images, and obtaining image features of the clothing image; clustering the multiple clothing images on the basis of the image features of the multiple clothing images, and obtaining multiple image sets; and determining the number of images of the multiple image sets respectively corresponding to at least one clothing image. The technical solution provided by the embodiments of the present application improves the classification accuracy of clothing.

Description

服装图像分类、图像分类方法、装置及设备Clothing image classification, image classification method, device and equipment
本申请要求2019年01月23日递交的申请号为201910063759.7、发明名称为“服装图像分类、图像分类方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 201910063759.7 and the invention title of "Clothing Image Classification, Image Classification Method, Apparatus and Equipment" filed on January 23, 2019, and the entire contents of which are incorporated into this application by reference .
技术领域Technical field
本申请实施例涉及计算机应用技术领域,尤其涉及一种服装图像分类、图像分类方法、装置及设备。The embodiments of the present application relate to the field of computer application technology, and in particular to a clothing image classification, an image classification method, device, and equipment.
背景技术Background technique
目前,为了方便管理,提高工作效率,现有的服装加工厂多使用一个生产单位只处理一项固定不变的工作,以实现批量服装的生产过程,也即通常意义上的流水线工作方式。At present, in order to facilitate management and improve work efficiency, existing garment processing factories use more than one production unit to handle only one fixed job, so as to realize the mass garment production process, which is the assembly line work method in the usual sense.
由于服装加工厂可能同时加工不同的服装,为了获得不同服装的加工数量,需要对加工的不同服装进行数量统计。通常使用摄像头对服装进行图像采集,并提取图像的sift特征点、纹理、边缘轮廓等特征作为图像特征,之后可以基于图像特征对图像进行聚类,获得属于不同类型的图像,进而确认某一类型的图像对应服装的加工情况。Since garment processing factories may process different garments at the same time, in order to obtain the processing quantity of different garments, it is necessary to count the number of different garments processed. Generally, a camera is used to collect images of clothing, and the sift feature points, textures, edge contours and other features of the image are extracted as image features. Then the images can be clustered based on the image features to obtain images of different types, and then confirm a certain type The image corresponds to the processing of the garment.
但是,由于服装种类较为多样化,采集的服装图像中可能包含纹理比较丰富的服装图像,例如针对包含较为丰富的图案的服装采集的图像,也可能包含纹理比较简单的服装图像,例如,针对纯色的服装采集的图像,这些服装图像的纹理、轮廓等特征过于复杂或者过于简单,使用这些服装图像的纹理等特征对服装进行服装图像分类时,结果不准确,产生分类误差。However, due to the diversification of clothing types, the collected clothing images may contain clothing images with richer textures, such as images collected for clothing with richer patterns, or clothing images with relatively simple textures, for example, for pure colors. The texture and contour features of these clothing images are too complex or too simple. When using the texture and other features of these clothing images to classify clothing images, the results are inaccurate and classification errors occur.
发明内容Summary of the invention
本申请实施例提供了一种服装图像分类、图像分类方法、装置及设备,用以解决现有技术中多个图像分类结果不够准确的技术问题。The embodiments of the present application provide a clothing image classification, an image classification method, device, and equipment to solve the technical problem of insufficient accuracy of multiple image classification results in the prior art.
第一方面,本申请实施例中提供了一种服装图像分类方法,包括:In the first aspect, an embodiment of the present application provides a clothing image classification method, including:
获取多个服装图像;Obtain multiple clothing images;
针对任一个服装图像,将所述服装图像划分为多个区域图像;For any clothing image, divide the clothing image into multiple regional images;
分别提取所述多个区域图像的颜色直方图特征;Extracting the color histogram features of the multiple regional images respectively;
将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;Weighting the color histogram features of the multiple regional images to obtain the image features of the clothing image;
基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;Clustering the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets;
确定所述多个图像集合分别对应至少一个服装图像的图像数量。It is determined that the plurality of image sets respectively correspond to the number of images of at least one clothing image.
第二方面,本申请实施例中提供了一种图像分类方法,包括:In the second aspect, an image classification method is provided in an embodiment of the present application, including:
获取多个待处理图像;Acquire multiple images to be processed;
针对任一个待处理图像,将所述待处理图像划分为多个区域图像;For any image to be processed, dividing the image to be processed into multiple regional images;
分别提取所述多个区域图像的颜色直方图特征;Extracting the color histogram features of the multiple regional images respectively;
将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;Weighting the color histogram features of the multiple regional images to obtain the image feature of the image to be processed;
基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;Classifying the multiple to-be-processed images based on the image features of the multiple to-be-processed images to obtain multiple image sets;
确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;Determine the image type to which at least one image to be processed respectively corresponding to the multiple image sets belongs;
确定每个图像类别对应的至少一个待处理图像的图像数量。Determine the number of images of at least one image to be processed corresponding to each image category.
第三方面,本申请实施例中提供了一种服装图像分类装置,包括:In the third aspect, an embodiment of the present application provides a clothing image classification device, including:
第一获取模块,用于获取多个服装图像;The first acquisition module is used to acquire multiple clothing images;
第一划分模块,用于针对任一个服装图像,将所述服装图像划分为多个区域图像;The first division module is configured to divide the clothing image into multiple regional images for any clothing image;
第一提取模块,用于分别提取所述多个区域图像的颜色直方图特征;The first extraction module is configured to extract the color histogram features of the multiple regional images respectively;
第一加权模块,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;The first weighting module is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the clothing image;
第一聚类模块,用于基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;The first clustering module is configured to cluster the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets;
第一确定模块,用于确定所述多个图像集合分别对应至少一个服装图像的图像数量。The first determining module is configured to determine the number of images corresponding to at least one clothing image in each of the plurality of image sets.
第四方面,本申请实施例中提供了一种图像分类装置,包括:In a fourth aspect, an image classification device is provided in an embodiment of the present application, including:
第二获取模块,用于获取多个待处理图像;The second acquisition module is used to acquire multiple images to be processed;
第二划分模块,用于针对任一个待处理图像,将所述待处理图像划分为多个区域图像;The second division module is configured to divide the to-be-processed image into multiple regional images for any one to-be-processed image;
第二提取模块,用于分别提取所述多个区域图像的颜色直方图特征;The second extraction module is used to extract the color histogram features of the multiple regional images respectively;
第二加权模块,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所 述待处理图像的图像特征;The second weighting module is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the image to be processed;
第二聚类模块,用于基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;The second clustering module is configured to classify the multiple to-be-processed images based on the image features of the multiple to-be-processed images to obtain multiple image sets;
第二确定模块,用于确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;The second determining module is configured to determine the image type to which at least one image to be processed respectively corresponding to the multiple image sets belongs;
第三确定模块,用于确定每个图像类别对应的至少一个待处理图像的图像数量。The third determining module is used to determine the image quantity of at least one image to be processed corresponding to each image category.
第五方面,本申请实施例中提供了一种服装图像分类设备,包括:存储组件以及处理组件,所述存储组件存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件调用并执行;In a fifth aspect, an embodiment of the present application provides a clothing image classification device, including: a storage component and a processing component, the storage component stores one or more computer instructions, and the one or more computer instructions are used for the processing The component is called and executed;
所述处理组件用于:The processing component is used for:
获取多个服装图像;针对任一个服装图像,将所述服装图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;确定所述多个图像集合分别对应至少一个服装图像的图像数量。Acquire multiple clothing images; for any clothing image, divide the clothing image into multiple regional images; extract the color histogram features of the multiple regional images respectively; combine the color histogram features of the multiple regional images Perform weighting processing to obtain image features of the clothing image; cluster the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets; determine that the multiple image sets correspond to each other The number of images of at least one clothing image.
第六方面,本申请实施例中提供了一种图像分类设备,包括:存储组件以及处理组件,所述存储组件存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件调用并执行;In a sixth aspect, an embodiment of the present application provides an image classification device, including: a storage component and a processing component, the storage component stores one or more computer instructions, and the one or more computer instructions are provided to the processing component Call and execute
所述处理组件用于:The processing component is used for:
获取多个待处理图像;针对任一个待处理图像,将所述待处理图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;确定每个图像类别对应的至少一个待处理图像的图像数量。Acquire multiple images to be processed; for any image to be processed, divide the image to be processed into multiple regional images; extract the color histogram features of the multiple regional images respectively; The histogram features are weighted to obtain the image features of the image to be processed; based on the image features of the multiple images to be processed, the multiple images to be processed are classified to obtain multiple image sets; The image types to which at least one image to be processed respectively correspond to each image set; determine the number of images of at least one image to be processed corresponding to each image category.
本申请实施例中,提取多个服装图像后,可以针对任一个服装图像,将所述服装图像划分为多个区域图像,之后,可以分别提取每个区域图像的颜色直方图特征,每个区域图像的颜色直方图特征可以体现服装图像的在该区域的局部颜色特征;将多个区域图像的颜色直方图加权处理生成服装图像的图像特征,获得的图像特征可以实现对产品图像的整体颜色特征的关注;另外,由于图像的纹理实际为像素值变化产生的,每个区域 图像的直方图特征实际为统计每个像素点的颜色直方图获得,因此,以多个区域图像的颜色直方图加权处理获得的图像特征,还可以从纹理上表征图像的特性。进而基于多个服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。由于各个服装图像的图像特征从局部以及整体上都能够表征服装图像的颜色和纹理特征,因此,获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,以通过服装图像的图像数量可以实现对服装生产过程的精准监控。In the embodiment of the present application, after extracting multiple clothing images, the clothing image can be divided into multiple regional images for any clothing image, and then the color histogram feature of each regional image can be extracted separately. The color histogram characteristics of the image can reflect the local color characteristics of the clothing image in the region; the color histograms of multiple regional images are weighted to generate the image characteristics of the clothing image, and the obtained image characteristics can realize the overall color characteristics of the product image In addition, because the texture of the image is actually produced by the change of pixel value, the histogram feature of each area image is actually obtained by counting the color histogram of each pixel. Therefore, the color histogram of multiple area images is weighted The image characteristics obtained by processing can also characterize the characteristics of the image from the texture. Furthermore, based on the image features of multiple clothing images, when multiple clothing images are clustered, accurate classification results can be obtained. Since the image features of each clothing image can represent the color and texture features of the clothing image locally and as a whole, the classification error of multiple image sets obtained is small, and it can be accurately determined that multiple image sets correspond to at least one clothing image. The number of images can be used to accurately monitor the clothing production process through the number of clothing images.
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。These and other aspects of the present application will be more concise and understandable in the description of the following embodiments.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了本申请提供的一种服装图像分类方法一个实施例的流程图;Fig. 1 shows a flowchart of an embodiment of a clothing image classification method provided by the present application;
图2示出了本申请提供的一种服装图像分类方法又一个实施例的流程图;Figure 2 shows a flowchart of another embodiment of a clothing image classification method provided by the present application;
图3示出了本申请提供的一种图片分类方法一个实施例的流程图;Fig. 3 shows a flowchart of an embodiment of a picture classification method provided by the present application;
图4示出了本申请提供的一种服装图像分类装置一个实施例的结构示意图;Fig. 4 shows a schematic structural diagram of an embodiment of a clothing image classification device provided by the present application;
图5示出了本申请提供的一种服装图像分类设备一个实施例的结构示意图;FIG. 5 shows a schematic structural diagram of an embodiment of a clothing image classification device provided by the present application;
图6示出了本申请提供的一种图片分类装置一个实施例的结构示意图;FIG. 6 shows a schematic structural diagram of an embodiment of a picture classification device provided by this application;
图7示出了本申请提供的一种图片分类设备一个实施例的结构示意图。Fig. 7 shows a schematic structural diagram of an embodiment of a picture classification device provided by the present application.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application.
在本申请的说明书和权利要求书及上述附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如101、102等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第 二”是不同的类型。In some of the procedures described in the specification and claims of this application and the above-mentioned drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be in the order in which they appear in this document. Execution or parallel execution, the sequence numbers of operations such as 101, 102, etc., are only used to distinguish different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions of "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, nor do they limit the "first" and "second" Are different types.
本发明实施例可以应用于数字化工厂管理中,通过对服装的生产过程进行智能化监控,以随时获知服装的生产进度,提高生产效率。The embodiments of the present invention can be applied to digital factory management, through the intelligent monitoring of the clothing production process, so as to know the production progress of the clothing at any time and improve production efficiency.
现有技术中,可以使用摄像头对服装进行图像采集,并提取图像的纹理、轮廓等图像特征,并基于图像特征对采集的多个图像进行分类,进而获得分属于不同类型的图像,进而确定不同类型的图像对应的服装的生产进度。但是,通过纹理、轮廓等特征表征图像时,会导致图像分类结果不够准确,容易产生分类误差。发明人发现,提取图像的纹理、轮廓等图像特征时,由于直接对整张图像进行提取,获得的图像特征不能很好地表征局部特征,且这种方式提取的特征,容易受到服装的形状、颜色、图案等因素的影响,也容易收到光照、曝光度等因素的影响,进而提取的特征不够准确,导致分类误差。In the prior art, a camera can be used to collect images of clothing, and image features such as texture and contour of the image can be extracted, and the collected multiple images can be classified based on the image features, so as to obtain images belonging to different types, and then determine different The production schedule of the garment corresponding to the type of image. However, when the image is characterized by features such as texture and contour, the result of image classification is not accurate enough, and classification errors are prone to occur. The inventor found that when extracting image features such as texture and contour of an image, because the entire image is directly extracted, the obtained image features cannot well represent local features, and the features extracted in this way are easily affected by the shape, The influence of factors such as color and pattern is also easily affected by factors such as light and exposure, and the extracted features are not accurate enough, leading to classification errors.
据此,发明人提出了本申请的技术方案,本发明实施例中,提取多个服装图像后,可以针对任一个服装图像,将所述服装图像划分为多个区域图像,之后,可以分别提取每个区域图像的颜色直方图特征,并将多个区域图像的颜色直方图特征进行加权处理,获得服装图像的图像特征。将服装图像划分为多个区域图像,并提取每个区域图像的颜色直方图实现对服装图像的局部特征的提取,由于又对多个区域图像的颜色直方图特征进行加权处理,实现对服装图像的整体特征的关注,获得的服装图像的图像特征可以从空间角度较为全面的表征;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,通过服装图像的图像数量可以实现对服装生产过程的精准监控。Based on this, the inventor proposed the technical solution of the present application. In the embodiment of the present invention, after extracting multiple clothing images, the clothing image can be divided into multiple regional images for any clothing image, and then can be extracted separately The color histogram features of each regional image are weighted to obtain the image features of the clothing image. The clothing image is divided into multiple regional images, and the color histogram of each regional image is extracted to extract the local features of the clothing image. Because the color histogram features of multiple regional images are weighted, the clothing image is realized The overall characteristics of the clothing image can be fully characterized from a spatial perspective; in addition, the histogram feature can represent the characteristics of the image from the color and texture, and is not easily affected by the clothing itself and the image collection environment. Furthermore, the weighted processing of the color histograms of the multiple region images is used to generate the image features of the clothing images. When the multiple clothing images are clustered, accurate classification results can be obtained. The obtained multiple image sets have relatively small classification errors, and the number of images corresponding to at least one clothing image in each of the multiple image sets can be accurately determined, and the clothing production process can be accurately monitored through the number of clothing images.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of this application.
如图1所示,为本发明实施例提供的一种服装图像分类方法的一个实施例的流程图,所述方法可以包括以下几个步骤:As shown in FIG. 1, it is a flowchart of an embodiment of a clothing image classification method provided by an embodiment of the present invention. The method may include the following steps:
101:获取多个服装图像。101: Acquire multiple clothing images.
其中,每个服装图像可以对应一个服装,且每个图像对应的服装均不同。Among them, each clothing image can correspond to one clothing, and the clothing corresponding to each image is different.
可选地,为了获得准确的服装生产数量,以进行不同类型服装的生产调度,可以针 对生产完成且处于质量检验程序中的服装进行服装图像的采集。Optionally, in order to obtain an accurate production quantity of garments to perform production scheduling of different types of garments, garment images can be collected for garments that have been produced and are in the quality inspection program.
在实际应用中,由于一个工厂可能包含多个产线,对于不同摄像头采集的图像可能存在大小不一的现象,为了同一对图像进行分类处理,可以将不同摄像头采集的多个图像进行归一化,获得多个服装图像。在对多个图像进行归一化时,可以保持原图像的纵横比,进而获得纵横比不变且尺寸归一化的多个服装图像。In practical applications, since a factory may contain multiple production lines, images collected by different cameras may have different sizes. In order to classify and process the same image, multiple images collected by different cameras can be normalized To obtain multiple clothing images. When the multiple images are normalized, the aspect ratio of the original image can be maintained, and then multiple clothing images with the same aspect ratio and normalized size can be obtained.
102:针对任一个服装图像,将所述服装图像划分为多个区域图像。102: For any clothing image, divide the clothing image into multiple regional images.
可以从多个服装图像中选择任一个服装图像,并将选择的服装图像划分为多个区域图像。It is possible to select any clothing image from a plurality of clothing images, and divide the selected clothing image into multiple regional images.
在某些实施例中,为了获得均衡的划分结果,针对任一个服装图像,可以将服装图像按照预设区域位置以及预设区域大小划分为多个区域图像。In some embodiments, in order to obtain a balanced division result, for any clothing image, the clothing image may be divided into multiple area images according to the preset area position and the preset area size.
其中,区域位置可以指区域图像的中心位置,区域大小可以指区域图像的图像大小,具体可以指区域图像的横向像素点数量以及纵向像素点数量。Wherein, the area position may refer to the center position of the area image, and the area size may refer to the image size of the area image, specifically it may refer to the number of horizontal pixels and the number of vertical pixels of the area image.
在一种可能的实现方式中,为了使得服装图像被均匀划分,对不同位置的颜色特征进行采集,可以将任一个服装图像,按照N*M的数量划分为多个区域图像。N可以与M相等,服装图像的横纵划分数量相同,因此,每个区域图像的区域大小相同。其中,N为大于1,小于服装图像像素点数量。在实际应用中,N可以取值为3,也即可以将服装图像均匀划分为9个大小相同的区域图像。In a possible implementation manner, in order to make the clothing image evenly divided and to collect color features at different positions, any clothing image can be divided into multiple regional images according to the number of N*M. N can be equal to M, and the number of horizontal and vertical divisions of the clothing image is the same. Therefore, the area size of each area image is the same. Among them, N is greater than 1, less than the number of pixels in the clothing image. In practical applications, N can take a value of 3, that is, the clothing image can be evenly divided into 9 regional images of the same size.
103:分别提取所述多个区域图像的颜色直方图特征。103: Extract the color histogram features of the multiple regional images respectively.
将服装图像进行了分块,以分别获得每个区域图像的颜色直方图特征,以对服装图像进行局部特征的提取,关注服装图像的局部特征。The clothing image is divided into blocks to obtain the color histogram features of each region image respectively, so as to extract the local features of the clothing image and pay attention to the local features of the clothing image.
为了提高统计效率,在实际应用中,可以直接对区域图像的多个像素点进行直方图统计,获得区域图像的颜色直方图特征。分别提取多个区域图像的颜色直方图特征,获得多个区域图像分别对应的颜色直方图特征。104:将多个区域图像的颜色直方图特征进行加权处理,获得服装图像的图像特征。In order to improve statistical efficiency, in practical applications, you can directly perform histogram statistics on multiple pixels of the regional image to obtain the color histogram characteristics of the regional image. Extract the color histogram features of the multiple area images respectively, and obtain the color histogram features corresponding to the multiple area images respectively. 104: Perform weighting processing on the color histogram features of multiple regional images to obtain image features of the clothing image.
其中,每个区域图像的颜色直方图特征可以以颜色特征矩阵的形式表示。Among them, the color histogram feature of each region image can be expressed in the form of a color feature matrix.
作为一种可能的实现方式,可以将多个区域图像的颜色直方图特征按照预定加权规则进行加权处理,获得服装图像的图像特征。预定加权规则实际可以指将每个区域图像的颜色直方图特征按照每个区域图像对应的特征权重以及加权位置进行加权处理,获得服装图像的图像特征。As a possible implementation manner, the color histogram features of multiple regional images can be weighted according to a predetermined weighting rule to obtain the image features of the clothing image. The predetermined weighting rule may actually mean that the color histogram feature of each regional image is weighted according to the feature weight and weighted position corresponding to each regional image to obtain the image feature of the clothing image.
在某些实施例中,为了将每个区域的特征均衡作用于服装图像的图像特征上,使得 获得的图像特征更准确,可以将每个区域图像的颜色直方图特征的权重设置为1。在每个区域图像的颜色直方图特征为颜色特征矩阵时,所述将多个区域图像的颜色直方图特征进行加权处理,获得服装图像的图像特征可以包括:按照每个区域图像在服装图像中的位置,确定每个区域图像的颜色直方图特征的加权顺序;将多个颜色特征矩阵,分别按照其对应的加权顺序进行矩阵横向或纵向拼接,获得的特征矩阵即为服装图像的图像特征。In some embodiments, in order to balance the features of each region on the image features of the clothing image, so that the obtained image features are more accurate, the weight of the color histogram feature of each region image can be set to 1. When the color histogram feature of each region image is a color feature matrix, performing weighting processing on the color histogram features of the multiple region images to obtain the image features of the clothing image may include: according to each region image in the clothing image Determine the weighting order of the color histogram features of each regional image; combine multiple color feature matrices in horizontal or vertical matrix according to their corresponding weighting order, and the obtained feature matrix is the image feature of the clothing image.
在实际应用中为了确保每个区域图像的颜色直方图特征对服装图像的图像特征的局部影响相同,生成准确的图像特征,可以将每个区域图像的特征权重设置相同,例如,均设置为1,此时,可以将多个区域图像分别对应的颜色直方图特征直接进行特征拼接,获得服装图像的图像特征。例如,假设3个相邻区域图像A1、A2、A3分别对应的颜色直方图特征为B1、B2、B3,则区域图像A1、A2、A3对应的服装图像的特征可以为B1B2B3。In practical applications, in order to ensure that the color histogram features of each region image have the same local impact on the image features of the clothing image and generate accurate image features, the feature weight of each region image can be set the same, for example, set to 1. At this time, the color histogram features corresponding to the multiple regional images can be directly stitched to obtain the image features of the clothing image. For example, assuming that the color histogram features corresponding to the three adjacent area images A1, A2, and A3 are B1, B2, and B3, the clothing image corresponding to the area images A1, A2, and A3 may have the feature B1B2B3.
105:基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合。105: Based on the image features of the multiple clothing images, cluster the multiple clothing images to obtain multiple image sets.
每个服装图像可以代表一个服装,每个服装图像的图像特征即可以表示服装的特征,如果服装图像相同,说明服装图像对应的服装相同。对于同一类服装,其服装图像的图像特征是相同的。基于多个服装图像各自的图像特征,将多个服装图像进行聚类,获得多个图像集合具体可以是将多个服装图像各自的图像特征,将特征相似度较高的服装图像划分为同一类图像,获得多个图像集合。Each clothing image can represent a clothing, and the image feature of each clothing image can represent the feature of the clothing. If the clothing image is the same, it means that the clothing corresponding to the clothing image is the same. For the same type of clothing, the image features of the clothing image are the same. Based on the respective image features of multiple clothing images, clustering multiple clothing images to obtain multiple image sets can specifically be to divide the respective image features of multiple clothing images and classify clothing images with higher feature similarity into the same category Image, get multiple image collections.
基于多个服装图像各自的图像特征,使用聚类算法将多个服装图像进行聚类,获得多个图像集合。Based on the respective image features of multiple clothing images, a clustering algorithm is used to cluster multiple clothing images to obtain multiple image sets.
在某些实施例中,可以使用聚类算法,将多个服装图像各自的图像特征进行特征聚类,之后将图像特征相同的特征类对应的服装图像作为一个图像集合,获得多个图像集合。In some embodiments, a clustering algorithm may be used to perform feature clustering on respective image features of multiple clothing images, and then clothing images corresponding to feature classes with the same image features are used as an image set to obtain multiple image sets.
其中,每个图像集合中可以对应有至少一个服装图像,所述至少一个服装图像对应的服装为同一类服装。Wherein, each image set may correspond to at least one clothing image, and the clothing corresponding to the at least one clothing image is of the same type of clothing.
106:确定所述多个图像集合分别对应至少一个服装图像的图像数量。106: Determine the number of images in which the multiple image sets respectively correspond to at least one clothing image.
每个图像集合中可以对应至少一个服装图像,可以统计至少一个服装图像的数量,获得图像数量,也即,获得每个图像集合对应的图像数量。Each image collection can correspond to at least one clothing image, and the number of at least one clothing image can be counted to obtain the number of images, that is, to obtain the number of images corresponding to each image collection.
在某些实施例中,确定多个图像集合分别对应至少一个服装图像的图像数量之后, 还可以输出所述多个图像集合以及每个图像集合对应的图像数量,以方便用户查看。In some embodiments, after determining the number of images corresponding to at least one clothing image in each of the multiple image sets, the multiple image sets and the number of images corresponding to each image set may also be output to facilitate the user to view.
本发明实施例中,提取多个服装图像后,可以针对任一个服装图像,将所述服装图像划分为多个区域图像,之后,可以分别提取每个区域图像的颜色直方图特征,每个区域图像的颜色直方图特征可以体现服装图像的在该区域的局部颜色特征;将多个区域图像的颜色直方图加权处理生成服装图像的图像特征,获得的图像特征可以实现对产品图像的整体颜色特征的关注。In the embodiment of the present invention, after extracting multiple clothing images, the clothing image can be divided into multiple regional images for any clothing image, and then the color histogram features of each regional image can be extracted separately. The color histogram characteristics of the image can reflect the local color characteristics of the clothing image in the region; the color histograms of multiple regional images are weighted to generate the image characteristics of the clothing image, and the obtained image characteristics can realize the overall color characteristics of the product image s concern.
另外,由于图像的纹理实际为像素值变化产生的,每个区域图像的直方图特征实际为统计每个像素点的颜色直方图获得,因此,以多个区域图像的颜色直方图加权处理获得的图像特征,还可以从纹理上表征图像的特性。进而基于多个服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。由于各个服装图像的图像特征从局部以及整体上都能够表征服装图像的颜色和纹理特征,因此,获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,以通过服装图像的图像数量可以实现对服装生产过程的精准监控。In addition, because the texture of the image is actually produced by the change in pixel value, the histogram feature of each area image is actually obtained by counting the color histogram of each pixel. Therefore, the color histogram of multiple area images is weighted. Image features can also characterize image characteristics from texture. Furthermore, based on the image features of multiple clothing images, when multiple clothing images are clustered, accurate classification results can be obtained. Since the image features of each clothing image can represent the color and texture features of the clothing image locally and as a whole, the classification error of multiple image sets obtained is small, and it can be accurately determined that multiple image sets correspond to at least one clothing image. The number of images can be used to accurately monitor the clothing production process through the number of clothing images.
在实际应用中,颜色直方图特征可以包含颜色特征矩阵,也即颜色直方图特征以颜色特征矩阵的形式表达图像的特性。In practical applications, the color histogram feature may include a color feature matrix, that is, the color histogram feature expresses the characteristics of the image in the form of a color feature matrix.
所述将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征可以包括:The performing weighting processing on the color histogram features of the multiple regional images to obtain the image features of the clothing image may include:
将所述多个区域图像各自的颜色特征矩阵进行横向或纵向的矩阵拼接处理,获得服装图像的图像特征。Perform horizontal or vertical matrix stitching processing on the respective color feature matrices of the multiple regional images to obtain image features of the clothing image.
任意两个颜色特征矩阵的横向拼接处理具体可以指将第一颜色特征矩阵的任一行与第二颜色特征矩阵对应的一行进行拼接处理,获得两个颜色特征矩阵的横向拼接矩阵。例如,假设第一颜色特征矩阵为[101;100],第二颜色特征矩阵为[202;200],将两个颜色特征矩阵进行横向拼接获得的横向拼接矩阵为[101202;100200]。The horizontal splicing processing of any two color feature matrices may specifically refer to splicing any row of the first color feature matrix and a row corresponding to the second color feature matrix to obtain a horizontal splicing matrix of two color feature matrices. For example, suppose the first color feature matrix is [101; 100], the second color feature matrix is [202; 200], and the horizontal mosaic matrix obtained by horizontally splicing two color feature matrices is [101202; 100200].
任意两个颜色特征矩阵的纵向拼接处理具体可以指基于第一颜色特征矩阵的最后一行以及第二颜色特征矩阵的第一行,将第一颜色特征矩阵以及第二颜色特征矩阵进行纵向拼接,获得两个颜色特征矩阵的纵向拼接矩阵。例如,假设第一颜色特征矩阵为[101;100],第二颜色特征矩阵为[202;200],将两个颜色特征矩阵进行纵向拼接获得的纵向拼接矩阵可以为[101;100;202;200]。The vertical splicing processing of any two color feature matrices may specifically refer to longitudinal splicing of the first color feature matrix and the second color feature matrix based on the last row of the first color feature matrix and the first row of the second color feature matrix to obtain Vertical mosaic matrix of two color feature matrices. For example, assuming that the first color feature matrix is [101; 100] and the second color feature matrix is [202; 200], the vertical stitching matrix obtained by vertically stitching the two color feature matrices may be [101; 100; 202; 200].
如图2所示,为本发明实施例提供的一种服装图像分类方法的又一个实施例的流程图,与图1所示的实施例的不同之处在于,在步骤106确定所述多个图像集合分别对应 至少一个服装图像的图像数量之后,所述方法还可以包括:As shown in FIG. 2, it is a flowchart of another embodiment of a clothing image classification method provided by an embodiment of the present invention. The difference from the embodiment shown in FIG. 1 lies in that it is determined in step 106 that the multiple After the image sets respectively correspond to the number of images of at least one clothing image, the method may further include:
201:确定所述多个图像集合分别对应的至少一个服装图像所在的服装类型。201: Determine the clothing type where at least one clothing image corresponding to each of the multiple image sets is located.
每个图像集合可以对应至少一个服装图像,属于同一个图像的服装图像属于同一种服装类型,因此,每个图像集合对应的至少一个服装图像属于同一服装类型,可以确定多个图像集合分别对应的至少一个服装图像所在的服装类型。Each image collection can correspond to at least one clothing image, and clothing images belonging to the same image belong to the same clothing type. Therefore, at least one clothing image corresponding to each image collection belongs to the same clothing type. It can be determined that multiple image collections correspond to each other. At least one clothing type of clothing image.
作为一个实施例,所述确定多个图像集合分别对应的至少一个服装图像所在的服装类型可以包括:As an embodiment, the determining the clothing type of at least one clothing image corresponding to each of the multiple image sets may include:
确定至少一个训练图像以及每个训练图像的图像特征;其中,每个训练图像对应一个服装类型;Determine at least one training image and the image characteristics of each training image; wherein each training image corresponds to a clothing type;
基于多个图像集合分别对应的至少一个服装图像的图像特征,确定与所述每个图像集合匹配的训练图像;Determining a training image matching each image set based on the image features of at least one clothing image corresponding to the multiple image sets;
所述多个图像集合分别对应的训练图像的服装类型,作为所述多个图像集合分别对应的至少一个服装图像所在的服装类型。The clothing types of the training images respectively corresponding to the multiple image sets are used as clothing types where at least one clothing image corresponding to the multiple image sets is located.
为了使图像的特征表达方式相同,以实现不同图像的特征匹配,该训练图像的图像特征的获取方式与图1~图2中所示的实施例的特征获取方式相同。In order to make the feature expression modes of the images the same to achieve feature matching of different images, the image feature acquisition method of the training image is the same as the feature acquisition method of the embodiment shown in FIGS. 1 to 2.
因此,每个训练图像的图像特征可以通过以下方式获得:Therefore, the image features of each training image can be obtained in the following ways:
针对任一个训练图像,将所述训练图像划分为多个训练区域图像;For any training image, dividing the training image into multiple training region images;
分别提取所述多个训练区域图像的颜色直方图特征;Extracting the color histogram features of the multiple training region images respectively;
将所述多个训练区域图像的颜色直方图特征进行加权处理,获得多个训练图像的图像特征。The color histogram features of the multiple training region images are weighted to obtain the image features of the multiple training images.
每个区域图像的区域位置不同,为了使得不同服装图像的图像特征的表示方式相同,可以将区域图像的颜色直方图特征按照区域位置进行加权处理,获得服装图像的图像特征。作为又一个实施例,上述步骤104:将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征可以包括:The regional position of each regional image is different. In order to make the image feature representation of different clothing images the same, the color histogram feature of the regional image can be weighted according to the regional location to obtain the image feature of the clothing image. As another embodiment, the above step 104: weighting the color histogram features of the multiple region images, and obtaining the image features of the clothing image may include:
将所述多个区域图像的颜色直方图特征,按照所述多个区域图像的区域位置进行加权处理,获得所述服装图像的图像特征。The color histogram features of the multiple regional images are weighted according to the regional positions of the multiple regional images to obtain the image features of the clothing image.
按照多个区域图像的区域位置进行加权处理具体可以指根据任一区域图像的区域位置确定区域图像的加权位置,并将所述区域图像按照其对应的加权位置,将其对应的颜色直方图特征进行特征拼接,以在多个区域图像的颜色直方图特征均特征拼接完成时,获得服装图像的图像特征。当颜色直方图特征为颜色特征矩阵时,将颜色直方图特征进 行特征拼接可以指将颜色直方图矩阵进行矩阵拼接。Performing weighting processing according to the regional positions of multiple regional images can specifically refer to determining the weighted position of the regional image according to the regional position of any regional image, and according to the corresponding weighted position of the regional image, the corresponding color histogram feature The feature stitching is performed to obtain the image features of the clothing image when the feature stitching of the color histogram features of the multiple regional images is completed. When the color histogram feature is a color feature matrix, the feature splicing of the color histogram feature can refer to the matrix splicing of the color histogram matrix.
由于使用单纯统计每个像素点像素值的方式,可以表示不同像素点的颜色总体特征,但是不能显示不同像素点在不同颜色空间的特性,因此,作为又一个实施例,所述步骤103分别提取所述多个区域图像的颜色直方图特征可以包括:Since the method of simply counting the pixel value of each pixel can represent the overall color characteristics of different pixels, but cannot display the characteristics of different pixels in different color spaces, as another embodiment, the step 103 extracts The color histogram features of the multiple regional images may include:
分别提取所述多个区域图像在多个颜色通道的颜色直方图特征。Extracting the color histogram features of the multiple region images in multiple color channels respectively.
可以依次提取每个区域图像在多个颜色通道的颜色直方图特征。基于多个颜色通道可以分别提取多个区域图像的颜色直方图特征。The color histogram features of each area image in multiple color channels can be extracted sequentially. Based on multiple color channels, the color histogram features of multiple regional images can be extracted respectively.
其中,每个颜色通道可以表示不同颜色特性,可以将不同像素点在不同颜色空间的特征通过转换至对应的颜色通道的方式获得。Among them, each color channel can represent different color characteristics, and the characteristics of different pixels in different color spaces can be obtained by converting to the corresponding color channel.
为了获得准确的颜色直方图特征,作为又一个实施例,所述分别提取所述多个区域图像在多个颜色通道的颜色直方图特征可以包括:In order to obtain accurate color histogram features, as yet another embodiment, the respectively extracting the color histogram features of the multiple region images in multiple color channels may include:
针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征;Extracting channel histogram features corresponding to each of the multiple color channels of the regional image for any one of the multiple regional images;
将所述多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征。The channel histogram features corresponding to the multiple color channels are weighted to obtain the color histogram feature of the regional image.
通道直方图特征可以指通道特征矩阵。将多个颜色通道分别对应的通道直方图特征进行加权处理,获得区域图像的颜色直方图特征可以包括:将多个通道特征矩阵进行横向或纵向的矩阵拼接处理,获得区域图像的颜色直方图特征。还可以通过多个颜色通道的通道顺序,确定多个颜色通道各自的加权顺序,将多个通道特征矩阵按照各自的加权顺序进行矩阵的横向或纵向拼接获得的特征矩阵即为区域图像的颜色直方图特征。The channel histogram feature can refer to the channel feature matrix. Weighting the channel histogram features corresponding to multiple color channels to obtain the color histogram feature of the regional image may include: performing horizontal or vertical matrix stitching processing on the multiple channel feature matrices to obtain the color histogram feature of the regional image . It is also possible to determine the respective weighting order of multiple color channels through the channel order of multiple color channels, and perform horizontal or vertical splicing of multiple channel feature matrices according to their respective weighting order. The feature matrix obtained is the color histogram of the regional image. Figure features.
通过提取区域图像在多个颜色直方图通道分别对应的通道直方图特征,并将多个通道直方图特征进行加权处理后获得区域图像的颜色直方图特征。在实际应用中,针对多个颜色通道对应的通道直方图特征的加权处理,可以将每个通道直方图特征进行加权处理,生成所述区域图像的颜色直方图。The color histogram features of the regional image are obtained by extracting the channel histogram features corresponding to the multiple color histogram channels of the regional image, and weighting the multiple channel histogram features. In practical applications, for the weighting processing of channel histogram features corresponding to multiple color channels, each channel histogram feature may be weighted to generate the color histogram of the regional image.
在某些实施例中,所述针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征包括:In some embodiments, for any one of the multiple regional images, extracting the channel histogram features corresponding to the multiple color channels of the regional image includes:
针对所述多个区域图像中的任一个区域图像,将所述区域图像的每个像素点在所述多个颜色通道分别对应的通道值;For any one of the multiple regional images, assign each pixel of the regional image to the corresponding channel value of the multiple color channels;
将每个颜色通道划分为多个直方图统计区间;Divide each color channel into multiple histogram statistical intervals;
针对任一个颜色通道,统计所述区域图像的多个像素点在所述颜色通道的通道值, 在所述颜色通道对应多个直方图统计区间分别对应的分布数量;For any color channel, count the channel values of the multiple pixels of the region image in the color channel, and the number of distributions corresponding to multiple histogram statistical intervals in the color channel;
基于所述多个直方图统计区间各自的分布数量,确定所述区域图像在所述颜色通道的通道直方图特征。Based on the respective distribution numbers of the multiple histogram statistical intervals, the channel histogram characteristics of the region image in the color channel are determined.
在某些实施例中,上述所述的服装图像分类方法还可以包括:In some embodiments, the clothing image classification method described above may further include:
确定至少一个颜色空间模型分别对应的三个颜色通道构成的多个颜色通道。Multiple color channels formed by three color channels corresponding to at least one color space model are determined.
至少一个颜色空间模块可以事先设置,可以通过至少一个颜色空间模型分别对应的三颜色通道获得多个颜色通道,确定多个颜色通道具体可以是获取事先设置的至少一个颜色空间模型分别对应的三个色通道构成的多个颜色通道,进而提高处理效率。At least one color space module can be set in advance, and multiple color channels can be obtained through three color channels corresponding to at least one color space model. The determination of multiple color channels may specifically be to obtain three corresponding to at least one color space model set in advance. Multiple color channels formed by color channels, thereby improving processing efficiency.
对于任一个区域图像,可以提取区域图像在多个颜色通道分别对应的通道直方图,具体可以将区域图像的多个像素点各自的像素值分别转换至多个颜色通道,获得每个像素点对应多个颜色通道的通道值,而针对每个颜色通道,可以获得各个区域图像对应多个像素点在该通道所对应的通道值,继而可以针对任一个颜色通道进行通道直方图统计。For any regional image, the channel histogram corresponding to the multiple color channels of the regional image can be extracted. Specifically, the respective pixel values of multiple pixels of the regional image can be converted to multiple color channels to obtain the corresponding multiple of each pixel. The channel value of each color channel, and for each color channel, the channel value corresponding to multiple pixels in each area image can be obtained, and then channel histogram statistics can be performed for any color channel.
由于通道数量较多,如果每个通道对应的数据一一统计,需要增加量计算过程,获得的通道直方图特征的数据维度也会非常高。因此,可以将每个颜色通道进行直方图统计区间划分,以将不同颜色通道按照直方图统计区间进行统计。Due to the large number of channels, if the data corresponding to each channel is counted one by one, the calculation process needs to be increased, and the data dimension of the obtained channel histogram feature will also be very high. Therefore, each color channel can be divided into histogram statistical intervals, so that different color channels can be counted according to the histogram statistical intervals.
在一些可能的设计中,所述至少一个颜色空间包括RGB颜色空间、HSV颜色空间以及YcbCr颜色空间;In some possible designs, the at least one color space includes RGB color space, HSV color space, and YcbCr color space;
其中,所述RGB颜色空间对应R颜色通道、G颜色通道以及B颜色通道,HSV颜色空间对应H颜色通道、S颜色通道以及V颜色通道,YcbCr颜色空间对应Y颜色通道、Cb颜色通道、Cv颜色通道。Wherein, the RGB color space corresponds to the R color channel, the G color channel, and the B color channel, the HSV color space corresponds to the H color channel, the S color channel, and the V color channel, and the YcbCr color space corresponds to the Y color channel, Cb color channel, and Cv color. aisle.
对于不同的颜色通道,可以针对其通道特征,将每个颜色通道按照划分次数将每个颜色通道划分为多个直方图统计区间。For different color channels, according to their channel characteristics, each color channel can be divided into multiple histogram statistical intervals according to the number of divisions.
作为一种可能的实现方式,可以将R颜色通道划分为24个直方图统计区间、G颜色通道划分为24个直方图统计区间以及B颜色通道划分为24个直方图统计区间,HSV颜色空间对应H颜色通道划分为32个直方图统计区间、S颜色通道划分为32个直方图统计区间以及V颜色通道对应8个直方图统计区间,YcbCr颜色空间对应Y颜色通道划分为24个直方图统计区间、Cb颜色通道划分为16个直方图统计区间、Cv颜色通道划分为16个统计区间。As a possible implementation, the R color channel can be divided into 24 histogram statistical intervals, the G color channel can be divided into 24 histogram statistical intervals, and the B color channel can be divided into 24 histogram statistical intervals. The HSV color space corresponds to The H color channel is divided into 32 histogram statistics intervals, the S color channel is divided into 32 histogram statistics intervals, the V color channel corresponds to 8 histogram statistics intervals, and the YcbCr color space corresponds to the Y color channel is divided into 24 histogram statistics intervals. , The Cb color channel is divided into 16 histogram statistical intervals, and the Cv color channel is divided into 16 statistical intervals.
进而可以统计多个像素点分别对应多个颜色通道上的通道值在每个统计区间的出现次数,进而获得每个统计区间对应的直方图特征数值。Furthermore, it is possible to count the number of occurrences in each statistical interval of the channel values of the multiple pixel points corresponding to the multiple color channels, and then obtain the histogram characteristic value corresponding to each statistical interval.
以上述G颜色通道划分为例,G颜色通道划分为24个直方图统计区间后,可以统计多个像素点在G颜色通道对应的通道值,分别在每个统计区间的出现次数,进而获得G颜色通道在24个统计区间分别对应的分布数量,获得G颜色通道的通道直方图特征,且该特征为1*24维数据。同样可以获得R、B、H、S、V、Y、Cb、Cr等颜色通道对应的直方图特征,且他们的特征的维度为分别为1*24、1*24、1*32、1*32、1*8、1*24、1*16、1*16。Taking the above G color channel division as an example, after the G color channel is divided into 24 histogram statistical intervals, the channel values of multiple pixels in the G color channel can be counted, the number of occurrences in each statistical interval, and then G The distribution numbers of the color channels corresponding to each of the 24 statistical intervals, the channel histogram feature of the G color channel is obtained, and the feature is 1*24 dimensional data. The histogram features corresponding to color channels such as R, B, H, S, V, Y, Cb, Cr can also be obtained, and the dimensions of their features are 1*24, 1*24, 1*32, 1*, respectively 32, 1*8, 1*24, 1*16, 1*16.
之后,可以将多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征,按照此方式进行特征加权处理,例如,将每个通道对应的通道直方图特征直接进行加权处理,获得1*200维的颜色特征直方图。如将每个服装通道平均划分为9个区域图像,将多个区域图像分别对应的颜色直方图特征进行特征加权处理,例如简单特征拼接,可以获得服装图像为1*1800维的图像特征。After that, the channel histogram features corresponding to the multiple color channels can be weighted to obtain the color histogram features of the regional image, and the feature weighting can be performed in this way, for example, the channel histogram features corresponding to each channel Perform weighting directly to obtain a 1*200-dimensional color feature histogram. For example, each clothing channel is divided into 9 regional images on average, and the corresponding color histogram features of multiple regional images are subjected to feature weighting processing, such as simple feature stitching, to obtain 1*1800 dimensional image features of clothing images.
通过图像特征并基于图像特征对多个服装图像进行聚类后,可以输出多个服装图像的聚类结果,以方便用户查看。作为又一个实施例,所述确定所述多个图像集合分别对应至少一个服装图像的图像数量之后,还包括:After clustering multiple clothing images based on image features, the clustering results of multiple clothing images can be output to facilitate users to view. As yet another embodiment, after the determining the number of images of the plurality of image sets corresponding to at least one clothing image, the method further includes:
将所述图像数量进行排序,以确定每个图像集合的输出顺序;Sort the number of images to determine the output order of each image set;
将多个图像集合按照各自的输出顺序,依次输出所述多个图像集合分别对应的至少一个服装图像。At least one clothing image corresponding to the multiple image sets is sequentially outputted according to the respective output order of the multiple image sets.
可选地,将图像数量进行排序,以确定每个图像集合的输出顺序具体可以指将图像数量按照数量大小进行升序或者降序,以确定每个图像集合的输出顺序。Optionally, sorting the number of images to determine the output order of each image collection may specifically refer to ascending or descending order of the number of images according to the number of images to determine the output order of each image collection.
如图3所示,为本发明实施例提供的一种图像分类方法的又一个实施例的流程图,所述方法可以包括以下几个步骤:As shown in FIG. 3, it is a flowchart of another embodiment of an image classification method provided by an embodiment of the present invention. The method may include the following steps:
301:获取多个待处理图像。301: Acquire multiple images to be processed.
302:针对任一个待处理图像,将所述待处理图像划分为多个区域图像。302: For any image to be processed, divide the image to be processed into multiple regional images.
303:分别提取所述多个区域图像的颜色直方图特征。303: Extract the color histogram features of the multiple regional images respectively.
304:将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征。304: Perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the image to be processed.
305:基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合。305: Based on the image features of the multiple to-be-processed images, classify the multiple to-be-processed images to obtain multiple image sets.
306:确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型。306: Determine the image type to which at least one image to be processed respectively corresponding to the multiple image sets belongs.
307:确定每个图像类别对应的至少一个待处理图像的图像数量。307: Determine the image quantity of at least one image to be processed corresponding to each image category.
本发明实施例提供的一种图像分类方法,与图1~图2所示的服装图像分类方法所使用的图像处理方式相同,在此不再赘述。The image classification method provided by the embodiment of the present invention is the same as the image processing method used in the clothing image classification method shown in FIG. 1 to FIG. 2, and will not be repeated here.
本发明实施例中,提取多个待处理图像后,可以针对任一个待处理图像,将所述待处理图像划分为多个区域图像,之后,可以分别提取每个区域图像的颜色直方图特征,并将多个区域图像的颜色直方图特征进行加权处理,获得待处理图像的图像特征。区域图像的颜色直方图特征可以体现待处理图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对待处理图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成待处理图像的图像特征,对多个待处理图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个待处理图像的图像数量,通过待处理图像的图像数量可以实现对服装生产过程的精准监控。In the embodiment of the present invention, after extracting multiple images to be processed, the image to be processed can be divided into multiple regional images for any image to be processed, and then the color histogram feature of each regional image can be extracted separately. The color histogram features of multiple regional images are weighted to obtain the image features of the image to be processed. The color histogram features of the regional image can reflect the local features of the image to be processed. Weighting the color histogram features of multiple regional images can realize the attention to the overall features of the image to be processed; in addition, the histogram features can be based on color and texture. The above characterizes the characteristics of the image, and is not easily affected by the clothing itself and the image collection environment. Furthermore, the weighted processing of the color histograms of the multiple regional images is used to generate the image characteristics of the image to be processed, and when the multiple images to be processed are clustered, accurate classification results can be obtained. The classification error of the obtained multiple image sets is small, and the number of images of the multiple image sets corresponding to at least one image to be processed can be accurately determined, and the clothing production process can be accurately monitored through the number of images to be processed.
如图4所示,为本发明实施例提供的一种服装图像分类装置的又一个实施例的结构示意图,所述装置可以包括以下几个模块:As shown in FIG. 4, it is a schematic structural diagram of another embodiment of a clothing image classification apparatus provided by an embodiment of the present invention. The apparatus may include the following modules:
第一获取模块401,用于获取多个服装图像;The first acquiring module 401 is used to acquire multiple clothing images;
第一划分模块402,用于针对任一个服装图像,将所述服装图像划分为多个区域图像;The first division module 402 is configured to divide the clothing image into multiple regional images for any clothing image;
第一提取模块403,用于分别提取所述多个区域图像的颜色直方图特征;The first extraction module 403 is configured to extract the color histogram features of the multiple regional images respectively;
第一加权模块404,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;The first weighting module 404 is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the clothing image;
第一聚类模块405,用于基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;The first clustering module 405 is configured to cluster the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets;
第一确定模块406,用于确定所述多个图像集合分别对应至少一个服装图像的图像数量。The first determining module 406 is configured to determine the number of images corresponding to at least one clothing image in each of the multiple image sets.
本申请实施例中,区域图像的颜色直方图特征可以体现服装图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对服装图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,通过服装图 像的图像数量可以实现对服装生产过程的精准监控。In the embodiments of this application, the color histogram features of the regional image can reflect the local features of the clothing image, and weighting the color histogram features of multiple regional images can realize the attention to the overall features of the clothing image; in addition, the histogram features The characteristics of the image can be characterized from the color and texture, and it is not easily affected by the clothing itself and the image collection environment. Furthermore, the weighted processing of the color histograms of the multiple region images is used to generate the image features of the clothing images. When the multiple clothing images are clustered, accurate classification results can be obtained. The classification error of the obtained multiple image sets is small, and the number of images corresponding to at least one clothing image in the multiple image sets can be accurately determined, and the clothing production process can be accurately monitored through the number of clothing images.
作为一个实施例,图4所示的装置还可以包括:As an embodiment, the device shown in FIG. 4 may further include:
第四确定模块,用于确定所述多个图像集合分别对应的至少一个服装图像所在的服装类型。The fourth determining module is used to determine the clothing type of at least one clothing image corresponding to the multiple image sets.
每个图像集合可以对应至少一个服装图像,属于同一个图像的服装图像属于同一种服装类型,因此,每个图像集合对应的至少一个服装图像属于同一服装类型,可以确定多个图像集合分别对应的至少一个服装图像所在的服装类型。Each image collection can correspond to at least one clothing image, and clothing images belonging to the same image belong to the same clothing type. Therefore, at least one clothing image corresponding to each image collection belongs to the same clothing type. It can be determined that multiple image collections correspond to each other. At least one clothing type of clothing image.
作为又一个实施例,图4所示的装置还可以包括:As yet another embodiment, the device shown in FIG. 4 may further include:
排序模块,用于将所述图像数量进行排序,以确定每个图像集合的输出顺序;A sorting module, used to sort the number of images to determine the output order of each image set;
输出模块,用于将多个图像集合按照各自的输出顺序,依次输出所述多个图像集合分别对应的至少一个服装图像。The output module is configured to sequentially output at least one clothing image corresponding to each of the multiple image sets according to the respective output order of the multiple image sets.
每个区域图像的区域位置不同,为了使得不同服装图像的图像特征的表示方式相同,可以将区域图像的颜色直方图特征按照其区域位置进行加权处理,获得服装图像的图像特征,作为又一个实施例,所述第一加权模块包括:The regional position of each regional image is different. In order to make the image feature representation of different clothing images the same, the color histogram feature of the regional image can be weighted according to its regional location to obtain the image features of the clothing image as another implementation For example, the first weighting module includes:
第一加权单元,用于将所述多个区域图像的颜色直方图特征,按照所述多个区域图像的区域位置进行加权处理,获得所述服装图像的图像特征。The first weighting unit is configured to perform weighting processing on the color histogram features of the multiple regional images according to the regional positions of the multiple regional images to obtain the image features of the clothing image.
由于使用单纯统计每个像素点像素值的方式,可以表示不同像素点的颜色总体特征,但是不能显示不同像素点在不同颜色空间的特性,因此,作为又一个实施例,所述第一提取模块包括:Since the method of simply counting the pixel value of each pixel can represent the overall color characteristics of different pixels, but cannot display the characteristics of different pixels in different color spaces, therefore, as another embodiment, the first extraction module include:
第一提取单元,用于分别提取所述多个区域图像在多个颜色通道的颜色直方图特征。The first extraction unit is configured to extract the color histogram features of the multiple regional images in multiple color channels.
为了获得准确的颜色直方图特征,作为又一个实施例,所述第一提取单元包括:In order to obtain accurate color histogram features, as another embodiment, the first extraction unit includes:
第一提取子单元,用于针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征;The first extraction subunit is configured to extract the channel histogram features corresponding to each of the multiple color channels of the regional image for any one of the multiple regional images;
第一加权子单元,用于将所述多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征。The first weighting subunit is used for weighting the channel histogram features corresponding to the multiple color channels to obtain the color histogram feature of the regional image.
在某些实施例中,所述第一提取子单元具体可以用于包括:In some embodiments, the first extraction subunit may specifically include:
针对所述多个区域图像中的任一个区域图像,将所述区域图像的每个像素点在所述多个颜色通道分别对应的通道值;For any one of the multiple regional images, assign each pixel of the regional image to the corresponding channel value of the multiple color channels;
将每个颜色通道划分为多个直方图统计区间;Divide each color channel into multiple histogram statistical intervals;
针对任一个颜色通道,统计所述区域图像的多个像素点在所述颜色通道的通道值, 在所述颜色通道对应多个直方图统计区间分别对应的分布数量;For any color channel, count the channel values of the multiple pixels of the region image in the color channel, and the number of distributions corresponding to multiple histogram statistical intervals in the color channel;
基于所述多个直方图统计区间各自的分布数量,确定所述区域图像在所述颜色通道的通道直方图特征。Based on the respective distribution numbers of the multiple histogram statistical intervals, the channel histogram characteristics of the region image in the color channel are determined.
在某些实施例中,还包括:In some embodiments, it further includes:
通道确定模块,用于确定至少一个颜色空间模型分别对应的三个颜色通道构成的多个颜色通道。The channel determining module is used to determine multiple color channels formed by three color channels corresponding to at least one color space model.
作为一个实施例,所述颜色直方图特征包括颜色特征矩阵;As an embodiment, the color histogram feature includes a color feature matrix;
所述第一加权模块可以包括:The first weighting module may include:
第二加权模块,用于将所述多个区域图像各自的颜色特征矩阵进行横向或纵向的矩阵拼接处理,获得所述服装图像的图像特征。The second weighting module is configured to perform horizontal or vertical matrix splicing processing on the respective color feature matrices of the multiple regional images to obtain the image features of the clothing image.
在一些可能的设计中,所述至少一个颜色空间包括RGB颜色空间、HSV颜色空间以及YcbCr颜色空间;In some possible designs, the at least one color space includes RGB color space, HSV color space, and YcbCr color space;
其中,所述RGB颜色空间对应R颜色通道、G颜色通道以及B颜色通道,HSV颜色空间对应H颜色通道、S颜色通道以及V颜色通道,YcbCr颜色空间对应Y颜色通道、Cb颜色通道、Cv颜色通道。Wherein, the RGB color space corresponds to the R color channel, the G color channel, and the B color channel, the HSV color space corresponds to the H color channel, the S color channel, and the V color channel, and the YcbCr color space corresponds to the Y color channel, Cb color channel, and Cv color. aisle.
对于不同的颜色通道,可以针对其通道特征,将每个颜色通道按照划分次数将每个颜色通道划分为多个直方图统计区间。For different color channels, according to their channel characteristics, each color channel can be divided into multiple histogram statistical intervals according to the number of divisions.
图4所述的装置可以执行图1~图2所示实施例所述的服装图像分类方法,其实现原理和技术效果不再赘述。对于上述实施例中服装图像分类装置其中各个模块、单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The device described in FIG. 4 can execute the clothing image classification method described in the embodiments shown in FIG. 1 to FIG. 2, and its implementation principles and technical effects will not be described in detail. The specific manners of performing operations of the various modules and units of the clothing image classification device in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
此外,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被计算机执行时可以实现上述图1~图2所示实施例的服装图像分类方法。In addition, an embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a computer, the clothing image classification method of the embodiments shown in FIGS. 1 to 2 can be implemented.
如图5所示,为本发明实施例提供的一种服装图像分类设备的又一个实施例的结构示意图,所述设备可以包括:存储组件501以及处理组件502,所述存储组件501存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件502调用并执行;As shown in Figure 5, it is a schematic structural diagram of another embodiment of a clothing image classification device provided by an embodiment of the present invention. The device may include a storage component 501 and a processing component 502. The storage component 501 stores one or Multiple computer instructions, the one or more computer instructions are for the processing component 502 to call and execute;
所述处理组件502可以用于:The processing component 502 can be used for:
获取多个服装图像;针对任一个服装图像,将所述服装图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;基于所述多个服装图像的图像特征,将 所述多个服装图像进行聚类,获得多个图像集合;确定所述多个图像集合分别对应至少一个服装图像的图像数量。Acquire multiple clothing images; for any clothing image, divide the clothing image into multiple regional images; extract the color histogram features of the multiple regional images respectively; combine the color histogram features of the multiple regional images Perform weighting processing to obtain image features of the clothing image; cluster the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets; determine that the multiple image sets correspond to each other The number of images of at least one clothing image.
本申请实施例中,区域图像的颜色直方图特征可以体现服装图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对服装图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,通过服装图像的图像数量可以实现对服装生产过程的精准监控。In the embodiments of this application, the color histogram features of the regional image can reflect the local features of the clothing image, and weighting the color histogram features of multiple regional images can realize the attention to the overall features of the clothing image; in addition, the histogram features The characteristics of the image can be characterized from the color and texture, and it is not easily affected by the clothing itself and the image collection environment. Furthermore, the weighted processing of the color histograms of the multiple region images is used to generate the image features of the clothing images. When the multiple clothing images are clustered, accurate classification results can be obtained. The obtained multiple image sets have relatively small classification errors, and the number of images corresponding to at least one clothing image in each of the multiple image sets can be accurately determined, and the clothing production process can be accurately monitored through the number of clothing images.
作为一个实施例,所述处理组件501还可以用于:As an embodiment, the processing component 501 may also be used for:
确定所述多个图像集合分别对应的至少一个服装图像所在的服装类型。Determine the clothing type where at least one clothing image corresponding to each of the multiple image sets is located.
作为又一个实施例,所述处理组件501还可以用于:As yet another embodiment, the processing component 501 may also be used for:
将所述图像数量进行排序,以确定每个图像集合的输出顺序;Sort the number of images to determine the output order of each image set;
将多个图像集合按照各自的输出顺序,依次输出所述多个图像集合分别对应的至少一个服装图像。At least one clothing image corresponding to the multiple image sets is sequentially outputted according to the respective output order of the multiple image sets.
由于使用单纯统计每个像素点像素值的方式,可以表示不同像素点的颜色总体特征,但是不能显示不同像素点在不同颜色空间的特性,因此,作为又一个实施例,所述处理组件将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征具体可以是:Since the method of simply counting the pixel value of each pixel can represent the overall color characteristics of different pixels, but cannot display the characteristics of different pixels in different color spaces, therefore, as another embodiment, the processing component will The color histogram features of the multiple regional images are weighted, and the image features of the clothing image can be obtained by:
将所述多个区域图像的颜色直方图特征,按照所述多个区域图像的区域位置进行加权处理,获得所述服装图像的图像特征。The color histogram features of the multiple regional images are weighted according to the regional positions of the multiple regional images to obtain the image features of the clothing image.
为了获得准确的颜色直方图特征,作为又一个实施例,所述处理组件分别提取所述多个区域图像的颜色直方图特征具体可以是:In order to obtain accurate color histogram features, as another embodiment, the processing component separately extracts the color histogram features of the multiple regional images, specifically:
分别提取所述多个区域图像在多个颜色通道的颜色直方图特征。Extracting the color histogram features of the multiple region images in multiple color channels respectively.
在某些实施例中,所述处理组件分别提取所述多个区域图像在多个颜色通道的颜色直方图特征具体可以是:针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征;In some embodiments, the processing component separately extracting the color histogram features of the multiple regional images in the multiple color channels may specifically be: for any one of the multiple regional images, extracting the Channel histogram characteristics corresponding to multiple color channels of the regional image;
将所述多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征。The channel histogram features corresponding to the multiple color channels are weighted to obtain the color histogram feature of the regional image.
在某些实施例中,所述处理组件针对所述多个区域图像中的任一个区域图像,提取 所述区域图像在多个颜色通道分别对应的通道直方图特征具体可以是:In some embodiments, for any one of the multiple regional images, the processing component extracts the channel histogram features corresponding to the multiple color channels of the regional image, specifically:
针对所述多个区域图像中的任一个区域图像,将所述区域图像的每个像素点在所述多个颜色通道分别对应的通道值;For any one of the multiple regional images, assign each pixel of the regional image to the corresponding channel value of the multiple color channels;
将每个颜色通道划分为多个直方图统计区间;Divide each color channel into multiple histogram statistical intervals;
针对任一个颜色通道,统计所述区域图像的多个像素点在所述颜色通道的通道值,在所述颜色通道对应多个直方图统计区间分别对应的分布数量;For any color channel, count the channel values of the multiple pixels of the regional image in the color channel, and the number of distributions corresponding to multiple histogram statistical intervals in the color channel;
基于所述多个直方图统计区间各自的分布数量,确定所述区域图像在所述颜色通道的通道直方图特征。Based on the respective distribution numbers of the multiple histogram statistical intervals, the channel histogram characteristics of the region image in the color channel are determined.
在某些实施例中,所述处理组件501还可以用于:In some embodiments, the processing component 501 may also be used to:
确定至少一个颜色空间模型分别对应的三个颜色通道构成的多个颜色通道。Multiple color channels formed by three color channels corresponding to at least one color space model are determined.
在一些可能的设计中,所述处理组件确定的至少一个颜色空间包括RGB颜色空间、HSV颜色空间以及YcbCr颜色空间;In some possible designs, the at least one color space determined by the processing component includes an RGB color space, an HSV color space, and a YcbCr color space;
其中,所述RGB颜色空间对应R颜色通道、G颜色通道以及B颜色通道,HSV颜色空间对应H颜色通道、S颜色通道以及V颜色通道,YcbCr颜色空间对应Y颜色通道、Cb颜色通道、Cv颜色通道。Wherein, the RGB color space corresponds to the R color channel, the G color channel, and the B color channel, the HSV color space corresponds to the H color channel, the S color channel, and the V color channel, and the YcbCr color space corresponds to the Y color channel, Cb color channel, and Cv color. aisle.
图5所述的设备可以执行图1~图2所示实施例所述的服装图像分类方法,其实现原理和技术效果不再赘述。对于上述实施例中服装图像分类设备其中处理组件的相关具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The device described in FIG. 5 can execute the clothing image classification method described in the embodiments shown in FIG. 1 to FIG. 2, and its implementation principles and technical effects will not be repeated. The specific methods of processing components in the clothing image classification device in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
如图6所示,为本发明实施例提供的一种图像分类装置的又一个实施例的结构示意图,所述装置可以包括以下几个模块:As shown in FIG. 6, it is a schematic structural diagram of another embodiment of an image classification apparatus provided by an embodiment of the present invention. The apparatus may include the following modules:
第二获取模块601,用于获取多个待处理图像;The second acquisition module 601 is used to acquire multiple images to be processed;
第二划分模块602,用于针对任一个待处理图像,将所述待处理图像划分为多个区域图像;The second dividing module 602 is configured to divide the to-be-processed image into multiple regional images for any one to-be-processed image;
第二提取模块603,用于分别提取所述多个区域图像的颜色直方图特征;The second extraction module 603 is configured to extract the color histogram features of the multiple regional images respectively;
第二加权模块604,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;The second weighting module 604 is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the image to be processed;
第二聚类模块605,用于基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;The second clustering module 605 is configured to classify the multiple to-be-processed images based on the image features of the multiple to-be-processed images to obtain multiple image sets;
第二确定模块606,用于确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;The second determining module 606 is configured to determine the image type to which at least one image to be processed respectively corresponding to the multiple image sets belongs;
第三确定模块607,用于确定每个图像类别对应的至少一个待处理图像的图像数量。The third determining module 607 is configured to determine the image quantity of at least one image to be processed corresponding to each image category.
本发明实施例中,区域图像的颜色直方图特征可以体现待处理图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对待处理图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成待处理图像的图像特征,对多个待处理图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个待处理图像的图像数量,通过待处理图像的图像数量可以实现对服装生产过程的精准监控。In the embodiment of the present invention, the color histogram features of the regional image can reflect the local features of the image to be processed, and weighting the color histogram features of multiple regional images can realize the focus on the overall features of the image to be processed; in addition, the histogram Features can characterize image characteristics from color and texture, and are not easily affected by the clothing itself and the image collection environment. Furthermore, the weighted processing of the color histograms of the multiple regional images is used to generate the image characteristics of the image to be processed, and when the multiple images to be processed are clustered, accurate classification results can be obtained. The classification error of the obtained multiple image sets is small, and the number of images of the multiple image sets corresponding to at least one image to be processed can be accurately determined, and the clothing production process can be accurately monitored through the number of images to be processed.
图6所述的装置可以执行图3所示实施例所述的图像分类方法,其实现原理和技术效果不再赘述。对于上述实施例中图像分类装置其中各个模块、单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The device described in FIG. 6 can execute the image classification method described in the embodiment shown in FIG. 3, and its implementation principles and technical effects will not be repeated. The specific methods for performing operations of the various modules and units of the image classification device in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
此外,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被计算机执行时可以实现上述图3所示实施例的图像分类方法。In addition, an embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a computer, the image classification method of the embodiment shown in FIG. 3 can be implemented.
如图7所示,为本发明实施例提供的一种图像分类设备的又一个实施例的结构示意图,所述设备可以包括:存储组件701以及处理组件702,所述存储组件701存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件702调用并执行;As shown in FIG. 7, it is a schematic structural diagram of another embodiment of an image classification device provided by an embodiment of the present invention. The device may include a storage component 701 and a processing component 702. The storage component 701 stores one or more Computer instructions, the one or more computer instructions are for the processing component 702 to call and execute;
所述处理组件702用于:The processing component 702 is used to:
获取多个待处理图像;针对任一个待处理图像,将所述待处理图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;确定每个图像类别对应的至少一个待处理图像的图像数量。Acquire multiple images to be processed; for any image to be processed, divide the image to be processed into multiple regional images; extract the color histogram features of the multiple regional images respectively; The histogram features are weighted to obtain the image features of the image to be processed; based on the image features of the multiple images to be processed, the multiple images to be processed are classified to obtain multiple image sets; The image types to which at least one image to be processed respectively correspond to each image set; determine the number of images of at least one image to be processed corresponding to each image category.
本发明实施例中,区域图像的颜色直方图特征可以体现待处理图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对待处理图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成待处理图像的图像特征,对多个待处理图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个待处理图像的图像数量,通过待处理图像的图像数量可以实现对服装生产过程的精准监控。In the embodiment of the present invention, the color histogram features of the regional image can reflect the local features of the image to be processed, and weighting the color histogram features of multiple regional images can realize the focus on the overall features of the image to be processed; in addition, the histogram Features can characterize image characteristics from color and texture, and are not easily affected by the clothing itself and the image collection environment. Furthermore, the weighted processing of the color histograms of the multiple regional images is used to generate the image characteristics of the image to be processed, and when the multiple images to be processed are clustered, accurate classification results can be obtained. The classification error of the obtained multiple image sets is small, and the number of images of the multiple image sets corresponding to at least one image to be processed can be accurately determined, and the clothing production process can be accurately monitored through the number of images to be processed.
图7所述的设备可以执行图3所示实施例所述的图像分类方法,其实现原理和技术效果不再赘述。对于上述实施例中图像分类设备其中处理组件的相关具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The device described in FIG. 7 can execute the image classification method described in the embodiment shown in FIG. 3, and its implementation principles and technical effects will not be repeated. The specific manners of processing components in the image classification device in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement without creative work.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that each implementation manner can be implemented by software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution essentially or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic A disc, an optical disc, etc., include a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiment.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features thereof are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (15)

  1. 一种服装图像分类方法,其特征在于,包括:A clothing image classification method, characterized in that it includes:
    获取多个服装图像;Obtain multiple clothing images;
    针对任一个服装图像,将所述服装图像划分为多个区域图像;For any clothing image, divide the clothing image into multiple regional images;
    分别提取所述多个区域图像的颜色直方图特征;Extracting the color histogram features of the multiple regional images respectively;
    将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;Weighting the color histogram features of the multiple regional images to obtain the image features of the clothing image;
    基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;Clustering the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets;
    确定所述多个图像集合分别对应至少一个服装图像的图像数量。It is determined that the plurality of image sets respectively correspond to the number of images of at least one clothing image.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    确定所述多个图像集合分别对应的至少一个服装图像所在的服装类型。Determine the clothing type where at least one clothing image corresponding to each of the multiple image sets is located.
  3. 根据权利要求1所述的方法,其特征在于,所述确定所述多个图像集合分别对应至少一个服装图像的图像数量之后,还包括:The method according to claim 1, wherein after determining the number of images of the plurality of image sets corresponding to at least one clothing image, the method further comprises:
    将所述图像数量进行排序,以确定每个图像集合的输出顺序;Sort the number of images to determine the output order of each image set;
    将多个图像集合按照各自的输出顺序,依次输出所述多个图像集合分别对应的至少一个服装图像。At least one clothing image corresponding to the multiple image sets is sequentially outputted according to the respective output order of the multiple image sets.
  4. 根据权利要求1所述的方法,其特征在于,所述将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征包括:The method according to claim 1, wherein said weighting the color histogram features of the multiple regional images to obtain the image features of the clothing image comprises:
    将所述多个区域图像的颜色直方图特征,按照所述多个区域图像的区域位置进行加权处理,获得所述服装图像的图像特征。The color histogram features of the multiple regional images are weighted according to the regional positions of the multiple regional images to obtain the image features of the clothing image.
  5. 根据权利要求1所述的方法,其特征在于,所述分别提取所述多个区域图像的颜色直方图特征包括:The method according to claim 1, wherein said separately extracting the color histogram features of the plurality of regional images comprises:
    分别提取所述多个区域图像在多个颜色通道的颜色直方图特征。Extracting the color histogram features of the multiple region images in multiple color channels respectively.
  6. 根据权利要求5所述的方法,其特征在于,所述分别提取所述多个区域图像在多个颜色通道的颜色直方图特征包括:The method according to claim 5, wherein the extracting the color histogram features of the multiple region images in multiple color channels respectively comprises:
    针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征;Extracting channel histogram features corresponding to each of the multiple color channels of the regional image for any one of the multiple regional images;
    将所述多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征。The channel histogram features corresponding to the multiple color channels are weighted to obtain the color histogram feature of the regional image.
  7. 根据权利要求6所述的方法,其特征在于,所述针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征包括:The method according to claim 6, wherein, for any one of the multiple regional images, extracting the channel histogram features corresponding to the multiple color channels of the regional image respectively comprises:
    针对所述多个区域图像中的任一个区域图像,将所述区域图像的每个像素点在所述多个颜色通道分别对应的通道值;For any one of the multiple regional images, assign each pixel of the regional image to the corresponding channel value of the multiple color channels;
    将每个颜色通道划分为多个直方图统计区间;Divide each color channel into multiple histogram statistical intervals;
    针对任一个颜色通道,统计所述区域图像的多个像素点在所述颜色通道的通道值,在所述颜色通道对应多个直方图统计区间分别对应的分布数量;For any color channel, count the channel values of the multiple pixels of the regional image in the color channel, and the number of distributions corresponding to multiple histogram statistical intervals in the color channel;
    基于所述多个直方图统计区间各自的分布数量,确定所述区域图像在所述颜色通道的通道直方图特征。Based on the respective distribution numbers of the multiple histogram statistical intervals, the channel histogram characteristics of the region image in the color channel are determined.
  8. 根据权利要求7所述的方法,其特征在于,还包括:The method according to claim 7, further comprising:
    确定至少一个颜色空间模型分别对应的三个颜色通道构成的多个颜色通道。Multiple color channels formed by three color channels corresponding to at least one color space model are determined.
  9. 根据权利要求8所述的方法,其特征在于,所述至少一个颜色空间包括RGB颜色空间、HSV颜色空间以及YcbCr颜色空间;The method according to claim 8, wherein the at least one color space includes an RGB color space, an HSV color space, and a YcbCr color space;
    其中,所述RGB颜色空间对应R颜色通道、G颜色通道以及B颜色通道,HSV颜色空间对应H颜色通道、S颜色通道以及V颜色通道,YcbCr颜色空间对应Y颜色通道、Cb颜色通道、Cv颜色通道。Wherein, the RGB color space corresponds to the R color channel, the G color channel, and the B color channel, the HSV color space corresponds to the H color channel, the S color channel, and the V color channel, and the YcbCr color space corresponds to the Y color channel, Cb color channel, and Cv color. aisle.
  10. 根据权利要求1所述的方法,其特征在于,所述颜色直方图特征包括颜色特征矩阵;The method of claim 1, wherein the color histogram feature includes a color feature matrix;
    所述将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征包括:The performing weighting processing on the color histogram features of the multiple regional images to obtain the image features of the clothing image includes:
    将所述多个区域图像各自的颜色特征矩阵进行横向或纵向的矩阵拼接处理,获得所述服装图像的图像特征。Perform horizontal or vertical matrix stitching processing on the respective color feature matrices of the multiple regional images to obtain the image features of the clothing image.
  11. 一种图像分类方法,其特征在于,包括:An image classification method, characterized in that it includes:
    获取多个待处理图像;Acquire multiple images to be processed;
    针对任一个待处理图像,将所述待处理图像划分为多个区域图像;For any image to be processed, dividing the image to be processed into multiple regional images;
    分别提取所述多个区域图像的颜色直方图特征;Extracting the color histogram features of the multiple regional images respectively;
    将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;Weighting the color histogram features of the multiple regional images to obtain the image feature of the image to be processed;
    基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;Classifying the multiple to-be-processed images based on the image features of the multiple to-be-processed images to obtain multiple image sets;
    确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;Determine the image type to which at least one image to be processed respectively corresponding to the multiple image sets belongs;
    确定每个图像类别对应的至少一个待处理图像的图像数量。Determine the number of images of at least one image to be processed corresponding to each image category.
  12. 一种服装图像分类装置,其特征在于,包括:A clothing image classification device, characterized in that it comprises:
    第一获取模块,用于获取多个服装图像;The first acquisition module is used to acquire multiple clothing images;
    第一划分模块,用于针对任一个服装图像,将所述服装图像划分为多个区域图像;The first division module is configured to divide the clothing image into multiple regional images for any clothing image;
    第一提取模块,用于分别提取所述多个区域图像的颜色直方图特征;The first extraction module is configured to extract the color histogram features of the multiple regional images respectively;
    第一加权模块,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;The first weighting module is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the clothing image;
    第一聚类模块,用于基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;The first clustering module is configured to cluster the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets;
    第一确定模块,用于确定所述多个图像集合分别对应至少一个服装图像的图像数量。The first determining module is configured to determine the number of images corresponding to at least one clothing image in each of the plurality of image sets.
  13. 一种图像分类装置,其特征在于,包括:An image classification device, characterized by comprising:
    第二获取模块,用于获取多个待处理图像;The second acquisition module is used to acquire multiple images to be processed;
    第二划分模块,用于针对任一个待处理图像,将所述待处理图像划分为多个区域图像;The second division module is configured to divide the to-be-processed image into multiple regional images for any one to-be-processed image;
    第二提取模块,用于分别提取所述多个区域图像的颜色直方图特征;The second extraction module is used to extract the color histogram features of the multiple regional images respectively;
    第二加权模块,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;The second weighting module is configured to perform weighting processing on the color histogram features of the multiple regional images to obtain the image features of the image to be processed;
    第二聚类模块,用于基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;The second clustering module is configured to classify the multiple to-be-processed images based on the image features of the multiple to-be-processed images to obtain multiple image sets;
    第二确定模块,用于确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;The second determining module is configured to determine the image type to which at least one image to be processed respectively corresponding to the multiple image sets belongs;
    第三确定模块,用于确定每个图像类别对应的至少一个待处理图像的图像数量。The third determining module is used to determine the image quantity of at least one image to be processed corresponding to each image category.
  14. 一种服装图像分类设备,其特征在于,包括:存储组件以及处理组件,所述存储组件存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件调用并执行;A clothing image classification device, characterized by comprising: a storage component and a processing component, the storage component stores one or more computer instructions, and the one or more computer instructions are called and executed by the processing component;
    所述处理组件用于:The processing component is used for:
    获取多个服装图像;针对任一个服装图像,将所述服装图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征 进行加权处理,获得所述服装图像的图像特征;基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;确定所述多个图像集合分别对应至少一个服装图像的图像数量。Acquire multiple clothing images; for any clothing image, divide the clothing image into multiple regional images; extract the color histogram features of the multiple regional images respectively; combine the color histogram features of the multiple regional images Perform weighting processing to obtain image features of the clothing image; cluster the multiple clothing images based on the image features of the multiple clothing images to obtain multiple image sets; determine that the multiple image sets correspond to each other The number of images of at least one clothing image.
  15. 一种图像分类设备,其特征在于,包括:存储组件以及处理组件,所述存储组件存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件调用并执行;An image classification device, characterized by comprising: a storage component and a processing component, the storage component stores one or more computer instructions, and the one or more computer instructions are called and executed by the processing component;
    所述处理组件用于:The processing component is used for:
    获取多个待处理图像;针对任一个待处理图像,将所述待处理图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;确定每个图像类别对应的至少一个待处理图像的图像数量。Acquire multiple images to be processed; for any image to be processed, divide the image to be processed into multiple regional images; extract the color histogram features of the multiple regional images respectively; The histogram features are weighted to obtain the image features of the image to be processed; based on the image features of the multiple images to be processed, the multiple images to be processed are classified to obtain multiple image sets; The image types to which at least one image to be processed respectively correspond to each image set; determine the number of images of at least one image to be processed corresponding to each image category.
PCT/CN2020/071925 2019-01-23 2020-01-14 Clothing image classification and image classification methods and apparatuses, and device WO2020151529A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910063759.7 2019-01-23
CN201910063759.7A CN111476253B (en) 2019-01-23 2019-01-23 Clothing image classification method, device and equipment and image classification method and device

Publications (1)

Publication Number Publication Date
WO2020151529A1 true WO2020151529A1 (en) 2020-07-30

Family

ID=71736308

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/071925 WO2020151529A1 (en) 2019-01-23 2020-01-14 Clothing image classification and image classification methods and apparatuses, and device

Country Status (3)

Country Link
CN (1) CN111476253B (en)
TW (1) TW202109356A (en)
WO (1) WO2020151529A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112990236B (en) * 2021-05-10 2021-08-31 腾讯科技(深圳)有限公司 Data processing method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955952A (en) * 2014-05-04 2014-07-30 电子科技大学 Extraction and description method for garment image color features
CN105631455A (en) * 2014-10-27 2016-06-01 阿里巴巴集团控股有限公司 Image main body extraction method and system
CN106022343A (en) * 2016-05-19 2016-10-12 东华大学 Fourier descriptor and BP neural network-based garment style identification method
CN106250431A (en) * 2016-07-25 2016-12-21 华南师范大学 A kind of Color Feature Extraction Method based on classification clothing and costume retrieval system
CN107194348A (en) * 2017-05-19 2017-09-22 北京云识图信息技术有限公司 The domain color recognition methods of target object in a kind of image

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100535926C (en) * 2006-01-06 2009-09-02 佳能株式会社 Data processing method and apparatus, image processing method and apparatus, image sorting method and apparatus, and storage medium
CN101714257A (en) * 2009-12-23 2010-05-26 公安部第三研究所 Method for main color feature extraction and structuring description of images
US8798362B2 (en) * 2011-08-15 2014-08-05 Hewlett-Packard Development Company, L.P. Clothing search in images
CN103065118A (en) * 2011-10-21 2013-04-24 索尼公司 Image blurring detection method and device
CN103207879B (en) * 2012-01-17 2016-03-30 阿里巴巴集团控股有限公司 The generation method and apparatus of image index
CN103377376A (en) * 2012-04-13 2013-10-30 阿里巴巴集团控股有限公司 Method and system for image classification, and method and system for image retrieval
CN103227810B (en) * 2012-12-20 2016-03-02 广州天锐锋信息科技有限公司 A kind of methods, devices and systems identifying remote desktop semanteme in network monitoring
CN103345645B (en) * 2013-06-27 2016-09-28 复旦大学 Commodity image class prediction method towards net purchase platform
CN105844283B (en) * 2015-01-16 2019-06-07 阿里巴巴集团控股有限公司 Method, image search method and the device of image classification ownership for identification
CN104636755A (en) * 2015-01-31 2015-05-20 华南理工大学 Face beauty evaluation method based on deep learning
CN105426894B (en) * 2015-11-06 2018-08-14 中国铁道科学研究院 Railway plug pin image detecting method and device
CN106485266A (en) * 2016-09-23 2017-03-08 重庆大学 A kind of ancient wall classifying identification method based on extraction color characteristic
CN107330431B (en) * 2017-06-30 2020-09-01 福州大学 Significance detection optimization method based on K-means cluster fitting
CN108154157B (en) * 2017-12-06 2020-07-28 西安交通大学 Fast spectral clustering method based on integration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955952A (en) * 2014-05-04 2014-07-30 电子科技大学 Extraction and description method for garment image color features
CN105631455A (en) * 2014-10-27 2016-06-01 阿里巴巴集团控股有限公司 Image main body extraction method and system
CN106022343A (en) * 2016-05-19 2016-10-12 东华大学 Fourier descriptor and BP neural network-based garment style identification method
CN106250431A (en) * 2016-07-25 2016-12-21 华南师范大学 A kind of Color Feature Extraction Method based on classification clothing and costume retrieval system
CN107194348A (en) * 2017-05-19 2017-09-22 北京云识图信息技术有限公司 The domain color recognition methods of target object in a kind of image

Also Published As

Publication number Publication date
TW202109356A (en) 2021-03-01
CN111476253B (en) 2024-04-02
CN111476253A (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN105118048B (en) The recognition methods of reproduction certificate picture and device
CN107123088B (en) A kind of method of automatic replacement photo background color
CN109410168B (en) Modeling method of convolutional neural network for determining sub-tile classes in an image
WO2017088365A1 (en) Skin-colour detection method and apparatus
CN109580656B (en) Mobile phone light guide plate defect detection method and system based on dynamic weight combination classifier
CN110969170B (en) Image theme color extraction method and device and electronic equipment
CN104408429A (en) Method and device for extracting representative frame of video
CN108764302A (en) A kind of bill images sorting technique based on color characteristic and bag of words feature
CN111932639B (en) Detection method of unbalanced defect sample based on convolutional neural network
CN110533654A (en) The method for detecting abnormality and device of components
CN115375690B (en) Classification and identification method for greasy tongue coating
CN107194348A (en) The domain color recognition methods of target object in a kind of image
CN105844251A (en) Cartoon video identification method and device
CN108038839A (en) Twisted-pair feeder lay real-time detection method on a kind of flow production line
CN110163822A (en) The netted analyte detection and minimizing technology and system cut based on super-pixel segmentation and figure
CN108009567A (en) A kind of automatic discriminating conduct of the fecal character of combination color of image and HOG and SVM
CN110827304A (en) Traditional Chinese medicine tongue image positioning method and system based on deep convolutional network and level set method
CN110533119A (en) The training method of index identification method and its model, device and electronic system
CN103268492B (en) A kind of corn grain type identification method
CN115631350B (en) Method and device for identifying colors of canned image
CN110569859A (en) Color feature extraction method for clothing image
WO2020151529A1 (en) Clothing image classification and image classification methods and apparatuses, and device
CN109213886A (en) Image search method and system based on image segmentation and Fuzzy Pattern Recognition
CN111598833A (en) Method and device for detecting defects of target sample and electronic equipment
CN111738310B (en) Material classification method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20745561

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20745561

Country of ref document: EP

Kind code of ref document: A1