Roll mode code scanning equipment and code scanning roll film control method

By using a high-transparency film in front of the scanning device's lens and combining it with a detection device to automatically replace contaminated areas, the problem of insufficient recognition accuracy and real-time performance of the scanning device in harsh industrial environments is solved, achieving a highly efficient self-cleaning function and reducing maintenance costs.

CN121536760APending Publication Date: 2026-02-17QINHUANGDAO XINZHI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610019773.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing barcode scanning devices are prone to lens contamination in harsh industrial environments, resulting in insufficient recognition accuracy and real-time performance, high maintenance costs, and an inability to adapt to the complex contamination conditions in wheel manufacturing sites.

Method used

The roll-to-roll barcode scanner uses a high-transparency film to protect the front of the camera lens and a detection device to monitor contamination in real time. The drive motor automatically replaces the high-transparency film in the contaminated area, achieving a self-cleaning function.

Benefits of technology

It achieves stability and real-time performance in barcode scanning and recognition under harsh environments, reduces maintenance costs, and ensures production continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121536760A_ABST
    Figure CN121536760A_ABST
Patent Text Reader

Abstract

The invention discloses roll mode code scanning equipment and a code scanning roll film control method, and relates to the field of image processing. The roll mode code scanning equipment comprises a frame body, a camera, a reel, a driving motor, a supporting shaft, a driven shaft and a detection device, a camera used for acquiring a hub image is fixedly arranged on the frame body; a high-transmittance film is protected in front of a lens of the camera; the frame body is provided with a reel for winding and connecting a high-permeability membrane; the driving motor is in transmission connection with the reel and is used for winding the stained high-permeability membrane; a support shaft for mounting a whole roll of high-permeability membrane is arranged on the frame body; an adjustable damper is arranged on the supporting shaft and is used for adjusting the rotating resistance of the supporting shaft; the driven shafts are arranged on the two sides of the camera, and the driven shafts are in rolling connection with a high-transmittance film; the detection device is in communication connection with the driving motor and the camera. The embodiment of the invention can adapt to the actual requirements of severe industrial scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more particularly to a roll-up scanning device and a method for controlling the scanning roll-up film. Background Technology

[0002] In the aluminum alloy wheel manufacturing industry, product lifecycle quality traceability is the core of production compliance and market reputation. This requires relying on QR codes etched into concealed locations on the wheel hubs to achieve end-to-end data collection. The scanning equipment, as the core device, typically integrates a light source, high-resolution sensors, and decoding algorithms to obtain product information by recognizing the QR codes. While some existing equipment is equipped with fixed transparent protective lenses or idle cover devices to reduce the impact of dust and minor wear on the lenses, significant limitations remain in the complex and polluted conditions of wheel manufacturing sites. Aluminum shavings from machining, and oil mist from cutting fluid and lubricants easily adhere to or scratch the lenses, leading to decreased contrast and blurred edges in the QR code image. Ambient lighting in the workshop and reflections from the wheel hub's metal surface further interfere with recognition, resulting in insufficient real-time data acquisition and accuracy in the MES system. In some cases, high miss rates can even disrupt production cycles or break the traceability chain.

[0003] In existing technologies, static protection methods for lenses have limited ability to resist contamination. After the lens becomes contaminated, the machine needs to be stopped for manual cleaning. A single machine needs to be cleaned 2-4 times a day, resulting in high maintenance costs and affecting production continuity. Conventional protective materials such as glass cannot balance protection and light transmission. The recognition stability is highly dependent on the cleanliness of the environment and cannot meet the actual needs of harsh industrial scenarios. Summary of the Invention

[0004] This invention provides a roll-to-roll barcode scanning device and a barcode roll film control method, which can be adapted to the actual needs of harsh industrial scenarios.

[0005] According to one aspect of the present invention, a roll-to-roll barcode scanning device is provided, comprising: a frame, a camera, a roll, a drive motor, a support shaft, a driven shaft, and a detection device;

[0006] A camera for acquiring wheel hub images is fixedly mounted on the frame;

[0007] The camera lens is protected with a high-transparency film;

[0008] The frame is equipped with a roller for winding and connecting the high-transparency membrane;

[0009] The drive motor is connected to the reel and is used to wind up the soiled high-permeability film;

[0010] The frame is equipped with a support shaft for mounting a whole roll of high-transparency film;

[0011] An adjustable damper is provided on the support shaft to adjust the rotational resistance of the support shaft.

[0012] The camera is provided with driven shafts on both sides, and the driven shafts are tactilely connected to the high-transparency film.

[0013] The detection device is communicatively connected to the drive motor and the camera, respectively, and is used to control the drive motor to drive the roll according to the image acquired by the camera, so as to update and replace the high-transparency film wound on the roll.

