Automatic operation visual sensor for digital tobacco leaf baking
By using automatic operational visual sensors during the tobacco leaf baking process, using HSV color space and arc-shaped guide rail technology, the baking quality problems caused by human judgment errors are solved, high accuracy and multi-angle detection are achieved, and tobacco leaf baking is improved efficiency and quality.
Patent Information
- Application Number
- CN202411210285.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
AI Technical Summary
During the baking process of existing tobacco leaves, the baking quality is not up to standard due to human judgment errors, and a kind of equipment is needed to reduce human influence and improve the judgment accuracy.
Design an automatic operation vision sensor including LED light bulb, camera, development board and position adjustment device. Convert RGB color space to HSV color space, combine the HSV threshold range to judge the tobacco leaf baking stage, and use arcuate guide rails and assembly blocks to achieve Multi-angle detection.
It improves the accuracy of the identification of the tobacco leaf baking stage, reduces artificial influence, improves baking efficiency and quality, enhances image recognition, and expands the detection range.
Smart Images

Figure CN119104548A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of visual sensors, and in particular relates to an automatic computing visual sensor for digital tobacco leaf baking. Background Art
[0002] According to the national standard tobacco leaf baking "three-stage six-step" process and baking curve setting experience, the whole baking process is set as 10 stages, the fresh tobacco period is defined as the first stage, and the yellowing period, color fixing period and dry period are divided into the front, middle and back stages according to the temperature and curling characteristics. The image samples are divided into 10 categories, namely stage 1 to stage 10.
[0003] The baking condition of tobacco leaves is mostly judged by human observation. Therefore, there is a possibility that the baking of tobacco leaves does not meet the required quality due to human judgment errors. Therefore, in order to ensure the baking quality of tobacco leaves, a device is needed to reduce human influence and improve the accuracy of judgment. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the disadvantages of the above-mentioned prior art and provide an automatic computing visual sensor for digital tobacco leaf baking.
[0005] The technical solution adopted to solve the above technical problems is: an automatic computing visual sensor for digital tobacco leaf baking, comprising a shell, an LED bulb and a camera are installed on the front of the shell, a development board is installed inside the shell, a position adjustment device is installed on the back of the shell, and the development board is provided with a processor, a memory interface, an expansion module, a power module and a debugging interface.
[0006] Furthermore, the position adjustment device includes an assembly block and a mounting plate, the assembly block is installed on the back side of the outer shell, a motor is installed inside the assembly block, the output end of the motor extends to the outside of the bottom end of the assembly block and is installed with a rotating drum, a connecting block is slidably installed on one side of the bottom end of the assembly block, a nut is rotatably installed on the top of the connecting block, an assembly plate is slidably installed on the front side of the mounting plate, a power adapter is installed on the front side of the assembly plate, an arc guide rail covering the front of the power adapter is installed on the front side of the assembly plate, and the rotating drum is slidably connected to the inside of the arc guide rail.
[0007] Furthermore, the nut is arranged at the top of the connection block so as to face the center of the bottom of the rotating drum, and a screw rod matched with the nut is installed at the center of the bottom of the rotating drum.
[0008] Furthermore, an inner side surface of the arc-shaped guide rail and an outer surface of the rotating drum are both provided with rough surfaces.
[0009] Furthermore, a slide groove is provided at the top of the arc-shaped guide rail, and a cylinder slidably connected to the slide groove provided at the top of the arc-shaped guide rail is rotatably installed at the bottom end of the assembly block.
[0010] An automatic computing visual determination method for digital tobacco leaf baking comprises the following steps:
[0011] S1. After burning the Linux image to the TF card, insert the card reader to connect to the PC for network settings and other configurations.
[0012] S2. Connect the development board to the PC via a USB cable, install the corresponding drivers and development tools, write and debug the code; finally, compile the code into a binary file, download the binary file to the development board through the development environment or dedicated tools, and complete the preliminary preparation.
[0013] S3. When tobacco leaves are being baked, images of the entire baking process are collected online in real time, and the HSV parameter values are obtained by converting the RGB color space.
[0014] S4. The tobacco leaf curing stage is determined by setting the HSV threshold range and the HSV parameter value.
[0015] Furthermore, the conversion of the RGB color space in S3 includes the following steps:
[0016] 1) Original image: The image sample set of tobacco leaves in RGB color space is f(x,y)| RGB , where RGB refers to red, green, and blue respectively.
[0017] 2) Get the values of the three channels of the tobacco leaf image: R x,y , G x,y , B x,y .
[0018] 3) Normalization: Convert the R, G, and B values to between 0 and 1:
[0019]
[0020] 4) Calculate the values of H, S, and V, where H, S, and V refer to hue, saturation, and value, respectively:
[0021] V=max(R' xy ,G' xy ,B' xy )
[0022]
[0023]
[0024] 5) Output image: Image converted to HSV color space f(x,y) | HSV .
[0025] Furthermore, the tobacco leaf curing stage described in S4 is specifically as follows:
[0026] When H≥25 and 55≤S<75, it is stage 1.
[0027] When 25≤H<32 and 75≤S<85, it is stage 2.
[0028] When 23≤H<25, it is stage 3.
[0029] When 21≤H<23, it is stage 4.
[0030] When 19≤H<21, it is stage 5.
[0031] When 17≤H<19, it is stage 6.
[0032] When 15≤H<17 and S≥70, it is stage 7.
[0033] When 15≤H<17 and S<70, it is stage 8.
[0034] When 13≤H<15 and S≥50, it is stage 9.
[0035] When 13≤H<15 and S<50, it is stage 10.
[0036] The beneficial effects of the present invention are as follows: (1) The present invention aims at the important significance of distinguishing the stages of tobacco leaf baking in improving baking efficiency and quality, in order to realize automatic identification of tobacco leaf baking stages, reduce human influence, and improve identification accuracy. An image acquisition system composed of an industrial camera and a light source is used to collect tobacco leaf images during the baking process, and image processing technology is used to enhance the effective information of the image, improve the image recognition, convert the tobacco leaf image in the RGB color space into the HSV color space, obtain the HSV three-channel value, and determine the tobacco leaf baking stage by the threshold screening method; (2) The present invention adopts an arc guide rail and cooperates with an assembly block. Through the installation and movement adjustment of the assembly block on the arc guide rail, the visual sensor has a wider detection angle and improves the detection range. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a structural schematic diagram of the present invention;
[0038] Figure 2 It is a structural schematic diagram of the present invention;
[0039] Figure 3 It is a schematic cross-sectional view of the assembly block and the connection block structure of the present invention.
[0040] Figure numerals: 1. housing; 2. LED bulb; 3. camera; 4. arc guide rail; 5. development board; 6. assembly block; 7. mounting plate; 8. motor; 9. rotating drum; 10. connecting block; 11. nut; 12. assembly plate; 13. power adapter. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0042] like Figures 1 to 3 As shown, an automatic computing visual sensor for digital tobacco leaf baking in this embodiment includes a shell 1, an LED bulb 2 and a camera 3 are installed on the front of the shell 1, a development board 5 is installed inside the shell 1, a position adjustment device is installed on the back of the shell 1, and the development board 5 is provided with a processor, a memory interface, an expansion module, a power module and a debugging interface. The processor (CPU) is the core of the development board 5 and is responsible for calculation and control. The memory is RAM (random access memory) and ROM (read-only memory) for storing programs and data. The interface and expansion module are used to connect external devices. The power module provides a stable power supply for the development board 5, and the debugging interface is used for program debugging and downloading.
[0043] like Figure 1 and Figure 3 As shown, the position adjustment device includes an assembly block 6 and a mounting plate 7. The assembly block 6 is mounted on the back of the housing 1. A motor 8 is mounted inside the assembly block 6. The output end of the motor 8 extends to the outside of the bottom end of the assembly block 6 and is mounted with a rotating drum 9. A connecting block 10 is slidably mounted on one side of the bottom end of the assembly block 6. A nut 11 is rotatably mounted on the top of the connecting block 10. An assembly plate 12 is slidably mounted on the front of the mounting plate 7. A power adapter 13 is mounted on the front of the assembly plate 12. An arc guide rail 4 covering the front of the power adapter 13 is mounted on the front of the assembly plate 12. The rotating drum 9 is slidably connected to the inside of the arc guide rail 4.
[0044] like Figure 3 As shown, the nut 11 is arranged at the top of the connecting block 10 and is opposite to the bottom center of the rotating drum 9. A screw rod matched with the nut 11 is installed at the bottom center of the rotating drum 9. When the assembly block 6 is assembled to the arc track, after the rotating drum 9 passes through the arc guide rail 4, the screw rod is aligned with the nut 11, and the nut 11 is rotated to connect the nut 11 with the screw rod, thereby restricting the assembly block 6 on the arc guide rail 4.
[0045] like Figure 1As shown, an inner side surface of the arc-shaped guide rail 4 and the outer surface of the drum 9 are both provided with rough surfaces. After the motor 8 drives the drum 9 to rotate, the friction force generated between the rough surfaces is used to stabilize the position of the assembly block 6.
[0046] like Figure 1 As shown, a slide groove is provided at the top of the arc-shaped guide rail 4, and a cylinder slidably connected to the slide groove provided at the top of the arc-shaped guide rail 4 is installed on the bottom end of the assembly block 6 for fixed axis rotation. When the assembly block 6 moves, the movement of the visual sensor is assisted by the sliding of the cylinder in the slide groove.
[0047] Therefore, when the visual sensor is installed, after the mounting plate 7 is installed on the side wall of the tobacco baking chamber, the nut 11 is first separated from the screw, and then the rotating drum 9 is inserted into the interior of the arc guide rail 4, and the cylinder arranged at the bottom of the assembly block 6 is placed in the slide groove opened on the arc guide rail 4, and then the connecting block 10 is slid upward, and the nut 11 is rotated to connect the screws again to restrict the assembly block 6 on the arc guide rail 4. At the same time, the arc shape of the arc guide rail 4 can be achieved by installing multiple visual sensors and moving the rotating drum 9 to different angle positions under the drive of the motor 8 to achieve multi-angle detection.
[0048] An automatic computing visual determination method for digital tobacco leaf baking comprises the following steps:
[0049] S1. After burning the Linux image to the TF card, insert the card reader to connect the PC for network settings and other configurations. Specifically, to burn the Linux image to the TF card (based on Windows PC), you need to prepare: TF card with a capacity of 8GB or more and a speed of class10 or above, a card reader, a Windows PC, a Linux image file (such as .img) and burning software. Select the Linux image file and TF drive letter for burning according to the requirements of the burning software. After burning, you can reinsert the TF card into the card reader to connect the PC for network settings and other configurations.
[0050] S2. Connect the development board to the PC via a USB cable, install the corresponding drivers and development tools, write and debug the code; finally, compile the code into a binary file, download the binary file to the development board through the development environment or special tools, and complete the preparation;
[0051] S3. When tobacco leaves are being baked, the whole baking process images are collected online in real time, and the HSV parameter values are obtained by converting the RGB color space. Specifically, in order to effectively collect images of the whole baking process, an intelligent computing visual sensor is installed 30 cm away from the tobacco leaves, and the camera angle and height are adjusted, and the light source is adjusted. The tobacco leaf images during the baking process are collected online in real time every 10 minutes. The sample type of the collected image data is *.jpg, and the image pixel is 1500×2350. During the baking process, tobacco leaves will generate noise due to force majeure factors such as background and lighting. The color and shape differences of tobacco leaves during the baking process will cause changes in image quality, so it is necessary to process the collected images and perform the following steps:
[0052] (1) Removal of useless information (background)
[0053] Background removal of tobacco leaf images can effectively reduce image noise interference and improve image recognition. Here, the color segmentation method is used to extract the tobacco leaf area. First, the histogram of the image is equalized; second, the image is converted to the HSV color space; finally, an appropriate HSV threshold range is set. The above steps can effectively segment the tobacco leaf area.
[0054] (2) Image enhancement
[0055] Image enhancement technology can improve the quality and detail clarity of tobacco leaf images, ensuring that the processed images are more suitable for further analysis and application. Image data enhancement methods include but are not limited to mirroring, translation, rotation, scaling, contrast adjustment, etc. Horizontal mirroring and adaptive histogram equalization are used here.
[0056] S4. Combine the HSV threshold range and the HSV parameter value to determine the tobacco leaf curing stage. Specifically, HSV is a color space created based on the intuitive characteristics of color. It describes color as hue, saturation, and brightness. Compared with the RGB color space, the HSV color space is more in line with human perception of color. The HSV parameter value can be obtained by converting the parameters of the RGB color space.
[0057] The conversion of RGB color space in S3 includes the following steps:
[0058] 1) Original image: The image sample set of tobacco leaves in RGB color space is f(x,y)| RGB , where RGB refers to red, green, and blue respectively;
[0059] 2) Get the values of the three channels of the tobacco leaf image: R x,y , G x,y , B x,y ;
[0060] 3) Normalization: Convert the R, G, and B values to between 0 and 1:
[0061]
[0062] 4) Calculate the values of H, S, and V:
[0063] V=max(R' xy ,G' xy ,B' xy )
[0064]
[0065]
[0066] 5) Output image: Image converted to HSV color space f(x,y) | HSV .
[0067] Then, according to the hue (H) and saturation (S) values of the HSV image, 10 categories were decomposed through the threshold screening method, corresponding to the images of 10 stages. The tobacco leaf curing stages in S4 are as follows:
[0068] When H≥25 and 55≤S<75, it is stage 1;
[0069] When 25≤H<32 and 75≤S<85, it is stage 2;
[0070] When 23≤H<25, it is stage 3;
[0071] When 21≤H<23, it is stage 4;
[0072] When 19≤H<21, it is stage 5;
[0073] When 17≤H<19, it is stage 6;
[0074] When 15≤H<17 and S≥70, it is stage 7;
[0075] When 15≤H<17 and S<70, it is stage 8;
[0076] When 13≤H<15 and S≥50, it is stage 9;
[0077] When 13≤H<15 and S<50, it is stage 10.
[0078] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.
Claims
1. An automatic computing visual sensor for digital tobacco leaf baking, comprising a housing (1), characterized in that: An LED bulb (2) and a camera (3) are installed on the front of the housing (1), a development board (5) is installed inside the housing (1), a position adjustment device is installed on the back of the housing (1), and the development board (5) is provided with a processor, a memory interface, an expansion module, a power module, and a debugging interface.
2. The automatic computing visual sensor for digital tobacco leaf baking according to claim 1, characterized in that: The position adjustment device comprises an assembly block (6) and a mounting plate (7); the assembly block (6) is mounted on the back of the housing (1); a motor (8) is mounted inside the assembly block (6); the output end of the motor (8) extends to the outside of the bottom end of the assembly block (6) and is mounted with a rotating drum (9); a connecting block (10) is slidably mounted on one side of the bottom end of the assembly block (6); a nut (11) is rotatably mounted on the top of the connecting block (10); an assembly plate (12) is slidably mounted on the front of the mounting plate (7); a power adapter (13) is mounted on the front of the assembly plate (12); an arc-shaped guide rail (4) covering the front of the power adapter (13); and the rotating drum (9) is slidably connected to the inside of the arc-shaped guide rail (4).
3. The automatic computing visual sensor for digital tobacco leaf baking according to claim 2, characterized in that: The nut (11) is arranged at the top of the connection block (10) facing the bottom center of the rotating drum (9), and a screw rod matching the nut (11) is installed at the bottom center of the rotating drum (9).
4. The automatic computing visual sensor for digital tobacco leaf baking according to claim 2, characterized in that: An inner side surface of the arc-shaped guide rail (4) and an outer surface of the rotating drum (9) are both provided with rough surfaces.
5. The automatic computing visual sensor for digital tobacco leaf baking according to claim 2, characterized in that: A slide groove is provided at the top of the arc-shaped guide rail (4), and a cylinder is rotatably mounted on the bottom end of the assembly block (6) and is slidably connected to the slide groove provided at the top of the arc-shaped guide rail (4).
6. An automatic computing visual determination method for digital tobacco leaf baking, comprising the following steps: S1. After burning the Linux image to the TF card, insert the card reader to connect to the PC for network settings and other configurations; S2. Connect the development board to the PC via a USB cable, install the corresponding drivers and development tools, and write and debug the code; Finally, compile the code into a binary file and download the binary file to the development board through the development environment or dedicated tools to complete the preparation. S3. When tobacco leaves are being baked, the whole baking process images are collected online in real time, and the HSV parameter values are obtained by converting the RGB color space; S4. The tobacco leaf curing stage is determined by setting the HSV threshold range and the HSV parameter value.
7. The automatic computing visual determination method for digital tobacco leaf baking according to claim 6, characterized in that: The conversion of the RGB color space described in S3 includes the following steps: 1) Original image: The image sample set of tobacco leaves in RGB color space is f(x,y)| RGB , where RGB refers to red, green, and blue respectively; 2) Get the values of the three channels of the tobacco leaf image: R x,y , G x,y , B x,y ; 3) Normalization: Convert the R, G, and B values to between 0 and 1: 4) Calculate the values of H, S, and V, where H, S, and V refer to hue, saturation, and value, respectively: V=max(R' xy ,G' xy ,B' xy ) 5) Output image: Image converted to HSV color space f(x,y) | HSV .
8. The automatic computing visual determination method for digital tobacco leaf baking according to claim 6, characterized in that: The tobacco leaf curing stages described in S4 are specifically: When H≥25 and 55≤S<75, it is stage 1; When 25≤H<32 and 75≤S<85, it is stage 2; When 23≤H<25, it is stage 3; When 21≤H<23, it is stage 4; When 19≤H<21, it is stage 5; When 17≤H<19, it is stage 6; When 15≤H<17 and S≥70, it is stage 7; When 15≤H<17 and S<70, it is stage 8; When 13≤H<15 and S≥50, it is stage 9; When 13≤H<15 and S<50, it is stage 10.
