Method and system for detecting models of small-package lubricating oil stickers

By using photoelectric sensors and cameras in collaboration, combined with OCR technology and a custom vocabulary, efficient and accurate detection of the model numbers on small-package lubricant stickers can be achieved. This solves the problems of low efficiency and poor environmental adaptability of traditional manual detection methods, and improves the automation level of the production line and product quality.

CN120612697APending Publication Date: 2025-09-09DALIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510557862.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

The traditional manual inspection method of small-package lubricant sticker model is inefficient and easily affected by human factors. Factors such as light changes and oil contamination affect the performance of the detection system, resulting in frequent false detections and missed detections, and poor environmental adaptability.

Method used

Through the collaborative work of photoelectric sensors and cameras, oil drum images are acquired, and sticker model recognition is performed by combining OCR technology and a custom vocabulary. The detection results are displayed using a human-computer interaction interface developed with PyQt, achieving fast and accurate model detection.

Benefits of technology

It significantly improves detection efficiency and accuracy, reduces human error rates, enhances the automation level and operational convenience of the production line, and ensures product quality and market compliance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612697A_ABST
    Figure CN120612697A_ABST
Patent Text Reader

Abstract

The invention discloses a small package lubricating oil sticker model detection method and system, and relates to the technical field of computer vision and image processing. Comprising the following steps: acquiring an image of a to-be-detected oil drum through cooperative work of a photoelectric sensor and a camera; processing the image of the oil drum to be detected, extracting effective image information of an oil drum sticker area according to a preset model detection area, and identifying the text content of the area by adopting an OCR (Optical Character Recognition) technology; and comparing an identification result with a standard model, and visually displaying a detection result through a human-computer interaction interface. By combining manual and automatic means, the detection efficiency of the lubricating oil stickers is improved, the product quality is ensured, the detection result can be quickly fed back, a user is helped to monitor the production process in real time, the necessity of manual intervention is reduced, and the automation level of a production line is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision and image processing, and in particular to a method and system for detecting the model of a sticker on a small package of lubricating oil. Background Art

[0002] With the continuous advancement of industrial automation and intelligence, the production and packaging of small-package lubricants is gradually developing towards efficiency and precision. Labeling, a critical step in the lubricant packaging process, directly impacts market distribution and consumer experience. Accurately inspecting the model number on the label is crucial for ensuring product compliance and preventing market confusion. However, traditional manual inspection methods are not only inefficient but also susceptible to human error, leading to frequent false detections and missed inspections.

[0003] In actual production environments, factors such as light changes and oil pollution may affect the performance of the detection system. How to improve the environmental adaptability of the system and ensure that it can work stably under various complex conditions is an urgent problem to be solved. Summary of the Invention

[0004] The purpose of the present invention is to propose a method and system for detecting the model of small-package lubricant stickers, which can achieve efficient and accurate detection of lubricant sticker models to meet the intelligent quality management needs of modern production lines.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for detecting the model number of a small package lubricating oil sticker is provided, comprising the following steps:

[0006] The photoelectric sensor and camera work together to obtain the image of the oil drum to be inspected;

[0007] The image of the oil drum to be inspected is processed, and the effective image information of the oil drum sticker area is extracted according to the pre-set model detection area, and the text content in the area is recognized using OCR technology;

[0008] Compare the recognition results with the standard model and intuitively display the test results through the human-computer interaction interface.

[0009] In one embodiment, the photoelectric sensor and the camera work together as follows:

[0010] Set the installation position of the photoelectric sensor to ensure that it can trigger the camera in time when the oil drum passes the inspection station;

[0011] Synchronize the sensor trigger signal with the camera exposure moment.

[0012] In one embodiment, the image of the oil drum to be inspected includes image height and width parameters and an image data pointer; the image data pointer is converted into a NumPy array by calling the ctypes library, and reshaped into a two-dimensional array to obtain the original image in Bayer format; the Bayer format is then converted into a standard RGB format; the scaling ratio of the video tag is obtained, and the image size is adaptively adjusted based on the scaling ratio to ensure the best display effect of the image in the interface.

[0013] In one embodiment, based on the pre-set model detection area, the effective image information of the oil drum sticker area is extracted as follows:

[0014] Drag the mouse or use a touch gesture to draw a detection frame directly on the image of the oil drum to be inspected; the coordinate parameters of the detection frame are recorded in real time, and the image is automatically cropped based on the spatial position information to extract the image of the oil drum sticker area, providing high-quality input data for subsequent OCR recognition.

[0015] In one embodiment, the text content of the region is recognized using OCR technology as follows:

[0016] Use open source OCR tools to perform character recognition on the extracted oil drum sticker images;

[0017] By configuring engine parameters and loading a custom vocabulary trained on lubricant model characteristics, optimized recognition of specific fonts and printing formats is achieved, significantly improving the recognition accuracy of model characters.

[0018] In one embodiment, the recognition result is compared with the standard model, and the detection result is intuitively displayed through the human-computer interaction interface as follows:

[0019] Use a comparison algorithm to match the extracted characters with the preset standard model;

[0020] Automatically generate comparison results including matching and difference analysis;

[0021] The graphical user interface developed with PyQt displays the inspection results in real time, including the recognized text, standard model, matching status, and compliance judgment.

[0022] In one embodiment, when the extracted character does not match a preset standard model:

[0023] Send out warning signals through sound and light alarms;

[0024] Automatically send a shutdown command to the production line control system;

[0025] The location information of abnormal oil barrels is highlighted in the graphical user interface.

[0026] According to a second aspect of an embodiment of the present disclosure, a system for detecting the model of a small-package lubricating oil sticker is provided, comprising:

[0027] The image acquisition module uses the photoelectric sensor and camera to work together to obtain the image of the oil drum to be inspected;

[0028] The extraction module processes the image of the oil drum to be inspected, extracts the valid image information of the oil drum sticker area based on the pre-set model detection area, and uses OCR technology to recognize the text content in the area;

[0029] The judgment module compares the recognition results with the standard model and intuitively displays the test results through the human-computer interaction interface.

[0030] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored and running on the memory, wherein the processor implements the method for detecting the model of a small-package lubricant sticker when executing the program.

[0031] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for detecting the model of a small-package lubricant sticker is implemented.

[0032] The above technical solutions adopted by the present invention have the following advantages compared with the existing technologies: 1. The present invention realizes rapid image capture and processing through the coordinated work of photoelectric sensors and cameras, significantly shortening the detection time and improving production efficiency;

[0033] 2. Using advanced OCR technology combined with user-defined detection area design, it can adapt to oil drums of different models and specifications, accurately identify sticker models, and effectively reduce human error rate while enhancing applicability;

[0034] 3. The user interface developed based on PyQt presents test results in real time, ensuring that operators can quickly obtain information and respond, greatly improving operational convenience and human-computer interaction experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The drawings in the specification, which constitute a part of this application, are used to provide further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute improper limitations on this application.

[0036] Figure 1 This is a flow chart of the method for detecting the model number of the sticker on the small package lubricating oil;

[0037] Figure 2 This is the functional block diagram of the small package lubricant sticker model detection system;

[0038] Figure 3 Set up a schematic diagram of the locations for the photoelectric sensors and cameras;

[0039] Explanation of the serial numbers in the figure: 1. Oil drum to be inspected; 2. Photoelectric sensor; 3. Camera. DETAILED DESCRIPTION

[0040] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0041] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.

[0042] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0043] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to the various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code can include one or more executable instructions for implementing the logical functions specified in the various embodiments. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of the boxes in the flowchart and / or block diagram, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0044] Example 1:

[0045] like Figure 1 As shown, this embodiment provides a method for detecting the model of a small package lubricating oil sticker, comprising the following steps:

[0046] S1. Photoelectric sensors and cameras work together to capture images of the oil drum to be inspected.

[0047] Specifically, by optimizing the installation position of the photoelectric sensor so that it is precisely aligned with the path of the oil drum, when the oil drum enters the detection area of ​​the sensor, the photoelectric sensor immediately generates a trigger signal, which is synchronized with the camera shooting action in milliseconds to ensure that every oil drum passing by can be accurately captured. Figure 3 shown.

[0048] S2. Process the image of the oil drum to be inspected, extract the valid image information of the oil drum sticker area based on the pre-set model detection area, and use OCR technology to recognize the text content in this area;

[0049] Specifically, the image of the oil drum to be inspected includes image height and width parameters and an image data pointer. First, the obtained image data pointer is converted into a NumPy array object using the ctypes library. The one-dimensional array is then reshaped into a two-dimensional matrix structure to obtain the original Bayer format image data. Next, a color space conversion algorithm is applied to convert the Bayer format image into a standard RGB format. Finally, based on the actual resolution of the display terminal, the scaling ratio of the video label is obtained, and the image size is adaptively adjusted accordingly to ensure the optimal display effect.

[0050] The operator draws a detection frame directly on the oil drum image displayed on the interface by dragging the mouse or using touch screen gestures. The system collects and stores the spatial position parameters of the detection frame, such as vertex coordinates, width, and height, in real time. Based on these parameters, the image processing algorithm is called to automatically perform the following operations: 1) obtain the precise boundary coordinates of the detection frame; 2) apply image cropping technology to extract the target area; 3) perform edge sharpening and contrast enhancement on the cropped sticker area image to ensure the input quality of subsequent OCR recognition.

[0051] An open-source OCR (optical character recognition) tool is used to perform character recognition processing on the extracted oil drum sticker images. At the same time, by configuring relevant engine parameters and loading a custom vocabulary library specially trained for lubricant model characteristics, optimized recognition effects for specific fonts and printing formats are achieved.

[0052] S3. Compare the recognition results with the standard model and display the test results intuitively through the human-computer interaction interface. The specific implementation method is:

[0053] S31 uses a comparison algorithm to match the extracted characters with a preset standard model;

[0054] S32. Automatically generate comparison results including matching and difference analysis;

[0055] S33. A graphical user interface developed with PyQt displays the test results in real time, including identification text, standard model, matching status, and compliance determination, allowing users to intuitively and quickly understand the test situation and product quality status.

[0056] By combining manual and automated means, this method improves the inspection efficiency of oil drum stickers, ensures product quality, and can quickly feedback inspection results, helping users monitor the production process in real time, reducing the need for manual intervention and improving the automation level of the production line.

[0057] Example 2:

[0058] like Figure 2 As shown, this embodiment provides a system for detecting the model of a small package lubricating oil sticker, including:

[0059] The image acquisition module uses the photoelectric sensor and camera to work together to obtain the image of the oil drum to be inspected;

[0060] The extraction module processes the image of the oil drum to be inspected, extracts the valid image information of the oil drum sticker area based on the pre-set model detection area, and uses OCR technology to recognize the text content in the area;

[0061] The judgment module compares the recognition results with the standard model and intuitively displays the test results through the human-computer interaction interface.

[0062] Example 3:

[0063] An electronic device includes a memory, a processor, and a computer program stored and running on the memory, wherein when the processor executes the program, the method for detecting the model number of a small package lubricating oil sticker is implemented, including:

[0064] The photoelectric sensor and camera work together to obtain the image of the oil drum to be inspected;

[0065] The image of the oil drum to be inspected is processed, and the effective image information of the oil drum sticker area is extracted according to the pre-set model detection area, and the text content in the area is recognized using OCR technology;

[0066] Compare the recognition results with the standard model and intuitively display the test results through the human-computer interaction interface.

[0067] Example 4:

[0068] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for detecting the model of a small-package lubricant sticker, including:

[0069] The photoelectric sensor and camera work together to obtain the image of the oil drum to be inspected;

[0070] The image of the oil drum to be inspected is processed, and the effective image information of the oil drum sticker area is extracted according to the pre-set model detection area, and the text content in the area is recognized using OCR technology;

[0071] Compare the recognition results with the standard model and intuitively display the test results through the human-computer interaction interface.

[0072] Those skilled in the art will appreciate that the modules or steps of the present disclosure described above can be implemented using a general-purpose computer device. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. The present disclosure is not limited to any specific combination of hardware and software.

[0073] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

[0074] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Those skilled in the art should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.

Claims

1. A method for detecting the model of a small package lubricating oil sticker, characterized in that: The following steps are involved: The photoelectric sensor and camera work together to obtain the image of the oil drum to be inspected; The image of the oil drum to be inspected is processed, and the effective image information of the oil drum sticker area is extracted according to the pre-set model detection area, and the text content in the area is recognized using OCR technology; Compare the recognition results with the standard model and intuitively display the test results through the human-computer interaction interface.

2. The method for detecting the model of the sticker of the small package lubricating oil according to claim 1, characterized in that: The photoelectric sensor and camera work together in the following way: Set the installation position of the photoelectric sensor to ensure that it can trigger the camera in time when the oil drum passes the inspection station; Synchronize the sensor trigger signal with the camera exposure moment.

3. The method for detecting the model of the sticker of the small package lubricating oil according to claim 1, characterized in that: The image of the oil drum to be detected includes image height and width parameters and an image data pointer. The image data pointer is converted into a NumPy array by calling the ctypes library and reshaped into a two-dimensional array to obtain the original image in Bayer format. The Bayer format is then converted into standard RGB format. The scaling ratio of the video label is obtained and the image size is adaptively adjusted based on the scaling ratio.

4. The method for detecting the model of the sticker of the small package lubricating oil according to claim 1, characterized in that: Based on the pre-set model detection area, the method for extracting valid image information of the oil drum sticker area is as follows: Drag the mouse or use a touch gesture to draw a detection frame directly on the image of the oil drum to be inspected; record the coordinate parameters of the detection frame in real time, and automatically crop the image based on the spatial position information to extract the image of the oil drum sticker area.

5. The method for detecting the model of the sticker of the small package lubricating oil according to claim 4, characterized in that: The method of using OCR technology to identify the text content in this area is as follows: Use open source OCR tools to perform character recognition on the extracted oil drum sticker images; By configuring engine parameters and loading a custom vocabulary trained on lubricant model characteristics, optimized recognition of specific fonts and printing formats can be achieved.

6. The method for detecting the model of the sticker of the small package lubricating oil according to claim 5, characterized in that: Compare the recognition results with the standard model and intuitively display the test results through the human-computer interaction interface as follows: Use a comparison algorithm to match the extracted characters with the preset standard model; Automatically generate comparison results including matching and difference analysis; The graphical user interface developed with PyQt displays the inspection results in real time, including the recognized text, standard model, matching status, and compliance judgment.

7. The method for detecting the model of the sticker of the small package lubricating oil according to claim 6, characterized in that: When the extracted characters do not match the preset standard model: Send out warning signals through sound and light alarms; Automatically send a shutdown command to the production line control system; The location information of abnormal oil barrels is highlighted in the graphical user interface.

8. Small package lubricating oil sticker model detection system, characterized by: include: The image acquisition module uses the photoelectric sensor and camera to work together to obtain the image of the oil drum to be inspected; The extraction module processes the image of the oil drum to be inspected, extracts the valid image information of the oil drum sticker area based on the pre-set model detection area, and uses OCR technology to recognize the text content in the area; The judgment module compares the recognition results with the standard model and intuitively displays the test results through the human-computer interaction interface.

9. An electronic device comprising a memory, a processor, and a computer program stored and running on the memory, characterized in that: When the processor executes the program, the method for detecting the model of the small-package lubricating oil sticker according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for detecting the model of the small-package lubricating oil sticker according to any one of claims 1 to 7 is implemented.