[0014] According to another aspect of the present invention, a method for controlling the scanning roll film is provided, applied to the detection device in a roll-pattern scanning device as described in any embodiment of the present invention, the method comprising:

[0015] Acquire the initial image of the high-transparency film in front of the camera lens;

[0016] The drive motor is controlled to drive the reel according to the initial image, so as to update and replace the high-transparency film wound on the reel.

[0017] The technical solution of this invention provides a high-transparency protective film in front of the camera lens. By detecting contamination of the high-transparency film in front of the lens based on the image captured by the camera, the film winding mechanism can be automatically driven to replace the contaminated area. This enables real-time self-cleaning of contamination and precise, on-demand replacement of the protective medium. The scanning coded image can be stably and efficiently identified, reducing maintenance costs and ensuring production continuity.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a front view of a roll-mode barcode scanning device provided according to an embodiment of the present invention;

[0021] Figure 2 This is a rear view of a roll-mode barcode scanning device provided according to an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of a roll-to-roll barcode scanner packaged in a housing according to an embodiment of the present invention;

[0023] Figure 4 This is a flowchart of a barcode scanning roll film control method provided according to an embodiment of the present invention.

[0024] Figure 5 This is a schematic diagram of the detection device according to an embodiment of the present invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] Figure 1-2 This is a front view of a roll-to-roll barcode scanning device provided in an embodiment of the present invention. As shown in the figure, the roll-to-roll barcode scanning device includes: a frame 10, a camera 11, a roll 21, a drive motor 22, a support shaft 23, a driven shaft 24, an adjustable damper 25, and a detection device 40.

[0028] A camera 11 for acquiring images of the wheel hub is fixedly mounted on the frame 10;

[0029] The lens of camera 11 is protected by a high-transparency coating 20;

[0030] The frame 10 is provided with a roller 21 for winding and connecting the high-transparency membrane 20;

[0031] The drive motor 22 is connected to the winding shaft 21 and is used to wind up the soiled high-permeability film 20.

[0032] The frame 10 is provided with a support shaft 23 for mounting the entire roll of high-transparency film 20;

[0033] An adjustable damper 25 is provided on the support shaft 23 to adjust the rotational resistance of the support shaft 23;

[0034] The camera 11 has driven shafts 24 on both sides, and the driven shafts 24 are tactilely connected to the high-transparency film 20.

[0035] The detection device 40 is communicatively connected to the drive motor 22 and the camera 11, respectively, and is used to control the drive motor 22 to drive the roller 21 according to the image acquired by the camera 11, so as to update and replace the high-transparency membrane 20 wound on the roller 21.

[0036] In some embodiments, the roll-up scanning device can be used to scan and recognize the QR code in the QR code image; the camera 11 can be used to capture the wheel hub QR code image.

[0037] When the roll-to-roll barcode scanner is running, the entire roll of high-transparency film 20 is first installed on the support shaft 23. The end of the high-transparency film 20 is pulled across the lens of the camera 11 and wound onto the reel 21, forming a protective structure for the lens of the camera 11. During the scanning operation, contaminants such as dust, aluminum shavings, cutting fluid, and oil from the production site are isolated on the outside of the high-transparency film 20, effectively preventing direct contamination of the lens of the camera 11. The reel 21 rotates in a timely manner to wind up the high-transparency film 20, keeping the contaminated film 20 away from the lens area, maintaining the cleanliness of the film 20 in the lens area, and ensuring the accuracy and real-time performance of barcode scanning. This embodiment uses a retractable high-transparency film 20 as a protective structure for the lens of the camera 11, meeting the lens protection requirements while automatically updating and replacing the clean high-transparency film 20, achieving self-cleaning of the protective structure. This eliminates the hassle of manual downtime cleaning and ensures production continuity.

[0038] The camera 11 has driven shafts 24 on both sides. The high-transparency film 20 is slidably connected to the driven shafts 24 and is flatly supported in front of the lens of the camera 11 through the driven shafts 24, ensuring the flatness of the high-transparency film 20 in front of the lens.

[0039] The adjustable damper 25 is used to adjust the rotational resistance of the support shaft 23 to provide the tension force of the high-permeability membrane 20, further ensuring the flatness of the high-permeability membrane 20.

[0040] The detection device 40, used for detecting the contamination status of the high-transparency film 20, serves as the basis for determining whether the reel 21 should wind up the contaminated high-transparency film 20. When abnormal contamination such as aluminum shavings and oil droplets is detected on the high-transparency film 20 in front of the camera 11 lens, but this does not affect the acquisition of barcode information, a preliminary judgment is made. If a threshold trigger event is constituted, the drive motor 22 operates to precisely wind up the high-transparency film 20 at the abnormal location. This method is highly efficient, saves on high-transparency film, increases maintenance cycles, and reduces costs. The detection device controls the camera to collect images of the high-transparency film 20 in front of the camera 11 during the barcode scanning process.

