A Method and System for Identifying Down Based on Machine Vision
Through the down recognition method based on machine vision, the HSV channel feature extraction and multi-feature weighted aggregation model are used, combined with the decision tree and support vector machine model, the problem of low down recognition accuracy in the existing technology is solved, and the effect of efficiently distinguishing fresh and recycled velvet is achieved.
Patent Information
- Application Number
- CN202510442678.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-04-10
AI Technical Summary
In the prior art, down recognition methods based on machine vision are difficult to effectively distinguish fresh and recycled, and have low accuracy and lack effective solutions.
Using a down recognition method based on machine vision, the V channel distribution histogram and the accumulated distribution function diagram of HSV channel are obtained, and significant features are extracted and normalized. The features are screened using a random forest algorithm, and a multi-feature weighted aggregation model is constructed, and the decision tree and support vector machine model are used for identification, and the superposition results are finally statistically calculated.
It improves the accuracy of down recognition, can effectively distinguish white and miscellaneous, and further identify fresh and recycled velvet, enhances the robustness and efficiency of the algorithm, reduces noise interference, and has efficient classification capabilities.
Smart Images

Figure CN119963929B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine vision, and in particular, to a method and system for identifying down based on machine vision. Background Art
[0002] Traditional down identification and classification mainly rely on manual visual inspection. The specific operation is to encapsulate the down in a transparent sealed bag, and the inspector relies on the naked eye to observe the appearance, shape, impurity distribution and other characteristics of the down to judge whether it is fresh down or recycled down. However, this manual visual inspection method has many limitations. Due to the influence of the inspector's experience and subjective factors, during the long-term inspection process, its accuracy is difficult to be stably guaranteed.
[0003] In the prior art, fully automatic down identification methods based on machine vision have been developed. However, currently these methods mainly focus on the classification of down types. For example, the patent with the publication number CN111680582A discloses a down detection method and system based on a support vector machine, including: establishing a down database containing different down categories and corresponding down data; selecting a certain number of down categories and corresponding down data from the down database as samples to form a training set; preprocessing the samples in the training set, using the preprocessed down data as input and the down category as output to train the support vector machine model to obtain the down vector machine model; obtaining the down data of the down to be detected and performing the same preprocessing, and inputting the preprocessed down data into the down vector machine model to obtain the down category of the down to be detected. Although the above patent can detect down raw materials in down production and processing to achieve differentiation, such as differentiating duck down from goose down. However, for the more critical problem of differentiating fresh down from recycled down, the accuracy of the prior art is generally low, and there is a lack of an effective solution.
[0004] In view of the above technical problems, the present invention proposes a method and system for identifying down based on machine vision. Summary of the Invention
[0005] The purpose of the present invention is to provide a method and system for identifying down based on machine vision in view of the deficiencies of the prior art.
[0006] To achieve the above purpose, the present invention adopts the following technical solutions:
[0007] A method for identifying down based on machine vision, including:
[0008] S1. Obtain an original image corresponding to the down, and extract the H, S, V channel component values of the original image;
[0009] S2. Calculate the V-channel distribution histogram and the cumulative distribution function graphs of the H, S, and V channels;
[0010] S3. Extract the pixel values corresponding to the peaks in the V-channel distribution histogram and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels as the significant features of the image, and perform normalization processing on the significant features of the original image to obtain the processed significant features of the image;
[0011] S4. Use the random forest algorithm to screen the processed image features to obtain the significance rankings of each feature in the significant features of the image;
[0012] S5. Construct a multi-feature weighted aggregation model, and based on the multi-feature weighted aggregation model, perform weighted aggregation on the significance rankings of each feature to obtain the final features of the image;
[0013] S6. Input the final features of the image into the decision tree model for recognition, and the decision tree model outputs the result of white fluff or miscellaneous fluff;
[0014] S7. Input the image features corresponding to the recognized white fluff or miscellaneous fluff into the support vector machine model for recognition, and the support vector machine model outputs whether it is fresh fluff or recycled fluff in the white fluff or miscellaneous fluff;
[0015] S8. Statistically superimpose the recognition results output in steps S6 and S7 to obtain the final recognition result.
[0016] Further, before extracting the H, S, and V channel component values of the original image in step S1, it further includes: converting the RGB channel of the original image to the HSV channel.
[0017] Further, the extraction of the pixel values corresponding to the peaks in the V-channel distribution histogram and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels as the significant features of the image in step S3 is extracted through feature engineering.
[0018] Further, in step S3, the normalization processing of the significant features of the image is performed based on the normalization function, where the normalization function is expressed as:
[0019] ;
[0020] ;
[0021] ;
[0022] ;
[0023] Among them, x1, x2, x3, and x4 respectively represent the pixel values corresponding to the peaks in the V-channel distribution histogram of the original image, and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels; μ represents the characteristic mean corresponding to the pixel values corresponding to the peaks in the V-channel distribution histogram and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels; σ represents the characteristic standard deviation corresponding to the pixel values corresponding to the peaks in the V-channel distribution histogram and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels; v hist , h cdf , s cdf , v cdf respectively represent the normalized V-channel distribution histogram feature, H-channel cumulative probability distribution feature, S-channel cumulative probability distribution feature, and V-channel cumulative probability distribution feature.
[0024] Furthermore, the final feature of the image obtained in step S5 is expressed as:
[0025] ;
[0026] Among them, ω1, ω2, ω3, and ω4 respectively represent the feature weight values corresponding to the normalized V-channel distribution histogram feature, H-channel cumulative probability distribution feature, S-channel cumulative probability distribution feature, and V-channel cumulative probability distribution feature; f represents the final feature of the obtained image.
[0027] Furthermore, the final recognition results in step S8 include fresh white down, recycled white down, fresh miscellaneous down, and recycled miscellaneous down.
[0028] Correspondingly, a down recognition system based on machine vision is also provided, including an inspection box, an inspection table, an imaging device equipped with a down recognition method based on machine vision, and a display screen; the inspection box is a square structure with a hollow interior, the inspection table is arranged on the inner bottom of the inspection box, and a feeding port is opened on one side of the inspection box. The imaging device is arranged on the top inside the inspection box, and the display screen is arranged on one side outside the inspection box, so that the down is put into the inspection box through the feeding port and placed on the inspection table, and the original image of the down is collected by the imaging device, and the recognition result is displayed through the display screen.
[0029] Furthermore, the imaging device includes a bar-shaped light source, a bracket, a polarizer, a camera base, and an industrial camera;
[0030] The bracket is arranged inside the inspection box, the bar-shaped light source and the camera base are both fixed on the bracket, the industrial camera is fixed on the camera base, and the polarizer is installed on the industrial camera.
[0031] Furthermore, the industrial camera is also connected to a Raspberry Pi through a data cable.
[0032] Furthermore, the Raspberry Pi is used to implement a down identification method based on machine vision.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0034] 1. Put the down sample into the feeding port and place it on the inspection table so that the subsequent imaging device can collect the down image;
[0035] 2. The industrial camera automatically acquires the image, converts the image from the RGB channel to the HSV channel, and simultaneously extracts the component values of the HSV channel. The polarizer installed on the industrial camera can solve the problem of external surface glare of the transparent bag of the down sample, which is beneficial to the extraction of the color characteristics of the down image data;
[0036] 3. Calculate the distribution histogram of the V channel and the cumulative distribution function graphs of the H, S, and V channels to improve the algorithm's ability to analyze color information;
[0037] 4. Extract the significant features of the H, S, and V channels of the above distribution graphs through feature engineering. Specifically, the pixel value corresponding to the peak in the distribution histogram of the V channel and the cumulative probability corresponding to the pixel values of 0 - 255 in the cumulative distribution function graphs of the H, S, and V channels are used as the significant features of the image, which improves the sensitivity of the algorithm to light, color, and details, and enhances the robustness and efficiency of image analysis;
[0038] 5. Design a down feature normalization function to normalize the significant features of the image, which can eliminate the scale differences between features, help improve the expression effect of features in the image, and enable the subsequent machine learning model to train and infer more efficiently.
[0039] 6. Use the random forest algorithm to screen and obtain the significance rankings of each feature, retain the features most valuable for prediction, and eliminate redundant features for subsequent weighted aggregation of features.
[0040] 7. Design a multi - feature weighted aggregation model to weighted - aggregate according to the significance degree of features to obtain the final features, which can highlight the contribution of useful features, reduce the interference of noise, and obtain more representative comprehensive features.
[0041] 8. Train a decision tree model based on the above image features to initially identify white down and miscellaneous down, which can effectively use the extracted color and brightness features for classification, and at the same time has the advantages of strong interpretability, high - efficiency training and inference, adaptation to non - linear relationships, and avoidance of overfitting;
[0042] 9. If it is identified as white (mixed) down, the support vector machine model is trained by the image features of the above-mentioned white (mixed) down to identify fresh down and recycled down in the white (mixed) down again. The support vector machine can effectively handle the subtle differences between fresh down and recycled down by relying on boundary maximization and nonlinear mapping, ensuring a high accuracy rate of classification;
[0043] 10. The results of the two identifications are statistically superimposed to obtain the final results (fresh white down, recycled white down, fresh mixed down, recycled mixed down). Brief Description of the Drawings
[0044] Figure 1 It is a structural diagram of a down identification system based on machine vision provided in the first embodiment;
[0045] Figure 2 It is an interaction diagram of a down identification system based on machine vision provided in the first embodiment;
[0046] Figure 3 It is a flowchart of a down identification method based on machine vision provided in the second embodiment;
[0047] Figure 4 It is a distribution diagram of HSV features of a down image provided in the second embodiment;
[0048] Figure 5 It is a diagram of identification results provided in the second embodiment. Detailed Embodiment
[0049] The following specific examples illustrate the embodiments of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0050] The purpose of the present invention is to provide a down identification method and system based on machine vision for the defects of the existing technology.
[0051] First Embodiment
[0052] This embodiment provides a down identification system based on machine vision, as Figure 1 、 Figure 2 shown, including an inspection table 1, a feed inlet 2, an inspection box 3, an imaging device 4, a Raspberry Pi 5, and a display screen 6.
[0053] The inspection box 3 is a closed box with a hollow interior, used to accommodate components such as the imaging device 4, the inspection table 1, the feed inlet 2, etc., providing a relatively stable environment for the imaging of the down samples.
[0054] The inspection table 1 is arranged at the inner bottom of the inspection box 3 and is used to place the down samples; the feed inlet 2 is arranged on the front of the inspection box 3. The feed inlet 2 is an opening, that is, an opening is provided on the front of the inspection box 3, and the down samples enter the inspection box 3 through the feed inlet 2 so that the down samples are placed on the inspection table 1.
[0055] The imaging device 4 is fixed inside the inspection box 3 and is used to collect the image information of the down samples.
[0056] The Raspberry Pi 5, as the core component for image processing and model operation, is placed at a suitable position inside or outside the inspection box 3; and the Raspberry Pi 5 has various interfaces such as HDMI, USB, Ethernet, etc., which are convenient for connecting to external devices such as the imaging device 4 and the display screen 6, realizing functions such as image data collection and result display, providing convenience for constructing the down recognition device.
[0057] The display screen 6 is used to display the recognition results and is placed outside the device for easy viewing by the operator, generally on the side or above the inspection box 3.
[0058] In this embodiment, the imaging device 4 includes a strip light source 7, a bracket 8, a polarizer 9, a camera base 10, and an industrial camera 11.
[0059] The bracket 8 is used to support the strip light source 7 and the industrial camera 11 and is placed inside the inspection box 3. Its position and structure need to be designed according to the overall layout of the imaging device 4.
[0060] The strip light source 7 is fixed on both sides of the bracket 8 and is used to illuminate the down samples to improve the imaging quality. Its position needs to cooperate with the industrial camera 11 to ensure that the light can evenly irradiate the down samples.
[0061] The camera base 10 is used to fix the industrial camera 11 and is placed on the bracket 8 to ensure the stable position of the industrial camera 11.
[0062] The industrial camera 11 is used to collect the images of the down samples, is fixed on the camera base 10, is placed on one side of the bracket 8, is opposite to the strip light source 7, and is aligned with the down samples on the inspection table 1.
[0063] The polarizer 9 is installed on the industrial camera 11 and is used to solve the problem of glare on the outer surface of the transparent bag of the down samples and is placed in front of the lens of the industrial camera 11.
[0064] In this embodiment, the down image data collected by the industrial camera 11 in the imaging device 4 is transmitted to the Raspberry Pi 5 through a data cable, and the Raspberry Pi 5 performs operations such as preprocessing, feature extraction, model training, and recognition on the image.
[0065] The bar light source 7 provides illumination for the imaging device 4. Through reasonable layout and light adjustment, the imaging device 4 can clearly capture the image of the down sample, improve the image quality, and thus provide a better basis for subsequent image processing and recognition.
[0066] The polarizer 9 is installed on the industrial camera 11. When the industrial camera 11 captures the down sample encapsulated in a transparent sealed bag, the polarizer 9 can effectively solve the problem of glare generated on the outer surface of the transparent bag, make the captured image clearer, facilitate the extraction of the color features of the down image data, and improve the recognition accuracy.
[0067] The Raspberry Pi 5 transmits the recognized down results (such as fresh white down, recycled white down, fresh mixed down, recycled mixed down) to the display screen 6 through a data cable, and the display screen 6 displays the results, which is convenient for the operator to intuitively understand the recognition situation of the down sample and realizes human-computer interaction.
[0068] It should be noted that the connection method between each component in this embodiment can be realized by means of threads, welding, gluing, etc., and the installation position of each component can be set according to the actual situation, and this embodiment will not be elaborated too much.
[0069] Embodiment Two
[0070] This embodiment provides a method for identifying down based on machine vision, and this identification method is realized based on the identification system of Embodiment One.
[0071] As Figure 3 shown, the identification method includes:
[0072] S1. Obtain the original image corresponding to the down, and extract the H, S, and V channel component values of the original image;
[0073] S2. Calculate the V-channel distribution histogram and the cumulative distribution function graphs of the H, S, and V channels;
[0074] S3. Extract the pixel values corresponding to the peaks in the V-channel distribution histogram and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels as the significant features of the image, and perform normalization processing on the significant features of the original image to obtain the processed image significant features;
[0075] S4. Use the random forest algorithm to screen the processed image features to obtain the significance rankings of the features in the image significant features;
[0076] S5. Construct a multi-feature weighted aggregation model, and based on the multi-feature weighted aggregation model, perform weighted aggregation on the significance rankings of each feature to obtain the final feature of the image;
[0077] S6. Input the final feature of the image into a decision tree model for recognition, and the decision tree model outputs the result of white down or miscellaneous down;
[0078] S7. Input the image features corresponding to the recognized white down or miscellaneous down into a support vector machine model for recognition, and the support vector machine model outputs whether it is fresh down or recycled down in the white down or miscellaneous down;
[0079] S8. Statistically superimpose the recognition results output in steps S6 and S7 to obtain the final recognition result.
[0080] In step S1, obtain the original image corresponding to the down, and extract the numerical values of the H, S, and V channel components of the original image.
[0081] First, put the white down or miscellaneous down sample into the inspection box 3 from the feed port 2 and place it on the inspection table 1. Then, collect the image by the imaging device 4. Specifically, illuminate the sample with the bar-shaped light source 7 fixed on both sides of the bracket 8, and use the industrial camera 11 equipped with a polarizer 9 to collect the original image of the white down or miscellaneous down sample and transmit it to the image preprocessing algorithm in the Raspberry Pi 5 for processing. Specifically: First, read the RGB image, convert the RGB image to an HSV image using the existing method, and extract the component numerical values of the H, S, and V channels of the converted HSV image.
[0082] In this embodiment, installing a polarizer on the industrial camera can solve the problem of glare on the outer surface of the transparent bag of the down sample, which is beneficial to the extraction of the color feature of the down image data.
[0083] In step S2, calculate the V-channel distribution histogram and the cumulative distribution function graphs of the H, S, and V channels.
[0084] The V-channel distribution histogram describes the distribution of the V-channel (brightness) values in the image. The specific steps are as follows: Extract the component numerical values of the V channel from the HSV image, count the frequency of each possible value (from 0 to 255) in the V channel to obtain the histogram, where the parameters of the histogram represent the image, channel index, mask, histogram size, and range respectively; The histogram can visually display the distribution.
[0085] The cumulative distribution function (CDF) graph describes the cumulative probability that the H, S, and V channel values in the image are less than or equal to a certain specific value. The specific steps are as follows: First, calculate the distribution histograms of the H, S, and V channels, perform cumulative summation on the histograms of each channel to obtain the CDF, and normalize the CDF to the range [0, 1] to represent the cumulative probability; The CDF graph can visually display the distribution.
[0086] In step S3, the pixel value corresponding to the peak in the V-channel distribution histogram and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels are extracted as the significant features of the image, and the significant features of the original image are normalized to obtain the processed image significant features.
[0087] As Figure 4 shown in the HSV feature distribution diagram of white down (WHITE) or other down (OTHER) images. The significant features of the H, S, and V channels of the above distribution diagram are extracted through feature engineering, specifically the pixel value corresponding to the peak in the V-channel distribution histogram and the cumulative probabilities corresponding to the 0-255 pixel values in the cumulative distribution function graphs of the H, S, and V channels, as the significant features of the image.
[0088] In this embodiment, the value of each pixel is directly obtained from the H, S, and V channels, and these values can be used as features for model training. By calculating the cumulative sum of the histogram and normalizing it, the cumulative probability of each pixel value is obtained, and these cumulative probabilities can be used as features for model training. This embodiment combines the peak of the V-channel distribution histogram and the cumulative probabilities of the H, S, and V channels to extract significant features, which can better capture the key information in the image data and improve the performance of the model.
[0089] This embodiment also designs a down feature normalization function to normalize the significant features of the image, expressed as:
[0090] ;
[0091] ;
[0092] ;
[0093] ;
[0094] where x1, x2, x3, and x4 respectively represent the pixel value corresponding to the peak in the V-channel distribution histogram of the original image and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels; μ represents the feature mean corresponding to the pixel value corresponding to the peak in the V-channel distribution histogram and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels; σ represents the feature standard deviation corresponding to the pixel value corresponding to the peak in the V-channel distribution histogram and the cumulative probabilities corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels; v hist 、h cdf 、s cdf 、v cdfThey respectively represent the normalized V-channel distribution histogram feature, H-channel cumulative probability distribution feature, S-channel cumulative probability distribution feature, and V-channel cumulative probability distribution feature; through the above formula, the features can be normalized to eliminate the scale difference between features.
[0095] In step S4, the random forest algorithm is used to screen the processed image features to obtain the significance ranking of each feature in the image significant features. Specifically:
[0096] S41. Prepare data;
[0097] First, it is necessary to prepare the feature data of the down sample images, including pixel values, histograms, cumulative probabilities, etc. of the images, and divide the feature data into a training set and a test set.
[0098] S42. Train the random forest model;
[0099] Input the training set into the training random forest algorithm, use the random forest algorithm to train the model, and obtain the importance score of each feature.
[0100] S43. Obtain feature importance;
[0101] After training, the random forest model will provide an importance score for each feature, indicating the contribution degree of each feature to the model prediction. These scores can be used for feature selection, retaining important features and removing unimportant features, which is convenient for sorting and visualization.
[0102] S44. Screen the image features:
[0103] Sort in descending order according to the importance score to obtain the significance ranking of the features. Select the top N important features as needed and reconstruct the feature matrix.
[0104] Through the above steps, the significance ranking of features can be screened using the random forest algorithm, retaining the features most valuable for prediction, thereby improving the performance and interpretability of the model.
[0105] In step S5, a multi-feature weighted aggregation model is constructed, and based on the multi-feature weighted aggregation model, the significance rankings of each feature are weighted and aggregated to obtain the final feature of the image.
[0106] According to the importance score of the feature, a weight ω is assigned to each feature. The weight ω can be the direct value of the feature importance score or the value after normalization. Therefore, according to the significance rankings of each feature obtained in step S4 from high to low, the weight values ω are assigned as 1, 0.75, 0.5, and 0.25 in turn. After feature aggregation, more representative aggregated features can be obtained. Multiply each feature by its corresponding weight, and then add all the weighted feature values to obtain the final aggregated feature, which is expressed as:
[0107] ;
[0108] Among them, ω1, ω2, ω3, and ω4 respectively represent the characteristic weight values corresponding to the normalized V-channel distribution histogram feature, H-channel cumulative probability distribution feature, S-channel cumulative probability distribution feature, and V-channel cumulative probability distribution feature; f represents the final feature of the obtained image.
[0109] In step S6, the final feature of the image is input into the decision tree model for recognition, and the decision tree model outputs the result of white down or miscellaneous down. Specifically:
[0110] S61. Data preparation:
[0111] First of all, it is necessary to prepare training data, including the aggregated feature matrix and the corresponding label data. The feature matrix is obtained through weighted aggregation, and the label data indicates whether each sample is white down or miscellaneous down.
[0112] S62. Divide the training set and the test set:
[0113] The data is divided into a training set and a test set to train the model on the training set and evaluate the performance of the model on the test set.
[0114] S63. Train the decision tree model:
[0115] Use the DecisionTreeClassifier class to train the decision tree model. The decision tree learns the relationship between features and labels and constructs a tree-like model for classification tasks.
[0116] S64. Model evaluation:
[0117] Use the accuracy_score and classification_report functions to evaluate the performance of the model. Evaluate the performance of the model on the test set. Commonly used evaluation metrics include accuracy, precision, recall, and F1 score, and output the accuracy and classification report.
[0118] Through the above steps, the decision tree model can be trained using the weighted aggregated features to initially identify whether the down sample is white down or miscellaneous down, thereby improving the performance and interpretability of the model.
[0119] In step S7, the image features corresponding to the identified white down or miscellaneous down are input into the support vector machine model for recognition, and the support vector machine model outputs whether it is fresh down or recycled down in the white down or miscellaneous down. Specifically:
[0120] S71. Data preparation:
[0121] First, it is necessary to prepare the training data, including the image feature matrix of white down or mixed down and the corresponding label data. The feature matrix is obtained through weighted aggregation, and the label data indicates whether each sample is fresh down or recycled down.
[0122] S72. Divide the training set and the test set:
[0123] Divide the data into a training set and a test set to train the model on the training set and evaluate the performance of the model on the test set.
[0124] S73. Train the support vector machine model:
[0125] Use the SVC class to train the support vector machine model, where the kernel parameter selects the linear kernel and the C parameter controls the regularization strength. The SVM maximizes the margin between different classes by finding the optimal hyperplane to achieve the classification task.
[0126] S74. Model evaluation:
[0127] Use the accuracy_score and classification_report functions to evaluate the performance of the model, output the accuracy rate and the classification report, and evaluate the performance of the model on the test set. Common evaluation metrics include accuracy rate, precision rate, recall rate, and F1 score.
[0128] Through the above steps, a support vector machine model can be trained using the weighted aggregated features to further identify fresh down and recycled down in white down or mixed down, thereby improving the performance and interpretability of the model.
[0129] In step S8, the recognition results output in steps S6 and S7 are statistically superimposed to obtain the final recognition result.
[0130] Statistically superimpose the prediction results of the decision tree model and the SVM model to determine the final classification result. Display the final classification result on the display screen 6. The final recognition results include fresh white down, recycled white down, fresh mixed down, and recycled mixed down. As Figure 5 shown in the schematic diagram of the recognition result.
[0131] Compared with the prior art, the beneficial effects of the present invention are:
[0132] 1. Put the down sample into the feed port and place it on the inspection table for subsequent imaging device to collect the down image;
[0133] 2. The industrial camera automatically acquires the image, converts the image from the RGB channel to the HSV channel, and simultaneously extracts the component values of the HSV channel. The polarizer installed on the industrial camera can solve the problem of external surface glare of the transparent bag of the down sample, which is beneficial to the extraction of color features of the down image data;
[0134] 3. Calculate the V-channel distribution histogram and the cumulative distribution function graphs of the H, S, and V channels to improve the algorithm's ability to analyze color information;
[0135] 4. Extract the significant features of the H, S, and V channels from the above distribution graphs. Specifically, the pixel value corresponding to the peak in the V-channel distribution histogram and the cumulative probabilities corresponding to the 0-255 pixel values in the cumulative distribution function graphs of the H, S, and V channels are used as the significant features of the image, enhancing the algorithm's sensitivity to illumination, color, and details, and improving the robustness and efficiency of image analysis;
[0136] 5. Design a down feature normalization function to normalize the significant features of the image, which can eliminate the scale differences between features, help improve the expression effect of features in the image, and enable subsequent machine learning models to train and infer more efficiently.
[0137] 6. Use the random forest algorithm to screen and obtain the significance rankings of each feature, retain the features most valuable for prediction, and eliminate redundant features for subsequent weighted aggregation of features.
[0138] 7. Design a multi-feature weighted aggregation model to weight and aggregate according to the significance of features to obtain the final features, which can highlight the contributions of useful features, reduce the interference of noise, and obtain more representative comprehensive features.
[0139] 8. Train a decision tree model based on the above image features to initially identify white down and miscellaneous down, which can effectively use the extracted color and brightness features for classification, and also has the advantages of strong interpretability, efficient training and inference, adaptation to non-linear relationships, and avoidance of overfitting;
[0140] 9. If it is identified as white (miscellaneous) down, then train a support vector machine model with the image features of the white (miscellaneous) down to re-identify the fresh down and recycled down in the white (miscellaneous) down. The support vector machine can effectively handle the subtle differences between fresh down and recycled down by maximizing the boundary and non-linear mapping, ensuring a high classification accuracy;
[0141] 10. Statistically superimpose the results of the two identifications to obtain the final results (fresh white down, recycled white down, fresh miscellaneous down, recycled miscellaneous down).
[0142] Note that the above is only the preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for identifying down based on machine vision, characterized in that, Including: S1. Obtain the original image corresponding to the down, and extract the H, S, and V channel component values of the original image; S2. Calculate the V-channel distribution histogram and the cumulative distribution function graphs of the H, S, and V channels; S3. Extract the pixel value corresponding to the peak in the V-channel distribution histogram and the cumulative probability corresponding to the pixel values from 0 to 255 in the cumulative distribution function graphs of the H, S, and V channels as the significant features of the image, and perform normalization processing on the significant features of the original image to obtain the processed image significant features; S4. Use the random forest algorithm to screen the processed image features to obtain the significance rankings of each feature in the image significant features; S5. Construct a multi-feature weighted aggregation model, and based on the multi-feature weighted aggregation model, weight and aggregate each feature according to the significance ranking to obtain the final features of the image; S6. Input the final features of the image into the decision tree model for recognition, and the decision tree model outputs the result of white down or mixed down; S7. Input the image features corresponding to the identified white down or mixed down into the support vector machine model for recognition, and the support vector machine model outputs whether it is fresh down or recycled down in the white down or mixed down; S8. Statistically superimpose the recognition results output in steps S6 and S7 to obtain the final recognition result.
2. The method for identifying down based on machine vision according to claim 1, wherein Before extracting the H, S, and V channel component values of the original image in step S1, it further includes: converting the RGB channels of the original image to HSV channels.
3. The method for identifying down based on machine vision according to claim 1, wherein In step S3, extracting the pixel value corresponding to the peak in the V-channel distribution histogram and the cumulative probability corresponding to the pixel values in the cumulative distribution function graphs of the H, S, and V channels as the significant features of the image is extracted through feature engineering.
4. The method for identifying down based on machine vision according to claim 1, wherein In step S3, the normalization processing of the significant features of the image is performed based on the normalization function, where the normalization function is expressed as: ; ; ; ; Among them, x1, x2, x3, and x4 represent the pixel value corresponding to the peak value in the V channel distribution histogram of the original image, and the cumulative probability corresponding to the pixel value in the H, S, and V channel cumulative distribution function diagrams, respectively; μ represents the pixel value corresponding to the peak value in the V channel distribution histogram, and the cumulative probability corresponding to the pixel value in the H, S, and V channel cumulative distribution function diagrams, and the corresponding characteristic mean; σ represents the pixel value corresponding to the peak value in the V channel distribution histogram, and the cumulative probability corresponding to the pixel value in the H, S, and V channel cumulative distribution function diagrams, and the corresponding characteristic standard deviation; v hist 、h cdf 、s cdf 、v cdf They respectively represent the normalized V channel distribution histogram features, H channel cumulative probability distribution features, S channel cumulative probability distribution features, and V channel cumulative probability distribution features.
5. The method for identifying down based on machine vision according to claim 4, wherein, In step S5, the final features of the image are obtained, expressed as: ; Among them, ω1, ω2, ω3, and ω4 respectively represent the feature weight values corresponding to the normalized V-channel distribution histogram feature, H-channel cumulative probability distribution feature, S-channel cumulative probability distribution feature, and V-channel cumulative probability distribution feature; f represents obtaining the final features of the image.
6. The down recognition method based on machine vision according to claim 1, wherein The final recognition result in step S8 includes fresh white down, recycled white down, fresh mixed down, and recycled mixed down.
7. A down recognition system based on machine vision, characterized in that, Including an inspection box, an inspection table, an imaging device installed with a machine vision-based down recognition method according to any one of claims 1-6, and a display screen; the inspection box is a square structure with a hollow interior, the inspection table is arranged on the inner bottom of the inspection box, and a feed port is opened on one side of the inspection box. The imaging device is arranged on the top inside the inspection box, and the display screen is arranged on one side outside the inspection box, so that the down is put into the inspection box through the feed port and placed on the inspection table, and the original image of the down is collected by the imaging device, and the recognition result is displayed through the display screen.
8. A down recognition system based on machine vision according to claim 7, characterized in that, The imaging device includes a strip light source, a bracket, a polarizer, a camera base, and an industrial camera; The bracket is arranged inside the inspection box, the strip light source and the camera base are both fixed on the bracket, the industrial camera is fixed on the camera base, and the polarizer is installed on the industrial camera.
9. The down identification system based on machine vision according to claim 8, characterized in that, The industrial camera is also connected to a Raspberry Pi through a data cable.
10. The down recognition system based on machine vision according to claim 9, characterized in that, The Raspberry Pi is used to implement a down recognition method based on machine vision according to any one of claims 1-6.
Citation Information
Patent Citations
Down feather detection method and system based on support vector machine
CN111680582A
Down separating / selecting method and apparatus
JP2010012421A