WO2020151529A1 - 服装图像分类、图像分类方法、装置及设备 - Google Patents
服装图像分类、图像分类方法、装置及设备 Download PDFInfo
- 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
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/50—Extraction 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction 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
本申请实施例提供一种服装图像分类、图像分类方法、装置及设备,所述服装图像分类方法包括获取多个服装图像;针对任一个服装图像,将所述服装图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;确定所述多个图像集合分别对应至少一个服装图像的图像数量。本申请实施例提供的技术方案提高了服装的分类精度。
Description
本申请要求2019年01月23日递交的申请号为201910063759.7、发明名称为“服装图像分类、图像分类方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及计算机应用技术领域,尤其涉及一种服装图像分类、图像分类方法、装置及设备。
目前,为了方便管理,提高工作效率,现有的服装加工厂多使用一个生产单位只处理一项固定不变的工作,以实现批量服装的生产过程,也即通常意义上的流水线工作方式。
由于服装加工厂可能同时加工不同的服装,为了获得不同服装的加工数量,需要对加工的不同服装进行数量统计。通常使用摄像头对服装进行图像采集,并提取图像的sift特征点、纹理、边缘轮廓等特征作为图像特征,之后可以基于图像特征对图像进行聚类,获得属于不同类型的图像,进而确认某一类型的图像对应服装的加工情况。
但是,由于服装种类较为多样化,采集的服装图像中可能包含纹理比较丰富的服装图像,例如针对包含较为丰富的图案的服装采集的图像,也可能包含纹理比较简单的服装图像,例如,针对纯色的服装采集的图像,这些服装图像的纹理、轮廓等特征过于复杂或者过于简单,使用这些服装图像的纹理等特征对服装进行服装图像分类时,结果不准确,产生分类误差。
发明内容
本申请实施例提供了一种服装图像分类、图像分类方法、装置及设备,用以解决现有技术中多个图像分类结果不够准确的技术问题。
第一方面,本申请实施例中提供了一种服装图像分类方法,包括:
获取多个服装图像;
针对任一个服装图像,将所述服装图像划分为多个区域图像;
分别提取所述多个区域图像的颜色直方图特征;
将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;
基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;
确定所述多个图像集合分别对应至少一个服装图像的图像数量。
第二方面,本申请实施例中提供了一种图像分类方法,包括:
获取多个待处理图像;
针对任一个待处理图像,将所述待处理图像划分为多个区域图像;
分别提取所述多个区域图像的颜色直方图特征;
将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;
基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;
确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;
确定每个图像类别对应的至少一个待处理图像的图像数量。
第三方面,本申请实施例中提供了一种服装图像分类装置,包括:
第一获取模块,用于获取多个服装图像;
第一划分模块,用于针对任一个服装图像,将所述服装图像划分为多个区域图像;
第一提取模块,用于分别提取所述多个区域图像的颜色直方图特征;
第一加权模块,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;
第一聚类模块,用于基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;
第一确定模块,用于确定所述多个图像集合分别对应至少一个服装图像的图像数量。
第四方面,本申请实施例中提供了一种图像分类装置,包括:
第二获取模块,用于获取多个待处理图像;
第二划分模块,用于针对任一个待处理图像,将所述待处理图像划分为多个区域图像;
第二提取模块,用于分别提取所述多个区域图像的颜色直方图特征;
第二加权模块,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所 述待处理图像的图像特征;
第二聚类模块,用于基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;
第二确定模块,用于确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;
第三确定模块,用于确定每个图像类别对应的至少一个待处理图像的图像数量。
第五方面,本申请实施例中提供了一种服装图像分类设备,包括:存储组件以及处理组件,所述存储组件存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件调用并执行;
所述处理组件用于:
获取多个服装图像;针对任一个服装图像,将所述服装图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;确定所述多个图像集合分别对应至少一个服装图像的图像数量。
第六方面,本申请实施例中提供了一种图像分类设备,包括:存储组件以及处理组件,所述存储组件存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件调用并执行;
所述处理组件用于:
获取多个待处理图像;针对任一个待处理图像,将所述待处理图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;确定每个图像类别对应的至少一个待处理图像的图像数量。
本申请实施例中,提取多个服装图像后,可以针对任一个服装图像,将所述服装图像划分为多个区域图像,之后,可以分别提取每个区域图像的颜色直方图特征,每个区域图像的颜色直方图特征可以体现服装图像的在该区域的局部颜色特征;将多个区域图像的颜色直方图加权处理生成服装图像的图像特征,获得的图像特征可以实现对产品图像的整体颜色特征的关注;另外,由于图像的纹理实际为像素值变化产生的,每个区域 图像的直方图特征实际为统计每个像素点的颜色直方图获得,因此,以多个区域图像的颜色直方图加权处理获得的图像特征,还可以从纹理上表征图像的特性。进而基于多个服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。由于各个服装图像的图像特征从局部以及整体上都能够表征服装图像的颜色和纹理特征,因此,获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,以通过服装图像的图像数量可以实现对服装生产过程的精准监控。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请提供的一种服装图像分类方法一个实施例的流程图;
图2示出了本申请提供的一种服装图像分类方法又一个实施例的流程图;
图3示出了本申请提供的一种图片分类方法一个实施例的流程图;
图4示出了本申请提供的一种服装图像分类装置一个实施例的结构示意图;
图5示出了本申请提供的一种服装图像分类设备一个实施例的结构示意图;
图6示出了本申请提供的一种图片分类装置一个实施例的结构示意图;
图7示出了本申请提供的一种图片分类设备一个实施例的结构示意图。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
在本申请的说明书和权利要求书及上述附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如101、102等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第 二”是不同的类型。
本发明实施例可以应用于数字化工厂管理中,通过对服装的生产过程进行智能化监控,以随时获知服装的生产进度,提高生产效率。
现有技术中,可以使用摄像头对服装进行图像采集,并提取图像的纹理、轮廓等图像特征,并基于图像特征对采集的多个图像进行分类,进而获得分属于不同类型的图像,进而确定不同类型的图像对应的服装的生产进度。但是,通过纹理、轮廓等特征表征图像时,会导致图像分类结果不够准确,容易产生分类误差。发明人发现,提取图像的纹理、轮廓等图像特征时,由于直接对整张图像进行提取,获得的图像特征不能很好地表征局部特征,且这种方式提取的特征,容易受到服装的形状、颜色、图案等因素的影响,也容易收到光照、曝光度等因素的影响,进而提取的特征不够准确,导致分类误差。
据此,发明人提出了本申请的技术方案,本发明实施例中,提取多个服装图像后,可以针对任一个服装图像,将所述服装图像划分为多个区域图像,之后,可以分别提取每个区域图像的颜色直方图特征,并将多个区域图像的颜色直方图特征进行加权处理,获得服装图像的图像特征。将服装图像划分为多个区域图像,并提取每个区域图像的颜色直方图实现对服装图像的局部特征的提取,由于又对多个区域图像的颜色直方图特征进行加权处理,实现对服装图像的整体特征的关注,获得的服装图像的图像特征可以从空间角度较为全面的表征;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,通过服装图像的图像数量可以实现对服装生产过程的精准监控。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
如图1所示,为本发明实施例提供的一种服装图像分类方法的一个实施例的流程图,所述方法可以包括以下几个步骤:
101:获取多个服装图像。
其中,每个服装图像可以对应一个服装,且每个图像对应的服装均不同。
可选地,为了获得准确的服装生产数量,以进行不同类型服装的生产调度,可以针 对生产完成且处于质量检验程序中的服装进行服装图像的采集。
在实际应用中,由于一个工厂可能包含多个产线,对于不同摄像头采集的图像可能存在大小不一的现象,为了同一对图像进行分类处理,可以将不同摄像头采集的多个图像进行归一化,获得多个服装图像。在对多个图像进行归一化时,可以保持原图像的纵横比,进而获得纵横比不变且尺寸归一化的多个服装图像。
102:针对任一个服装图像,将所述服装图像划分为多个区域图像。
可以从多个服装图像中选择任一个服装图像,并将选择的服装图像划分为多个区域图像。
在某些实施例中,为了获得均衡的划分结果,针对任一个服装图像,可以将服装图像按照预设区域位置以及预设区域大小划分为多个区域图像。
其中,区域位置可以指区域图像的中心位置,区域大小可以指区域图像的图像大小,具体可以指区域图像的横向像素点数量以及纵向像素点数量。
在一种可能的实现方式中,为了使得服装图像被均匀划分,对不同位置的颜色特征进行采集,可以将任一个服装图像,按照N*M的数量划分为多个区域图像。N可以与M相等,服装图像的横纵划分数量相同,因此,每个区域图像的区域大小相同。其中,N为大于1,小于服装图像像素点数量。在实际应用中,N可以取值为3,也即可以将服装图像均匀划分为9个大小相同的区域图像。
103:分别提取所述多个区域图像的颜色直方图特征。
将服装图像进行了分块,以分别获得每个区域图像的颜色直方图特征,以对服装图像进行局部特征的提取,关注服装图像的局部特征。
为了提高统计效率,在实际应用中,可以直接对区域图像的多个像素点进行直方图统计,获得区域图像的颜色直方图特征。分别提取多个区域图像的颜色直方图特征,获得多个区域图像分别对应的颜色直方图特征。104:将多个区域图像的颜色直方图特征进行加权处理,获得服装图像的图像特征。
其中,每个区域图像的颜色直方图特征可以以颜色特征矩阵的形式表示。
作为一种可能的实现方式,可以将多个区域图像的颜色直方图特征按照预定加权规则进行加权处理,获得服装图像的图像特征。预定加权规则实际可以指将每个区域图像的颜色直方图特征按照每个区域图像对应的特征权重以及加权位置进行加权处理,获得服装图像的图像特征。
在某些实施例中,为了将每个区域的特征均衡作用于服装图像的图像特征上,使得 获得的图像特征更准确,可以将每个区域图像的颜色直方图特征的权重设置为1。在每个区域图像的颜色直方图特征为颜色特征矩阵时,所述将多个区域图像的颜色直方图特征进行加权处理,获得服装图像的图像特征可以包括:按照每个区域图像在服装图像中的位置,确定每个区域图像的颜色直方图特征的加权顺序;将多个颜色特征矩阵,分别按照其对应的加权顺序进行矩阵横向或纵向拼接,获得的特征矩阵即为服装图像的图像特征。
在实际应用中为了确保每个区域图像的颜色直方图特征对服装图像的图像特征的局部影响相同,生成准确的图像特征,可以将每个区域图像的特征权重设置相同,例如,均设置为1,此时,可以将多个区域图像分别对应的颜色直方图特征直接进行特征拼接,获得服装图像的图像特征。例如,假设3个相邻区域图像A1、A2、A3分别对应的颜色直方图特征为B1、B2、B3,则区域图像A1、A2、A3对应的服装图像的特征可以为B1B2B3。
105:基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合。
每个服装图像可以代表一个服装,每个服装图像的图像特征即可以表示服装的特征,如果服装图像相同,说明服装图像对应的服装相同。对于同一类服装,其服装图像的图像特征是相同的。基于多个服装图像各自的图像特征,将多个服装图像进行聚类,获得多个图像集合具体可以是将多个服装图像各自的图像特征,将特征相似度较高的服装图像划分为同一类图像,获得多个图像集合。
基于多个服装图像各自的图像特征,使用聚类算法将多个服装图像进行聚类,获得多个图像集合。
在某些实施例中,可以使用聚类算法,将多个服装图像各自的图像特征进行特征聚类,之后将图像特征相同的特征类对应的服装图像作为一个图像集合,获得多个图像集合。
其中,每个图像集合中可以对应有至少一个服装图像,所述至少一个服装图像对应的服装为同一类服装。
106:确定所述多个图像集合分别对应至少一个服装图像的图像数量。
每个图像集合中可以对应至少一个服装图像,可以统计至少一个服装图像的数量,获得图像数量,也即,获得每个图像集合对应的图像数量。
在某些实施例中,确定多个图像集合分别对应至少一个服装图像的图像数量之后, 还可以输出所述多个图像集合以及每个图像集合对应的图像数量,以方便用户查看。
本发明实施例中,提取多个服装图像后,可以针对任一个服装图像,将所述服装图像划分为多个区域图像,之后,可以分别提取每个区域图像的颜色直方图特征,每个区域图像的颜色直方图特征可以体现服装图像的在该区域的局部颜色特征;将多个区域图像的颜色直方图加权处理生成服装图像的图像特征,获得的图像特征可以实现对产品图像的整体颜色特征的关注。
另外,由于图像的纹理实际为像素值变化产生的,每个区域图像的直方图特征实际为统计每个像素点的颜色直方图获得,因此,以多个区域图像的颜色直方图加权处理获得的图像特征,还可以从纹理上表征图像的特性。进而基于多个服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。由于各个服装图像的图像特征从局部以及整体上都能够表征服装图像的颜色和纹理特征,因此,获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,以通过服装图像的图像数量可以实现对服装生产过程的精准监控。
在实际应用中,颜色直方图特征可以包含颜色特征矩阵,也即颜色直方图特征以颜色特征矩阵的形式表达图像的特性。
所述将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征可以包括:
将所述多个区域图像各自的颜色特征矩阵进行横向或纵向的矩阵拼接处理,获得服装图像的图像特征。
任意两个颜色特征矩阵的横向拼接处理具体可以指将第一颜色特征矩阵的任一行与第二颜色特征矩阵对应的一行进行拼接处理,获得两个颜色特征矩阵的横向拼接矩阵。例如,假设第一颜色特征矩阵为[101;100],第二颜色特征矩阵为[202;200],将两个颜色特征矩阵进行横向拼接获得的横向拼接矩阵为[101202;100200]。
任意两个颜色特征矩阵的纵向拼接处理具体可以指基于第一颜色特征矩阵的最后一行以及第二颜色特征矩阵的第一行,将第一颜色特征矩阵以及第二颜色特征矩阵进行纵向拼接,获得两个颜色特征矩阵的纵向拼接矩阵。例如,假设第一颜色特征矩阵为[101;100],第二颜色特征矩阵为[202;200],将两个颜色特征矩阵进行纵向拼接获得的纵向拼接矩阵可以为[101;100;202;200]。
如图2所示,为本发明实施例提供的一种服装图像分类方法的又一个实施例的流程图,与图1所示的实施例的不同之处在于,在步骤106确定所述多个图像集合分别对应 至少一个服装图像的图像数量之后,所述方法还可以包括:
201:确定所述多个图像集合分别对应的至少一个服装图像所在的服装类型。
每个图像集合可以对应至少一个服装图像,属于同一个图像的服装图像属于同一种服装类型,因此,每个图像集合对应的至少一个服装图像属于同一服装类型,可以确定多个图像集合分别对应的至少一个服装图像所在的服装类型。
作为一个实施例,所述确定多个图像集合分别对应的至少一个服装图像所在的服装类型可以包括:
确定至少一个训练图像以及每个训练图像的图像特征;其中,每个训练图像对应一个服装类型;
基于多个图像集合分别对应的至少一个服装图像的图像特征,确定与所述每个图像集合匹配的训练图像;
所述多个图像集合分别对应的训练图像的服装类型,作为所述多个图像集合分别对应的至少一个服装图像所在的服装类型。
为了使图像的特征表达方式相同,以实现不同图像的特征匹配,该训练图像的图像特征的获取方式与图1~图2中所示的实施例的特征获取方式相同。
因此,每个训练图像的图像特征可以通过以下方式获得:
针对任一个训练图像,将所述训练图像划分为多个训练区域图像;
分别提取所述多个训练区域图像的颜色直方图特征;
将所述多个训练区域图像的颜色直方图特征进行加权处理,获得多个训练图像的图像特征。
每个区域图像的区域位置不同,为了使得不同服装图像的图像特征的表示方式相同,可以将区域图像的颜色直方图特征按照区域位置进行加权处理,获得服装图像的图像特征。作为又一个实施例,上述步骤104:将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征可以包括:
将所述多个区域图像的颜色直方图特征,按照所述多个区域图像的区域位置进行加权处理,获得所述服装图像的图像特征。
按照多个区域图像的区域位置进行加权处理具体可以指根据任一区域图像的区域位置确定区域图像的加权位置,并将所述区域图像按照其对应的加权位置,将其对应的颜色直方图特征进行特征拼接,以在多个区域图像的颜色直方图特征均特征拼接完成时,获得服装图像的图像特征。当颜色直方图特征为颜色特征矩阵时,将颜色直方图特征进 行特征拼接可以指将颜色直方图矩阵进行矩阵拼接。
由于使用单纯统计每个像素点像素值的方式,可以表示不同像素点的颜色总体特征,但是不能显示不同像素点在不同颜色空间的特性,因此,作为又一个实施例,所述步骤103分别提取所述多个区域图像的颜色直方图特征可以包括:
分别提取所述多个区域图像在多个颜色通道的颜色直方图特征。
可以依次提取每个区域图像在多个颜色通道的颜色直方图特征。基于多个颜色通道可以分别提取多个区域图像的颜色直方图特征。
其中,每个颜色通道可以表示不同颜色特性,可以将不同像素点在不同颜色空间的特征通过转换至对应的颜色通道的方式获得。
为了获得准确的颜色直方图特征,作为又一个实施例,所述分别提取所述多个区域图像在多个颜色通道的颜色直方图特征可以包括:
针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征;
将所述多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征。
通道直方图特征可以指通道特征矩阵。将多个颜色通道分别对应的通道直方图特征进行加权处理,获得区域图像的颜色直方图特征可以包括:将多个通道特征矩阵进行横向或纵向的矩阵拼接处理,获得区域图像的颜色直方图特征。还可以通过多个颜色通道的通道顺序,确定多个颜色通道各自的加权顺序,将多个通道特征矩阵按照各自的加权顺序进行矩阵的横向或纵向拼接获得的特征矩阵即为区域图像的颜色直方图特征。
通过提取区域图像在多个颜色直方图通道分别对应的通道直方图特征,并将多个通道直方图特征进行加权处理后获得区域图像的颜色直方图特征。在实际应用中,针对多个颜色通道对应的通道直方图特征的加权处理,可以将每个通道直方图特征进行加权处理,生成所述区域图像的颜色直方图。
在某些实施例中,所述针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征包括:
针对所述多个区域图像中的任一个区域图像,将所述区域图像的每个像素点在所述多个颜色通道分别对应的通道值;
将每个颜色通道划分为多个直方图统计区间;
针对任一个颜色通道,统计所述区域图像的多个像素点在所述颜色通道的通道值, 在所述颜色通道对应多个直方图统计区间分别对应的分布数量;
基于所述多个直方图统计区间各自的分布数量,确定所述区域图像在所述颜色通道的通道直方图特征。
在某些实施例中,上述所述的服装图像分类方法还可以包括:
确定至少一个颜色空间模型分别对应的三个颜色通道构成的多个颜色通道。
至少一个颜色空间模块可以事先设置,可以通过至少一个颜色空间模型分别对应的三颜色通道获得多个颜色通道,确定多个颜色通道具体可以是获取事先设置的至少一个颜色空间模型分别对应的三个色通道构成的多个颜色通道,进而提高处理效率。
对于任一个区域图像,可以提取区域图像在多个颜色通道分别对应的通道直方图,具体可以将区域图像的多个像素点各自的像素值分别转换至多个颜色通道,获得每个像素点对应多个颜色通道的通道值,而针对每个颜色通道,可以获得各个区域图像对应多个像素点在该通道所对应的通道值,继而可以针对任一个颜色通道进行通道直方图统计。
由于通道数量较多,如果每个通道对应的数据一一统计,需要增加量计算过程,获得的通道直方图特征的数据维度也会非常高。因此,可以将每个颜色通道进行直方图统计区间划分,以将不同颜色通道按照直方图统计区间进行统计。
在一些可能的设计中,所述至少一个颜色空间包括RGB颜色空间、HSV颜色空间以及YcbCr颜色空间;
其中,所述RGB颜色空间对应R颜色通道、G颜色通道以及B颜色通道,HSV颜色空间对应H颜色通道、S颜色通道以及V颜色通道,YcbCr颜色空间对应Y颜色通道、Cb颜色通道、Cv颜色通道。
对于不同的颜色通道,可以针对其通道特征,将每个颜色通道按照划分次数将每个颜色通道划分为多个直方图统计区间。
作为一种可能的实现方式,可以将R颜色通道划分为24个直方图统计区间、G颜色通道划分为24个直方图统计区间以及B颜色通道划分为24个直方图统计区间,HSV颜色空间对应H颜色通道划分为32个直方图统计区间、S颜色通道划分为32个直方图统计区间以及V颜色通道对应8个直方图统计区间,YcbCr颜色空间对应Y颜色通道划分为24个直方图统计区间、Cb颜色通道划分为16个直方图统计区间、Cv颜色通道划分为16个统计区间。
进而可以统计多个像素点分别对应多个颜色通道上的通道值在每个统计区间的出现次数,进而获得每个统计区间对应的直方图特征数值。
以上述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。
之后,可以将多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征,按照此方式进行特征加权处理,例如,将每个通道对应的通道直方图特征直接进行加权处理,获得1*200维的颜色特征直方图。如将每个服装通道平均划分为9个区域图像,将多个区域图像分别对应的颜色直方图特征进行特征加权处理,例如简单特征拼接,可以获得服装图像为1*1800维的图像特征。
通过图像特征并基于图像特征对多个服装图像进行聚类后,可以输出多个服装图像的聚类结果,以方便用户查看。作为又一个实施例,所述确定所述多个图像集合分别对应至少一个服装图像的图像数量之后,还包括:
将所述图像数量进行排序,以确定每个图像集合的输出顺序;
将多个图像集合按照各自的输出顺序,依次输出所述多个图像集合分别对应的至少一个服装图像。
可选地,将图像数量进行排序,以确定每个图像集合的输出顺序具体可以指将图像数量按照数量大小进行升序或者降序,以确定每个图像集合的输出顺序。
如图3所示,为本发明实施例提供的一种图像分类方法的又一个实施例的流程图,所述方法可以包括以下几个步骤:
301:获取多个待处理图像。
302:针对任一个待处理图像,将所述待处理图像划分为多个区域图像。
303:分别提取所述多个区域图像的颜色直方图特征。
304:将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征。
305:基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合。
306:确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型。
307:确定每个图像类别对应的至少一个待处理图像的图像数量。
本发明实施例提供的一种图像分类方法,与图1~图2所示的服装图像分类方法所使用的图像处理方式相同,在此不再赘述。
本发明实施例中,提取多个待处理图像后,可以针对任一个待处理图像,将所述待处理图像划分为多个区域图像,之后,可以分别提取每个区域图像的颜色直方图特征,并将多个区域图像的颜色直方图特征进行加权处理,获得待处理图像的图像特征。区域图像的颜色直方图特征可以体现待处理图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对待处理图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成待处理图像的图像特征,对多个待处理图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个待处理图像的图像数量,通过待处理图像的图像数量可以实现对服装生产过程的精准监控。
如图4所示,为本发明实施例提供的一种服装图像分类装置的又一个实施例的结构示意图,所述装置可以包括以下几个模块:
第一获取模块401,用于获取多个服装图像;
第一划分模块402,用于针对任一个服装图像,将所述服装图像划分为多个区域图像;
第一提取模块403,用于分别提取所述多个区域图像的颜色直方图特征;
第一加权模块404,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;
第一聚类模块405,用于基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;
第一确定模块406,用于确定所述多个图像集合分别对应至少一个服装图像的图像数量。
本申请实施例中,区域图像的颜色直方图特征可以体现服装图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对服装图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,通过服装图 像的图像数量可以实现对服装生产过程的精准监控。
作为一个实施例,图4所示的装置还可以包括:
第四确定模块,用于确定所述多个图像集合分别对应的至少一个服装图像所在的服装类型。
每个图像集合可以对应至少一个服装图像,属于同一个图像的服装图像属于同一种服装类型,因此,每个图像集合对应的至少一个服装图像属于同一服装类型,可以确定多个图像集合分别对应的至少一个服装图像所在的服装类型。
作为又一个实施例,图4所示的装置还可以包括:
排序模块,用于将所述图像数量进行排序,以确定每个图像集合的输出顺序;
输出模块,用于将多个图像集合按照各自的输出顺序,依次输出所述多个图像集合分别对应的至少一个服装图像。
每个区域图像的区域位置不同,为了使得不同服装图像的图像特征的表示方式相同,可以将区域图像的颜色直方图特征按照其区域位置进行加权处理,获得服装图像的图像特征,作为又一个实施例,所述第一加权模块包括:
第一加权单元,用于将所述多个区域图像的颜色直方图特征,按照所述多个区域图像的区域位置进行加权处理,获得所述服装图像的图像特征。
由于使用单纯统计每个像素点像素值的方式,可以表示不同像素点的颜色总体特征,但是不能显示不同像素点在不同颜色空间的特性,因此,作为又一个实施例,所述第一提取模块包括:
第一提取单元,用于分别提取所述多个区域图像在多个颜色通道的颜色直方图特征。
为了获得准确的颜色直方图特征,作为又一个实施例,所述第一提取单元包括:
第一提取子单元,用于针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征;
第一加权子单元,用于将所述多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征。
在某些实施例中,所述第一提取子单元具体可以用于包括:
针对所述多个区域图像中的任一个区域图像,将所述区域图像的每个像素点在所述多个颜色通道分别对应的通道值;
将每个颜色通道划分为多个直方图统计区间;
针对任一个颜色通道,统计所述区域图像的多个像素点在所述颜色通道的通道值, 在所述颜色通道对应多个直方图统计区间分别对应的分布数量;
基于所述多个直方图统计区间各自的分布数量,确定所述区域图像在所述颜色通道的通道直方图特征。
在某些实施例中,还包括:
通道确定模块,用于确定至少一个颜色空间模型分别对应的三个颜色通道构成的多个颜色通道。
作为一个实施例,所述颜色直方图特征包括颜色特征矩阵;
所述第一加权模块可以包括:
第二加权模块,用于将所述多个区域图像各自的颜色特征矩阵进行横向或纵向的矩阵拼接处理,获得所述服装图像的图像特征。
在一些可能的设计中,所述至少一个颜色空间包括RGB颜色空间、HSV颜色空间以及YcbCr颜色空间;
其中,所述RGB颜色空间对应R颜色通道、G颜色通道以及B颜色通道,HSV颜色空间对应H颜色通道、S颜色通道以及V颜色通道,YcbCr颜色空间对应Y颜色通道、Cb颜色通道、Cv颜色通道。
对于不同的颜色通道,可以针对其通道特征,将每个颜色通道按照划分次数将每个颜色通道划分为多个直方图统计区间。
图4所述的装置可以执行图1~图2所示实施例所述的服装图像分类方法,其实现原理和技术效果不再赘述。对于上述实施例中服装图像分类装置其中各个模块、单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
此外,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被计算机执行时可以实现上述图1~图2所示实施例的服装图像分类方法。
如图5所示,为本发明实施例提供的一种服装图像分类设备的又一个实施例的结构示意图,所述设备可以包括:存储组件501以及处理组件502,所述存储组件501存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件502调用并执行;
所述处理组件502可以用于:
获取多个服装图像;针对任一个服装图像,将所述服装图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;基于所述多个服装图像的图像特征,将 所述多个服装图像进行聚类,获得多个图像集合;确定所述多个图像集合分别对应至少一个服装图像的图像数量。
本申请实施例中,区域图像的颜色直方图特征可以体现服装图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对服装图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成服装图像的图像特征,对多个服装图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个服装图像的图像数量,通过服装图像的图像数量可以实现对服装生产过程的精准监控。
作为一个实施例,所述处理组件501还可以用于:
确定所述多个图像集合分别对应的至少一个服装图像所在的服装类型。
作为又一个实施例,所述处理组件501还可以用于:
将所述图像数量进行排序,以确定每个图像集合的输出顺序;
将多个图像集合按照各自的输出顺序,依次输出所述多个图像集合分别对应的至少一个服装图像。
由于使用单纯统计每个像素点像素值的方式,可以表示不同像素点的颜色总体特征,但是不能显示不同像素点在不同颜色空间的特性,因此,作为又一个实施例,所述处理组件将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征具体可以是:
将所述多个区域图像的颜色直方图特征,按照所述多个区域图像的区域位置进行加权处理,获得所述服装图像的图像特征。
为了获得准确的颜色直方图特征,作为又一个实施例,所述处理组件分别提取所述多个区域图像的颜色直方图特征具体可以是:
分别提取所述多个区域图像在多个颜色通道的颜色直方图特征。
在某些实施例中,所述处理组件分别提取所述多个区域图像在多个颜色通道的颜色直方图特征具体可以是:针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征;
将所述多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征。
在某些实施例中,所述处理组件针对所述多个区域图像中的任一个区域图像,提取 所述区域图像在多个颜色通道分别对应的通道直方图特征具体可以是:
针对所述多个区域图像中的任一个区域图像,将所述区域图像的每个像素点在所述多个颜色通道分别对应的通道值;
将每个颜色通道划分为多个直方图统计区间;
针对任一个颜色通道,统计所述区域图像的多个像素点在所述颜色通道的通道值,在所述颜色通道对应多个直方图统计区间分别对应的分布数量;
基于所述多个直方图统计区间各自的分布数量,确定所述区域图像在所述颜色通道的通道直方图特征。
在某些实施例中,所述处理组件501还可以用于:
确定至少一个颜色空间模型分别对应的三个颜色通道构成的多个颜色通道。
在一些可能的设计中,所述处理组件确定的至少一个颜色空间包括RGB颜色空间、HSV颜色空间以及YcbCr颜色空间;
其中,所述RGB颜色空间对应R颜色通道、G颜色通道以及B颜色通道,HSV颜色空间对应H颜色通道、S颜色通道以及V颜色通道,YcbCr颜色空间对应Y颜色通道、Cb颜色通道、Cv颜色通道。
图5所述的设备可以执行图1~图2所示实施例所述的服装图像分类方法,其实现原理和技术效果不再赘述。对于上述实施例中服装图像分类设备其中处理组件的相关具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
如图6所示,为本发明实施例提供的一种图像分类装置的又一个实施例的结构示意图,所述装置可以包括以下几个模块:
第二获取模块601,用于获取多个待处理图像;
第二划分模块602,用于针对任一个待处理图像,将所述待处理图像划分为多个区域图像;
第二提取模块603,用于分别提取所述多个区域图像的颜色直方图特征;
第二加权模块604,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;
第二聚类模块605,用于基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;
第二确定模块606,用于确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;
第三确定模块607,用于确定每个图像类别对应的至少一个待处理图像的图像数量。
本发明实施例中,区域图像的颜色直方图特征可以体现待处理图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对待处理图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成待处理图像的图像特征,对多个待处理图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个待处理图像的图像数量,通过待处理图像的图像数量可以实现对服装生产过程的精准监控。
图6所述的装置可以执行图3所示实施例所述的图像分类方法,其实现原理和技术效果不再赘述。对于上述实施例中图像分类装置其中各个模块、单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
此外,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被计算机执行时可以实现上述图3所示实施例的图像分类方法。
如图7所示,为本发明实施例提供的一种图像分类设备的又一个实施例的结构示意图,所述设备可以包括:存储组件701以及处理组件702,所述存储组件701存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件702调用并执行;
所述处理组件702用于:
获取多个待处理图像;针对任一个待处理图像,将所述待处理图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;确定每个图像类别对应的至少一个待处理图像的图像数量。
本发明实施例中,区域图像的颜色直方图特征可以体现待处理图像的局部特征,将多个区域图像的颜色直方图特征进行加权处理可以实现对待处理图像的整体特征的关注;另外,直方图特征可以从颜色和纹理上表征图像的特性,且不易受到服装本身及图像采集环境的影响。进而使用多个区域图像的颜色直方图加权处理生成待处理图像的图像特征,对多个待处理图像进行聚类时,可以获得准确的分类结果。获得的多个图像集合分类误差较小,可以准确确定多个图像集合分别对应至少一个待处理图像的图像数量,通过待处理图像的图像数量可以实现对服装生产过程的精准监控。
图7所述的设备可以执行图3所示实施例所述的图像分类方法,其实现原理和技术效果不再赘述。对于上述实施例中图像分类设备其中处理组件的相关具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (15)
- 一种服装图像分类方法,其特征在于,包括:获取多个服装图像;针对任一个服装图像,将所述服装图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;确定所述多个图像集合分别对应至少一个服装图像的图像数量。
- 根据权利要求1所述的方法,其特征在于,还包括:确定所述多个图像集合分别对应的至少一个服装图像所在的服装类型。
- 根据权利要求1所述的方法,其特征在于,所述确定所述多个图像集合分别对应至少一个服装图像的图像数量之后,还包括:将所述图像数量进行排序,以确定每个图像集合的输出顺序;将多个图像集合按照各自的输出顺序,依次输出所述多个图像集合分别对应的至少一个服装图像。
- 根据权利要求1所述的方法,其特征在于,所述将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征包括:将所述多个区域图像的颜色直方图特征,按照所述多个区域图像的区域位置进行加权处理,获得所述服装图像的图像特征。
- 根据权利要求1所述的方法,其特征在于,所述分别提取所述多个区域图像的颜色直方图特征包括:分别提取所述多个区域图像在多个颜色通道的颜色直方图特征。
- 根据权利要求5所述的方法,其特征在于,所述分别提取所述多个区域图像在多个颜色通道的颜色直方图特征包括:针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征;将所述多个颜色通道分别对应的通道直方图特征进行加权处理,获得所述区域图像的颜色直方图特征。
- 根据权利要求6所述的方法,其特征在于,所述针对所述多个区域图像中的任一个区域图像,提取所述区域图像在多个颜色通道分别对应的通道直方图特征包括:针对所述多个区域图像中的任一个区域图像,将所述区域图像的每个像素点在所述多个颜色通道分别对应的通道值;将每个颜色通道划分为多个直方图统计区间;针对任一个颜色通道,统计所述区域图像的多个像素点在所述颜色通道的通道值,在所述颜色通道对应多个直方图统计区间分别对应的分布数量;基于所述多个直方图统计区间各自的分布数量,确定所述区域图像在所述颜色通道的通道直方图特征。
- 根据权利要求7所述的方法,其特征在于,还包括:确定至少一个颜色空间模型分别对应的三个颜色通道构成的多个颜色通道。
- 根据权利要求8所述的方法,其特征在于,所述至少一个颜色空间包括RGB颜色空间、HSV颜色空间以及YcbCr颜色空间;其中,所述RGB颜色空间对应R颜色通道、G颜色通道以及B颜色通道,HSV颜色空间对应H颜色通道、S颜色通道以及V颜色通道,YcbCr颜色空间对应Y颜色通道、Cb颜色通道、Cv颜色通道。
- 根据权利要求1所述的方法,其特征在于,所述颜色直方图特征包括颜色特征矩阵;所述将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征包括:将所述多个区域图像各自的颜色特征矩阵进行横向或纵向的矩阵拼接处理,获得所述服装图像的图像特征。
- 一种图像分类方法,其特征在于,包括:获取多个待处理图像;针对任一个待处理图像,将所述待处理图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;确定每个图像类别对应的至少一个待处理图像的图像数量。
- 一种服装图像分类装置,其特征在于,包括:第一获取模块,用于获取多个服装图像;第一划分模块,用于针对任一个服装图像,将所述服装图像划分为多个区域图像;第一提取模块,用于分别提取所述多个区域图像的颜色直方图特征;第一加权模块,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述服装图像的图像特征;第一聚类模块,用于基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;第一确定模块,用于确定所述多个图像集合分别对应至少一个服装图像的图像数量。
- 一种图像分类装置,其特征在于,包括:第二获取模块,用于获取多个待处理图像;第二划分模块,用于针对任一个待处理图像,将所述待处理图像划分为多个区域图像;第二提取模块,用于分别提取所述多个区域图像的颜色直方图特征;第二加权模块,用于将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;第二聚类模块,用于基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;第二确定模块,用于确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;第三确定模块,用于确定每个图像类别对应的至少一个待处理图像的图像数量。
- 一种服装图像分类设备,其特征在于,包括:存储组件以及处理组件,所述存储组件存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件调用并执行;所述处理组件用于:获取多个服装图像;针对任一个服装图像,将所述服装图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征 进行加权处理,获得所述服装图像的图像特征;基于所述多个服装图像的图像特征,将所述多个服装图像进行聚类,获得多个图像集合;确定所述多个图像集合分别对应至少一个服装图像的图像数量。
- 一种图像分类设备,其特征在于,包括:存储组件以及处理组件,所述存储组件存储一条或多条计算机指令,所述一条或多条计算机指令供所述处理组件调用并执行;所述处理组件用于:获取多个待处理图像;针对任一个待处理图像,将所述待处理图像划分为多个区域图像;分别提取所述多个区域图像的颜色直方图特征;将所述多个区域图像的颜色直方图特征进行加权处理,获得所述待处理图像的图像特征;基于所述多个待处理图像的图像特征,将所述多个待处理图像进行分类,获得多个图像集合;确定所述多个图像集合分别对应的至少一个待处理图像所属的图像类型;确定每个图像类别对应的至少一个待处理图像的图像数量。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910063759.7 | 2019-01-23 | ||
| CN201910063759.7A CN111476253B (zh) | 2019-01-23 | 2019-01-23 | 服装图像分类、图像分类方法、装置及设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020151529A1 true WO2020151529A1 (zh) | 2020-07-30 |
Family
ID=71736308
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/071925 Ceased WO2020151529A1 (zh) | 2019-01-23 | 2020-01-14 | 服装图像分类、图像分类方法、装置及设备 |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN111476253B (zh) |
| TW (1) | TW202109356A (zh) |
| WO (1) | WO2020151529A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115546475A (zh) * | 2022-07-21 | 2022-12-30 | 平安信托有限责任公司 | 图像处理方法、装置、计算机设备及存储介质 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112990236B (zh) * | 2021-05-10 | 2021-08-31 | 腾讯科技(深圳)有限公司 | 一种数据处理方法和相关装置 |
| CN114677527B (zh) * | 2022-03-21 | 2026-04-24 | 深圳大学 | 颜色识别方法、装置、电子设备及存储介质 |
| CN114998598A (zh) * | 2022-06-01 | 2022-09-02 | 北京字节跳动网络技术有限公司 | 一种图像处理方法、装置、存储介质及电子设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103955952A (zh) * | 2014-05-04 | 2014-07-30 | 电子科技大学 | 一种服装图像颜色特征的提取与描述方法 |
| CN105631455A (zh) * | 2014-10-27 | 2016-06-01 | 阿里巴巴集团控股有限公司 | 一种图像主体提取方法及系统 |
| CN106022343A (zh) * | 2016-05-19 | 2016-10-12 | 东华大学 | 一种基于傅里叶描述子和bp神经网络的服装款式识别方法 |
| CN106250431A (zh) * | 2016-07-25 | 2016-12-21 | 华南师范大学 | 一种基于分类服装的颜色特征提取方法及服装检索系统 |
| CN107194348A (zh) * | 2017-05-19 | 2017-09-22 | 北京云识图信息技术有限公司 | 一种图像中目标物体的主颜色识别方法 |
Family Cites Families (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100535926C (zh) * | 2006-01-06 | 2009-09-02 | 佳能株式会社 | 数据处理,图像处理和图像分类方法及设备 |
| CN101714257A (zh) * | 2009-12-23 | 2010-05-26 | 公安部第三研究所 | 图像主颜色特征提取和结构化描述的方法 |
| US8798362B2 (en) * | 2011-08-15 | 2014-08-05 | Hewlett-Packard Development Company, L.P. | Clothing search in images |
| CN103065118A (zh) * | 2011-10-21 | 2013-04-24 | 索尼公司 | 图像模糊检测方法和装置 |
| CN103207879B (zh) * | 2012-01-17 | 2016-03-30 | 阿里巴巴集团控股有限公司 | 图像索引的生成方法及设备 |
| CN103377376A (zh) * | 2012-04-13 | 2013-10-30 | 阿里巴巴集团控股有限公司 | 图像分类的方法和系统、图像检索的方法和系统 |
| CN103227810B (zh) * | 2012-12-20 | 2016-03-02 | 广州天锐锋信息科技有限公司 | 一种在网络监控中识别远程桌面语义的方法、装置和系统 |
| CN103345645B (zh) * | 2013-06-27 | 2016-09-28 | 复旦大学 | 面向网购平台的商品图像类别预测方法 |
| CN105844283B (zh) * | 2015-01-16 | 2019-06-07 | 阿里巴巴集团控股有限公司 | 用于识别图像类目归属的方法、图像搜索方法及装置 |
| CN104636755A (zh) * | 2015-01-31 | 2015-05-20 | 华南理工大学 | 一种基于深度学习的人脸美丽评价方法 |
| CN105426894B (zh) * | 2015-11-06 | 2018-08-14 | 中国铁道科学研究院 | 铁道塞钉图像检测方法及装置 |
| CN106485266A (zh) * | 2016-09-23 | 2017-03-08 | 重庆大学 | 一种基于提取颜色特征的古代壁画分类识别方法 |
| CN107330431B (zh) * | 2017-06-30 | 2020-09-01 | 福州大学 | 一种基于K-means聚类拟合的显著性检测优化方法 |
| CN108154157B (zh) * | 2017-12-06 | 2020-07-28 | 西安交通大学 | 一种基于集成的快速谱聚类方法 |
-
2019
- 2019-01-23 CN CN201910063759.7A patent/CN111476253B/zh active Active
- 2019-11-29 TW TW108143616A patent/TW202109356A/zh unknown
-
2020
- 2020-01-14 WO PCT/CN2020/071925 patent/WO2020151529A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103955952A (zh) * | 2014-05-04 | 2014-07-30 | 电子科技大学 | 一种服装图像颜色特征的提取与描述方法 |
| CN105631455A (zh) * | 2014-10-27 | 2016-06-01 | 阿里巴巴集团控股有限公司 | 一种图像主体提取方法及系统 |
| CN106022343A (zh) * | 2016-05-19 | 2016-10-12 | 东华大学 | 一种基于傅里叶描述子和bp神经网络的服装款式识别方法 |
| CN106250431A (zh) * | 2016-07-25 | 2016-12-21 | 华南师范大学 | 一种基于分类服装的颜色特征提取方法及服装检索系统 |
| CN107194348A (zh) * | 2017-05-19 | 2017-09-22 | 北京云识图信息技术有限公司 | 一种图像中目标物体的主颜色识别方法 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115546475A (zh) * | 2022-07-21 | 2022-12-30 | 平安信托有限责任公司 | 图像处理方法、装置、计算机设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202109356A (zh) | 2021-03-01 |
| CN111476253A (zh) | 2020-07-31 |
| CN111476253B (zh) | 2024-04-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110969170B (zh) | 一种图像主题色提取方法、装置及电子设备 | |
| WO2020151529A1 (zh) | 服装图像分类、图像分类方法、装置及设备 | |
| CN109410168B (zh) | 用于确定图像中的子图块类别的卷积神经网络的建模方法 | |
| CN105893925A (zh) | 基于肤色的人手检测方法及装置 | |
| WO2017088365A1 (zh) | 一种肤色检测方法及装置 | |
| CN113792584A (zh) | 一种安全护具佩戴检测方法及系统 | |
| CN103530638A (zh) | 多摄像头下的行人匹配方法 | |
| CN108764302A (zh) | 一种基于颜色特征和词袋特征的票据图像分类方法 | |
| CN107194348A (zh) | 一种图像中目标物体的主颜色识别方法 | |
| CN108009567A (zh) | 一种结合图像颜色及hog和svm的粪便性状的自动辨别方法 | |
| CN103985130A (zh) | 一种针对复杂纹理图像的图像显著性分析方法 | |
| WO2022022310A1 (zh) | 分光器端口识别方法及装置 | |
| CN110569859A (zh) | 一种服装图像的颜色特征提取方法 | |
| CN108171683A (zh) | 一种采用软件自动识别的细胞计数方法 | |
| CN116977270A (zh) | 一种高精度轴承全表面缺陷在线可视化智能检测方法 | |
| CN106898011A (zh) | 一种基于边缘检测来确定卷积神经网络卷积核数量的方法 | |
| CN110276260B (zh) | 一种基于深度摄像头的商品检测方法 | |
| CN110751660B (zh) | 一种彩色图像分割方法 | |
| Kiratiratanapruk et al. | Silkworm eggs detection and classification using image analysis | |
| CN107169528A (zh) | 一种基于机器学习的集成电路图像的通孔识别装置 | |
| CN113628287B (zh) | 一种基于深度学习的单阶段服装颜色识别系统及方法 | |
| CN103366161B (zh) | 一种白粉虱数量的统计方法及系统 | |
| CN114519799A (zh) | 一种多特征座位状态实时检测方法及系统 | |
| CN119417880B (zh) | 田间环境下麦穗表型性状测量方法及装置 | |
| CN118953914A (zh) | 一种基于图像识别的垃圾分类系统及方法 |
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 |