[0041] The technical solution of this invention provides a high-transparency protective film in front of the camera lens. By detecting contamination of the high-transparency film in front of the lens based on the image captured by the camera, the film winding mechanism can be automatically driven to replace the contaminated area. This enables real-time self-cleaning of contamination and precise, on-demand replacement of the protective medium. The scanning coded image can be stably and efficiently identified, reducing maintenance costs and ensuring production continuity.

[0042] In some implementations, such as Figure 3 As shown, the roll-mode barcode scanner also includes: a housing 30;

[0043] The housing 30 encloses the frame 10, camera 11, reel 21, drive motor 22, support shaft 23, driven shaft 24, adjustable damper 25 and detection device 40; an open window 31 is provided on the housing 30 corresponding to the lens of the camera 11.

[0044] The barcode scanner is enclosed within a housing 30, enhancing its protective performance. An open window 31 is provided in the housing 30 corresponding to the lens area of ​​the camera 11. The housing 30 can be made of transparent material to facilitate observation of its internal operating status.

[0045] In some implementations, the width of the open window 31 corresponds to the width of the high-transparency membrane 20. This correspondence between the width of the open window 31 and the width of the high-transparency membrane 20 ensures that the high-transparency membrane 20 can completely cover the open window 31, further enhancing protection.

[0046] Figure 4 This is a flowchart illustrating a method for controlling the scanning of roll film according to an embodiment of the present invention. This embodiment is applicable to situations where a high-transparency film is being detected for replacement in a roll-to-roll scanning device. The method can be executed by a detection device, which can be implemented in hardware and / or software and can be configured within the roll-to-roll scanning device.

[0047] See Figure 4 The shown barcode scanning roll film control method includes:

[0048] S401. Acquire the initial image of the high-transparency film in front of the camera lens.

[0049] The initial image can be an image acquired by a roll-up scanning device.

[0050] S402. Control the drive motor to drive the roller according to the initial image to update and replace the high-transparency film wound on the roller.

[0051] The system determines the severity of contamination of the high-transmittance membrane based on the initial image. When the membrane is severely contaminated, the drive motor activates the winding shaft. When the contamination is minor, the drive motor does not activate the winding shaft. The detection of the membrane's contamination status serves as the basis for determining whether the winding shaft should reel in the contaminated membrane.

[0052] In this embodiment of the invention, when abnormal contamination such as aluminum shavings and oil droplets is detected on the high-transparency film in front of the camera lens but does not affect the acquisition of code information, the drive motor works to precisely roll away the high-transparency film at the abnormal position. This is both highly efficient and economical in terms of high-transparency film, increasing maintenance cycle and reducing cost.

[0053] In an optional embodiment, controlling the drive motor to drive the reel based on the initial image includes: preprocessing the initial image to obtain an intermediate image; the preprocessing includes: oil mist denoising, reflection suppression, and aluminum chip filtering; segmenting the intermediate image to obtain a contaminant identification result; determining the film movement length based on the contaminant identification result; and controlling the drive motor to drive the reel based on the film movement length when the film movement length is not empty.

[0054] In some embodiments, preprocessing the initial image to obtain an intermediate image includes: obtaining a contamination concentration coefficient of the initial image; performing de-manipulation processing on the initial image based on the contamination concentration coefficient to obtain a first processed image; obtaining the polarization degree and dividing the initial image into a strong reflective region and a foreground region; suppressing the brightness of the strong reflective region to obtain a second processed image; determining the elemental size of the aluminum shavings based on the contamination concentration coefficient; performing erosion and dilation on the second processed image based on the elemental size to obtain a third processed image; and performing weighted fusion of the first processed image, the second processed image, and the third processed image to obtain an intermediate image.

[0055] Oil noise can be removed using nonlocal mean denoising to obtain the first processed image. A pollution concentration coefficient C is introduced as an adjustment factor to dynamically adjust the smoothing intensity according to the pollution level of the workshop environment, avoiding over-smoothing of key edges in the image under mild pollution. The pollution concentration coefficient can be obtained from sensors configured in the environment. The pollution concentration coefficient can include oil mist and / or milling fluid concentration. C∈[0,5] (0=no pollution, 5=heavy pollution).

[0056] The smoothing parameter h(C) and spatial attenuation parameter σ(C) are determined based on the pollution concentration coefficient C, and the calculation formulas are as follows:

[0057] h(C) = 10 + 5 × C

[0058] σ(C) = 0.5 + 0.8 × C

