A cigarette bubble wrinkle defect identification method and device based on line laser scanning
By generating point cloud data of the cigarette stem image using line laser scanning technology, and calculating the contour waveform and baseline line, the problem of inaccurate detection of cigarette blistering defects in existing technologies is solved, and accurate identification of blistering defects is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUBEI CHINA TOBACCO INDUSTRY CO LTD
- Filing Date
- 2023-06-30
- Publication Date
- 2026-07-03
AI Technical Summary
Existing methods for detecting defects in cigarette appearance cannot accurately detect defects containing depth information, such as wrinkles, and are not effective for objects with complex surface textures or large color variations.
Line laser scanning technology is used to acquire images of the cigarette stem using an area array camera, generate point cloud data, calculate the contour waveform and baseline line, and identify abnormal contour points to determine the location of wrinkling defects.
It enables accurate detection of cigarette bar wrinkling defects, independent of the influence of surface texture and color factors, thus improving the accuracy and efficiency of detection.
Smart Images

Figure CN116609343B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of defect detection technology, and more specifically, to a method and apparatus for identifying cigarette blistering defects based on line laser scanning. Background Technology
[0002] The quality of cigarettes has a significant impact on the taste and flavor of tobacco products. Defective cigarettes can negatively affect consumer experience and satisfaction. Traditional manual inspection methods are heavily influenced by worker subjectivity; operators are prone to visual fatigue as working hours increase, and traditional defect detection methods also suffer from low efficiency, high error rates, and poor real-time performance. Therefore, many automated inspection technologies for cigarette appearance defects have emerged.
[0003] However, current methods for detecting cigarette appearance defects are generally only applicable to surface defect detection, that is, focusing on detecting two-dimensional defects such as cigarette oil stains, yellow spots, punctures, and overlapping markings. They can only provide two-dimensional information about the defective surface, but cannot accurately detect defects containing depth information such as cigarette wrinkles. At the same time, the detection effect is not good for objects with complex surface textures or large color variations. Summary of the Invention
[0004] To address the aforementioned issues, this application provides a method and apparatus for identifying cigarette blistering defects based on line laser scanning.
[0005] In a first aspect, embodiments of this application provide a method for identifying cigarette blistering defects based on line laser scanning, the method comprising:
[0006] During the self-rotation of the cigarette based on the central axis of the cigarette, the image of the cigarette generatrix corresponding to the cigarette is continuously acquired by the area array camera. The cigarette generatrix corresponding to the cigarette is determined based on the laser line projected by the line laser onto the cylindrical surface of the cigarette.
[0007] The point cloud data of the cigarette busbar is determined based on the cigarette busbar image, and the cigarette outline waveform and reference straight line corresponding to each cigarette busbar image are generated based on each point cloud data.
[0008] Calculate the first distance from each contour point on the cigarette profile waveform to the reference straight line, and determine the location of the foaming defect of the cigarette based on the abnormal region corresponding to the abnormal contour point. The abnormal contour point is the contour point whose first distance is greater than a preset distance.
[0009] Preferably, the step of continuously acquiring the cigarette generatrix image corresponding to the cigarette based on the area array camera includes:
[0010] Send a first control command to the line laser to cause the line laser to project a laser line onto the cylindrical surface of the cigarette stick;
[0011] The image of the cigarette's main body is obtained by continuously acquiring the laser line area on the surface of the cigarette cylinder using an area array camera.
[0012] Preferably, determining the point cloud data of the cigarette busbar based on the cigarette busbar image includes:
[0013] Establish the camera coordinate system corresponding to the area array camera, establish the laser coordinate system corresponding to the line laser, and determine the vector coordinates of each measurement point on the cigarette branch line based on the camera coordinate system and the laser coordinate system;
[0014] By summing up the vector coordinates, the point cloud data of the cigarette branch busbar is obtained.
[0015] Preferably, the step of generating the cigarette profile waveform and reference straight line corresponding to each cigarette generatrix image based on each of the point cloud data includes:
[0016] The point cloud data are subjected to median filtering to obtain the cigarette profile waveform corresponding to each cigarette gene image.
[0017] Depth values are fitted to the point cloud data after median filtering to obtain the baseline straight line corresponding to each cigarette branch gene image.
[0018] Preferably, the baseline line is obtained by fitting based on a random sampling consensus algorithm or the least squares method.
[0019] Preferably, the method further includes:
[0020] Minimum neighborhood clustering analysis is performed on each of the abnormal contour points to determine the shape of the wrinkled defect region.
[0021] Secondly, embodiments of this application provide a cigarette stick wrinkle defect identification device based on line laser scanning, the device comprising:
[0022] The acquisition module is used to continuously acquire images of the cigarette generatrix corresponding to the cigarette based on an area array camera during the self-rotation of the cigarette based on the cigarette's central axis. The cigarette generatrix corresponding to the cigarette is determined based on the laser line projected by a line laser onto the cylindrical surface of the cigarette.
[0023] The determination module is used to determine the point cloud data of the cigarette busbar based on the cigarette busbar image, and generate the cigarette outline waveform and reference straight line corresponding to each cigarette busbar image based on each point cloud data.
[0024] The calculation module is used to calculate the first distance from each contour point on the cigarette profile waveform to the reference straight line, and to determine the location of the foaming defect of the cigarette based on the abnormal region corresponding to the abnormal contour point. The abnormal contour point is the contour point whose first distance is greater than a preset distance.
[0025] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method provided as in the first aspect or any possible implementation of the first aspect.
[0026] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method provided as in the first aspect or any possible implementation thereof.
[0027] The beneficial effects of this invention are as follows: by using a line laser to determine the cigarette generatrix of the cigarette, the cigarette profile waveform corresponding to the cigarette generatrix is determined, and the location of the wrinkle defect is determined based on the cigarette profile waveform. This method can accurately detect the depth and location of the wrinkle defect. Furthermore, the line laser is not affected by factors such as the surface texture and color of the object, so it can more accurately detect wrinkle defects with depth information. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A schematic flowchart illustrating a method for identifying cigarette blistering defects based on line laser scanning, provided in an embodiment of this application;
[0030] Figure 2 A schematic diagram of a cigarette foaming defect identification device based on line laser scanning provided in this application embodiment;
[0031] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0032] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0033] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0034] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0035] See Figure 1 , Figure 1 This is a schematic flowchart of a method for identifying cigarette blistering defects based on line laser scanning, provided in an embodiment of this application. In this embodiment, the method includes:
[0036] S101. During the self-rotation of the cigarette based on the central axis of the cigarette, the image of the cigarette generatrix corresponding to the cigarette is continuously acquired based on the area array camera. The cigarette generatrix corresponding to the cigarette is determined based on the laser line projected by the line laser onto the cylindrical surface of the cigarette.
[0037] The entity executing this application may be a cloud server.
[0038] In one embodiment of this application, to identify wrinkles at various locations on the cigarette surface, a line laser is projected onto the cigarette surface, serving as the identified generatrix of the cigarette. An area array camera then captures images of the generatrix. Since wrinkles can appear anywhere on the cigarette surface, the cigarette needs to be kept in a rotating state. This allows the line laser to work in conjunction with the area array camera during the cigarette's rotation, continuously capturing images of the generatrix at various locations on the cylindrical surface of the cigarette. The cigarette's rotation can be achieved using two co-directional rollers. After the aforementioned production process, the cigarette is transported via a conveyor belt or similar means to two closely spaced co-directional rollers, causing it to rotate at the angle between the two rollers.
[0039] In one possible implementation, the continuous acquisition of cigarette generatrix images corresponding to the cigarette based on the area array camera includes:
[0040] Send a first control command to the line laser to cause the line laser to project a laser line onto the cylindrical surface of the cigarette stick;
[0041] The image of the cigarette's main body is obtained by continuously acquiring the laser line area on the surface of the cigarette cylinder using an area array camera.
[0042] In one embodiment of this application, after a cigarette enters between the co-directional rollers and begins to rotate, the cloud server sends a first control command to the line laser, causing the line laser to project a laser line onto the location of the cigarette upon receiving the first control command. This laser line reveals the normally invisible cigarette beam, and then an image of the cigarette beam is obtained by capturing the location of the laser line using an area array camera.
[0043] S102. Determine the point cloud data of the cigarette busbar based on the cigarette busbar image, and generate the cigarette outline waveform and reference straight line corresponding to each cigarette busbar image based on each point cloud data.
[0044] In one embodiment of this application, the point cloud data left by the laser can be identified in the cigarette generatrix image acquired by the area array camera. The point cloud data can be regarded as a set of laser point vectors, which is represented as a curve in the image. Therefore, the contour waveform of the projected laser line on the cigarette can be determined by the curve formed by the point cloud data, that is, the cigarette contour waveform. Ideally, the cigarette contour waveform should be a straight line, but in the case of bubbles, the cigarette contour waveform is not a straight line. However, in reality, the point cloud data projected by the laser fluctuates, that is, the cigarette contour waveform cannot be a completely straight line even without bubbles. In order to judge the bubbles, it is also necessary to fit and generate a reference straight line based on the point cloud data, and judge whether the cigarette contour waveform is abnormal based on the reference straight line. The reference straight line can be fitted by the maximum square method, random sample consensus algorithm, etc.
[0045] In one possible implementation, determining the point cloud data of the cigarette busbar based on the cigarette busbar image includes:
[0046] Establish the camera coordinate system corresponding to the area array camera, establish the laser coordinate system corresponding to the line laser, and determine the vector coordinates of each measurement point on the cigarette branch line based on the camera coordinate system and the laser coordinate system;
[0047] By summing up the vector coordinates, the point cloud data of the cigarette branch busbar is obtained.
[0048] In one embodiment of this application, a line laser projects a laser line onto the cylindrical surface of a cigarette, intersecting the surface to form the cigarette's generatrix. Let P be a point on the generatrix, and p be the image point formed by the image in the camera. For ease of description, a series of coordinate systems will be constructed. Establishing the camera coordinate system... Based on the imaging theory of cameras, establish an image plane coordinate system. Establish laser coordinate system ,in, The plane in question coincides with the laser plane. To simplify the process, let's take... The coordinate system is the measurement coordinate system. Therefore, the coordinates of the measured point P in the measurement coordinate system are: The coordinates in the camera coordinate system are Let the image coordinates of its image point p be... The corresponding coordinates in the image plane coordinate system are Then the following relationship exists:
[0049]
[0050] Where S[] is the S matrix, To normalize the focal length, , These are the pixel coordinates of the camera's principal point. This parameter is only related to the camera itself and is called the camera's intrinsic parameter.
[0051] Suppose that the pose between the camera coordinate system and the measurement coordinate system can have the following relationship:
[0052]
[0053] Where R and t represent the rotation angle and offset position relationship between the two coordinate systems, respectively. These two parameters describe the positional relationship between the camera and the laser light plane, and are called the sensor's extrinsic parameters. Thus, the relationship between the pixel coordinates of the measured point and its coordinates in the measurement coordinate system can be described as:
[0054]
[0055] Through system calibration, the internal parameters of the camera and the external parameters of the sensor can be determined. Since the coordinates on the image plane coordinate system corresponding to the area scan camera are known quantities that the area scan camera can acquire, the actual spatial coordinates (i.e., vector coordinates) of the measured point can be obtained from the coordinates of the pixels on the image plane coordinate system. By summarizing all the vector coordinates on the image, the point cloud data of the cigarette branch generatrix can be obtained.
[0056] In one possible implementation, generating the cigarette profile waveform and reference straight line corresponding to each of the cigarette generatrix images based on the point cloud data includes:
[0057] The point cloud data are subjected to median filtering to obtain the cigarette profile waveform corresponding to each cigarette gene image.
[0058] Depth values are fitted to the point cloud data after median filtering to obtain the baseline straight line corresponding to each cigarette branch gene image.
[0059] In one embodiment of this application, median filtering is applied to the extracted point cloud data of the cigarette stem to obtain a smooth cigarette stem contour waveform, providing reliable preprocessing for cigarette defect assessment. Median filtering can remove outliers and noise to retain important features of the cigarette stem contour while eliminating the influence of outliers and smoothing the data. In addition to forming the cigarette stem contour waveform, the processed point cloud data can also be used to obtain the baseline line of the cigarette stem image through depth value fitting.
[0060] In one possible implementation, the baseline line is obtained by fitting based on a random sampling consensus algorithm or the least squares method.
[0061] In one embodiment of this application, the fitting process of the random sampling consensus algorithm to the baseline line is as follows:
[0062] (1) From all the sample datasets corresponding to the point cloud data, randomly select two point sets. The two points determine a straight line. Find the equation of the straight line.
[0063] (2) Set a distance threshold t and calculate the distance d from all sample points to the line obtained in (1);
[0064] (3) If d is less than the threshold t, then the point is an interior point; otherwise, it is an outlier.
[0065] (4) Repeat steps (1) to (3), and record the number of interior points obtained each time, as well as the number of interior points; repeat N times and then end the iteration;
[0066] (5) Count the number of all interior points during the iteration process. The line determined by the interior points of the iteration with the largest number of interior points is the final line equation. The line corresponding to the final line equation is the reference line.
[0067] (6) The theoretical standard deviation of the iteration number k is defined as:
[0068]
[0069] in, is the probability of selecting an interior point from the dataset; n is the number of points needed to estimate the initial model.
[0070] The least squares method for fitting a reference line is as follows: First, a straight line is generated based on two randomly selected point sets. Then, the sum of the squares of the distances from all points in the point cloud data to this line is calculated. The line with the smallest sum of squares is the final reference line.
[0071] S103. Calculate the first distance from each contour point on the cigarette profile waveform to the reference straight line, and determine the location of the foaming defect of the cigarette based on the abnormal area corresponding to the abnormal contour point. The abnormal contour point is the contour point whose first distance is greater than a preset distance.
[0072] In one embodiment of this application, due to the formation of wrinkles, the profile of the cross section in the plane containing the generatrix is no longer a straight line, and there is a dimensional change in the radial direction at the location of the wrinkles. Furthermore, because the cigarette has a large cylindricity error and is relatively lightweight, it may jump during rotational measurement. Therefore, the relative position of the measured generatrix profile data changes continuously with each measurement. Thus, after obtaining the reference straight line through the aforementioned process, it is necessary to calculate the first distance from each profile point on the cigarette profile waveform to the reference straight line, and use this first distance to determine the wrinkles. Specifically, since the profile waveform formed by the point cloud data cannot be perfectly straight, a preset distance is set to avoid misjudgments caused by reasonable fluctuations in the point cloud data. Only profile points with a first distance greater than the preset distance are considered abnormal profile points. Based on the abnormal areas corresponding to these abnormal profile points, the location of the wrinkle defect in the cigarette can be determined. The wrinkle defect diagnosis result obtained in this way is accurate and is not affected by factors such as the surface texture or color of the object.
[0073] In one possible implementation, the method further includes:
[0074] Minimum neighborhood clustering analysis is performed on each of the abnormal contour points to determine the shape of the wrinkled defect region.
[0075] In one embodiment of this application, wrinkles are generally classified into point-like wrinkle defects and sheet-like wrinkle defects. Based on the frequency of occurrence of different types of wrinkles, the locations in the production process that are prone to defects can be identified and adjusted, thereby reducing the defect incidence rate during production. Therefore, after identifying abnormal contour points, the abnormal contour points are clustered using a minimum neighborhood algorithm to determine the shape of the wrinkle defect region based on the clustering results.
[0076] The following will be combined with the appendix Figure 2 This application provides a detailed description of the cigarette blister defect identification device based on line laser scanning, as provided in the embodiments of this application. It should be noted that the appendix... Figure 2 The cigarette stick wrinkle defect identification device based on line laser scanning shown is used to perform the functions described in this application. Figure 1The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figure 1 The example shown.
[0077] Please see Figure 2 , Figure 2 This is a schematic diagram of a cigarette foaming defect identification device based on line laser scanning, provided in an embodiment of this application. Figure 2 As shown, the device includes:
[0078] The acquisition module 201 is used to continuously acquire images of the cigarette generatrix corresponding to the cigarette based on an area array camera during the self-rotation of the cigarette based on the cigarette's central axis. The cigarette generatrix corresponding to the cigarette is determined based on the laser line projected by a line laser onto the cylindrical surface of the cigarette.
[0079] The determining module 202 is used to determine the point cloud data of the cigarette busbar based on the cigarette busbar image, and generate the cigarette outline waveform and reference straight line corresponding to each cigarette busbar image based on each point cloud data.
[0080] The calculation module 203 is used to calculate the first distance from each contour point on the cigarette contour waveform to the reference straight line, and to determine the location of the foaming defect of the cigarette based on the abnormal region corresponding to the abnormal contour point. The abnormal contour point is the contour point whose first distance is greater than a preset distance.
[0081] In one possible implementation, the acquisition module 201 includes:
[0082] A transmitting unit is used to send a first control command to the line laser, so as to cause the line laser to project a laser line onto the cylindrical surface of the cigarette stick.
[0083] The acquisition unit is used to continuously acquire the laser line area on the cylindrical surface of the cigarette based on the area array camera to obtain the image of the cigarette generatrix.
[0084] In one possible implementation, the determining module 202 includes:
[0085] The unit is used to establish the camera coordinate system corresponding to the area array camera, establish the laser coordinate system corresponding to the line laser, and determine the vector coordinates of each measurement point on the cigarette branch line according to the camera coordinate system and the laser coordinate system.
[0086] The summarization unit is used to summarize the coordinates of each vector to obtain the point cloud data of the cigarette branch busbar.
[0087] In one possible implementation, the determining module 202 further includes:
[0088] The processing unit is used to perform median filtering on each of the point cloud data to obtain the cigarette profile waveform corresponding to each of the cigarette busbar images;
[0089] The fitting unit is used to perform depth value fitting on each of the point cloud data after median filtering to obtain the reference straight line corresponding to each of the cigarette branch busbar images.
[0090] In one possible implementation, the baseline line is obtained by fitting based on a random sampling consensus algorithm or the least squares method.
[0091] In one possible implementation, the device further includes:
[0092] The clustering module is used to perform minimum neighborhood clustering analysis on each of the abnormal contour points to determine the shape of the wrinkled defect region.
[0093] Those skilled in the art will clearly understand that the technical solutions of the embodiments of this application can be implemented by means of software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, wherein the hardware may be, for example, a field-programmable gate array (FPGA), an integrated circuit (IC), etc.
[0094] Each processing unit and / or module in the embodiments of this application can be implemented by an analog circuit that implements the functions described in the embodiments of this application, or by software that executes the functions described in the embodiments of this application.
[0095] See Figure 3 It shows a schematic diagram of the structure of an electronic device according to an embodiment of this application, which can be used to implement... Figure 1 The method in the illustrated embodiment. (As shown) Figure 3 As shown, the electronic device 300 may include: at least one central processing unit 301, at least one network interface 304, user interface 303, memory 305, and at least one communication bus 302.
[0096] The communication bus 302 is used to enable communication between these components.
[0097] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0098] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0099] The central processing unit 301 may include one or more processing cores. The central processing unit 301 connects to various parts within the electronic device 300 using various interfaces and lines. It executes various functions of the terminal 300 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the central processing unit 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The central processing unit 301 may integrate one or more of the following: a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the central processing unit 301.
[0100] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned central processing unit 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
[0101] exist Figure 3In the illustrated electronic device 300, the user interface 303 is mainly used to provide an input interface for the user and to acquire user input data; while the central processing unit 301 can be used to call the cigarette blister defect identification application based on line laser scanning stored in the memory 305, and specifically perform the following operations:
[0102] During the self-rotation of the cigarette based on the central axis of the cigarette, the image of the cigarette generatrix corresponding to the cigarette is continuously acquired by the area array camera. The cigarette generatrix corresponding to the cigarette is determined based on the laser line projected by the line laser onto the cylindrical surface of the cigarette.
[0103] The point cloud data of the cigarette busbar is determined based on the cigarette busbar image, and the cigarette outline waveform and reference straight line corresponding to each cigarette busbar image are generated based on each point cloud data.
[0104] Calculate the first distance from each contour point on the cigarette profile waveform to the reference straight line, and determine the location of the foaming defect of the cigarette based on the abnormal region corresponding to the abnormal contour point. The abnormal contour point is the contour point whose first distance is greater than a preset distance.
[0105] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0106] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0107] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0108] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0109] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0110] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0111] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0112] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0113] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A method for identifying cigarette blistering defects based on line laser scanning, characterized in that, The method includes: During the self-rotation of the cigarette based on the central axis of the cigarette, the image of the cigarette generatrix corresponding to the cigarette is continuously acquired by the area array camera. The cigarette generatrix corresponding to the cigarette is determined based on the laser line projected by the line laser onto the cylindrical surface of the cigarette. Based on the images of each cigarette busbar, point cloud data of each cigarette busbar is determined, and based on the point cloud data, cigarette outline waveform and reference straight line corresponding to each cigarette busbar image are generated. The cigarette outline waveform is the outline waveform of the projected laser line on the cigarette. Calculate the first distance from each contour point on the cigarette profile waveform to the reference straight line, and determine the location of the foaming defect of the cigarette based on the abnormal area corresponding to the abnormal contour point. The abnormal contour point is the contour point whose first distance is greater than a preset distance. The step of continuously acquiring images of the cigarette generatrix corresponding to the cigarette based on an area array camera includes: Send a first control command to the line laser to cause the line laser to project a laser line onto the cylindrical surface of the cigarette stick; The image of the cigarette's main body is obtained by continuously acquiring the laser line area on the surface of the cigarette cylinder using an area array camera. The step of generating the cigarette profile waveform and reference straight line corresponding to each cigarette generatrix image based on each of the point cloud data includes: The point cloud data are subjected to median filtering to obtain the cigarette profile waveform corresponding to each cigarette gene image. Depth values are fitted to the point cloud data after median filtering to obtain the baseline straight line corresponding to each cigarette branch gene image.
2. The method according to claim 1, characterized in that, The determination of point cloud data for the cigarette busbar based on the cigarette busbar image includes: Establish the camera coordinate system corresponding to the area array camera, establish the laser coordinate system corresponding to the line laser, and determine the vector coordinates of each measurement point on the cigarette branch line based on the camera coordinate system and the laser coordinate system; By summing up the vector coordinates, the point cloud data of the cigarette branch busbar is obtained.
3. The method according to claim 1, characterized in that, The baseline line is obtained by fitting based on a random sampling consensus algorithm or the least squares method.
4. The method according to claim 1, characterized in that, The method further includes: Minimum neighborhood clustering analysis is performed on each of the abnormal contour points to determine the shape of the wrinkled defect region.
5. A device for identifying cigarette blistering defects based on line laser scanning, characterized in that, The device includes: The acquisition module is used to continuously acquire images of the cigarette generatrix corresponding to the cigarette based on an area array camera during the self-rotation of the cigarette based on the cigarette's central axis. The cigarette generatrix corresponding to the cigarette is determined based on the laser line projected by a line laser onto the cylindrical surface of the cigarette. The determination module is used to determine the point cloud data of each cigarette busbar based on each of the cigarette busbar images, and to generate the cigarette outline waveform and reference straight line corresponding to each of the cigarette busbar images based on the point cloud data. The cigarette outline waveform is the outline waveform of the projected laser line on the cigarette. The calculation module is used to calculate the first distance from each contour point on the cigarette contour waveform to the reference straight line, and to determine the location of the foaming defect of the cigarette based on the abnormal area corresponding to the abnormal contour point. The abnormal contour point is the contour point whose first distance is greater than a preset distance. The data acquisition module includes: A transmitting unit is used to send a first control command to the line laser, so as to cause the line laser to project a laser line onto the cylindrical surface of the cigarette stick. The acquisition unit is used to continuously acquire the laser line area on the surface of the cigarette cylinder based on the area array camera to obtain the image of the cigarette generatrix; The determination module also includes: The processing unit is used to perform median filtering on each of the point cloud data to obtain the cigarette profile waveform corresponding to each of the cigarette busbar images; The fitting unit is used to perform depth value fitting on each of the point cloud data after median filtering to obtain the reference straight line corresponding to each of the cigarette branch busbar images.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-4.