Toy waste color classifying and sorting method and system
By using the CCD camera and image processing technology, combined with color recognition algorithms and robotic arm modules, the automation and intelligent classification of toy waste is realized, and the problems of low artificial classification efficiency and inaccurate in the existing technologies have improved the classification efficiency and improvement accuracy.
Patent Information
- Application Number
- CN202411589863.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-01-24
AI Technical Summary
The existing toy waste classification methods mainly rely on manual labor, are inefficient and error-prone, cannot adapt to the rapidly changing production environment, and lack automated and intelligent solutions.
The CCD camera module is used to capture toy waste images in real time, and the image processing unit is used for preprocessing and color feature extraction. The color recognition algorithm is used to compare with the predefined color model to generate classification signals and control the robotic arm module for classification and picking.
The automation and intelligent classification of toy waste is realized, the category efficiency and accuracy are improved, the rapidly changing production environment is adapted, and the waste of resources and environmental pollution are reduced.
Smart Images

Figure CN119346467A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of waste recycling, and in particular relates to a method and a system for color classification and sorting of toy waste. Background Art
[0002] The production and consumption of toy products are increasing year by year, and with it comes a large amount of toy waste. Toy waste is usually composed of parts of different materials and colors. If it is not sorted and processed, it may lead to waste of resources and environmental pollution. Therefore, it is particularly important to develop an efficient toy waste classification system, especially a color classification system.
[0003] Currently, the sorting of toy waste is mainly done manually, which is time-consuming and prone to errors. Manual sorting is inefficient and is limited by workers' visual judgment ability during the sorting process, which can easily lead to inaccurate sorting. In addition, traditional sorting methods cannot adapt to the rapidly changing production environment, and the demand for immediate response and automation has not been effectively met.
[0004] With the advancement of automation technology, especially the development of machine vision and intelligent control technology, automated classification systems based on image processing have gradually become possible. Machine vision technology can capture and process images in real time, extract effective feature information, and thus accurately identify and classify objects. However, in the color classification of toy waste, there is currently a lack of means to use image processing technology for rapid classification and sorting. Summary of the invention
[0005] In order to overcome the deficiencies and shortcomings of the prior art, the primary purpose of the present invention is to provide a method and system for color classification and sorting of toy waste, which realizes automation and intelligence in the color classification of toy waste, not only improves the classification efficiency, but also ensures the accuracy of classification, thereby providing effective technical support for environmental protection and resource recycling.
[0006] The primary purpose of the present invention is achieved through the following technical solutions:
[0007] The method for color sorting of toy waste includes the following steps:
[0008] A CCD camera module is used to capture images of toy waste passing through a conveyor belt in real time. The CCD camera module works under a preset light source condition.
[0009] Preprocessing the image, including image denoising, color correction and image enhancement;
[0010] The image processing unit extracts color features from the preprocessed image, and uses a color recognition algorithm to compare the color information of the toy waste with a predefined color model to generate a classification result;
[0011] generating a corresponding classification signal according to the result of the color recognition, indicating the target color category of the toy waste;
[0012] receiving the classification signal, controlling the robot arm module to grab the toy waste according to the target color category, and placing it into the corresponding classification container;
[0013] Monitor the classification process and record the classification data in real time, and adjust the image processing algorithm or the motion trajectory of the robotic arm based on the classification effect feedback.
[0014] Preferably, the image is preprocessed, including image denoising, color correction and image enhancement, by:
[0015] For each pixel in the image, define a 7x7 neighborhood window that includes the pixel;
[0016] Calculate the values of all pixels in the neighborhood window and find the median;
[0017] Replace the pixel value with the calculated median value;
[0018] Repeat the above process for each pixel in the image until all pixels have been processed;
[0019] Adjusting the hue channel to change the color characteristics of the image, wherein the adjustment range of the hue channel is limited to between 0 and 179;
[0020] The saturation channel is adjusted to enhance or weaken the color concentration of the image, and the adjustment range of the saturation channel is limited to between 0 and 255;
[0021] Adjust the brightness channel to increase or decrease the brightness of the image, and the adjustment range of the brightness channel is limited to between 0 and 255;
[0022] Calculate the histogram of the input image and count the frequency of occurrence of each gray value;
[0023] Calculate the cumulative distribution function based on the histogram to map pixel values;
[0024] Use the cumulative distribution function to map the pixel values in the original image to new grayscale values;
[0025] Generate a new image with the mapped grayscale values.
[0026] Preferably, the method of extracting color features from the preprocessed image by the image processing unit is:
[0027] Convert RGB color space to HSV color space;
[0028] Calculate the color histogram and extract color distribution features.
[0029] Preferably, the method for establishing a predefined color model is:
[0030] Match the characteristics of polyvinyl chloride, polyethylene, polypropylene, polystyrene and ABS materials according to the color change characteristics of the materials;
[0031] Use images of known material samples to annotate and train machine learning models;
[0032] Images of PVC, PE, PP, PS, and ABS materials were input into the trained model and classified to obtain the predefined color model.
[0033] Preferably, images of known material samples are used for annotation, and the method for training the machine learning model is:
[0034] Collect images containing samples of PVC, PE, PP, PS, and ABS materials;
[0035] Use the LabelImg annotation tool to label the image;
[0036] Use data augmentation techniques to increase the diversity of the training set, including rotation, translation, scaling, flipping, and color transformation;
[0037] Normalize the image data to the same scale and scale the pixel values to [0,1];
[0038] Use deep learning frameworks to build CNN models;
[0039] Before training the model, choose the optimizer, loss function, and evaluation metric;
[0040] Use the prepared training data and validation data to train the model;
[0041] After training is complete, the model performance is evaluated using the test dataset.
[0042] Preferably, a color recognition algorithm is used to compare the color information of the toy waste with a predefined color model, and a method for generating a classification result is:
[0043] Calculate the mean of the extracted colors and compare with the model color;
[0044] The color with the smallest distance can be selected as the classification result;
[0045] The classification results are recorded and output.
[0046] Preferably, the method of receiving the classification signal, controlling the robot arm module to grab the toy waste according to the target color category, and placing it into the corresponding classification container is:
[0047] Send the classification signal to the controller using a serial port, I2C or other communication methods;
[0048] The controller receives the signal from the color recognition module and determines the action of the robot arm according to the signal;
[0049] Control the robot arm to perform a grasping action according to the received color signal;
[0050] Determine the target container for delivery according to the classification signal;
[0051] The robot arm places the grabbed waste into the target container.
[0052] Another technical problem to be solved by the present invention is to provide a toy waste color classification and sorting system, comprising:
[0053] A CCD camera module is used to capture images of toy waste on the conveyor belt and obtain image data of the waste in real time;
[0054] A light source module, cooperating with the CCD camera module, to capture the color information of the toy waste under different lighting conditions;
[0055] An image processing unit connected to the CCD camera module receives and analyzes the image data, classifies the toy waste using a color recognition algorithm, and generates a classification signal;
[0056] A robotic arm module, connected to the image processing unit, performs accurate waste sorting according to the classification signal, and the robotic arm module grabs and puts toy waste of different colors into corresponding collection containers;
[0057] The control system is used to coordinate the work of the CCD camera module, image processing unit and robotic arm module, optimize the classification efficiency and provide real-time monitoring and feedback.
[0058] Another technical problem to be solved by the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for color classification and sorting of toy waste as described above is implemented.
[0059] Another technical problem to be solved by the present invention is to provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method for color classification and sorting of toy waste as described in any of the above is implemented.
[0060] Compared with the prior art, the present invention has the following advantages:
[0061] The CCD camera module is used to capture images in real time under preset light conditions to ensure consistent image quality and reduce ambient light interference; image denoising, color correction and image enhancement are implemented to improve image quality and lay the foundation for subsequent color feature extraction; the color recognition algorithm is applied through the image processing unit to extract color information in the image and generate classification results. This process requires efficient algorithms to reduce computing time and ensure classification accuracy.
[0062] Generate corresponding classification signals based on the results of color recognition to ensure that the classification information is clear and accurate, which is convenient for the subsequent control of the robotic arm module; after receiving the classification signal, control the action of the robotic arm module to enable it to grab and classify according to the target color category, thereby improving the degree of automation and classification efficiency; implement real-time monitoring of the classification process, record classification data, analyze the classification effect, and provide feedback to adjust the image processing algorithm or the motion trajectory of the robotic arm to ensure the adaptability and stability of the system under different conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 The present invention is a flow chart of a method for color classification and sorting of toy waste. DETAILED DESCRIPTION
[0064] The specific implementation modes of the present invention are further described in detail to make the technical solutions of the present invention easier to understand and grasp.
[0065] Example
[0066] See also Figure 1 As shown, the method for color classification and sorting of toy waste includes the following steps:
[0067] A CCD camera module is used to capture images of toy waste passing through a conveyor belt in real time. The CCD camera module works under a preset light source condition.
[0068] Preprocessing the image, including image denoising, color correction and image enhancement;
[0069] The image processing unit extracts color features from the preprocessed image, and uses a color recognition algorithm to compare the color information of the toy waste with a predefined color model to generate a classification result;
[0070] generating a corresponding classification signal according to the result of the color recognition, indicating the target color category of the toy waste;
[0071] receiving the classification signal, controlling the robot arm module to grab the toy waste according to the target color category, and placing it into the corresponding classification container;
[0072] Monitor the classification process and record the classification data in real time, and adjust the image processing algorithm or the motion trajectory of the robotic arm based on the classification effect feedback.
[0073] This method uses CCD camera modules and robotic arms to automatically complete the color classification of toy waste, which significantly improves the classification speed and efficiency compared to manual classification. The system can process and classify a large amount of toy waste in real time to meet the needs of high-volume industries; through pre-processing steps such as denoising, color correction and image enhancement, it ensures image quality and reduces external interference. The application of color recognition algorithms makes the classification results more accurate and reduces the errors caused by human factors.
[0074] The system can adjust the image processing algorithm and the motion trajectory of the robot arm according to real-time monitoring data to adapt to different operating environments and changing conditions. This flexibility ensures the stability of the system under different lighting and background conditions; through precise color classification, recyclable toy waste can be effectively sorted into corresponding containers, reducing resource waste and promoting environmental protection. Reasonable treatment of waste helps reduce negative impacts on the environment.
[0075] The system has a high degree of automation, which significantly reduces the reliance on manual classification, thereby reducing labor costs. In addition, manual classification may lead to fatigue and misjudgment, while the automated system can operate continuously and stably; the solution can expand different functional modules according to needs, such as introducing more advanced image processing algorithms or improving the grasping ability of the robot arm, to facilitate future technology upgrades and system expansion.
[0076] Monitoring the sorting process and recording sorting data can not only provide analysis of the sorting effect, but also provide data support for subsequent optimization and improvement, helping to further improve system performance; through automated picking, it reduces direct contact between operators and waste, improves safety, and reduces potential accident risks caused by manual operation.
[0077] The method for preprocessing the image, including image denoising, color correction and image enhancement is as follows:
[0078] For each pixel in the image, define a 7x7 neighborhood window that includes the pixel;
[0079] Calculate the values of all pixels in the neighborhood window and find the median;
[0080] Replace the pixel value with the calculated median value;
[0081] Repeat the above process for each pixel in the image until all pixels have been processed;
[0082] Adjusting the hue channel to change the color characteristics of the image, wherein the adjustment range of the hue channel is limited to between 0 and 179;
[0083] The saturation channel is adjusted to enhance or weaken the color concentration of the image, and the adjustment range of the saturation channel is limited to between 0 and 255;
[0084] Adjust the brightness channel to increase or decrease the brightness of the image, and the adjustment range of the brightness channel is limited to between 0 and 255;
[0085] Calculate the histogram of the input image and count the frequency of occurrence of each gray value;
[0086] Calculate the cumulative distribution function based on the histogram to map pixel values;
[0087] Use the cumulative distribution function to map the pixel values in the original image to new grayscale values;
[0088] Generate a new image with the mapped grayscale values.
[0089] By using a 7x7 neighborhood window to calculate the median for denoising, random noise (such as salt and pepper noise) in the image can be effectively removed while retaining edge information. The median filter is very friendly to sudden image edges and avoids the blurring effect that may be caused by traditional mean filtering; the denoised image has higher quality, laying the foundation for subsequent color feature extraction and classification, and reducing the possibility of misclassification.
[0090] Independent adjustment of hue, saturation and brightness makes the color features of the image more prominent and enhances the visual effect. The adjustment range limit makes the operation safer and will not cause excessive color distortion; by adjusting the hue channel, the influence of light source changes on the image color can be eliminated, ensuring that the color remains consistent in different environments, thereby improving the accuracy of the classification algorithm.
[0091] By increasing or decreasing the saturation, the color of the image can be made more vivid or natural to meet different application requirements. Images with richer colors can be more easily recognized by color recognition algorithms; by adjusting the brightness channel, the brightness of the image can be increased or decreased according to actual needs, ensuring that the image remains visible under different lighting conditions.
[0092] By calculating the histogram of the input image and counting the frequency of occurrence of each gray value, we can fully understand the brightness distribution of the image and provide basic data for subsequent processing; by calculating the cumulative distribution function (CDF), we can achieve image contrast enhancement, making the originally dim image clearer and enhancing the visibility of details.
[0093] Using the cumulative distribution function to map the pixel values in the original image to new grayscale values can effectively improve the contrast and brightness of the image, making the image more suitable for subsequent processing and analysis; the new image generated by these steps is more expressive, which helps the color classification algorithm achieve better results in feature extraction and improves the overall classification accuracy.
[0094] Through denoising, color correction and image enhancement, the final image has better quality and can effectively improve the accuracy of image processing and color recognition; the implementation of this solution provides good input data for the automated image classification system, making the entire automatic classification process more efficient and reliable.
[0095] The method for extracting color features from the preprocessed image by the image processing unit is:
[0096] Convert RGB color space to HSV color space;
[0097] Calculate the color histogram and extract color distribution features.
[0098] The hue part of the HSV model directly represents the color (such as red, green, blue, etc.), which is more consistent with human visual perception, making color classification and analysis more intuitive; high saturation corresponds to bright colors, and low saturation corresponds to gray or faded colors. Through this channel, the concentration of the color can be easily analyzed; compared with the RGB components, the brightness of HSV is easier to adjust, especially under changing lighting conditions; the HSV space separates the representation of color, making it easier to operate when adjusting color. For example, when adjusting brightness and saturation, the hue will not be affected, thus avoiding color distortion.
[0099] The color histogram provides a concise and powerful description of the distribution of each color in the image, which can help identify and classify the main color features in the image; through the histogram, the frequency of different colors in the image can be intuitively observed, thus providing data support for subsequent analysis; calculating the color histogram can effectively reduce the feature dimension, compress the color information of the image into a relatively small feature vector, and simplify the computational complexity of subsequent processing; when performing image retrieval or classification, using the histogram as a feature representation is relatively more efficient and faster to calculate.
[0100] The HSV space is robust to changes in lighting, especially when analyzing saturation and hue, and can maintain relatively consistent results, thereby improving the stability of feature extraction; through the color histogram, it can better ignore subtle changes in the background and focus on the actual distribution of color, thereby enhancing the reliability of feature extraction.
[0101] Image reading: Use cv2.imread to read the image and convert the BGR format to RGB format for display.
[0102] Color Space Conversion: Convert the image from BGR to HSV color space using cv2.cvtColor.
[0103] Adjust the color channels:
[0104] Hue: Increase or decrease the hue by adjusting the value of the H channel.
[0105] Saturation: Increase or decrease the saturation by adjusting the value of the S channel.
[0106] Brightness: Increase or decrease brightness by adjusting the value of the V channel.
[0107] Use np.clip to limit the range of channel values after resizing.
[0108] Convert back to original color space: Convert the adjusted HSV image back to BGR format using cv2.cvtColor.
[0109] Results: The original image and the adjusted image are displayed using the matplotlib library
[0110] The method to create a predefined color model is:
[0111] Match the characteristics of polyvinyl chloride, polyethylene, polypropylene, polystyrene and ABS materials according to the color change characteristics of the materials;
[0112] Use images of known material samples to annotate and train machine learning models;
[0113] Images of PVC, PE, PP, PS, and ABS materials were input into the trained model and classified to obtain the predefined color model.
[0114] Polyvinyl chloride (PVC): light brown to opaque brown, the color depth increases with the number of regenerations.
[0115] Polyethylene (PE): The color gradually turns yellow.
[0116] Polypropylene (PP): The color remains almost unchanged after one recycling, but the color becomes darker after multiple recycling.
[0117] Polystyrene (PS): The color turns yellow after recycling.
[0118] ABS: The color change is obvious.
[0119] Using images of known material samples for annotation, the method for training a machine learning model is:
[0120] Collect images containing samples of PVC, PE, PP, PS, and ABS materials;
[0121] Use the LabelImg annotation tool to label the image;
[0122] Use data augmentation techniques to increase the diversity of the training set, including rotation, translation, scaling, flipping, and color transformation;
[0123] Normalize the image data to the same scale and scale the pixel values to [0,1];
[0124] Use deep learning frameworks to build CNN models;
[0125] Before training the model, choose the optimizer, loss function, and evaluation metric;
[0126] Use the prepared training data and validation data to train the model;
[0127] After training is complete, the model performance is evaluated using the test dataset.
[0128] Image reading: Use cv2.imread to read the image in grayscale mode.
[0129] Calculate histogram: Use np.histogram to calculate the histogram of the image and get the frequency distribution of each grayscale value.
[0130] Calculate the cumulative distribution function (CDF):
[0131] The CDF is calculated using the cumsum() function to get the total number of pixels for each grayscale value and all the grayscale values below it.
[0132] Normalize the CDF to facilitate subsequent mapping.
[0133] Map pixel values:
[0134] Use a mask to avoid cases where the CDF is zero.
[0135] A linear transformation is performed to adjust the range of the CDF so that all grayscale values are evenly distributed between 0 and 255.
[0136] Generate enhanced image: Generate a new image through the mapped grayscale values.
[0137] Use a deep learning framework to build a CNN model. The following is an example of a CNN architecture:
[0138]
[0139]
[0140] After training is complete, use the test dataset to evaluate the model performance and see how the model performs on unseen data:
[0141] test_loss,test_accuracy=model.evaluate(test_data,test_labels)
[0142] print(f"Testaccuracy:{test_accuracy}")
[0143] Use the trained model to make predictions for new images:
[0144] predictions=model.predict(new_images)
[0145] predicted_classes=tf.argmax(predictions,axis=1)
[0146] The color information of toy waste is compared with the predefined color model using a color recognition algorithm to generate the classification result as follows:
[0147] Calculate the mean of the extracted colors and compare with the model color;
[0148] The color with the smallest distance can be selected as the classification result;
[0149] The classification results are recorded and output.
[0150] By calculating the mean of the extracted color information, the color interference caused by factors such as ambient lighting changes, shadows, and reflections can be effectively reduced, making color recognition more accurate; selecting the color model with the smallest distance as the classification result can quickly and accurately match the closest color and reduce the possibility of misclassification; this method can adapt to a variety of colors, and the classification capability of the system can be expanded by simply adding or updating colors in the predefined color model; the color model can be updated according to actual conditions, and retrained and optimized to ensure the system's adaptability to new colors or environmental changes.
[0151] The mean calculation and distance comparison algorithms are highly efficient and can achieve real-time color recognition and classification, which is suitable for use in dynamic environments, such as production lines or robot work; this method can process continuous data streams, extracting and classifying colors for each frame of the image, and maintaining an efficient work rhythm; mean calculation and distance calculation (such as Euclidean distance) are relatively simple and easy to program. It can be developed quickly using a variety of programming languages and frameworks; this solution has relatively low requirements for computing resources and is suitable for implementation in resource-constrained environments, such as running on microcontrollers or embedded systems.
[0152] The method for receiving the classification signal, controlling the robot arm module to grab the toy waste according to the target color category, and placing it into the corresponding classification container is:
[0153] Send the classification signal to the controller using a serial port, I2C or other communication methods;
[0154] The controller receives the signal from the color recognition module and determines the action of the robot arm according to the signal;
[0155] Control the robot arm to perform a grasping action according to the received color signal;
[0156] Determine the target container for delivery according to the classification signal;
[0157] The robot arm places the grabbed waste into the target container.
[0158] By automatically controlling the robotic arm, waste can be classified quickly and accurately, greatly improving production and processing efficiency and reducing human intervention; the system can run continuously for a long time, suitable for large-scale waste processing needs, and reducing downtime; the robotic arm can perform grasping operations based on accurate classification signals, reducing errors caused by human factors and ensuring that waste of each color can be accurately classified; the system's algorithm and the control logic of the robotic arm ensure the consistency of the classification process and reduce fluctuations in classification results.
[0159] It supports multiple communication protocols (such as serial port, I2C, etc.), which can be flexibly selected according to specific application requirements, and is easy to integrate with other devices; more color models and classification containers can be added as needed, or the hardware of the robot arm can be upgraded to expand the system functions; the automated operation of the robot arm can effectively reduce dependence on manual labor, reduce labor costs and the complexity of human resource management; reduce manual operations in potentially dangerous working environments, and improve overall work safety.
[0160] By receiving classification signals through the controller, it can respond quickly and adjust the operation of the robotic arm according to real-time data to improve reaction flexibility; the data during the classification process can be recorded and analyzed to provide a basis for optimizing the system and help identify bottlenecks and improvement points; the robotic arm can be linked with other automated equipment (such as conveyor belts, screening machines, etc.) to achieve more complex workflows and enhance the collaborative efficiency of the overall system; the gripping mode and delivery strategy of the robotic arm can be flexibly configured according to different operating environments and task requirements to improve adaptability.
[0161] Toy waste color sorting and sorting system, including:
[0162] A CCD camera module is used to capture images of toy waste on the conveyor belt and obtain image data of the waste in real time;
[0163] A light source module, cooperating with the CCD camera module, to capture the color information of the toy waste under different lighting conditions;
[0164] An image processing unit connected to the CCD camera module receives and analyzes the image data, classifies the toy waste using a color recognition algorithm, and generates a classification signal;
[0165] A robotic arm module, connected to the image processing unit, performs accurate waste sorting according to the classification signal, and the robotic arm module grabs and puts toy waste of different colors into corresponding collection containers;
[0166] The control system is used to coordinate the work of the CCD camera module, image processing unit and robotic arm module, optimize the classification efficiency and provide real-time monitoring and feedback.
[0167] The CCD camera module can capture waste images in real time. With the help of the robotic arm module, the entire classification and picking process can be completed in a short time, significantly improving work efficiency. The system can run uninterruptedly and is suitable for high-intensity production line operations, reducing manual intervention and downtime. The image processing unit uses advanced color recognition algorithms to accurately identify and classify toy waste of different colors, reducing the probability of misclassification. With the assistance of the light source module, the CCD camera can maintain stable image acquisition and color recognition under various lighting conditions, improving classification consistency.
[0168] The robotic arm's automated picking capability reduces reliance on manual labor, lowers labor costs and operational complexity; the control system can coordinate the operation of each module, monitor the entire process in real time, and automatically adjust operating parameters to optimize performance; the system can configure recognition algorithms as needed, flexibly adjust classification standards, and adapt to different types of toy waste; the decoupling design between modules makes the system easy to maintain and upgrade, and can be quickly adjusted according to technological advances or changes in demand.
[0169] The control system can monitor the working status of each module in real time, record data for subsequent analysis, help identify bottlenecks and optimize the system; through monitoring, problems can be quickly identified and solved, ensuring that the system is always in the best working state and reducing downtime; accurate classification and picking can help improve the recycling rate of waste materials, promote the reuse of resources, and meet the goal of sustainable development. By classifying and processing waste materials, pollution to the environment can be reduced and the environmental friendliness of waste treatment can be improved.
[0170] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for color classification and sorting of toy waste when executing the program.
[0171] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for color classification and sorting of toy waste as described above is implemented.
[0172] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0173] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0174] Of course, the above are only typical examples of the present invention. In addition to these, the present invention may also have many other specific implementations. Any technical solutions formed by equivalent replacement or equivalent transformation fall within the scope of protection required by the present invention. Of course, the above are only typical examples of the present invention. In addition to these, the present invention may also have many other specific implementations. Any technical solutions formed by equivalent replacement or equivalent transformation fall within the scope of protection required by the present invention.
Claims
1. The method for color classification and sorting of toy waste is characterized by , including the following steps: A CCD camera module is used to capture images of toy waste passing through a conveyor belt in real time. The CCD camera module works under a preset light source condition. Preprocessing the image, including image denoising, color correction and image enhancement; The image processing unit extracts color features from the preprocessed image, and uses a color recognition algorithm to compare the color information of the toy waste with a predefined color model to generate a classification result; generating a corresponding classification signal according to the result of the color recognition, indicating the target color category of the toy waste; receiving the classification signal, controlling the robot arm module to grab the toy waste according to the target color category, and placing it into the corresponding classification container; Monitor the classification process and record the classification data in real time, and adjust the image processing algorithm or the motion trajectory of the robotic arm based on the classification effect feedback.
2. The method for color classification and sorting of toy waste according to claim 2, characterized in that: The method for preprocessing the image, including image denoising, color correction and image enhancement is as follows: For each pixel in the image, define a 7x7 neighborhood window that includes the pixel; Calculate the values of all pixels in the neighborhood window and find the median; Replace the pixel value with the calculated median value; Repeat the above process for each pixel in the image until all pixels have been processed; Adjusting the hue channel to change the color characteristics of the image, wherein the adjustment range of the hue channel is limited to between 0 and 179; The saturation channel is adjusted to enhance or weaken the color concentration of the image, and the adjustment range of the saturation channel is limited to between 0 and 255; Adjust the brightness channel to increase or decrease the brightness of the image, and the adjustment range of the brightness channel is limited to between 0 and 255; Calculate the histogram of the input image and count the frequency of occurrence of each gray value; Calculate the cumulative distribution function based on the histogram to map pixel values; Use the cumulative distribution function to map the pixel values in the original image to new grayscale values; Generate a new image with the mapped grayscale values.
3. The method for color classification and sorting of toy waste according to claim 2, characterized in that: The method for extracting color features from the preprocessed image by the image processing unit is: Convert RGB color space to HSV color space; Calculate the color histogram and extract color distribution features.
4. The method for color classification and sorting of toy waste according to claim 3, characterized in that: The method to create a predefined color model is: Match the characteristics of polyvinyl chloride, polyethylene, polypropylene, polystyrene and ABS materials according to the color change characteristics of the materials; Use images of known material samples to annotate and train machine learning models; Images of PVC, PE, PP, PS, and ABS materials were input into the trained model and classified to obtain the predefined color model.
5. The method for color classification and sorting of toy waste according to claim 4, characterized in that: Using images of known material samples for annotation, the method for training a machine learning model is: Collect images containing samples of PVC, PE, PP, PS, and ABS materials; Use the LabelImg annotation tool to label the image; Use data augmentation techniques to increase the diversity of the training set, including rotation, translation, scaling, flipping, and color transformation; Normalize the image data to the same scale and scale the pixel values to [0,1]; Use deep learning frameworks to build CNN models; Before training the model, choose the optimizer, loss function, and evaluation metric; Use the prepared training data and validation data to train the model; After training is complete, the model performance is evaluated using the test dataset.
6. The method for color sorting of toy waste according to claim 1, characterized in that: The color information of toy waste is compared with the predefined color model using a color recognition algorithm to generate the classification result as follows: Calculate the mean of the extracted colors and compare with the model color; The color with the smallest distance can be selected as the classification result; The classification results are recorded and output.
7. The method for color classification and sorting of toy waste according to claim 1, characterized in that: The method for receiving the classification signal, controlling the robot arm module to grab the toy waste according to the target color category, and placing it into the corresponding classification container is: Send the classification signal to the controller using a serial port, I2C or other communication methods; The controller receives the signal from the color recognition module and determines the action of the robot arm according to the signal; Control the robot arm to perform a grasping action according to the received color signal; Determine the target container for delivery according to the classification signal; The robot arm places the grabbed waste into the target container.
8. Toy waste color sorting and sorting system, characterized by: Included are: CCD camera module, used to capture images of toy waste on the conveyor belt and obtain image data of the waste in real time; A light source module, cooperating with the CCD camera module, to capture the color information of the toy waste under different lighting conditions; An image processing unit connected to the CCD camera module receives and analyzes the image data, classifies the toy waste using a color recognition algorithm, and generates a classification signal; A robotic arm module, connected to the image processing unit, performs accurate waste sorting according to the classification signal, and the robotic arm module grabs and puts toy waste of different colors into corresponding collection containers; The control system is used to coordinate the work of the CCD camera module, image processing unit and robotic arm module, optimize the classification efficiency and provide real-time monitoring and feedback.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for color classification and sorting of toy waste as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for color classification and sorting of toy waste as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Intelligent sorting method and system for semiconductor film-shaped diffusion source
CN121082574A