A method, device and equipment for detecting label position deviation
Obtain the image through the camera and use the segmentation template to select the label area, and compare the area difference, which solves the high cost and precision deviation problems of label position offset detection in the existing technology, and realizes low-cost and efficient label positioning. Offset detection.
Patent Information
- Application Number
- CN202410781565.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-06-18
AI Technical Summary
The existing workpiece label position offset detection technology has high costs and long detection time, and is limited by irregularly shaped workpieces, making it difficult to accurately locate the marking point position, resulting in test deviations.
Provides a camera-based label position offset detection method. By obtaining the image to be tested, using the pre-stored segmentation template to perform image segmentation, selecting the label recognition area and dividing the area pairs, calculating the area difference of the area pair and comparing it with the error threshold. Yes, determine the label position offset.
It achieves low-cost, accurate and efficient label position offset detection, improves detection efficiency and assembly line production efficiency, and solves the detection position accuracy deviation caused by irregular-shaped labels. Only one set of visual detection devices is needed to complete the position offset. Testing saves testing costs.
Smart Images

Figure CN118365699B
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual inspection technology, and in particular to a label position deviation detection method, device and detection equipment. Background Art
[0002] As visual acquisition and image processing technology are widely used, there are more and more scenarios where various cameras such as industrial cameras are used for inspection, such as automated visual production inspection in factories, daily attendance data processing, access control management, and other scenarios.
[0003] In the scenario of detecting the position deviation of workpieces, the existing detection technology mainly includes using cameras to collect image information multiple times, and judging whether the workpiece has position deviation by the offset of the marking point. However, such situations require multiple sets of visual acquisition equipment to perform multiple image comparisons, which is costly and time-consuming. On the other hand, due to the problem of irregular shapes of the workpieces to be detected, it is also difficult to accurately locate the marking point during the detection process, resulting in test deviation. Summary of the invention
[0004] In order to solve the problem that the offset of labels on existing workpieces affects identification, the present application provides a label position offset detection method, device and detection equipment, which can realize the offset detection of RFID tags of various shapes based on one camera, thereby improving the detection efficiency and accuracy.
[0005] In one aspect, a method for detecting a label position deviation is provided, the method comprising:
[0006] Acquire a test image of the workpiece to be tested that contains a label;
[0007] Segment the image to be tested based on a pre-stored segmentation template, select a recognition area containing the label from the image, and obtain a region pair by dividing the adjacent area around the recognition area; wherein each region pair includes two sub-regions, the two sub-regions are separated by the recognition area and are symmetrically distributed relative to the recognition area;
[0008] For each of the region pairs, calculating the area difference between two sub-regions, and comparing the area difference with a corresponding error threshold;
[0009] The position deviation of the tag is determined according to the comparison result.
[0010] In some embodiments, segmenting the image to be tested based on a pre-stored segmentation template, selecting a recognition area containing the label, and obtaining a region pair by dividing the adjacent regions around the recognition area, includes:
[0011] Acquiring a corresponding segmentation template based on the type of the label of the workpiece to be tested;
[0012] Select the label based on the segmentation template to obtain the identification area;
[0013] Based on the edge extension line of the identification area, the adjacent areas around the identification area are divided to obtain the area pair.
[0014] In some embodiments, each of the region pairs corresponds to one of the error thresholds.
[0015] In some embodiments, determining the position offset of the tag according to the comparison result includes:
[0016] If there is a region pair whose area difference is greater than the error threshold, it is determined that the tag position is offset.
[0017] In some embodiments, before acquiring the image to be measured of the area of the workpiece to be measured containing the label, the method further includes:
[0018] The segmentation template is constructed based on the label of the workpiece to be tested; wherein the segmentation template includes a standard identification area and a standard area pair adjacent to the standard identification area, the standard identification area can at least accommodate the label, and each of the standard area pairs includes two standard sub-areas, the two standard sub-areas are separated by the standard identification area and are symmetrically distributed relative to the standard identification area.
[0019] In some embodiments, the tag is an RFID tag, and before acquiring the image of the area of the workpiece to be measured that includes the tag, the method further includes:
[0020] In response to a trigger signal of a limit switch of a detection area of the workpiece to be detected, reading information of the RFID tag;
[0021] If reading the information of the RFID tag fails, the step of obtaining the image to be measured of the area of the workpiece to be measured including the tag is performed.
[0022] In some embodiments, after determining the position offset of the tag according to the comparison result, the method further includes:
[0023] The position of the RFID tag reading device is adjusted based on the position deviation to re-read the RFID tag.
[0024] On the other hand, a label position deviation detection device is provided, the device comprising:
[0025] An image acquisition module is used to acquire the image to be tested containing the label of the workpiece to be tested;
[0026] An image segmentation module, used to segment the image to be tested based on a pre-stored segmentation template, select a recognition area containing the label, and obtain a region pair by dividing the adjacent area around the recognition area; wherein each region pair includes two sub-regions, the two sub-regions are separated by the recognition area and are symmetrically distributed relative to the recognition area;
[0027] A difference calculation module, used for calculating, for each of the area pairs, an area difference between two sub-areas therein, and comparing the area difference with a corresponding error threshold;
[0028] The offset determination module is used to determine the position offset of the tag according to the comparison result.
[0029] In some embodiments, the image segmentation module is specifically used to:
[0030] Acquiring a corresponding segmentation template based on the type of the label of the workpiece to be tested;
[0031] Select the label based on the segmentation template to obtain the identification area;
[0032] Based on the edge extension line of the identification area, the adjacent areas around the identification area are divided to obtain the area pair.
[0033] In some embodiments, each of the region pairs corresponds to one error threshold.
[0034] In some embodiments, the offset calculation module is specifically used to:
[0035] If there is a region pair whose area difference is greater than the error threshold, it is determined that the tag position is offset.
[0036] In some embodiments, the device is further used to:
[0037] The segmentation template is constructed based on the label of the workpiece to be tested; wherein the segmentation template includes a standard identification area and a standard area pair adjacent to the standard identification area, the standard identification area can at least accommodate the label, and each of the standard area pairs includes two standard sub-areas, the two standard sub-areas are separated by the standard identification area and are symmetrically distributed relative to the standard identification area.
[0038] In some embodiments, the tag is an RFID tag, and the apparatus is further configured to:
[0039] In response to a trigger signal of a limit switch of a detection area of the workpiece to be detected, reading information of the RFID tag;
[0040] If reading the information of the RFID tag fails, the step of obtaining the image to be measured of the area of the workpiece to be measured including the tag is performed.
[0041] In some embodiments, the device is further used to:
[0042] The position of the RFID tag reading device is adjusted based on the position deviation to re-read the RFID tag.
[0043] On the other hand, a label position deviation detection device is provided, including an image acquisition device, a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the label position deviation detection method as described above.
[0044] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, code set or instruction set is stored. The processor can load and execute at least one instruction, at least one program, code set or instruction set to implement the label position offset detection method provided in the above-mentioned embodiment of the present application.
[0045] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer program instructions, the computer program instructions being stored in a computer-readable storage medium. A processor reads the computer instructions from the computer-readable storage medium and executes the computer instructions, so that the computer device executes the label position offset detection method described in any of the above embodiments.
[0046] The beneficial effects brought by the technical solution provided by the present application include at least: the embodiment of the present invention provides a label position offset detection method, device and detection equipment, the method includes obtaining a test image containing a label of a workpiece to be tested; segmenting the test image based on a pre-stored segmentation template, selecting a recognition area containing the label from it, and obtaining a region pair by dividing the adjacent area around the recognition area; wherein each region pair includes two sub-regions, the two sub-regions are separated by the recognition area and symmetrically distributed relative to the recognition area; for each region pair, the area difference between the two sub-regions is calculated, and the area difference is compared with the corresponding error threshold; the position offset of the label is determined according to the comparison result. The label position offset detection method provided by the embodiment of the present invention can realize low-cost, accurate and efficient label position offset detection by comparing the size of the offset area, thereby improving the detection and assembly line production efficiency; on the other hand, it can also solve the detection position accuracy deviation caused by the irregular shape size of each batch of labels, and only one set of visual detection devices is needed to realize position offset detection, which can effectively save detection costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Hereinafter, the present disclosure will be described in more detail based on embodiments and with reference to the accompanying drawings.
[0048] Figure 1 A schematic diagram of an implementation flow of a label position deviation detection method provided by an exemplary embodiment of the present application is shown;
[0049] Figure 2 A schematic diagram of an application scenario of a tag position deviation detection method provided by an exemplary embodiment of the present application is shown;
[0050] Figure 3 A schematic diagram showing another application scenario of a tag position deviation detection method provided by an exemplary embodiment of the present application is shown;
[0051] Figure 4 Another implementation flow diagram of a label position deviation detection method provided by an exemplary embodiment of the present application is shown;
[0052] Figure 5 A schematic diagram of another implementation flow of a label position deviation detection method provided by an exemplary embodiment of the present application is shown;
[0053] Figure 6 A schematic structural diagram of a label position deviation detection device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0054] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, and to fully understand and implement how the present disclosure applies technical means to solve technical problems and achieve the corresponding technical effects, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. The embodiments of the present disclosure and the various features in the embodiments can be combined with each other without conflict, and the technical solutions formed are all within the scope of protection of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.
[0055] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0056] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0057] The label position offset detection method provided in the present application can realize label offset detection of various shapes based on one camera, thereby improving detection efficiency and accuracy.
[0058] Embodiment 1
[0059] Figure 1 A schematic diagram of the implementation flow of a label position deviation detection method provided by an embodiment of the present invention is shown.
[0060] Figure 2 A schematic diagram of an application scenario of a tag position offset detection method provided by an embodiment of the present invention is shown.
[0061] See also Figure 1 The tag position deviation detection method provided by the embodiment of the present invention may include steps 101 to 104.
[0062] Step 101: Acquire a test image of a workpiece to be tested that contains a label.
[0063] In a specific example, the method is applied to position offset detection of RFID tags of workpieces on an assembly line. Before step 101, the method further includes:
[0064] In response to a trigger signal of a limit switch of a detection area of the workpiece to be detected, reading information of the RFID tag;
[0065] If reading the information of the RFID tag fails, the step of obtaining the image to be measured of the area of the workpiece to be measured including the tag is performed.
[0066] Wherein, in response to the trigger signal of the limit switch of the workpiece to be measured, reading the RFID tag includes:
[0067] In response to a trigger signal of the limit switch from the workpiece to be tested, controlling the conveyor belt where the workpiece to be tested is located to stop;
[0068] After responding to the trigger signal, the RFID tag is read after a pre-stored buffering time.
[0069] In a specific example, a limit switch is installed at a fixed position on an automated assembly line. When a tooling plate equipped with an RFID tag moves to the trigger point of the limit switch, a camera installed above the assembly line is triggered to take a delayed photo.
[0070] Step 102: Segment the image to be tested based on a pre-stored segmentation template, select an identification area containing the label, and obtain an area pair by dividing the adjacent area around the identification area; wherein each of the area pairs includes two sub-areas, and the two sub-areas are separated by the identification area and symmetrically distributed relative to the identification area.
[0071] In some embodiments, step 102 includes:
[0072] Acquiring a corresponding segmentation template based on the type of the label of the workpiece to be tested;
[0073] Select the label based on the segmentation template to obtain the identification area;
[0074] Based on the edge extension line of the identification area, the adjacent areas around the identification area are divided to obtain the area pair.
[0075] See also Figure 2,In a specific example, the collected RFID tag image is segmented by ,region, and the built-in image processing algorithm of the camera is used to count the ROI pixels of each ,delimited area, and the area of each delimited area is calculated, which is ,recorded as A1, A2, A3, A4, A5, A6, A7, and A8.
[0076] In some embodiments, due to the shape of the workpiece itself, the size and shape of the RFID tag used for each product on the production line may vary.
[0077] For example, the shape of the air conditioner indoor unit itself is relatively large, and the corresponding RFID tag area is also relatively large; while the shape of the small workpiece on the air conditioner compressor itself is relatively small, and the corresponding RFID tag area is also relatively small; for a hollow cylinder such as a flange, the corresponding RFID tag can be round.
[0078] Figure 3 A schematic diagram of another application scenario of an embodiment of the present invention is shown. Figure 3 ,For circular labels, the recognition regions and region pairs can be constructed using ,rectangular box selection.
[0079] In some embodiments, the camera is fixed in position for shooting, and the shape and size of the identification area and areas A1 to A8 can be adjusted according to the shape and size of the RFID tag. The segmentation area selection templates used in different RFID tags may be different, but the shape of the selection area can be similar, such as a rectangle, and then the area of the segmentation area can be compared and judged according to the identification area.
[0080] Step 103: For each of the region pairs, calculate the area difference between two sub-regions therein, and compare the area difference with a corresponding error threshold.
[0081] In some embodiments, each of the region pairs corresponds to one of the error thresholds.
[0082] In some embodiments, step 103 includes:
[0083] Acquire the error threshold based on the type of the workpiece to be measured, each of the area pairs corresponds to one error threshold;
[0084] The magnitude relationships between the area differences and the corresponding error thresholds are compared respectively.
[0085] In a specific example, by comparing the area deviation of the symmetrical position with the pre-stored area deviation requirement limit, it is determined whether the current position of the RFID tag is offset, so as to determine whether the card reader can correctly read the barcode information in the RFID tag.
[0086] Step 104: Determine the position offset of the tag according to the comparison result.
[0087] In some embodiments, step 104 includes:
[0088] If there is a region pair whose area difference is greater than the error threshold, it is determined that the tag position is offset.
[0089] In some embodiments, after step 104, the method further includes:
[0090] Calculating the offset position of the RFID based on the area of the sub-region in the region pair whose area difference is greater than the error threshold;
[0091] The RFID tag is re-read based on the offset position.
[0092] In a specific example, area one and area three are an area pair, and the area difference is greater than the corresponding error threshold, and the offset direction and offset distance of the RFID tag are determined based on the areas of area one and area three.
[0093] In some embodiments, the method before step 101 further includes:
[0094] The segmentation template is constructed based on the label of the workpiece to be tested; wherein the segmentation template includes a standard identification area and a standard area pair adjacent to the standard identification area, the standard identification area can at least accommodate the label, and each of the standard area pairs includes two standard sub-areas, the two standard sub-areas are separated by the standard identification area and are symmetrically distributed relative to the standard identification area.
[0095] The label position offset detection method provided in the embodiment of the present invention realizes low-cost, accurate and efficient label position offset detection by comparing the size of the offset area, thereby improving the detection and assembly line production efficiency; on the other hand, the method provided in the embodiment of the present invention can solve the detection position accuracy deviation caused by the irregular external dimensions of each batch of labels, and only one set of visual detection devices is needed to realize position offset detection, which can effectively save detection costs.
[0096] Furthermore, the visual inspection solution provided by the embodiment of the present invention can also be applied to the offset detection of other workpieces, accessories or structures, and has the advantages of low inspection cost and easy implementation.
[0097] Embodiment 2
[0098] See also Figure 2In a specific example, when the limit switch is triggered, the camera is controlled to obtain an RFID tag image, and the image includes an RFID tag identification area and a segmentation area. In a specific example, the shape of the identification area is a rectangle, and the segmentation area includes eight areas from A1 to A8, and two symmetrically located areas form a pair for area comparison.
[0099] Optionally, the limit switch may include but is not limited to an infrared sensor, a proximity sensor, and a beam switch.
[0100] Figure 4 A schematic diagram of another implementation flow of the RFID tag position deviation detection method provided by an embodiment of the present invention is shown.
[0101] See also Figure 4 In a specific example, the implementation process of the RFID tag position offset detection method provided by the embodiment of the present invention is as follows.
[0102] When the limit switch, i.e., the sensor, detects the RFID tag, the RFID reader is turned on to read the tag information.
[0103] Determine whether the tag information is read. If the tag information is read, the read coding information is sent to the host computer; if the tag information is not read, turn on the camera to perform position offset detection.
[0104] Furthermore, it is determined whether the RFID tag position is offset. If it is not offset, there is an abnormality in the RFID system and the host computer issues an alarm prompt; if the RFID tag position is offset, a position offset prompt message is sent to the host computer for re-inspection.
[0105] Figure 5 A schematic diagram of another implementation flow of the RFID tag position deviation detection method provided by an embodiment of the present invention is shown.
[0106] See also Figure 5 In a specific example, the implementation process of the RFID tag position offset detection method provided by the embodiment of the present invention is as follows.
[0107] After the limit switch or sensor detects the RFID tag, it controls the conveyor to stop and turns on the card reader after an interval of 100ms. The card reader reads the RFID tag information, decodes it and transmits it to the host computer via Ethernet.
[0108] Optionally, the assembly line device with RFID tags flows to the limit detection area. When the limit infrared sensor switch senses the device with RFID, it sends a 24V DC high level to the PLC controller. After receiving the high level signal, the PLC controller sends control signals to the conveyor belt and the card reader respectively, so that the conveyor belt stops and the card reader is turned on. After an interval of 100ms, when the conveyor belt is completely stationary, the RFID tag information is read through the card reader fixed under the assembly line.
[0109] The host computer determines whether the tag information is read. If it is read successfully, the read coded information is sent to the host computer.
[0110] Optionally, the card reader sends the RFID tag information to a host computer via Ethernet for determination. If the host computer determines that the coded information is read, the read coded information is uploaded to the server.
[0111] If the tag information cannot be read successfully, an open detection signal is sent to the camera via Ethernet, and the camera is triggered to take a photo to collect the RFID tag image information.
[0112] Optionally, when the host computer determines that no barcode information is read, the host computer sends an open signal to the camera via Ethernet, and the camera is triggered to take a photo and collect RFID tag image information.
[0113] The size of the image blocks around the collected RFID is counted, and the offset error area is determined according to the recognition accuracy.
[0114] The size of the area error of the symmetrical image blocks is determined respectively. If there is an area error greater than the threshold φ, it is determined that the RFID tag has a position offset and re-detection is performed based on the offset position; if there is no area error greater than the threshold φ, it is determined that there is no position offset and detection is performed normally.
[0115] Optionally, the collected image information is framed to select an area around the RFID for position offset comparison, i.e., A1 to A8, to determine whether the offset area errors |A1-A3|, |A2-A4|, |A5-A7|, |A6-A8| of the RFID tag are all less than φ, thereby determining whether the RFID has a large position offset in all directions. If the difference is less than φ, it is determined that the tag has no offset and is in a normal detection state, otherwise the robot arm clamps the RFID tag to the front station of the visual detection and re-performs the position offset detection.
[0116] On the other hand, the method provided by the embodiment of the present invention also includes the steps of establishing an RFID detection template and determining the value of φ. The threshold φ of the offset error area is determined by testing the RFID tag with a card reader. For the same batch of products, the same set of visual test detection templates and thresholds are used for judgment.
[0117] In the prior art, multiple groups of cameras are used to collect images in sequence for comparison to avoid the position offset of the marking point. However, such a method cannot accurately locate the marking point for irregular RFID tags. The method provided in the embodiment of the present invention can detect the position offset of workpieces of various shapes by using only one group of cameras to take pictures under the triggering of the sensor, without the need for additional camera devices, effectively reducing the recognition cost and improving the detection and recognition efficiency.
[0118] Embodiment 3
[0119] Figure 6 A schematic structural diagram of a label position deviation detection device provided by an embodiment of the present invention is shown.
[0120] See also Figure 6 , the label position deviation detection device provided by the embodiment of the present invention may include:
[0121] On the other hand, a label position deviation detection device is provided, the device comprising:
[0122] The image acquisition module 201 is used to acquire the image of the workpiece to be tested containing the label;
[0123] An image segmentation module 202 is used to segment the image to be tested based on a pre-stored segmentation template, select a recognition area containing the label, and obtain a region pair by dividing the adjacent area around the recognition area; wherein each region pair includes two sub-regions, the two sub-regions are separated by the recognition area and are symmetrically distributed relative to the recognition area;
[0124] A difference calculation module 203 is used to calculate the area difference between two sub-regions in each region pair, and compare the area difference with a corresponding error threshold;
[0125] The offset determination module 204 is used to determine the position offset of the tag according to the comparison result.
[0126] In some embodiments, the image segmentation module is specifically used to:
[0127] Acquiring a corresponding segmentation template based on the type of the label of the workpiece to be tested;
[0128] Select the label based on the segmentation template to obtain the identification area;
[0129] Based on the edge extension line of the identification area, the adjacent areas around the identification area are divided to obtain the area pair.
[0130] In some embodiments, each of the region pairs corresponds to one error threshold.
[0131] In some embodiments, the offset calculation module is specifically used to:
[0132] If there is a region pair whose area difference is greater than the error threshold, it is determined that the tag position is offset.
[0133] In some embodiments, the device is further used to:
[0134] The segmentation template is constructed based on the label of the workpiece to be tested; wherein the segmentation template includes a standard identification area and a standard area pair adjacent to the standard identification area, the standard identification area can at least accommodate the label, and each of the standard area pairs includes two standard sub-areas, the two standard sub-areas are separated by the standard identification area and are symmetrically distributed relative to the standard identification area.
[0135] In some embodiments, the tag is an RFID tag, and the apparatus is further configured to:
[0136] In response to a trigger signal of a limit switch of a detection area of the workpiece to be detected, reading information of the RFID tag;
[0137] If reading the information of the RFID tag fails, the step of obtaining the image to be measured of the area of the workpiece to be measured including the tag is performed.
[0138] In some embodiments, the device is further used to:
[0139] The position of the RFID tag reading device is adjusted based on the position deviation to re-read the RFID tag.
[0140] To sum up, the device provided in the embodiment of the present invention can realize low-cost, accurate and efficient RFID tag position offset detection by comparing the size of the offset area, thereby improving the detection and assembly line production efficiency; on the other hand, it can solve the detection position accuracy deviation caused by the irregular external dimensions of each batch of RFID tags, and only one set of visual inspection devices is needed to realize position offset detection, which can effectively save detection costs.
[0141] Embodiment 4:
[0142] On the other hand, an embodiment of the present invention provides a label position deviation detection device, including an image acquisition device, a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the label position deviation detection method as described above.
[0143] In some embodiments, the device further comprises a limit switch, a card reader, and a conveyor belt.
[0144] Embodiment 5
[0145] In some implementations of this embodiment, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.
[0146] In some implementations of this embodiment, a computer program product is provided, including a computer program / instructions, characterized in that when the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.
[0147] The processor may include, but is not limited to, one or more processors or microprocessors. Each processor may be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components to execute the method in the above embodiments.
[0148] The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, and the computer-readable storage medium may include but is not limited to, for example, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, computer storage media (e.g., hard disk, floppy disk, solid-state drive, removable disk, CD-ROM, DVD-ROM, Blu-ray disc, etc.).
[0149] The computer-readable storage medium may also store at least one computer executable program / instruction, which may be, for example, a computer-readable instruction. The computer-readable storage medium includes, but is not limited to, for example, a volatile memory and / or a non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The computer-readable storage medium may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. For example, a non-transitory computer-readable storage medium may be connected to a computing device such as a computer, and then, when the computing device runs the computer-readable instructions stored on the computer-readable storage medium, the various methods described above may be performed.
[0150] In addition, the computer device may also include (but not limited to) a data bus, an input / output (I / O) bus, a display, and input / output devices (eg, keyboard, mouse, speaker, etc.), etc.
[0151] The processor may communicate with external devices via an I / O bus via a wired or wireless network.
[0152] In one embodiment, the at least one computer executable instruction may also be compiled into or constitute a software product / computer program product, wherein one or more computer executable instructions are executed by a processor to perform the various functions and / or method steps in the embodiments described in the present technology.
[0153] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0154] It should be noted that in the present disclosure, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element limited by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0155] Although the embodiments disclosed in the present disclosure are as above, the above contents are only embodiments adopted for facilitating the understanding of the present disclosure and are not intended to limit the present disclosure. Any technician in the technical field to which the present disclosure belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present disclosure, but the scope of patent protection of the present disclosure shall still be subject to the scope defined in the attached claims.
Claims
1. A label position deviation detection method, characterized in that: The method comprises: Acquire a test image of the workpiece to be tested that contains a label; Segment the image to be tested based on a pre-stored segmentation template, select a recognition area containing the label from the image, and obtain a region pair by dividing the adjacent area around the recognition area; wherein each region pair includes two sub-regions, the two sub-regions are separated by the recognition area and are symmetrically distributed relative to the recognition area; For each of the region pairs, calculating the area difference between two sub-regions, and comparing the area difference with a corresponding error threshold; Determine the position deviation of the tag according to the comparison result; The segmentation of the image to be tested based on a pre-stored segmentation template, selecting a recognition area containing the label, and obtaining a region pair by dividing the adjacent regions around the recognition area, includes: Acquiring a corresponding segmentation template based on the type of the label of the workpiece to be tested; Select the label based on the segmentation template to obtain the identification area; Based on the edge extension line of the identification area, the adjacent areas around the identification area are divided to obtain the area pair.
2. The method according to claim 1, characterized in that Each of the region pairs corresponds to one error threshold.
3. The method according to claim 1, characterized in that The step of determining the position offset of the tag according to the comparison result includes: If there is a region pair whose area difference is greater than the error threshold, it is determined that the tag position is offset.
4. The method according to any one of claims 1 to 3, characterized in that: Before acquiring the image to be measured of the area of the workpiece to be measured containing the label, the method further includes: The segmentation template is constructed based on the label of the workpiece to be tested; wherein the segmentation template includes a standard identification area and a standard area pair adjacent to the standard identification area, the standard identification area can at least accommodate the label, and each of the standard area pairs includes two standard sub-areas, the two standard sub-areas are separated by the standard identification area and are symmetrically distributed relative to the standard identification area.
5. The method according to claim 1, characterized in that The tag is an RFID tag. Before acquiring the image of the area of the workpiece to be measured that includes the tag, the method further includes: In response to a trigger signal of a limit switch of a detection area of the workpiece to be detected, reading information of the RFID tag; If reading the information of the RFID tag fails, the step of obtaining the image to be measured of the area of the workpiece to be measured including the tag is performed.
6. The method according to claim 5, characterized in that After determining the position offset of the tag according to the comparison result, the method further includes: The position of the RFID tag reading device is adjusted based on the position deviation to re-read the RFID tag.
7. A label position deviation detection device based on any one of the label position deviation detection methods of claims 1 to 6, characterized in that: The device comprises: An image acquisition module is used to acquire the image to be tested containing the label of the workpiece to be tested; An image segmentation module, used to segment the image to be tested based on a pre-stored segmentation template, select a recognition area containing the label, and obtain a region pair by dividing the adjacent area around the recognition area; wherein each region pair includes two sub-regions, the two sub-regions are separated by the recognition area and are symmetrically distributed relative to the recognition area; A difference calculation module, used for calculating, for each of the area pairs, an area difference between two sub-areas therein, and comparing the area difference with a corresponding error threshold; The offset determination module is used to determine the position offset of the tag according to the comparison result.
8. A label position deviation detection device, characterized in that: It includes an image collector, a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the label position offset detection method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the label position offset detection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Patch element positioning identification method based on minimum enclosing rectangle
CN105809705A
Inspection apparatus, image forming system, inspection method, and program
CN110022414A
Label detection method and device and computer readable storage medium
CN111950538A
Qualified label detection method, storage medium and electronic equipment
CN112164057A
Offset state determination method and device, electronic equipment and storage medium
CN114255218A