[0059] Get the local block size (usually 7×7 pixels) and the search window size (usually 21×21 pixels).

[0060] Traverse each pixel of the image. For each pixel (x,y) in the initial image: extract a local block of fixed size centered at (x,y), and search for similar local blocks within a search window Ω around (x,y).

[0061] For each pixel (u,v) within the search window: extract local blocks of the same size centered at (u,v); calculate the squared Euclidean distance between the two local blocks: the sum of squared grayscale differences; calculate the squared spatial distance: (x,y)-(u,v)|², and substitute it into the following weight formula to calculate the weight value w:

[0062] W=|I in (x,y)-I in (u,v)|² / h²(C)- |(x,y)-(u,v)|² / σ²(C)

[0063] Among them, I in (x,y) is the initial image, I in (u,v) represents the image of the search window. The weights of all pixels within the search window are summed to obtain the normalization constant Z; the weighted average is then calculated to obtain the first processed image. :

[0064]

[0065] The polarization degree P can be used to distinguish between reflective areas and valid coded areas. Grayscale correction is then performed on reflective pixels to obtain the second processed image. The polarization degree P can be obtained using a polarization sensor, where P ∈ [0,1] (1 = fully polarized, 0 = no polarization). The polarization degree threshold can be 0.3. The polarization degree of each pixel in the initial image is obtained and compared with the polarization degree threshold to filter out pixels in strongly reflective areas and foreground areas.

[0066] If the polarization degree P(x,y) of a pixel is greater than 0.3, the pixel is determined to belong to a highly reflective region.

[0067] If the polarization degree P(x,y) of a pixel is ≤0.3, then the pixel is determined to belong to the foreground region.

[0068] For pixels in highly reflective areas, brightness is suppressed, while the brightness of pixels in the foreground area remains unchanged. Brightness suppression is applied to all pixels in highly reflective areas of the initial image, resulting in the second processed image.

[0069] Brightness suppression can be applied to pixels in highly reflective areas using the following formula:

[0070] I polar (x,y) = I in (x,y) × (1 - 0.8×P(x,y))

[0071] I polar (x,y) represents the second processed image.

[0072] Adaptive opening operation (etching followed by dilation) is used to remove small aluminum chips (≤3 pixels) to obtain a third processed image, which retains the effective image area, such as a QR code structure.

[0073] The structural element size can be calculated based on the pollution concentration coefficient C: k_size = 2 + ⌊C⌋, where k_size = 2 when C = 0 and k_size = 7 when C = 5. An elliptical structural element is preferred (as it better matches the irregular shape of aluminum shavings).

[0074] An erosion operation is performed on the second processed image: a window of size k slides across the second processed image. At each position, the minimum value of all pixels within the area covered by the window is taken, and this minimum value determines the pixel value of the eroded image. The erosion operation can shrink bright areas, expand dark areas, and eliminate small bright aluminum chips. A dilation operation is then performed on the eroded image: a window of size k slides across the eroded image. At each position, the maximum value of all pixels within the area covered by the window is taken, and this maximum value determines the pixel value of the dilated image. The dilated image is then used as the third processed image. The dilation operation can restore the original size of the QR code's main structure and compensate for the shrinkage caused by erosion.

[0075] Multimodal fusion enhances the results of denoising, reflection suppression, and morphological processing, outputting the preprocessed result, i.e., the intermediate image. :

[0076]

[0077] Among them, weight (Trained and optimized in industrial scenarios).

[0078] It is evident that by eliminating oil mist blur, suppressing milling fluid reflection, and weakening aluminum chip interference, the contrast between the foreground and background can be improved. This enables multimodal adaptive preprocessing, targeted noise reduction and image enhancement, improved quality of intermediate images, and reduced interference in intermediate images.

[0079] In an optional embodiment, the step of segmenting the intermediate image to obtain a pollutant identification result includes: encoding the intermediate image to obtain an encoding result; decoding the encoding result to obtain a pollutant mask, which is then used as the pollutant identification result; the pollutant mask includes pollutant regions and pollutant types.

[0080] This process involves using a pre-trained contaminant detection model to encode the input intermediate model, obtaining the encoded result, and then decoding the encoded result to obtain the contaminant mask, which is used as the contaminant identification result. The contaminant detection model can be an improved model based on a lightweight U-Net (U-shaped network), which includes an encoder and a decoder. MobileNetV3 can be used as the encoder to reduce the number of parameters. An attention mechanism can also be added to the contaminant detection model to focus on the QR code region. The encoder extracts 5 levels of feature maps (channel count 8→16→32→64→128), and the decoder is used for upsampling and feature fusion, outputting a 4-channel probability map. Attention layers can be inserted in layers 3-5 of the encoder to enhance the feature weights of the QR code region.

