CN113378627B - Automatic garbage classification method and device based on DSP chip and single chip microcomputer control - Google Patents
Automatic garbage classification method and device based on DSP chip and single chip microcomputer control Download PDFInfo
- Publication number
- CN113378627B CN113378627B CN202110442622.XA CN202110442622A CN113378627B CN 113378627 B CN113378627 B CN 113378627B CN 202110442622 A CN202110442622 A CN 202110442622A CN 113378627 B CN113378627 B CN 113378627B
- Authority
- CN
- China
- Prior art keywords
- garbage
- image
- digital image
- motor
- bearing mechanism
- 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.)
- Active
Links
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B65—CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
- B65F—GATHERING OR REMOVAL OF DOMESTIC OR LIKE REFUSE
- B65F1/00—Refuse receptacles; Accessories therefor
- B65F1/0033—Refuse receptacles; Accessories therefor specially adapted for segregated refuse collecting, e.g. receptacles with several compartments; Combination of receptacles
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B65—CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
- B65F—GATHERING OR REMOVAL OF DOMESTIC OR LIKE REFUSE
- B65F1/00—Refuse receptacles; Accessories therefor
- B65F1/14—Other constructional features; Accessories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/181—Segmentation; Edge detection involving edge growing; involving edge linking
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B65—CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
- B65F—GATHERING OR REMOVAL OF DOMESTIC OR LIKE REFUSE
- B65F2210/00—Equipment of refuse receptacles
- B65F2210/138—Identification means
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B65—CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
- B65F—GATHERING OR REMOVAL OF DOMESTIC OR LIKE REFUSE
- B65F2210/00—Equipment of refuse receptacles
- B65F2210/176—Sorting means
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02W—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
- Y02W30/00—Technologies for solid waste management
- Y02W30/10—Waste collection, transportation, transfer or storage, e.g. segregated refuse collecting, electric or hybrid propulsion
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mechanical Engineering (AREA)
- Studio Devices (AREA)
- Processing Of Solid Wastes (AREA)
Abstract
The application provides an automatic garbage classification method and device based on DSP chip and single chip microcomputer control, wherein the method comprises the following steps: collecting a simulation image of the garbage; decoding the analog image and outputting a digital image signal and a control signal; extracting image features of the digital image, comparing and identifying the image features with a pre-stored image feature library and outputting a comparison result; when the comparison result shows that the garbage belongs to the first preset garbage type, sending a corresponding control instruction to the first motor to control the driving bearing mechanism to horizontally place the garbage above the corresponding containing area, and sending a corresponding opening and closing control instruction to the second motor to control the bearing mechanism to be opened to place the garbage in the corresponding containing area; and when the comparison result shows that the garbage belongs to a second preset garbage type, sending a corresponding opening and closing control instruction to the second motor to control the bearing mechanism to be directly opened so as to throw the garbage into the corresponding containing area. The application has the advantages of simple structure, low cost and high operation efficiency.
Description
Technical Field
The application relates to the technical field of automatic classification, in particular to an automatic garbage classification method and device based on DSP chip and single chip microcomputer control.
Background
At present, in order to reduce the phenomenon of random waste disposal and reduce the waste disposal amount and cost, waste classification is becoming more important and has become a basic life requirement of urban families, such as classifying waste into kitchen and toilet waste and other waste, dry waste and wet waste. The garbage classification mode that uses always at present is artifical classification, and the resident need be at home through the type of artifical discernment rubbish, and deposit rubbish temporarily in the garbage bin region that corresponds again. However, manual identification is prone to errors, and the identified garbage types are fixed, so that the accuracy of garbage classification is affected, and the labor cost is increased.
The intelligent garbage classification device disclosed in the prior art often adopts a large number of sensors such as pressure sensors, humidity sensors and audio sensors, and some devices need to deploy computers, servers and the like on site even in order to combine edge computing, cloud computing and the like, so that the structure is complex and the deployment cost is high.
Disclosure of Invention
In view of the above, it is necessary to provide an automatic garbage classification method and device based on DSP chip and single chip microcomputer control, which has simple structure, low cost and high operation efficiency.
The application provides an automatic garbage classification method based on DSP chip and single chip microcomputer control, which comprises the following steps:
when a bearing mechanism of the automatic garbage classification device receives garbage, acquiring a simulation image of the garbage through a camera device;
decoding the analog image using an image decoder and outputting a digital image signal and a control signal;
preprocessing the digital image of the garbage by using a digital signal processing chip, and extracting image characteristics of the digital image, wherein the digital signal processing chip takes a control signal of an image decoder as a trigger signal of a direct memory access channel, acquires the digital image signal through the direct memory access channel, and stores the digital image signal in an external memory to obtain the digital image of the garbage, and the digital signal processing chip also compares and identifies the extracted image characteristics with a pre-stored image characteristic library and outputs a comparison result;
receiving the comparison result by using a single chip microcomputer control module, and when the comparison result shows that the garbage belongs to a first preset garbage type, sending a corresponding control instruction to a first motor by the single chip microcomputer control module so as to control and drive the bearing mechanism to horizontally place the garbage above a storage area corresponding to the first preset garbage type, and sending a corresponding opening and closing control instruction to a second motor so as to control the bearing mechanism to be opened and place the garbage into the corresponding storage area;
and when the comparison result shows that the garbage belongs to a second preset garbage type, the singlechip control module sends a corresponding opening and closing control instruction to the second motor so as to control the bearing mechanism to be directly opened and throw the garbage into the corresponding storage area.
Optionally, the extracting image features of the digital image comprises:
performing characteristic region segmentation on the digital image by a local recursive segmentation method;
performing region growing processing on the digital image subjected to the feature region segmentation by a region growing method based on the region gray difference;
extracting the outline of the characteristic region of the digital image by a Freeman direction chain code method, and calculating the perimeter and the area of the outline of the characteristic region according to a chain code value to be used as external characteristic parameters of the digital image;
and extracting the skeleton characteristics of the digital image by a thinning iterative algorithm, and extracting the second moment and entropy characteristics of the digital image by utilizing a gray level co-occurrence matrix to serve as the internal characteristic parameters of the digital image.
Optionally, the step of comparing and identifying the extracted image features with a pre-stored image feature library by the digital signal processing chip includes:
comparing and identifying the external characteristic parameters of the digital images with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library, and comparing and identifying the internal characteristic parameters of the digital images with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library;
when the external characteristic parameters of the digital image are identified to be matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library, and the internal characteristic parameters of the digital image are identified to be matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to the first preset garbage type; or
And when the external characteristic parameters of the digital image are identified to be not matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library and/or the internal characteristic parameters of the digital image are identified to be not matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to the second preset garbage type.
Optionally, the preprocessing the digital image of the spam includes:
and calibrating and normalizing the digital image of the garbage.
Optionally, the single chip microcomputer control module controls the first motor and/or the second motor in a PWM manner.
Optionally, the digital signal processing chip triggers an enable signal ce0 according to a control signal of the image decoder, enables the dma channel through the enable signal ce0, and acquires the digital image signal through the dma channel to obtain the digital image.
The application also provides an automatic waste classification device, the device includes:
the camera device is used for collecting a simulation image of the garbage when the bearing mechanism of the automatic garbage classification device receives the garbage;
an image decoder for decoding the analog image and outputting a digital image signal and a control signal;
the digital signal processing chip is used for preprocessing the digital image of the garbage and extracting the image characteristics of the digital image, wherein the digital signal processing chip takes a control signal of the image decoder as a trigger signal of a direct memory access channel, acquires the digital image signal through the direct memory access channel and stores the digital image signal into an external memory to obtain the digital image of the garbage, and the digital signal processing chip is also used for comparing and identifying the extracted image characteristics with a prestored image characteristic library and outputting a comparison result;
the single chip microcomputer control module is used for receiving the comparison result, and when the comparison result shows that the garbage belongs to a first preset garbage type, the single chip microcomputer control module sends a corresponding control instruction to the first motor so as to control and drive the bearing mechanism to horizontally place the garbage above a storage area corresponding to the first preset garbage type, and sends a corresponding opening and closing control instruction to the second motor so as to control the bearing mechanism to be opened and place the garbage into the corresponding storage area;
and when the comparison result shows that the garbage belongs to a second preset garbage type, the singlechip control module also sends a corresponding opening and closing control instruction to the second motor so as to control the bearing mechanism to be directly opened and throw the garbage into the corresponding storage area.
Optionally, the extracting, by the digital signal processing chip, the image feature of the digital image includes:
performing characteristic region segmentation on the digital image by a local recursive segmentation method;
performing region growing processing on the digital image subjected to the feature region segmentation by a rectangular growing method for segmenting gray level difference;
extracting the outline of the characteristic region of the digital image by a direction chain code method, and calculating the perimeter and the area of the outline of the characteristic region according to a chain code value to be used as external characteristic parameters of the digital image;
and extracting the skeleton characteristics of the digital image by a thinning iterative algorithm, and extracting the second moment and entropy characteristics of the digital image by utilizing a gray level co-occurrence matrix to serve as the internal characteristic parameters of the digital image.
Optionally, the step of comparing and identifying the extracted image features with a pre-stored image feature library by the digital signal processing chip includes:
comparing and identifying the external characteristic parameters of the digital images with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library, and comparing and identifying the internal characteristic parameters of the digital images with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library;
when the external characteristic parameters of the digital image are identified to be matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library, and the internal characteristic parameters of the digital image are identified to be matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to the first preset garbage type; or
And when the external characteristic parameters of the digital image are identified to be not matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library and/or the internal characteristic parameters of the digital image are identified to be not matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to the second preset garbage type.
Optionally, the digital signal processing chip pre-processes the digital image of the garbage includes:
and calibrating and normalizing the digital image of the garbage.
Optionally, the single chip microcomputer control module controls the first motor and/or the second motor in a PWM manner.
Optionally, the digital signal processing chip triggers an enable signal ce0 according to a control signal of the image decoder, and enables the direct memory access channel through the enable signal ce0, so as to acquire the digital image signal through the direct memory access channel to obtain the digital image.
According to the automatic garbage classification method and device based on the DSP chip and the single chip microcomputer control, the automatic classification and storage of garbage can be achieved by the DSP chip and the single chip microcomputer, the structure is simple, the cost is low, the operation is efficient, the cost required by garbage classification is reduced, and the garbage classification precision is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only the embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a perspective view of an automatic garbage sorting device according to a preferred embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a carrying mechanism and a receiving mechanism according to a preferred embodiment of the present application.
Fig. 3 is a schematic structural diagram of an image capturing device, an image decoder and a DSP chip according to a preferred embodiment of the present invention.
Fig. 4 is a flowchart of image feature comparison recognition according to a preferred embodiment of the present application.
Fig. 5 is a schematic diagram of image feature extraction according to a preferred embodiment of the present application.
Fig. 6 is a schematic structural diagram of a single chip microcomputer control module and a motor according to a preferred embodiment of the present invention.
Fig. 7 is a flowchart of sorting and storing garbage according to the preferred embodiment of the present application.
Fig. 8 is a schematic structural diagram of a power supply system according to a preferred embodiment of the present application.
Fig. 9 is a flowchart of an automatic garbage classification method according to a preferred embodiment of the present application.
Description of the main elements
Second receiving area 102
Support means 20
Enable interface 502
Single chip microcomputer control module 60
First electric machine 70
Second electric motor 71
The following detailed description will further illustrate the present application in conjunction with the above-described figures.
Detailed Description
In order that the above objects, features and advantages of the present application can be more clearly understood, a detailed description of the present application will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present application, and the described embodiments are merely a subset of the embodiments of the present application and are not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
Please refer to fig. 1, which illustrates a garbage classification apparatus according to a preferred embodiment of the present application. The garbage classification device 1 includes, but is not limited to, a storage mechanism 10, a carrying mechanism 20, a bracket 21, an image pickup device 30, an image decoder 40, a DSP chip 50, a single chip microcomputer control module 60, a first motor 70, a second motor 71, and a power supply system 80.
In one embodiment, the receiving mechanism 10 includes at least two receiving areas, one receiving area is used for receiving the second predetermined waste type, and the other receiving area is used for receiving the first predetermined waste type.
Referring to fig. 2, in an embodiment, the first predetermined garbage type includes dry garbage and wet garbage, and the second predetermined garbage type is other garbage than the dry garbage and the wet garbage. The at least two receiving areas include a first receiving area 101, a second receiving area 102, and a third receiving area 103. The first storage area 101 is used for storing dry garbage, the second storage area 102 is used for storing wet garbage, and the third storage area 103 is used for storing other garbage. In other embodiments, the number of the storage areas may also be set according to other preset garbage types. In other embodiments, the first predetermined waste type may be dry waste and the second predetermined waste type may be wet waste.
In one embodiment, the carrying mechanism 20 is movably disposed in any one of the storage areas, for example, above the third storage area 103, and is used for receiving garbage to be sorted, which is input by a user. The first receiving area 101, the second receiving area 102 and the third receiving area 103 are upwardly open, and have the same size, and the carriage 20 is shaped like a flat plate, and the size of the flat plate is smaller than that of the opening of any receiving area. The carriage 20 can translate along the edges of the first, second and third receiving areas 101, 102, 103.
For example, a fixing rod (not shown) is disposed at the same side of the first receiving area 101, the second receiving area 102 and the third receiving area 103. One end of the bearing mechanism 20 is provided with a sleeve structure, and the other end is a free end. The bearing mechanism 20 is fixed on the fixing rod through the sleeving structure and can move along the fixing rod, so as to translate along the edges of the first receiving area 101, the second receiving area 102 and the third receiving area 103. Each time the carrying mechanism 20 is driven to translate above a receiving area, the carrying mechanism 20 can be driven to rotate along the fixing rod, so as to be opened downwards, and the garbage carried on the carrying mechanism 20 falls into the receiving area.
As shown in fig. 1, in one embodiment, the rack 21 is provided on the storage mechanism 10, the rack 21 is provided with an inlet 210, the inlet 210 is aligned with the carrying mechanism 20 so that the carrying mechanism 20 is exposed, and a user can input garbage to be sorted from the inlet 210 and drop the garbage on the carrying mechanism 20. The bracket 21 is further provided with an accommodating space (not shown) for accommodating electronic components such as the camera device 30, the image decoder 40, the DSP chip 50, the single chip microcomputer control module 60, the first motor 70, the second motor 71, the power system 80, and the like.
In one embodiment, the camera device 30 is disposed on the bracket 21, is located right above the carrying mechanism 20, and is configured to capture a simulation image of the garbage when the carrying mechanism 20 receives the garbage to be classified.
Referring to fig. 3, in an embodiment, the image decoder 40 is an SAA7111 chip, and is configured to decode an analog image acquired by the image capturing device 30 and output a digital image signal and a control signal to the DSP chip 50. Wherein the digital image signal has a predetermined resolution, for example 720 x 576.
In an embodiment, the DSP chip 50 is a TMS320C-5509 chip, and the DSP chip 50 includes an EMIF (External Memory Interface) Interface 501, an enable Interface 502, a USB Interface 503, a UART (Universal Asynchronous Receiver/Transmitter) Interface 504, an External expansion Memory SDRAM 505 and a FLASH 506. The image feature library can be downloaded to the FLASH 506 in advance through the USB interface 503 by other terminal devices such as a personal computer or a USB disk. The DSP chip 50 uses the control signal of the image decoder 40 as a trigger signal of a Direct Memory Access (DMA) channel, and acquires the digital image signal through the DMA channel and stores the digital image signal in an external Memory to obtain the digital image of the garbage.
Specifically, the EMIF interface 501 is configured to receive the digital image signal output by the image decoder 40. The control signal output by the image decoder 40 is a Direct Memory Access (DMA) channel trigger signal of the DSP chip 50, the enable interface 502 is configured to receive the control signal output by the image decoder 40, the control signal triggers an enable signal ce0, and the enable signal ce0 enables the DMA channel to acquire the digital image signal and store the acquired digital image signal in the SDRAM 505. The DSP chip 50 also compares the extracted image features with a pre-stored image feature library to identify and output a comparison result.
Referring to fig. 4, in S401, system initialization is performed on the DSP chip 50. S402, waiting the DMA channel to trigger. And S403, acquiring a digital image signal when the DMA channel is triggered, and storing the digital image in the SDRAM 505. S404, judging whether the digital image signal is acquired. When the digital image signal is not acquired, returning to S403; when the digital image signal acquisition is completed, S405 is entered. In S405, image data is read from the SDRAM 505. S406, preprocessing the read digital image. S407, extracting image features of the digital image. And S408, matching the extracted image features with the image features in the image feature library, and classifying the garbage. And S409, sending the garbage classification result to the single chip microcomputer control module 60. And S410, judging whether the garbage classification is finished or not. And when the garbage classification is finished, the process is finished. If the garbage classification is not completed, the process returns to S402.
In one embodiment, pre-processing the read digital image comprises: and calibrating and normalizing the digital image of the garbage. Wherein, the calibration process comprises geometric calibration, gray scale calibration and the like.
Referring to fig. 5, specifically, the extracting the image features of the digital image includes: the DSP chip 50 performs feature region segmentation on the digital image by a local recursive segmentation method, wherein the local recursive segmentation method is an OTSU algorithm. The DSP chip 50 further performs region growing processing on the digital image after feature region segmentation by a region growing method based on a region gray difference according to the local features of the digital image. The DSP chip 50 further tracks the feature region outline of the digital image by a Freeman direction chain code method, calculates the perimeter and the area of the feature region outline according to a chain code value as external feature parameters of the digital image, extracts the skeleton features of the digital image by a refinement iterative algorithm, and extracts the second moment and entropy features of the digital image by a gray level co-occurrence matrix algorithm as internal feature parameters of the digital image.
In one embodiment, the DSP chip 50 compares and identifies the extracted image features of the digital image with image features in a pre-stored image feature library, and outputs a comparison result. And the image features in the pre-stored image feature library comprise the image features of the first preset garbage type.
Specifically, the external characteristic parameters of the digital image are compared with the external characteristic parameters of the image features in the pre-stored image feature library for identification, and the internal characteristic parameters of the digital image are compared with the internal characteristic parameters of the image features in the pre-stored image feature library for identification. And when the external characteristic parameters of the digital image are identified to be matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library and the internal characteristic parameters of the digital image are identified to be matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to the first preset garbage type. And when the external characteristic parameters of the digital image are identified to be not matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library and/or the internal characteristic parameters of the digital image are identified to be not matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to the second preset garbage type.
In an embodiment, when it is recognized that the external feature parameter of the digital image is within a preset external feature parameter range of the image feature of the first preset spam type and the internal feature parameter of the digital image is within a preset internal feature parameter range of the image feature of the first preset spam type, it is determined that the image feature of the digital image matches with the image feature of the first preset spam type, and the comparison result indicates that the spam belongs to the first preset spam type. When the external characteristic parameters of the digital image are identified not to be within the preset external characteristic parameter range of the image characteristics of the first preset garbage type, and/or the internal characteristic parameters of the digital image are identified not to be within the preset internal characteristic parameter range of the image characteristics of the first preset garbage type, the image characteristics of the digital image are judged to be not matched with the image characteristics of the first preset garbage type, and the comparison result shows that the garbage belongs to the second preset garbage type.
For example, if the first preset garbage type includes dry garbage and wet garbage, the second preset garbage type is other garbage, and when the image feature of the digital image is matched with the image feature of the dry garbage, the comparison result indicates that the garbage belongs to the dry garbage. And when the image characteristics of the digital image are matched with the image characteristics of wet garbage, the comparison result shows that the garbage belongs to the wet garbage. And when the image characteristics of the digital image are not matched with the image characteristics of dry garbage and wet garbage, the comparison result shows that the garbage belongs to other garbage.
In other embodiments, other terminal devices may import the trained convolutional neural network model into the FLASH 506 through the USB interface 503, where the convolutional neural network model is generated by training according to the image features of the first preset garbage type. The DSP chip 50 automatically identifies and classifies the image features of the garbage through the convolutional neural network model.
In an embodiment, the DSP chip 50 outputs the comparison result, i.e. the type of the garbage, to the single chip microcomputer control module 60 through the UART interface 504.
Referring to fig. 6, in an embodiment, the single chip microcomputer control module 60 is an STM32 chip, and the STM32 chip includes a UART interface. The single chip microcomputer control module 60 is electrically connected to the first motor 70 and the second motor 71, and controls the first motor 70 and/or the second motor 71 in a PWM manner. In one embodiment, the first and second electric machines 70 and 71 are MG995R steering engines. The first motor 70 is used for driving the carrying mechanism 20 to translate, and the second motor 71 is used for driving the carrying mechanism 20 to open and close.
In an embodiment, the single chip microcomputer control module 60 receives the comparison result output by the DSP chip 50 through the UART interface, and controls the first motor 70 and the second motor 71 to drive the carrying mechanism 20 to store the garbage in the storing mechanism 10 according to the comparison result.
In an embodiment, when the comparison result indicates that the garbage belongs to a first preset garbage type, the single chip microcomputer control module 60 sends a corresponding control instruction to the first motor 70 to control and drive the carrying mechanism 20 to horizontally place the garbage above a storage area corresponding to the first preset garbage type, and sends a corresponding opening and closing control instruction to the second motor 71 to control the carrying mechanism 20 to be opened to place the garbage in the corresponding storage area. When the comparison result indicates that the garbage belongs to the second preset garbage type, the single chip microcomputer control module 60 sends a corresponding opening and closing control instruction to the second motor 71 to control the carrying mechanism 20 to be directly opened to put the garbage into the corresponding storage area.
For example, when the comparison result indicates that the garbage belongs to dry garbage, the single chip microcomputer control module 60 outputs a first pulse signal to the first motor 70 to control the first motor 70 to drive the carrying mechanism 20 to translate to a position above the first receiving area 101 corresponding to the dry garbage, and outputs a second pulse signal to the second motor 71 to control the second motor 71 to drive the carrying mechanism 20 to open downward so that the garbage falls into the first receiving area 101. When the comparison result indicates that the garbage belongs to wet garbage, the single chip microcomputer control module 60 outputs a third pulse signal to the first motor 70 to control the first motor 70 to drive the bearing mechanism 20 to translate to the position above the second storage area 102 corresponding to the wet garbage, and outputs the second pulse signal to the second motor 71 to control the second motor 71 to drive the bearing mechanism 20 to open downwards so that the garbage falls into the second storage area 102. When the comparison result indicates that the garbage belongs to other garbage, the single chip microcomputer control module 60 outputs a fourth pulse signal to the first motor 70 to control the first motor 70 to keep the carrying mechanism 20 located above the third receiving area 103 corresponding to the other garbage, and outputs the second pulse signal to the second motor 71 to control the second motor 71 to drive the carrying mechanism 20 to open downward so that the garbage falls into the third receiving area 103.
Specifically, referring to fig. 7, in S701, the single chip microcomputer control module 60 receives the comparison result output by the DSP chip 50 through the UART interface. S702, determining the type of the garbage according to the comparison result. And S703, judging whether to drive the bearing mechanism 20 to move according to the type of the garbage. If the waste belongs to another waste, the carriage 20 is not driven to move, and the process proceeds to S707. When the garbage does not belong to other garbage, the carrying mechanism 20 is driven to move, and the process proceeds to S704. S704, the moving direction of the support mechanism 20 is determined. S705, when the garbage is dry garbage, the single chip microcomputer control module 60 outputs a first pulse signal with a duty cycle of 12.5% and a period of 20ms to the first motor 70, so as to control the first motor 70 to drive the carrying mechanism 20 to move rightward to a position above the first storage area 101 corresponding to the dry garbage. S706, when the garbage belongs to wet garbage, the single chip microcomputer control module 60 outputs a third pulse signal with a duty ratio of 2.5% and a period of 20ms to the first motor 70, so as to control the first motor 70 to drive the carrying mechanism 20 to move leftward above the second receiving area 102 corresponding to the wet garbage. S707, the single chip microcomputer control module 60 outputs a fourth pulse signal with a duty cycle of 7.5% and a period of 20ms to the first motor 70, so as to control the first motor 70 to keep still. S708, outputting a second pulse signal to the second motor 71 to control the second motor 71 to drive the carrying mechanism 20 to open downward so that the garbage falls into the corresponding storage area, and driving the carrying mechanism 20 to close after the garbage falls into the storage area. The second pulse signal comprises a pulse signal with a duty ratio of 2.5%, a period of 20ms and a duration of 0.5s and a pulse signal with a duty ratio of 7.5%, a period of 20ms and a duration of 0.5 s.
Referring to fig. 8, in one embodiment, the power system 80 includes a battery 801, a charging device 802, and a transforming device 803. The battery 801 is a 20C lithium battery with 7.4V and 2200mAh, the charging device 802 is a solar panel, and the transforming device 803 transforms a power supply voltage of 7.4V to 5V and 9V to respectively supply power to the camera device 30, the image decoder 40, the DSP chip 50, the single-chip microcomputer control module 60, the first motor 70 and the second motor 71.
Please refer to fig. 9, which is a flowchart illustrating a method for detecting wearing of a safety helmet according to a preferred embodiment of the present application. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
S901, when the bearing mechanism of the automatic garbage classification device receives garbage, a camera device is used for collecting a simulation image of the garbage.
And S902, decoding the analog image by using an image decoder and outputting a digital image signal and a control signal.
And S903, preprocessing the digital image of the garbage by using a digital signal processing chip, and extracting the image characteristics of the digital image.
And S904, the digital signal processing chip compares the extracted image features with a pre-stored image feature library, identifies the image features and outputs a comparison result.
And S905, receiving the comparison result by using a single chip microcomputer control module.
S906, when the comparison result shows that the garbage belongs to a first preset garbage type, the single-chip microcomputer control module sends a corresponding control instruction to the first motor so as to control and drive the bearing mechanism to horizontally place the garbage above a storage area corresponding to the first preset garbage type.
And S907, the single chip microcomputer control module sends a corresponding opening and closing control instruction to the second motor so as to control the bearing mechanism to be opened and throw the garbage into the corresponding storage area.
And S908, when the comparison result shows that the garbage belongs to a second preset garbage type, the single chip microcomputer control module sends a corresponding opening and closing control instruction to the second motor so as to control the bearing mechanism to be directly opened and throw the garbage into the corresponding storage area.
The automatic garbage classification method and device based on the DSP chip and the single chip microcomputer control can achieve automatic classification and storage of garbage by the DSP chip and the single chip microcomputer, are simple in structure, low in cost and efficient in operation, reduce the cost required by garbage classification, and improve the garbage classification precision.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it will be obvious that the term "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. Several units or means recited in the apparatus claims may also be embodied by one and the same item or means in software or hardware. The terms first, second, etc. are used to denote names, but not to denote any particular order.
Although the present application has been described in detail with reference to preferred embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the spirit and scope of the present application.
Claims (10)
1. An automatic garbage classification method based on DSP chip and single chip microcomputer control is characterized by comprising the following steps:
when a bearing mechanism of the automatic garbage classification device receives garbage, acquiring a simulation image of the garbage through a camera device;
decoding the analog image using an image decoder and outputting a digital image signal and a control signal;
preprocessing the digital image of the garbage by using a digital signal processing chip, and extracting image characteristics of the digital image, wherein the digital signal processing chip takes a control signal of an image decoder as a trigger signal of a direct memory access channel, acquires the digital image signal through the direct memory access channel, and stores the digital image signal in an external memory to obtain the digital image of the garbage, and the digital signal processing chip also compares and identifies the extracted image characteristics with a pre-stored image characteristic library and outputs a comparison result;
the single chip microcomputer control module receives the comparison result, controls a first motor and/or a second motor in a PWM mode, judges whether the bearing mechanism is driven to move or not according to the type of the garbage, determines the moving direction of the bearing mechanism when the bearing mechanism is driven to move, outputs a first pulse signal with a first duty ratio and a preset period, a third pulse signal with a second duty ratio and the preset period, and a fourth pulse signal with the third duty ratio and the preset period to the first motor, controls the first motor to drive the bearing mechanism to translate, outputs a second pulse signal to the second motor, controls the second motor to drive the bearing mechanism to open and close, and controls the second pulse signal to comprise a pulse signal which lasts for a preset time, has the second duty ratio and the preset period, and a pulse signal which lasts for the preset time and has the third duty ratio and the preset period;
when the comparison result shows that the garbage belongs to dry garbage, the singlechip control module sends the first pulse signal with the first duty ratio and the preset period to the first motor so as to control the first motor to drive the bearing mechanism to horizontally place the dry garbage above a storage area corresponding to the dry garbage, and sends the pulse signal which lasts for the preset time and has the second duty ratio and the preset period and the pulse signal which lasts for the preset time and has the third duty ratio and the preset period to the second motor so as to control the second motor to drive the bearing mechanism to open and throw the dry garbage into the storage area corresponding to the dry garbage, and then drives the bearing mechanism to close;
when the comparison result shows that the garbage belongs to wet garbage, the singlechip control module sends the third pulse signal with the second duty ratio and the preset period to the first motor so as to control the first motor to drive the bearing mechanism to horizontally place the wet garbage above a storage area corresponding to the wet garbage, and sends the pulse signal with the second duty ratio and the preset period lasting for the preset time and the pulse signal with the third duty ratio and the preset period lasting for the preset time to the second motor so as to control the second motor to drive the bearing mechanism to open and throw the wet garbage to the storage area corresponding to the wet garbage, and then drives the bearing mechanism to close;
when the comparison result is that rubbish belongs to other rubbish, singlechip control module will have the third duty cycle with predetermine periodic fourth pulse signal send to first motor, in order to control first motor keeps bearing mechanism is located with the storage area top that other rubbish corresponds, and will last predetermine time, have the second duty cycle with predetermine periodic pulse signal and last predetermine time, have the third duty cycle with predetermine periodic pulse signal send to the second motor, in order to control second motor drive bearing mechanism directly opens and with other rubbish is put in to with the storage area that other rubbish corresponds, redrive bearing mechanism is closed.
2. The automatic garbage classification method of claim 1 wherein said extracting image features of said digital image comprises:
performing characteristic region segmentation on the digital image by a local recursive segmentation method;
performing region growing processing on the digital image subjected to the feature region segmentation by a region growing method based on the region gray difference;
extracting the outline of the characteristic region of the digital image by a Freeman direction chain code method, and calculating the perimeter and the area of the outline of the characteristic region according to a chain code value to be used as external characteristic parameters of the digital image;
and extracting the skeleton characteristics of the digital image by a thinning iterative algorithm, and extracting the second moment and entropy characteristics of the digital image by utilizing a gray level co-occurrence matrix to serve as the internal characteristic parameters of the digital image.
3. The method of claim 2, wherein the step of comparing the extracted image features with a pre-stored image feature library by the dsp chip comprises:
comparing and identifying the external characteristic parameters of the digital image with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library, and comparing and identifying the internal characteristic parameters of the digital image with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library;
when the external characteristic parameters of the digital image are identified to be matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library, and the internal characteristic parameters of the digital image are identified to be matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to dry garbage or wet garbage; or
And when the external characteristic parameters of the digital image are identified to be not matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library and/or the internal characteristic parameters of the digital image are identified to be not matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to other garbage.
4. The automatic garbage classification method of claim 1 wherein the pre-processing of the digital image of the garbage comprises:
and calibrating and normalizing the digital image of the garbage.
5. The automatic garbage classification method according to claim 1, characterized by: the digital signal processing chip triggers an enabling signal ce0 according to a control signal of the image decoder, enables the direct memory access channel through the enabling signal ce0, and acquires the digital image signal through the direct memory access channel to obtain the digital image.
6. An automatic waste sorting device, characterized in that the device comprises:
the camera device is used for collecting a simulation image of the garbage when the bearing mechanism of the automatic garbage classification device receives the garbage;
an image decoder for decoding the analog image and outputting a digital image signal and a control signal;
the digital signal processing chip is used for preprocessing the digital image of the garbage and extracting the image characteristics of the digital image, wherein the digital signal processing chip takes a control signal of the image decoder as a trigger signal of a direct memory access channel, acquires the digital image signal through the direct memory access channel and stores the digital image signal in an external memory so as to obtain the digital image of the garbage, and the digital signal processing chip also compares and identifies the extracted image characteristics with a pre-stored image characteristic library and outputs a comparison result;
the single chip microcomputer control module is used for receiving the comparison result, controlling a first motor and/or a second motor in a PWM (pulse width modulation) mode, judging whether the bearing mechanism is driven to move according to the type of the garbage, determining the moving direction of the bearing mechanism when the bearing mechanism is driven to move, outputting a first pulse signal with a first duty ratio and a preset period, a third pulse signal with a second duty ratio and a preset period, and a fourth pulse signal with a third duty ratio and the preset period to the first motor by the single chip microcomputer control module, controlling the first motor to drive the bearing mechanism to translate, outputting a second pulse signal to the second motor by the single chip microcomputer control module, controlling the second motor to drive the bearing mechanism to open and close, wherein the second pulse signal comprises a pulse signal which lasts for a preset time, has the second duty ratio and the preset period, and a pulse signal which lasts for the preset time and has the third duty ratio and the preset period;
when the comparison result shows that the garbage belongs to dry garbage, the single chip microcomputer control module sends the first pulse signal with the first duty ratio and the preset period to the first motor so as to control the first motor to drive the bearing mechanism to horizontally place the dry garbage above a storage area corresponding to the dry garbage, and sends the pulse signal which lasts for the preset time, has the second duty ratio and the preset period and the pulse signal which lasts for the preset time, has the third duty ratio and the preset period to the second motor so as to control the second motor to drive the bearing mechanism to be opened so as to throw the dry garbage into the storage area corresponding to the dry garbage, and then drives the bearing mechanism to be closed;
when the comparison result shows that the garbage belongs to wet garbage, the singlechip control module sends the third pulse signal with the second duty ratio and the preset period to the first motor so as to control the first motor to drive the bearing mechanism to horizontally place the wet garbage above a storage area corresponding to the wet garbage, and sends the pulse signal with the second duty ratio and the preset period lasting for the preset time and the pulse signal with the third duty ratio and the preset period lasting for the preset time to the second motor so as to control the second motor to drive the bearing mechanism to open and throw the wet garbage to the storage area corresponding to the wet garbage, and then drives the bearing mechanism to close;
when the comparison result is that the garbage belongs to other garbage, the singlechip control module further sends a fourth pulse signal with a third duty ratio and a preset period to the first motor to control the first motor to keep the bearing mechanism located above a storage area corresponding to other garbage, and continuously sends a pulse signal with the second duty ratio and the preset period and a pulse signal with the third duty ratio and the preset period to the second motor for preset time to control the second motor to drive the bearing mechanism to be directly opened and to put other garbage into the storage area corresponding to other garbage, and then drives the bearing mechanism to be closed.
7. The automatic garbage classification device of claim 6 wherein the digital signal processing chip extracting image features of the digital image comprises:
performing characteristic region segmentation on the digital image by a local recursive segmentation method;
performing region growing processing on the digital image subjected to the feature region segmentation by a rectangular growing method for segmenting gray level difference;
extracting the outline of the characteristic region of the digital image by a direction chain code method, and calculating the perimeter and the area of the outline of the characteristic region according to a chain code value to be used as external characteristic parameters of the digital image;
and extracting the skeleton characteristics of the digital image by a thinning iterative algorithm, and extracting the second moment and entropy characteristics of the digital image by utilizing a gray level co-occurrence matrix to serve as the internal characteristic parameters of the digital image.
8. The automatic garbage classification device of claim 7, wherein the digital signal processing chip compares the extracted image features with a pre-stored image feature library for identification, comprising:
comparing and identifying the external characteristic parameters of the digital images with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library, and comparing and identifying the internal characteristic parameters of the digital images with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library;
when the external characteristic parameters of the digital image are identified to be matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library, and the internal characteristic parameters of the digital image are identified to be matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to dry garbage or wet garbage; or
And when the external characteristic parameters of the digital image are identified to be not matched with the external characteristic parameters of the image characteristics in the pre-stored image characteristic library and/or the internal characteristic parameters of the digital image are identified to be not matched with the internal characteristic parameters of the image characteristics in the pre-stored image characteristic library, the comparison result indicates that the garbage belongs to other garbage.
9. The automatic garbage classification device of claim 6 wherein the digital signal processing chip pre-processes the digital image of the garbage comprising:
and calibrating and normalizing the digital image of the garbage.
10. The automatic waste sorting device of claim 6, further comprising: the digital signal processing chip triggers an enabling signal ce0 according to the control signal of the image decoder, and enables the direct memory access channel through the enabling signal ce0, so that the digital image signal is acquired through the direct memory access channel to obtain the digital image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110442622.XA CN113378627B (en) | 2021-04-23 | 2021-04-23 | Automatic garbage classification method and device based on DSP chip and single chip microcomputer control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110442622.XA CN113378627B (en) | 2021-04-23 | 2021-04-23 | Automatic garbage classification method and device based on DSP chip and single chip microcomputer control |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113378627A CN113378627A (en) | 2021-09-10 |
CN113378627B true CN113378627B (en) | 2023-02-10 |
Family
ID=77570002
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110442622.XA Active CN113378627B (en) | 2021-04-23 | 2021-04-23 | Automatic garbage classification method and device based on DSP chip and single chip microcomputer control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113378627B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114194663A (en) * | 2021-12-29 | 2022-03-18 | 扬州长光智能制造科技有限公司 | Intelligent garbage can with energy consumption monitoring, electricity utilization safety and automatic weighing functions |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105471352A (en) * | 2016-01-05 | 2016-04-06 | 珠海格力电器股份有限公司 | Motor speed regulation method, device and system and intelligent environment-friendly barrel |
CN112365395A (en) * | 2020-11-17 | 2021-02-12 | 中建科技集团有限公司 | Intelligent garbage collection method, device, equipment and computer readable storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102008062002A1 (en) * | 2008-12-12 | 2010-06-17 | Francotyp-Postalia Gmbh | Device and method for mail acceptance |
CN109389161B (en) * | 2018-09-28 | 2021-08-31 | 广州大学 | Garbage identification evolutionary learning method, device, system and medium based on deep learning |
CN109465809B (en) * | 2018-12-17 | 2024-07-19 | 中北大学 | Intelligent garbage classification robot based on binocular stereoscopic vision positioning identification |
CN109622416B (en) * | 2019-01-21 | 2021-07-30 | 哈尔滨工业大学(深圳) | Garbage classification method and system based on ultrasonic sensor array |
CN110378418A (en) * | 2019-07-19 | 2019-10-25 | Oppo广东移动通信有限公司 | Refuse classification method, device, equipment and storage medium |
CN111252407A (en) * | 2020-01-17 | 2020-06-09 | 珠海格力电器股份有限公司 | Garbage disposal device, method and storage medium |
-
2021
- 2021-04-23 CN CN202110442622.XA patent/CN113378627B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105471352A (en) * | 2016-01-05 | 2016-04-06 | 珠海格力电器股份有限公司 | Motor speed regulation method, device and system and intelligent environment-friendly barrel |
CN112365395A (en) * | 2020-11-17 | 2021-02-12 | 中建科技集团有限公司 | Intelligent garbage collection method, device, equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113378627A (en) | 2021-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110861852A (en) | Automatic classification garbage can based on visual identification and classification method | |
CN109034159B (en) | Image information extraction method and device | |
CN109928107A (en) | A kind of automatic classification system | |
US11335086B2 (en) | Methods and electronic devices for automated waste management | |
WO2007053470A2 (en) | Detecting humans via their pose | |
CN112732871B (en) | Multi-label classification method for acquiring client intention labels through robot induction | |
CN111259977A (en) | Garbage classification device based on deep learning | |
CN111186656A (en) | Target garbage classification method and intelligent garbage can | |
CN113378627B (en) | Automatic garbage classification method and device based on DSP chip and single chip microcomputer control | |
CN112733936A (en) | Recyclable garbage classification method based on image recognition | |
CN110466911A (en) | Automatic sorting garbage bin and classification method | |
Feng et al. | Garbage disposal of complex background based on deep learning with limited hardware resources | |
CN116386649A (en) | Cloud-edge-collaboration-based field bird monitoring system and method | |
CN114492658B (en) | Real-time household garbage detection method and device, electronic equipment and medium | |
CN112707058A (en) | Detection method, system, device and medium for standard actions of kitchen waste | |
CN113902914B (en) | Automatic water meter reading identification method based on microcontroller and convolutional neural network | |
CN116935108A (en) | Method, device, equipment and medium for monitoring abnormal garbage throwing behavior | |
CN117541988B (en) | Object detection method of renewable resource recycling system | |
CN107366491A (en) | The control method and electric extendable door of a kind of electric extendable door | |
CN110781778A (en) | Access control method and device, storage medium and home system | |
CN116091748A (en) | AIGC-based image recognition system and device | |
CN115743989A (en) | Intelligent resource classification recycling device | |
CN114937265A (en) | Point cloud detection method, model training method, device, equipment and storage medium | |
CN114782762A (en) | Garbage image detection method and community garbage station | |
CN113139561B (en) | Garbage classification method, garbage classification device, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |