Cigarette equipment code reading camera parameter adaptive optimization method and device
By using dual-channel cameras and deep learning models on the cigarette production line, the exposure and gain parameters of the cigarette device code reading camera are adaptively optimized, and the difficulty in parameter adjustment caused by lighting changes and material differences is solved, and efficient QR code recognition and imaging quality improvement is achieved.
Patent Information
- Application Number
- CN202510285610.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-17
AI Technical Summary
Changes in on-site lighting conditions of cigarette production lines, differences in cigarette box strip materials and surface reflective characteristics make it difficult to adjust the parameters of cigarette equipment code reading cameras, affecting imaging quality and identification accuracy.
A dual-channel camera is used to collect the QR code image data of the cigarette box strip. By setting the camera parameters of the reference system and the perturbation system, the QR code pictures are collected, feature matching and training data set construction is carried out, and the optimal camera parameters are predicted using deep learning models.
It realizes the automatic generation of relatively optimal camera parameter combinations in complex lighting environments, improves the imaging quality and recognition accuracy of the code reading camera of cigarette equipment, and adapts to different packaging materials and lighting conditions.
Smart Images

Figure CN120163172A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cigarette manufacturing, and particularly to a method and device for adaptively optimizing the parameters of a barcode reading camera of a cigarette device. Background Art
[0002] In recent years, due to the advantage that the two-dimensional code technology can quickly transfer information from the physical world to digital devices, it has been widely used in various industries. In the tobacco manufacturing industry, quality traceability, as an important means to ensure quality and safety, can achieve rapid positioning of cigarette quality problems and full-process tracking of production logistics, thereby promoting the improvement of production efficiency. By applying the two-dimensional code technology to various links such as cigarette production, packaging, and transportation, the refined management level of cigarette products can be effectively improved. In this process, the barcode reading camera of the cigarette device plays a crucial role, because the imaging quality of the camera directly affects the accuracy of subsequent identification of the two-dimensional code on the cigarette carton strip, and further affects the stability of the production and assembly processes. Therefore, obtaining high-quality two-dimensional code pictures has become a difficult problem currently faced.
[0003] For the barcode reading camera of the cigarette device, optimizing the camera exposure and gain parameters is an effective means to improve the imaging quality. Existing automatic exposure and gain technologies usually rely on the perception of global scene light or specific local light brightness, and adjust the camera parameters by using image statistics methods. However, these automatic exposure technologies based on image statistics methods have limited effects in rapidly changing dynamic scenes, are prone to exposure lag, and at the same time, traditional automatic exposure algorithms may not be able to effectively balance the bright and dark parts under extreme lighting conditions, ultimately resulting in loss of details. Summary of the Invention
[0004] In view of the above, the present invention aims to provide a method and device for adaptively optimizing the parameters of a barcode reading camera of a cigarette device to solve the problem of difficult adjustment of the barcode reading camera parameters caused by changes in the on-site lighting conditions of the cigarette production line, differences in the materials of cigarette carton strips, and surface reflection characteristics.
[0005] The technical solution adopted by the present invention is as follows:
[0006] In the first aspect, the present invention provides a method for adaptively optimizing the parameters of a barcode reading camera of a cigarette device, which includes:
[0007] Setting the parameters of the barcode reading camera of the cigarette device for the reference system and the perturbation system respectively;
[0008] Based on the set camera parameters of the reference system and the perturbation system, collecting two-dimensional code pictures of cigarette carton strips to obtain a reference system picture and a perturbation system picture;
[0009] Performing feature matching on the reference system picture and the perturbation system picture to determine the best matching result;
[0010] Construct a training data set according to the best matching result;
[0011] Use the training data set to train a pre-constructed deep learning-based cigarette equipment code-reading camera parameter estimation model, so that the cigarette equipment code-reading camera parameter estimation model predicts camera parameters in the cigarette production line environment.
[0012] In at least one possible implementation, the cigarette equipment code-reading camera parameters of the set reference system and perturbation system respectively include: setting the camera initialization parameters as the reference system, and the camera of the perturbation system performs multiple groups of random perturbations based on the initialization parameters of the reference system camera to generate several groups of different parameter settings.
[0013] In at least one possible implementation, the random perturbation includes:
[0014] Set the perturbation initial value according to the initialization parameters of the reference system camera;
[0015] Set the standard deviation according to a fixed ratio, and combine the use of the Gaussian distribution to perform random perturbations on the initialization parameters to generate multiple groups of camera parameter groups adjusted by perturbations, where at least the camera parameter groups include: exposure parameters and gain parameters.
[0016] In at least one possible implementation, the constructing a training data set according to the best matching result includes: using the parameters of the corresponding cigarette equipment code-reading camera in the best matching result as the true label, and constructing perturbation samples and reference samples with the reference system pictures and perturbation system pictures; aggregating the perturbation samples and reference samples together into a data set.
[0017] In at least one possible implementation, the feature matching includes:
[0018] Detect the two-dimensional code regions of the reference system pictures and perturbation system pictures respectively to determine the two-dimensional code regions in the pictures;
[0019] Obtain the feature descriptors of the two-dimensional code regions in the reference system pictures and perturbation system pictures;
[0020] According to the feature descriptors, find the similar feature pairs between the reference system pictures and the perturbation system pictures;
[0021] Calculate the average distance of all similar feature pairs in the reference system pictures and the perturbation system pictures, and use the average distance to measure the overall matching degree between the reference system pictures and the perturbation system pictures.
[0022] In at least one possible implementation manner, the training process of the cigarette equipment code-reading camera parameter estimation model includes: inputting training data into the model, and obtaining a feature map with complete picture information and key information of the two-dimensional code area through a multi-branch interaction manner; after processing the feature map through a multi-layer perceptron, outputting a prediction result of the camera parameters.
[0023] In at least one possible implementation manner, the processing process of the cigarette equipment code-reading camera parameter estimation model specifically includes:
[0024] Multi-scale feature extraction: Extracting multi-level feature maps of the input image through a convolutional neural network, and obtaining three groups of feature representations with different semantic levels of high, medium, and low;
[0025] Feature scale normalization: Taking the middle level as the standard, aligning the multi-level feature maps through downsampling and upsampling operations;
[0026] Cross-level attention fusion: Using the middle-level feature as the query benchmark, integrating the high-level and low-level features to form key-value pairs, and performing feature weighted fusion through a cross-attention mechanism;
[0027] Prediction decision generation: Inputting the fused features into a non-linear transformation module, implementing feature space mapping through a multi-layer perceptron, and outputting the final prediction result of the preset camera parameters.
[0028] In a second aspect, the present invention provides a cigarette equipment code-reading camera parameter adaptive optimization device, which includes:
[0029] A parameter setting module for setting the cigarette equipment code-reading camera parameters of the reference system and the perturbation system respectively;
[0030] A two-way picture acquisition module for acquiring cigarette box strip two-dimensional code pictures based on the set camera parameters of the reference system and the perturbation system, and obtaining a reference system picture and a perturbation system picture;
[0031] A picture matching module for performing feature matching on the reference system picture and the perturbation system picture to determine the best matching result;
[0032] A data set construction module for constructing a training data set according to the best matching result;
[0033] A model training module for training a pre-constructed cigarette equipment code-reading camera parameter estimation model based on deep learning by using the training data set, so that the cigarette equipment code-reading camera parameter estimation model predicts the camera parameters in the cigarette production line environment.
[0034] Compared with the prior art, the present invention conducts a targeted analysis of the task of identifying the two-dimensional code on the cigarette case in a specific scenario, and believes that the key lies in how to accurately obtain the two-dimensional code area in the image captured by the camera. Based on this analysis, the present invention proposes to adaptively optimize and adjust the exposure and gain parameters of the camera in a feature evaluation mode according to the specific area position of the two-dimensional code in the camera's field of view, forming an iterative feedback mechanism between the imaging quality and the camera parameters, and then designing an adaptive optimization scheme based on the supervision of the optimal label (exposure and gain parameters) to adjust the parameters of the code-reading camera of the cigarette equipment, so as to further improve the imaging quality of the camera.
[0035] The main design concept of the present invention is to propose using a dual-channel camera to collect image data of the two-dimensional code on the cigarette case strip for specific scenario problems such as the complex light environment and the material characteristics of the two-dimensional code in the cigarette production site. One channel is the reference system, which uses global automatic exposure and generates an initial and relatively optimal camera parameter setting; the other channel is the perturbation system, which performs multiple groups of random perturbations based on the initialization parameters of the reference system and generates a series of different parameter settings; matches the image frames collected by the reference system and the perturbation system, calculates the matching degree of the two-dimensional code area features in the picture, and determines the best matching result from them; uses the camera parameters corresponding to the best matching result as the true label for model training; and then uses the true label as the supervision constraint of the code-reading camera parameter estimation model of the cigarette equipment and conducts training, so that the model can obtain the ability to automatically generate a relatively optimal camera parameter combination in the complex lighting environment of the workshop site. The present invention combines multiple parameter configurations of the reference system and the perturbation system to assist the deep learning model in training and prediction, and realizes the optimization of the code-reading camera parameters of the cigarette equipment in a specific scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described below in conjunction with the drawings, where:
[0037] Figure 1 It is a schematic diagram of the method for adaptively optimizing the parameters of the code-reading camera of the cigarette equipment provided by the embodiment of the present invention;
[0038] Figure 2 It is a schematic diagram of the system architecture for adaptively optimizing the parameters of the code-reading camera of the cigarette equipment provided by the embodiment of the present invention;
[0039] Figure 3 It is a schematic diagram of the device for adaptively optimizing the parameters of the code-reading camera of the cigarette equipment provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as limiting the present invention.
[0041] An embodiment of a method for adaptively optimizing the parameters of a code-reading camera of a cigarette-making device is proposed by the present invention. Specifically, as Figure 1 shown, it includes:
[0042] Step S1: Set the parameters of the code-reading camera of the cigarette-making device for the reference system and the perturbation system respectively.
[0043] Before collecting the two-dimensional code image data of the cigarette carton and strip using the dual cameras in this embodiment, the main idea of setting the parameters of the dual cameras is as follows: Set the initialization parameters of the camera as the reference system, and the camera as the perturbation system performs multiple groups of random perturbations based on the initialization parameters of the reference system camera to generate several groups of different parameter settings to adapt to the light changes in the complex environment of the cigarette production line and the reflective characteristics of the cigarette carton and strip surface.
[0044] Specifically, for the reference system camera, global automatic exposure is adopted to generate an initial and relatively optimal parameter setting of the code-reading camera of the cigarette-making device, and the exposure and gain parameters are respectively denoted as and .
[0045] For the perturbation system, the initial value of the perturbation is set according to the exposure and gain values of the reference system camera, and the initial parameters are randomly perturbed using the Gaussian distribution. For the exposure parameter, the generated perturbation value is , and the formula is as follows:
[0046]
[0047] where, is the standard deviation of the perturbation, which is set to 10% of the initial exposure value.
[0048] For the gain parameter, the generated perturbation value is , and the formula is as follows:
[0049]
[0050] where, is the standard deviation of the perturbation, which is set to 5% of the initial gain value.
[0051] By performing four random samplings on the exposure and gain parameters respectively, four different parameter combinations are obtained, denoted as: .
[0052] Step S2: Based on the camera parameters of the set reference system and perturbation system, collect the cigarette carton strip QR code pictures to obtain the reference system pictures and perturbation system pictures.
[0053] Combined with the four groups of parameter combinations in the above example, use the camera parameters to trigger two cameras to collect the corresponding QR code picture data respectively. After that, these picture data can be grouped into the perturbation system and the reference system, that is, four groups of picture pairs are formed.
[0054] Step S3: Perform feature matching on the reference system pictures and the perturbation system pictures to determine the best matching result.
[0055] The following details the feature matching method, which specifically includes:
[0056] Step 31: Detect the QR code area of the cigarette carton strip pictures obtained from the reference system and the perturbation system.
[0057] Specifically, first construct the integral image of the picture. For any point in the picture, the value of the integral image is the sum of all pixel values in the area above and to the left of this point. Through the integral image, calculate the pixel sum of each rectangular area, and then according to the brightness difference of different areas, obtain the eigenvalue. To ensure the effective detection of feature areas of different sizes and positions, set a sliding window in the picture and apply multi-scale feature extraction. Calculate the eigenvalue within windows of different positions and sizes, and gradually screen out non-QR code areas through a cascade classifier, only retaining the areas that may contain QR codes.
[0058]
[0059] Among them, represents the threshold of the classifier, represents passing the detection, represents failing the detection.
[0060] Step 32: Obtain the feature descriptors of the QR code areas of the cigarette carton strips in the reference system and the perturbation system.
[0061] First, use the ORB algorithm to obtain the feature points in the reference system and perturbation system pictures. Subsequently, calculate the binary features by sampling the pixels around the feature points to generate a feature vector, as shown in the following formula:
[0062]
[0063] Among them, represents the pixel The grayscale value of can be obtained by multiple sampling and comparison to obtain a fixed-length binary descriptor.
[0064] Step 33, find similar feature pairs between the reference frame and the perturbation frame images through a brute force matching method.
[0065] Specifically, the distances between descriptors are compared one by one through brute force matching to find the nearest neighbor match for each feature point, as shown in the following formula:
[0066]
[0067] in, and There are two descriptors, is the length of the descriptor, and Indicates the descriptor The value of the bit, Represents the distance between two descriptors.
[0068] Step 34, using the average matching distance to calculate the average distance of all matching pairs in the two images to measure the overall matching degree of the two images, the calculation formula is as follows:
[0069]
[0070] in, is the number of matching pairs, and They are Descriptors for matching points.
[0071] According to the matching values of different image pairs obtained by calculation, the best match is found, and the parameter values of the cigarette equipment code reading camera corresponding to the reference system and the disturbance system in the best matching pair are recorded.
[0072] Step S4, constructing a training data set according to the best matching result.
[0073] Specifically, the parameters of the cigarette equipment code-reading camera corresponding to the reference system and the perturbation system in the best matching result are extracted as the true labels, and constructed into perturbation samples and reference samples together with the pictures taken by the reference system and the perturbation system cameras. These are then aggregated into the final training data set. In the subsequent model training process, the above-mentioned true labels are used for supervision and constraint to ensure that the model can predict the optimal camera parameters in real time under the cigarette production line environment, so that the code-reading camera can accurately read the QR code information on the cigarette box strips under different packaging materials, lighting conditions and moving speeds.
[0074] Step S5: Use the training dataset to train a pre-constructed deep learning-based cigarette equipment code-reading camera parameter estimation model, so that the cigarette equipment code-reading camera parameter estimation model predicts camera parameters in the cigarette production line environment.
[0075] In actual operation, the training data can be input into the model. Through the multi-branch interaction method, feature maps with complete picture information and regional key information are obtained; the feature maps are processed by a multi-layer perceptron, and the prediction results of camera parameters (such as the exposure and gain parameter values mentioned in the previous example) are output. In this way, the adaptive ability of the model to the actual environment is optimized, ensuring that the model can predict the best camera parameters in real time in the cigarette production line environment, enabling the code-reading camera to accurately read the two-dimensional code information on cigarette cartons under different packaging materials, lighting conditions, and moving speeds.
[0076] This will be further combined with Figure 2 the model example in the schematic cigarette equipment code-reading camera parameter adaptive optimization system architecture to introduce the model processing process:
[0077] Input the training pictures into the ResNet50 network, extract three feature maps with output sizes of 28×28, 14×14, and 7×7, and input these three feature maps into three different branches respectively. Input the low-level semantic feature map of 28×28 into Branch 1 (the first branch in this model), the middle-level semantic feature map of 14×14 into Branch 2 (the second branch in this model), and the high-level semantic feature map of 7×7 into Branch 3 (the third branch in this model).
[0078] To facilitate subsequent feature interaction, downsampling and upsampling operations are performed on the low-level semantic feature map and the high-level semantic feature map respectively to match the size of the middle-level semantic feature map.
[0079] The feature maps obtained from different branches are interacted through the attention mechanism, where the feature map corresponding to Branch 2 is used as the query, and the feature maps corresponding to Branch 1 and Branch 3 are used as the key and
[0080]
[0081]
[0082] where the key and the query are the feature information obtained after the attention mechanism, softmax is the activation function, C is the dimension of the feature map.
[0083] Specifically, the operation of the attention mechanism on Branch 2 and Branch 3 can enhance the semantic understanding ability of the intermediate layer features, endowing them with global semantic information. The operation of the attention mechanism on Branch 2 and Branch 1 can highlight and retain the fine-grained information of the low-level features, while enhancing the intermediate layer features' perception ability of local structures and textures. This interaction mode enables the intermediate layer semantic features to effectively fuse low-level and high-level semantic features, thereby capturing complementary information at different levels.
[0084]
[0085] After that, the fused feature map F that aggregates information at different levels of the input image passes through a multi-layer perceptron to obtain the prediction result of the model regarding the parameters of the barcode reading camera of the cigarette equipment. and . After being fully trained on the dataset mentioned above, the model can automatically generate the optimal camera parameter combination under different lighting environments. In practical applications, it can adapt to complex environmental changes without manual intervention, greatly improving the automation level and efficiency of the cigarette production line, thus meeting the requirements of high-speed production lines for real-time performance and reliability.
[0086] In summary, the main design concept of the present invention is to use a dual-channel camera to collect image data of cigarette box and strip two-dimensional codes. One channel is the reference system, which uses global automatic exposure and generates an initial and relatively optimal camera parameter setting. The other channel is the perturbation system, which performs multiple groups of random perturbations based on the initialization parameters of the reference system and generates a series of different parameter settings. The image frames collected by the reference system and the perturbation system are matched, and the matching degree of the two-dimensional code area features in the pictures is calculated to determine the best matching result. The camera parameters corresponding to the best matching result are used as the true labels for model training. Furthermore, using the true labels as the supervision constraints for the parameter estimation model of the cigarette equipment barcode reading camera to carry out training, enabling the model to obtain the ability to automatically generate a relatively optimal camera parameter combination under the complex lighting environment on the workshop floor. By combining multiple parameter configurations of the reference system and the perturbation system to assist the deep learning model in training and prediction, the present invention realizes the optimization of the parameters of the cigarette equipment barcode reading camera for specific scenarios.
[0087] Finally, in combination with the above-mentioned various embodiments, the present invention also provides an embodiment of an adaptive optimization device for the parameters of a cigarette equipment barcode reading camera, as Figure 3 shown. Specifically, the device may include:
[0088] A parameter setting module 301, configured to set the parameters of the cigarette equipment barcode reading camera for the reference system and the perturbation system respectively;
[0089] The two-channel image acquisition module 302 is used to acquire the cigarette carton strip two-dimensional code images based on the camera parameters of the set reference system and disturbance system, and obtain the reference system image and the disturbance system image;
[0090] The image matching module 303 is used to perform feature matching on the reference system image and the disturbance system image to determine the best matching result;
[0091] The dataset construction module 304 is used to construct a training dataset according to the best matching result;
[0092] The model training module 305 is used to train the pre-constructed deep learning-based cigarette equipment code reading camera parameter estimation model by using the training dataset, so that the cigarette equipment code reading camera parameter estimation model predicts the camera parameters in the cigarette production line environment.
[0093] It should be understood that the division of each component in the above Figure 3 shown cigarette equipment code reading camera parameter adaptive optimization device is only a logical function division. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these components can all be implemented in the form of software called by a processing element; it is also possible that some components are implemented in the form of software called by a processing element, and some components are implemented in the form of hardware. For example, a certain above-mentioned module can be a separately established processing element, or can be integrated in a certain chip of an electronic device. The implementation of other components is similar. In addition, these components can be fully or partially integrated together, or can be independently implemented. In the implementation process, each step of the above method or each of the above components can be completed by the integrated logic circuit in the processor element or the instruction in the form of software.
[0094] For example, the above components can be one or more integrated circuits configured to implement the above method, such as: one or more application specific integrated circuits (ASIC for short), or, one or more digital signal processors (DSP for short), or, one or more field programmable gate arrays (FPGA for short), etc. Again, these components can be integrated together and implemented in the form of a system-on-a-chip (SOC for short).
[0095] In the embodiments of the present invention, if there are any expressions referring to directions, they are relative concepts based on the embodiments. In addition, "at least one" means one or more, and "a plurality of" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent the situations where A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. The character " / " generally indicates an "or" relationship between the associated objects before and after. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0096] The structure, features, and effects of the present invention have been described in detail based on the embodiments shown in the drawings above. However, the above are only the preferred embodiments of the present invention. It should be noted that for the technical features involved in the above embodiments and their preferred modes, those skilled in the art can reasonably combine and match them into various equivalent solutions without departing from or changing the design concept and technical effects of the present invention. Therefore, the scope of the present invention is not limited by the drawings shown. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified into equivalent changes, should still be within the protection scope of the present invention as long as they do not exceed the spirit covered by the description and the drawings.
Claims
1. A method for adaptively optimizing parameters of a barcode reading camera for cigarette equipment, characterized in that: include: Set the cigarette equipment code reading camera parameters for the reference system and the disturbance system respectively; Based on the set reference frame and disturbance frame camera parameters, collect the cigarette box bar QR code image to obtain the reference frame image and the disturbance frame image; Perform feature matching on the reference system image and the perturbation system image to determine the best matching result; Construct a training data set based on the best matching results; The training data set is used to train a pre-constructed deep learning-based cigarette equipment code reading camera parameter estimation model, so that the cigarette equipment code reading camera parameter estimation model can predict camera parameters in a cigarette production line environment.
2. The method for adaptively optimizing parameters of a barcode reading camera for cigarette equipment according to claim 1, characterized in that: The setting of the cigarette equipment code reading camera parameters of the reference system and the perturbation system includes: setting the initialization parameters of the camera as the reference system, performing multiple groups of random perturbations on the camera as the perturbation system based on the initialization parameters of the reference system camera, and generating several groups of different parameter settings.
3. The method for adaptively optimizing parameters of a barcode reading camera for cigarette equipment according to claim 2, characterized in that: The random disturbance includes: Set the initial value of the perturbation according to the initialization parameters of the reference frame camera; The standard deviation is set according to a predetermined ratio, and the initialization parameters are randomly perturbed using Gaussian distribution to generate a plurality of camera parameter groups after perturbation adjustment, wherein the camera parameter groups at least include: exposure parameters and gain parameters.
4. The method for adaptively optimizing parameters of a barcode reading camera for cigarette equipment according to claim 1, characterized in that: The method of constructing a training data set based on the best matching result includes: taking the parameters of the cigarette equipment code reading camera corresponding to the best matching result as the real label, and constructing them into perturbation samples and reference samples together with the reference system images and the perturbation system images; and aggregating the perturbation samples and the reference samples into a data set.
5. The method for adaptively optimizing parameters of a barcode reading camera for cigarette equipment according to claim 1, characterized in that: The feature matching includes: Perform QR code area detection on the reference system image and the perturbation system image respectively to determine the QR code area in the image; Obtain feature descriptors of the QR code regions in the reference frame image and the perturbation frame image; According to the feature descriptors, searching for similar feature pairs between the reference system image and the perturbation system image; The mean distance between all similar feature pairs in the reference frame image and the perturbation frame image is calculated, and the overall matching degree between the reference frame image and the perturbation frame image is measured by the mean distance.
6. The method for adaptively optimizing parameters of a barcode reading camera for cigarette equipment according to any one of claims 1 to 5, characterized in that: The training process of the cigarette equipment code reading camera parameter estimation model includes: inputting training data into the model, obtaining a feature map with complete image information and key information of the two-dimensional code area through a multi-branch interaction method; processing the feature map through a multi-layer perceptron, and outputting the prediction results of the camera parameters.
7. The method for adaptively optimizing parameters of a barcode reading camera for cigarette equipment according to claim 6, characterized in that: The processing process of the cigarette equipment code reading camera parameter estimation model specifically includes: Multi-scale feature extraction: extract multi-level feature maps of the input image through convolutional neural networks to obtain three sets of feature representations with high, medium and low semantic levels; Feature scale normalization: Based on the middle level, align the multi-level feature maps through downsampling and upsampling operations; Cross-level attention fusion: Use the middle-level features as the query benchmark, integrate the high-level and low-level features to form key-value pairs, and perform weighted fusion of features through the cross-attention mechanism; Prediction decision generation: The fused features are input into the nonlinear transformation module, feature space mapping is achieved through the multi-layer perceptron, and the final prediction results of the preset camera parameters are output.
8. A device for adaptively optimizing parameters of a barcode reading camera for cigarette equipment, characterized in that: include: A parameter setting module, used to set the parameters of the cigarette equipment code reading camera of the reference system and the disturbance system respectively; The two-channel image acquisition module is used to acquire the QR code image of the cigarette box based on the set reference system and disturbance system camera parameters to obtain the reference system image and the disturbance system image; The image matching module is used to perform feature matching on the reference system image and the perturbation system image to determine the best matching result; A data set construction module is used to construct a training data set according to the best matching result; The model training module is used to train a pre-built deep learning-based cigarette equipment code reading camera parameter estimation model using the training data set, so that the cigarette equipment code reading camera parameter estimation model can predict camera parameters in a cigarette production line environment.