[0081] Loss function design (adapting to class imbalance): In the workshop scene, aluminum chips and / or oil droplets are sparse occlusions (accounting for <20%), while oil mist is a diffuse area (accounting for up to 50%). Cross-entropy is used to calculate the oil mist loss, and the overlap between the predicted result and the true label (i.e., the Dice coefficient) is used to calculate the loss for milling fluid and / or oil droplets. The cross-entropy and Dice losses are then fused to obtain a hybrid loss. :

[0082]

[0083] Cross-entropy loss :

[0084]

[0085] Dice loss (Optimized for sparse aluminum chips and oil droplets):

[0086]

[0087] (To avoid a denominator of 0) . For real labels, To predict labels, post-processing of the mask involves performing morphological closing operations (filling small gaps) and connected component analysis on the segmentation results (removing mis-segmented regions with an area <5 pixels) to generate the final contamination mask. This refers to the pollutant identification results.

[0088] Training the contaminant detection model can include: collecting 100,000 real-world workshop images (containing different concentrations of aluminum shavings, milling fluid, and oil mist, with roller conveyor speeds of 0.5-2 m / s) as the training dataset. The training dataset can be augmented by randomly adding aluminum shavings and / or oil droplet masks, adjusting the blur level, and rotating and / or scaling the QR codes (simulating roller conveyor transport offset). The training dataset will also be labeled with contamination types. (and the boundary boxes of actual pollutants, etc.)

[0089] It is evident that by precisely segmenting aluminum chips (hard masking), milling fluid and / or oil droplets (liquid coverage), and oil mist (diffuse and blurred areas), a contamination mask can be generated, providing a basis for subsequent remediation and improving the efficiency and accuracy of contaminant detection.

[0090] In an optional embodiment, determining the roll film movement length based on the pollutant identification result includes: acquiring the occlusion area and optical occlusion degree of the pollutant region, and determining the pollutant anomaly detection result; when the pollutant anomaly detection result is normal, determining that the roll film movement length is empty; when the pollutant anomaly detection result is abnormal, acquiring the length of each pollutant region along the conveying direction; and determining the roll film movement length based on the length of each pollutant region along the conveying direction.

[0091] The occlusion area and optical occlusion degree can be quantitative values ​​representing the degree of contamination. When the contaminant type is aluminum shavings, the pixel area of ​​the contaminant region can be calculated. When the contaminant type is milling fluid and / or oil droplets, the pixel area and / or reflected light intensity of the contaminant region can be calculated. When the contaminant type is oil mist, the image contrast standard deviation of the contaminant region can be calculated. The occlusion area and / or optical occlusion degree of each contaminant type can be mapped to the degree of contamination, and the degree of contamination of different contaminant types can be weighted and fused to obtain the total degree of contamination. When the total degree of contamination meets the contamination condition, such as the total degree of contamination being greater than or equal to a preset threshold, the contaminant anomaly detection result is determined to be abnormal. When the total degree of contamination does not meet the contamination condition, such as the total degree of contamination being less than the preset threshold, the contaminant anomaly detection result is normal.

[0092] The length of each contaminant region along the conveying direction can be obtained, and the cumulative length values ​​of contaminant regions located on the same straight line can be selected. A safety margin is then added to the cumulative length values ​​to obtain the film roll movement length.

[0093] After controlling the drive motor to drive the roll shaft according to the film movement length, the initial image of the high-transparency film in front of the camera lens is re-acquired and processed to obtain an intermediate image, and pollutant identification results are obtained by pollutant segmentation, thereby determining the film movement length. This process is repeated until the film movement length is determined to be empty.

[0094] As can be seen, by determining the film roll movement length based on the length of the contaminated area along the conveying direction when the contamination is severe, the film roll can be replaced precisely. This enables dynamic adjustment based on the degree of contamination, with shorter replacement time for slight contamination and longer replacement time for severe contamination. This allows for multi-level response to different degrees of contamination, thereby reducing the length of film consumed each time. This allows a single roll to support more maintenance operations, while also reducing the frequency of film roll replacement and improving the utilization rate of the film roll.

[0095] In an optional embodiment, the barcode scanning roll film control method further includes: when it is determined that the roll film movement length is empty, performing occlusion repair on the intermediate image according to the pollutant identification result to obtain a target image; and performing target detection on the target image to obtain a coded region detection result.

[0096] The empty roll-up length indicates that contaminants will not interfere with the detection of target regions in the intermediate image. For example, the target region could be a coded region, such as a QR code. A pre-trained target detection model can be used to detect targets in the target image, obtaining the coded region detection results. The target detection model can refer to the structure, training, and application of the contaminant detection model. Before performing target detection on the intermediate image, occlusion repair can be performed beforehand to reduce occlusion interference, thereby improving the accuracy of target detection.

