CN-121974013-A - Machine vision-based oral liquid bottle cap online detection quantitative subpackaging system and method
Abstract
The invention relates to the technical field of production and packaging of oral liquid bottle caps, in particular to an online detection and quantitative subpackaging system and method of an oral liquid bottle cap based on machine vision, wherein the method comprises the steps of acquiring bottle cap images and preprocessing the bottle cap images in the process of moving the bottle cap along a conveying path; the method comprises the steps of inputting a preprocessed bottle cap image into a deep learning model, synchronously identifying multiple types of defects on the surface of the bottle cap, outputting a defect identification result, associating the defect identification result with position information of the bottle cap on a conveying path, sending a rejection instruction to an execution mechanism, calculating a trigger time according to response delay of the execution mechanism, realizing dynamic rejection of unqualified products, counting the qualified products, generating a package replacement instruction when the cumulative number of the qualified products reaches a set threshold value, controlling the package replacement mechanism to switch a package channel, and resetting a count value.
Inventors
- TANG XIANFENG
- TANG GUANGWEN
- ZHAO ZONGLIN
- ZHAO DONG
- TONG ZHIBO
- LIU YIXUAN
- MA BINGYAN
Assignees
- 重庆首键药用包装材料有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260330
Claims (7)
- 1. An online detection and quantitative subpackaging method for an oral liquid bottle cap based on machine vision is characterized by comprising the following steps of: acquiring a bottle cap image and preprocessing the bottle cap image in the process of moving the bottle cap along the conveying path; inputting the preprocessed bottle cap image into a deep learning model, synchronously identifying multiple types of defects on the surface of the bottle cap, and outputting a defect identification result; The defect identification result is associated with the position information of the bottle cap on the conveying path, a rejection instruction is sent to an executing mechanism through a real-time communication link, and the triggering time is calculated according to the response delay of the executing mechanism, so that the dynamic rejection of unqualified products is realized; and counting qualified products, generating a package changing instruction when the accumulated number of the qualified products reaches a set threshold value, controlling the package changing mechanism to switch the packaging channel, and resetting the count value.
- 2. The method for online detecting, counting and subpackaging the bottle caps of the oral liquid based on machine vision according to claim 1, wherein the specific steps of acquiring the bottle cap image and preprocessing the bottle cap image during the movement of the bottle caps along the conveying path comprise the following steps: In the process of moving the bottle cap along the conveying path, generating a trigger signal when the bottle cap reaches a preset imaging area, and responding to the trigger signal to acquire a bottle cap image; And sequentially carrying out graying treatment and filtering denoising treatment on the acquired image, and extracting a bottle cap area image according to the preset interested area parameter.
- 3. The method for online detecting, counting and subpackaging the bottle caps of the oral liquid based on machine vision according to claim 2, wherein the specific steps of inputting the preprocessed bottle cap images into a deep learning model, synchronously recognizing multiple types of defects on the surface of the bottle caps, and outputting the defect recognition result comprise the following steps: Inputting the preprocessed bottle cap region image into a pre-trained convolutional neural network model; the convolutional neural network model is a multitasking detection model, and synchronously outputs the identification result and the confidence coefficient of at least one kind of defects in scratches, greasy dirt, burrs and riveting offset; And when the output confidence level is lower than a preset threshold value, marking the identification result as suspicious, and triggering a secondary rechecking mechanism.
- 4. The method for online detecting, counting and subpackaging the bottle caps of the oral liquid based on machine vision according to claim 3, wherein the specific steps of associating the defect identification result with the position information of the bottle caps on the conveying path, sending a rejection command to an executing mechanism through a real-time communication link, calculating a trigger time according to the response delay of the executing mechanism, and realizing the dynamic rejection of unqualified products comprise the following steps: Acquiring a real-time position signal of the bottle cap along the conveying path, and storing the identification result and the position information of the corresponding bottle cap in an associated manner; Calculating the optimal trigger time of the rejection instruction according to the inherent response delay of the executing mechanism and the current movement speed of the bottle cap; and sending a rejection instruction to an executing mechanism through a real-time communication link, and executing a rejection action when the bottle cap moves to a rejection station.
- 5. The method for online detecting, counting and packaging bottle caps of oral liquid based on machine vision according to claim 4, wherein the removing command is sent to the executing mechanism through a real-time communication link, and the removing action is executed when the bottle caps move to the removing station, The communication period of the real-time communication link is not more than 2ms, and the end-to-end delay from image acquisition to transmission of the elimination instruction is not more than 30ms.
- 6. The method for online detecting, counting and subpackaging the bottle caps of the oral liquid based on machine vision according to claim 5, wherein the specific steps of counting the qualified products, generating a packet changing instruction when the accumulated number of the qualified products reaches a set threshold value, controlling the packet changing mechanism to switch the packaging channel, and resetting the count value comprise the following steps: Accumulating and counting the bottle caps with qualified recognition results, comparing the current count value with a preset sub-packaging threshold, and generating a full-package signal when the count value is equal to the sub-packaging threshold; Responding to the full packet signal, controlling a state machine to switch from a counting state to a packet switching state, and generating a packet switching instruction; The package replacing instruction controls the package replacing mechanism to switch the package channel to the empty package container, generates a reset signal after the package replacing is completed, resets the count value and returns to the count state.
- 7. An online detection and quantitative subpackaging system for oral liquid bottle caps based on machine vision, which adopts the online detection and quantitative subpackaging method for oral liquid bottle caps based on machine vision as claimed in any one of claims 1-6, characterized in that, The system comprises an image acquisition module, a defect identification module, a synchronous eliminating module and a counting sub-packaging module, wherein the image acquisition module, the defect identification module, the synchronous eliminating module and the counting sub-packaging module are sequentially connected; The image acquisition module is used for acquiring a bottle cap image and preprocessing the bottle cap image in the process of moving the bottle cap along the conveying path; The defect recognition module is used for inputting the preprocessed bottle cap image into the deep learning model, synchronously recognizing multiple types of defects on the surface of the bottle cap and outputting a defect recognition result; The synchronous eliminating module is used for associating the defect identification result with the position information of the bottle cap on the conveying path, sending an eliminating instruction to the executing mechanism through a real-time communication link, and calculating the triggering time according to the response delay of the executing mechanism so as to realize the dynamic elimination of unqualified products; The counting sub-packaging module is used for counting qualified products, generating a package replacing instruction when the accumulated quantity of the qualified products reaches a set threshold value, controlling the package replacing mechanism to switch a packaging channel, and resetting the count value.
Description
Machine vision-based oral liquid bottle cap online detection quantitative subpackaging system and method Technical Field The invention relates to the technical field of production and packaging of oral liquid bottle caps, in particular to an online detection and quantitative subpackaging system and method for oral liquid bottle caps based on machine vision. Background The oral liquid bottle cap is used as a key component of medicine package, and the quality of the oral liquid bottle cap is directly related to the tightness and safety of medicines. If the defects such as scratches, greasy dirt, burrs, riveting offset and the like possibly exist on the surface of the bottle cap, the defects can not be effectively detected in the production link, the packaging seal is invalid, and the risk of medicine pollution or deterioration is caused. At present, in the production and packaging process of the oral liquid bottle caps, a separation type operation mode is generally adopted for quality detection and quantitative subpackaging. The quality detection link is based on manual visual sampling inspection or off-line visual inspection equipment, and has the technical problems that the manual sampling inspection is low in efficiency and high in subjectivity, is difficult to adapt to the requirement of high-speed continuous production, is high in omission ratio, cannot ensure full inspection coverage of products, and can improve the detection rate to a certain extent through off-line visual inspection, but the detection result and the follow-up sub-packaging link lack of real-time linkage, and the detected bottle caps need to be collected and counted again in a manual or semi-automatic mode, so that the interruption link in the production beat is increased, and the risk of secondary pollution is introduced. In summary, the prior art lacks an automatic method capable of fusing high-speed on-line detection with accurate quantitative subpackaging depth, and is difficult to meet the comprehensive requirements of the oral liquid bottle cap production subpackaging process on efficiency, reliability and cleanliness. Disclosure of Invention The invention aims to provide an online detection quantitative subpackaging system and method for an oral liquid bottle cap based on machine vision, which can meet the comprehensive requirements on efficiency, reliability and cleanliness in the production subpackaging process of the oral liquid bottle cap. In order to achieve the above object, in a first aspect, the present invention provides a method for online detecting, counting and packaging caps of an oral liquid based on machine vision, comprising: acquiring a bottle cap image and preprocessing the bottle cap image in the process of moving the bottle cap along the conveying path; inputting the preprocessed bottle cap image into a deep learning model, synchronously identifying multiple types of defects on the surface of the bottle cap, and outputting a defect identification result; The defect identification result is associated with the position information of the bottle cap on the conveying path, a rejection instruction is sent to an executing mechanism through a real-time communication link, and the triggering time is calculated according to the response delay of the executing mechanism, so that the dynamic rejection of unqualified products is realized; and counting qualified products, generating a package changing instruction when the accumulated number of the qualified products reaches a set threshold value, controlling the package changing mechanism to switch the packaging channel, and resetting the count value. The method for acquiring the bottle cap image and preprocessing the bottle cap image in the process of moving the bottle cap along the conveying path comprises the following specific steps of: In the process of moving the bottle cap along the conveying path, generating a trigger signal when the bottle cap reaches a preset imaging area, and responding to the trigger signal to acquire a bottle cap image; And sequentially carrying out graying treatment and filtering denoising treatment on the acquired image, and extracting a bottle cap area image according to the preset interested area parameter. The method for synchronously identifying the multiple types of defects on the surface of the bottle cap by inputting the preprocessed bottle cap image into the deep learning model and outputting the defect identification result comprises the following specific steps of: Inputting the preprocessed bottle cap region image into a pre-trained convolutional neural network model; the convolutional neural network model is a multitasking detection model, and synchronously outputs the identification result and the confidence coefficient of at least one kind of defects in scratches, greasy dirt, burrs and riveting offset; And when the output confidence level is lower than a preset threshold value, marking the identification result as suspicious