[0097] It is evident that by further occlusion repairing the intermediate image when the high-transparency film does not interfere with target detection in the intermediate image only when the film movement length is empty, the target image can be obtained. Target detection on the target image can further reduce occlusion interference, improve the quality of the target image, and improve the accuracy of target detection by performing target detection on the high-quality target image.

[0098] In an optional embodiment, the step of performing occlusion repair on the intermediate image based on the pollutant identification result to obtain the target image includes: when the pollutant type in the pollutant region is oil mist, inputting the intermediate image and the pollutant identification result into a blurred image repair model, and outputting a corrected first repaired image; when the pollutant type in the pollutant region is reflective material, obtaining the gray-scale mean of the surrounding area of ​​the pollutant region; correcting the pixel values ​​of the pollutant region based on the gray-scale mean and the polarization degree of the pollutant region, and outputting a corrected second repaired image; when the pollutant type in the pollutant region is aluminum shavings, obtaining pixel jump information of the surrounding area of ​​the pollutant region; determining the pixel value distribution information of the pollutant region based on the pixel jump information; correcting the pixel values ​​of the pixels in the pollutant region based on the pixel value distribution information of the pollutant region, and obtaining a third repaired image; and fusing the first repaired image, the second repaired image, and the third repaired image to obtain the target image.

[0099] Specifically, for contaminant areas caused by oil mist, a pre-trained blurred image inpainting model can be used for correction. The blurred image inpainting model takes the image to be inpainted and the area to be inpainted as input, i.e., the intermediate image and the oil mist-type contaminant area in the contaminant identification result as input, and outputs the inpainted image, i.e., the first inpainted image. In some embodiments, the blurred image inpainting model can employ a Generative Adversarial Network (GAN) model. The loss function of the blurred image inpainting model can be...

[0100]

[0101] in, To combat the losses, , This is the restored ground truth image (clear image). , Used to balance the quality and detail of the generated product.

[0102] Reflective materials may include milling fluid and / or oil droplets. The average grayscale value of the area surrounding the contaminated region of the reflective material is used to describe the average background value around the contaminated region. The surrounding region can refer to the area formed by a predetermined number (e.g., 10) of pixels extending outward from the contaminated region.

[0103] Based on transmittance estimation, the true grayscale of pixels obscured by reflective objects is restored; if the liquid is a semi-transparent medium, the degree of polarization is used to reconstruct the true grayscale. Estimating transmittance The true grayscale of the contaminated area is restored, and the restored image is the second restored image:

[0104]

[0105] Transmittance refers to the grayscale of a liquid surface's reflectance, which can be the average grayscale value of the area surrounding the contaminated region. The higher the degree of polarization, the lower the transmittance.

[0106] For contaminated areas caused by aluminum shavings, context interpolation combined with symbol rule constraints can be used to repair the periodicity of the encoded symbols. The periodicity is characterized by alternating black and white bars, and the neighborhood symbol width can be used to address this. Predict the pixel values ​​of the contaminated area in the aluminum shavings. Pixel transition information refers to pixels with abrupt changes in grayscale value, i.e., grayscale transition edges. For an image of a coded region, grayscale transition edges are typically pixel edges that change from black to white or from white to black. Pixel value distribution information refers to the grayscale values ​​of each pixel within the contaminated area, determining the grayscale values ​​at each location within the contaminated area.

[0107] Determine the symbol width K: Horizontally scan the intermediate image in the uncontaminated area (area outside the contaminated area); detect grayscale transition edges (black→white or white→black); calculate the average distance between adjacent edges as the K value. Typically, K is an integer (e.g., 8, 10, 12 pixels). Based on each pixel (x, y) to be repaired in the contaminated area of ​​aluminum shavings in the contaminated area of ​​the contaminated area in the contaminated contaminant identification results, calculate four reference position coordinates: left: (xK, y), right: (x+K, y), top: (x, yK), and bottom: (x, y+K). Boundary check: Ensure the reference positions are within the image range. Validity check: Ensure the reference positions are not obscured by aluminum shavings. Collect the grayscale values ​​of all valid reference pixels, count the frequency of each grayscale value, and select the grayscale value with the highest frequency as the repair value. If all reference pixels are invalid, use the average value of the region. If the frequency of occurrence is equal, select the nearest reference pixel value as the repaired image, forming the third repaired image. Calculate the pixel values ​​of the third repaired image based on the following formula:

[0108] I repair2 (x,y)=mode{I denoise (x±K,y),I denoise (x,y±K)}

[0109] In fact, the first restored image is the result of restoring the contaminant area of ​​oil mist, the second restored image is the result of restoring the contaminant area of ​​reflective material, and the third restored image is the result of restoring the contaminant area of ​​aluminum shavings. Since the contaminant areas do not overlap, the restored images of each contaminant area and the images in the intermediate images other than the contaminant areas can be directly obtained and stitched together to form the target image.

[0110] Figure 5This is a schematic diagram of a detection device provided in an embodiment of the present invention. The detection device can perform a barcode scanning roll film control method. The device can be implemented in hardware and / or software, and can be configured in an electronic device that carries a certain data processing capability.

[0111] See Figure 5 The detection device shown includes:

[0112] The acquisition module 501 is used to acquire the initial image of the high-transparency film in front of the camera lens;

[0113] The control module 502 is used to control the drive motor to drive the reel according to the initial image, so as to update and replace the high-transparency film wound on the reel.

[0114] In this embodiment of the invention, when abnormal contamination such as aluminum shavings and oil droplets is detected on the high-transparency film in front of the camera lens but does not affect the acquisition of code information, the drive motor works to precisely roll away the high-transparency film at the abnormal position. This is both highly efficient and economical in terms of high-transparency film, increasing maintenance cycle and reducing cost.

[0115] Optional, control module 502, specifically used for:

[0116] The initial image is preprocessed to obtain an intermediate image; the preprocessing includes: oil mist denoising, reflection suppression, and aluminum chip filtering.

[0117] The intermediate image is segmented to obtain pollutant identification results;

[0118] The film movement length is determined based on the pollutant identification results;

[0119] When the film roll movement length is not empty, the drive motor drives the roll shaft according to the film roll movement length.

[0120] Optional, control module 502, specifically used for:

[0121] Obtain the pollution concentration coefficient of the initial image;

[0122] The initial image is de-processed according to the pollution concentration coefficient to obtain a first processed image;

[0123] The polarization degree is obtained, and the strongly reflective region and the foreground region are divided in the initial image;

[0124] Brightness suppression is applied to the highly reflective areas to obtain a second processed image;

[0125] The elemental size of the aluminum shavings is determined based on the pollution concentration coefficient.

[0126] The second processed image is eroded and dilated according to the element size to obtain the third processed image;

[0127] The first processed image, the second processed image, and the third processed image are weighted and fused to obtain an intermediate image.

[0128] Optional, control module 502, specifically used for:

[0129] The intermediate image is encoded to obtain the encoding result;

[0130] The encoding result is decoded to obtain a contaminant mask, which is used as the contaminant identification result; the contaminant mask includes the contaminant region and the contaminant type.

[0131] Optional, control module 502, specifically used for:

[0132] The obstruction area and optical obstruction degree of the pollutant region are obtained to determine the abnormal detection result of the pollutant.

[0133] When the abnormal detection result of the pollutant is normal, the film roll movement length is determined to be empty;

[0134] When the abnormal detection result of the pollutant is abnormal, the length of each pollutant region along the conveying direction is obtained;

[0135] The film movement length is determined based on the length of each contaminant region along the conveying direction.

[0136] Optionally, the detection device may also include: a repair module, used for:

[0137] When it is determined that the film movement length is empty, the intermediate image is occluded and repaired according to the pollutant identification result to obtain the target image;

[0138] Target detection is performed on the target image to obtain the coded region detection result.

[0139] Optional, repair module, specifically used for:

[0140] When the pollutant type in the pollutant area is oil mist, the intermediate image and the pollutant identification result are input into the blurred image restoration model, and the corrected first restored image is output.

[0141] When the pollutant type in the pollutant area is reflective, obtain the average gray value of the area surrounding the pollutant area;

[0142] Based on the grayscale mean and the polarization degree of the contaminant region, the pixel values ​​of the contaminant region are corrected, and the corrected second repaired image is output.

[0143] When the contaminant type in the contaminant area is aluminum shavings, obtain the pixel transition information of the area surrounding the contaminant area;

[0144] Based on the pixel transition information, determine the pixel value distribution information of the pollutant region;

[0145] Based on the pixel value distribution information of the pollutant region, the pixel values ​​of the pixels in the pollutant region are corrected to obtain a third repaired image;

[0146] The first repaired image, the second repaired image, and the third repaired image are fused together to obtain the target image.

[0147] The detection device provided in the embodiments of the present invention can execute the barcode scanning roll film control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the barcode scanning roll film control method.

[0148] The data acquisition and other aspects involved in the technical solutions of this invention comply with relevant laws and regulations and do not violate public order and good morals.

[0149] In some embodiments, the barcode scanning roll-up control method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded into and / or installed on an electronic device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the barcode scanning roll-up control method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the barcode scanning roll-up control method by any other suitable means (e.g., by means of firmware).

[0150] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0151] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0152] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0153] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0154] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0155] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability.

[0156] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0157] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A roll-mode barcode scanning device, characterized in that, The roll-mode barcode scanning device includes: a frame, a camera, a roll, a drive motor, a support shaft, a driven shaft, and a detection device; A camera for acquiring wheel hub images is fixedly mounted on the frame; The camera lens is protected by a high-transparency film; The frame is equipped with a roller for winding and connecting the high-transparency membrane; The drive motor is connected to the reel and is used to wind up the soiled high-permeability film; The frame is equipped with a support shaft for mounting a whole roll of high-transparency film; The camera is provided with driven shafts on both sides, and the driven shafts are tactilely connected to the high-transparency film. The detection device is communicatively connected to the drive motor and the camera, respectively, and is used to control the drive motor to drive the roll according to the image acquired by the camera, so as to update and replace the high-transparency film wound on the roll.

2. The roll-mode barcode scanning device according to claim 1, characterized in that, Also includes: Box; The housing encapsulates the frame, the camera, the reel, the drive motor, the support shaft, the driven shaft, and the detection device. An open window is provided on the housing corresponding to the lens area of ​​the camera.

3. The roll-to-roll barcode scanning device according to claim 2, characterized in that, The width of the open window corresponds to the width setting of the high-transparency film.

4. A method for controlling barcode scanning of roll film, characterized in that, The method, applied to the detection device in the roll-mode barcode scanning equipment as described in any one of claims 1-3, comprises: Acquire the initial image of the high-transparency film in front of the camera lens; The drive motor is controlled to drive the reel according to the initial image, so as to update and replace the high-transparency film wound on the reel.

5. The method according to claim 4, characterized in that, The step of controlling the drive motor to drive the reel based on the initial image includes: The initial image is preprocessed to obtain an intermediate image; the preprocessing includes: oil mist denoising, reflection suppression, and aluminum chip filtering. The intermediate image is segmented to obtain pollutant identification results; The film movement length is determined based on the pollutant identification results; When the film roll movement length is not empty, the drive motor drives the roll shaft according to the film roll movement length.

6. The method according to claim 5, characterized in that, The preprocessing of the initial image to obtain the intermediate image includes: Obtain the pollution concentration coefficient of the initial image; The initial image is de-processed according to the pollution concentration coefficient to obtain a first processed image; The polarization degree is obtained, and the strongly reflective region and the foreground region are divided in the initial image; Brightness suppression is applied to the highly reflective areas to obtain a second processed image; The elemental size of the aluminum shavings is determined based on the pollution concentration coefficient. The second processed image is eroded and dilated according to the element size to obtain the third processed image; The first processed image, the second processed image, and the third processed image are weighted and fused to obtain an intermediate image.

7. The method according to claim 5, characterized in that, The step of segmenting the intermediate image to obtain pollutant identification results includes: The intermediate image is encoded to obtain the encoding result; The encoding result is decoded to obtain a contaminant mask, which is used as the contaminant identification result; the contaminant mask includes the contaminant region and the contaminant type.

8. The method according to claim 5, characterized in that, Determining the film movement length based on the pollutant identification result includes: The obstruction area and optical obstruction degree of the pollutant region are obtained to determine the abnormal detection result of the pollutant. When the abnormal detection result of the pollutant is normal, the film roll movement length is determined to be empty; When the abnormal detection result of the pollutant is abnormal, the length of each pollutant region along the conveying direction is obtained; The film movement length is determined based on the length of each contaminant region along the conveying direction.

9. The method according to claim 5, characterized in that, Also includes: When it is determined that the film movement length is empty, the intermediate image is occluded and repaired according to the pollutant identification result to obtain the target image; Target detection is performed on the target image to obtain the coded region detection result.

10. The method according to claim 9, characterized in that, The step of performing occlusion repair on the intermediate image based on the pollutant identification result to obtain the target image includes: When the pollutant type in the pollutant area is oil mist, the intermediate image and the pollutant identification result are input into the blurred image restoration model, and the corrected first restored image is output. When the pollutant type in the pollutant area is reflective, obtain the average gray value of the area surrounding the pollutant area; Based on the grayscale mean and the polarization degree of the contaminant region, the pixel values ​​of the contaminant region are corrected, and the corrected second repaired image is output. When the contaminant type in the contaminant area is aluminum shavings, obtain the pixel transition information of the area surrounding the contaminant area; Based on the pixel transition information, determine the pixel value distribution information of the pollutant region; Based on the pixel value distribution information of the pollutant region, the pixel values ​​of the pixels in the pollutant region are corrected to obtain a third repaired image; The first repaired image, the second repaired image, and the third repaired image are fused together to obtain the target image.