Code spraying area positioning method and device, computer device and readable storage medium

By preprocessing and feature extraction of images captured from product packaging, the instance segmentation and rotation target detection results of the inkjet printing area are determined, solving the problem of inkjet printing area detection under different shapes and arrangements, and achieving fast and accurate inkjet printing area positioning.

CN119942048BActive Publication Date: 2026-07-03HANS LASER TECH IND GRP CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANS LASER TECH IND GRP CO LTD
Filing Date
2024-12-16
Publication Date
2026-07-03

Smart Images

  • Figure CN119942048B_ABST
    Figure CN119942048B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, and readable storage medium for locating inkjet-printed areas. The method includes: acquiring an image sample containing the inkjet-printed area and preprocessing the image sample; determining the instance segmentation result and the rotation target detection result of the target to be detected in the image sample based on the preprocessed image sample; and determining the location information of the inkjet-printed area based on the instance segmentation result and the rotation target detection result. This method enables rapid extraction of the feature distribution of the inkjet-printed area in the image sample, thereby achieving rapid and accurate location of the inkjet-printed area. It effectively improves the problem of difficulty in efficiently and accurately detecting the inkjet-printed area on each product package due to differences in the shape, size, and arrangement of product packaging, meeting higher requirements for inkjet printing applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of inkjet printing technology, and in particular to a method, apparatus, computer equipment, and readable storage medium for inkjet printing area positioning. Background Technology

[0002] With the continuous development of inkjet printing technology and the increasing demand for inkjet printing, the requirements for its use are becoming increasingly stringent. In consumer products and other fields, the inkjet-printed areas on product packaging can provide consumers with key information such as quality and production details. For manufacturers, it is an essential means to ensure product safety and traceability, and a crucial link in ensuring compliance with food safety regulations, maintaining brand reputation, and winning consumer trust. Therefore, it is of paramount importance to inspect the inkjet-printed areas on product packaging.

[0003] In related technologies, traditional computer vision technology is usually used to detect the coding area on product packaging. However, due to the different shapes, sizes and arrangements of product packaging, it is difficult to guarantee efficient and accurate detection of the coding area on each product packaging. Summary of the Invention

[0004] Therefore, it is necessary to provide a coding area positioning method, device, computer equipment, and readable storage medium to address the above-mentioned technical problems.

[0005] A method for locating a coding area, comprising:

[0006] Acquire an image sample containing the inkjet-printed area and preprocess the image sample;

[0007] Based on the preprocessed image acquisition sample, determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample;

[0008] Based on the instance segmentation results and the rotating target detection results, the positioning information of the inkjet printing area is determined.

[0009] In one embodiment, determining the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample based on the preprocessed image acquisition sample includes:

[0010] Obtain the preset rotation selection box corresponding to the preprocessed image acquisition sample;

[0011] Based on the preset rotation selection box, feature extraction processing is performed on the preprocessed image acquisition sample to determine the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample.

[0012] In one embodiment, the step of performing feature extraction processing on the preprocessed image acquisition sample according to the preset rotation selection box, and determining the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample, includes:

[0013] The preprocessed image samples are subjected to primary feature extraction processing to determine multi-scale feature information maps;

[0014] The multi-scale feature information map after the primary feature extraction is subjected to feature fusion processing to determine the multi-scale feature fusion map;

[0015] Based on the preset rotation selection box and the multi-scale feature fusion map, the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample are determined.

[0016] In one embodiment, determining the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample based on the preset rotation selection box and the multi-scale feature fusion map includes:

[0017] Based on the multi-scale feature fusion map, the initial instance segmentation result of the target to be detected in the image acquisition sample is determined;

[0018] Based on the preset rotation selection box and the initial instance segmentation result, the rotation target detection result of the target to be detected in the image acquisition sample is determined;

[0019] Based on the initial instance segmentation result and the rotated target detection result, the instance segmentation result of the target to be detected in the image acquisition sample is determined.

[0020] In one embodiment, the instance segmentation result includes an instance segmentation mask, and the rotation target detection result includes an instance rotation center, an instance rotation angle, and a rotation frame scale; determining the positioning information of the inkjet printing area based on the instance segmentation result and the rotation target detection result includes:

[0021] Based on the instance segmentation results, determine multiple instance segmentation masks, instance rotation centers, instance rotation angles, and rotation box scales;

[0022] Based on the instance rotation center, the instance rotation angle, and the rotation frame scale, determine the positioning information of multiple instance segmentation masks;

[0023] The positioning information of the inkjet printing area is determined based on the positioning information of the segmented mask of multiple instances.

[0024] In one embodiment, determining the positioning information of multiple instance segmentation masks based on the instance rotation center, the instance rotation angle, and the rotation frame scale includes:

[0025] Determine the instance rotation matrix based on the instance rotation angle;

[0026] The corner coordinates of the preset horizontal selection box are determined based on the preset horizontal selection box, the rotation center of the instance, and the scale of the rotation box.

[0027] Based on the instance rotation matrix and the corner coordinates of the preset horizontal selection box, the positioning information of the plurality of instance segmentation masks is determined.

[0028] In one embodiment, determining the positioning information of the inkjet printing area based on the positioning information of the segmented mask from multiple instances includes:

[0029] Based on the positioning information of the segmentation masks of multiple instances, the target region of the instance is determined;

[0030] Based on the target area of ​​the instance, determine the positioning information of the inkjet printing area.

[0031] A coding area positioning device, comprising:

[0032] The acquisition module is used to acquire image samples containing the inkjet printing area and preprocess the image samples.

[0033] The feature analysis module, connected to the acquisition module, is used to determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample based on the preprocessed image acquisition sample.

[0034] The positioning module, connected to the feature analysis module, is used to determine the positioning information of the inkjet printing area based on the instance segmentation result and the rotating target detection result.

[0035] A computer device includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method described above.

[0036] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.

[0037] A computer program product that, when run on a terminal device, causes the terminal device to perform any of the methods described above.

[0038] The beneficial effects of the embodiments provided in this application include:

[0039] This inkjet printing area localization method acquires and preprocesses image samples containing the inkjet printing area. Based on the preprocessed image samples, feature extraction is performed to determine the instance segmentation and rotation detection results of the target to be detected within the image samples, reflecting the feature distribution. Then, based on these results, the localization information of the inkjet printing area is determined. Compared to traditional inkjet printing area localization methods, this method introduces a rotation detection mechanism that adapts to different shapes, sizes, and arrangements of the inkjet printing area in the image samples. This enables rapid extraction of the feature distribution of the inkjet printing area in the image samples, leading to fast and accurate localization of the inkjet printing area. This effectively improves the problem of accurately detecting the inkjet printing area on each product packaging due to variations in shape, size, and arrangement, meeting higher requirements for inkjet printing applications. Attached Figure Description

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

[0041] Figure 1 This is a flowchart illustrating a coding area positioning method in one embodiment;

[0042] Figure 2 This is a schematic diagram of the specific process of step 104 in one embodiment;

[0043] Figure 3 This is a schematic diagram of the specific process of step 106 in one embodiment;

[0044] Figure 4 This is a schematic diagram of the coding area positioning process in one embodiment;

[0045] Figure 5 This is a schematic diagram of the coding area positioning process in one embodiment;

[0046] Figure 6 This is a schematic diagram of the coding area positioning process in one embodiment;

[0047] Figure 7 This is a schematic block diagram of the structure of the inkjet printing area positioning device in one embodiment;

[0048] Figure 8 This is a schematic block diagram of the specific structure of the feature analysis module 40 in one embodiment;

[0049] Figure 9 This is a schematic block diagram of the specific structure of the positioning module 60 in one embodiment;

[0050] Figure 10 This is a schematic diagram of the structure of a computer device in one embodiment. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0052] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0053] Figure 1 This is a flowchart illustrating a coding area positioning method in one embodiment.

[0054] In this embodiment, as Figure 1 As shown, the inkjet printing area positioning method includes steps 102 to 106.

[0055] Step 102: Obtain an image sample containing the inkjet printing area and preprocess the image sample.

[0056] The coding area can be the coding area on the product packaging that needs to be positioned and detected. The image acquisition sample can be an image or picture of the coding area on the product packaging that needs to be positioned and detected. Preprocessing can be a pre-consistency processing of the image acquisition sample before feature extraction. Optionally, preprocessing can be formatting the image acquisition sample to a uniform scale and normalizing the image acquisition sample.

[0057] The scenarios for acquiring and preprocessing image samples containing the inkjet-printed area include: acquiring an image of the inkjet-printed area on the product packaging using an acquisition module (such as an image acquisition device) to obtain an image sample containing the inkjet-printed area, and then preprocessing the image sample using an acquisition module (such as an image analysis device) to obtain a preprocessed image sample.

[0058] Step 104: Based on the preprocessed image acquisition sample, determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample.

[0059] The target to be detected can be image information related to the coding area in the preprocessed image acquisition sample. The instance segmentation result can be a graphic feature division result that reflects the feature distribution of multiple targets to be detected after feature extraction from multiple targets to be detected in the preprocessed image acquisition sample. The rotation target detection result can be an image feature detection result that adapts to coding areas of different scales, shapes, and arrangements in the image acquisition sample after optimized feature extraction based on a rotation detection mechanism. Optionally, the instance segmentation result includes an instance segmentation mask, and the rotation target detection result includes the instance rotation center, instance rotation angle, and rotation box scale.

[0060] The process of determining the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample based on the preprocessed image acquisition sample includes: obtaining the preset rotation selection box corresponding to the preprocessed image acquisition sample; performing feature extraction processing on the preprocessed image acquisition sample based on the preset rotation selection box to determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample.

[0061] The preset rotation selection box can be the range of image features selected in a single step during the optimization feature extraction process of multiple targets to be detected in the preprocessed image acquisition sample based on the rotation detection mechanism.

[0062] It should be noted that the scale of the preset rotation selection box can be adjusted in combination with the scale, shape and different arrangement of the image acquisition sample containing the coding area. Then, based on the rotation detection mechanism, the feature extraction of multiple targets to be detected in the preprocessed image acquisition sample can be optimized, so as to adapt to coding areas of different scales, shapes and different arrangements in the image acquisition sample.

[0063] Step 106: Determine the positioning information of the inkjet printing area based on the instance segmentation results and the rotation target detection results.

[0064] The positioning information of the coding area can be the position information of the coding area relative to the product packaging. Optionally, the positioning information of the coding area can be the position coordinates of the coding area in the product packaging coordinate system.

[0065] The scenarios for determining the location information of the inkjet printing area based on the instance segmentation results and the rotating target detection results include: determining the location information of multiple instance segmentation masks based on the instance segmentation results and the rotating target detection results; and determining the location information of the inkjet printing area based on the location information of the multiple instance segmentation masks.

[0066] When inspecting the inkjet-printed area on product packaging, the process begins by acquiring an image of the inkjet-printed area using an acquisition module (such as an image acquisition device) to obtain an image sample containing the inkjet-printed area. This image sample is then preprocessed using another acquisition module (such as an image analysis device) to obtain a preprocessed image sample. Next, a preset rotation selection box corresponding to the preprocessed image sample is acquired. Based on the preset rotation selection box, feature extraction is performed on the preprocessed image sample to determine the instance segmentation result and rotation target detection result of the target to be detected in the image sample. Then, based on the instance segmentation result and rotation target detection result, the positioning information of multiple instance segmentation masks is determined. Finally, based on the positioning information of the multiple instance segmentation masks, the positioning information of the inkjet-printed area is determined.

[0067] The inkjet printing area localization method provided in this embodiment acquires an image sample containing the inkjet printing area and preprocesses the image sample. Based on the preprocessed image sample, feature extraction is performed to determine the instance segmentation result and rotation target detection result of the target to be detected in the image sample that can reflect the feature distribution. Then, based on the obtained instance segmentation result and rotation target detection result, the localization information of the inkjet printing area is determined. Compared with the traditional inkjet printing area localization method, a rotation detection mechanism that can adapt to different shapes, sizes and arrangements of inkjet printing areas in the image sample is introduced. This enables rapid extraction of the feature distribution of the inkjet printing area in the image sample, and thus rapid and accurate localization of the inkjet printing area. This effectively improves the problem that it is difficult to ensure efficient and accurate detection of the inkjet printing area on each product packaging due to the different shapes, sizes and arrangements of product packaging, and meets the higher requirements of inkjet printing.

[0068] Figure 2 This is a schematic diagram of the specific process of step 104 in one embodiment.

[0069] In this embodiment, as Figure 2 As shown, step 104 includes sub-steps 202 to 206.

[0070] Step 202 involves performing primary feature extraction on the preprocessed image acquisition samples to determine the multi-scale feature information map.

[0071] Primary feature extraction processing can be the process of extracting features from preprocessed image samples at multiple different scales. The multi-scale feature information map can be the feature extraction results from image samples at multiple different scales. Optionally, primary feature extraction processing can be the process of extracting features based on a convolutional neural network algorithm at multiple different input image resolutions and input channel numbers. The multi-scale feature information map can be feature sampling maps of multiple different input image resolutions and different input channel numbers.

[0072] Step 204 involves performing feature fusion processing on the multi-scale feature information map after primary feature extraction to determine the multi-scale feature fusion map.

[0073] Feature fusion processing can be the process of merging and fusing features from multi-scale feature maps. A multi-scale feature fusion map is a feature fusion map obtained after merging and fusing features from multi-scale feature maps.

[0074] It should be noted that after feature merging and feature fusion processing of multi-scale feature information maps, the number of multi-scale feature fusion maps obtained is often greater than the number of multi-scale feature information maps, and the scale range of the obtained multi-scale feature fusion maps is smaller than the scale range of the multi-scale feature information maps.

[0075] Step 206: Based on the preset rotation selection box and the multi-scale feature fusion map, determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample.

[0076] Based on the preset rotation selection box and the multi-scale feature fusion map, the scenarios for determining the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample include: determining the initial instance segmentation result of the target to be detected in the image acquisition sample based on the multi-scale feature fusion map; determining the rotation target detection result of the target to be detected in the image acquisition sample based on the preset rotation selection box and the initial instance segmentation result; and determining the instance segmentation result of the target to be detected in the image acquisition sample based on the initial instance segmentation result and the rotation target detection result.

[0077] The initial instance segmentation result can be an initial graphic feature segmentation result formed based on a multi-scale feature fusion map, which has different receptive fields and can reflect the feature distribution of multiple targets to be detected in the image acquisition sample.

[0078] It's important to note that the receptive field represents the region of the input image that a point on the feature map can see. In other words, the point on the feature map is calculated from the receptive field size region of the input image. A larger receptive field value indicates a larger range of the original image it can access, meaning it may contain more global and semantically higher-level features; conversely, a smaller value indicates that the features it contains are more local and detailed.

[0079] Based on the initial instance segmentation results and the rotation target detection results, the specific scenarios for determining the instance segmentation results of the target to be detected in the image acquisition sample include: it is necessary to combine the rotation target detection results to crop the initial instance segmentation results, and then perform upsampling and binarization after cropping to obtain the instance segmentation results of the inkjet printing area on the product packaging.

[0080] The inkjet printing area localization method provided in this embodiment performs primary feature extraction and feature fusion processing on the preprocessed image acquisition sample to determine a multi-scale feature fusion map. Based on the obtained multi-scale feature fusion map, the initial instance segmentation result and the rotation target detection result are determined. Then, the initial instance segmentation result is precisely cropped based on the obtained rotation target detection result, ensuring that the instance segmentation result only contains the region directly related to the target object, thereby improving the quality and practicality of the instance segmentation result.

[0081] Figure 3 This is a schematic diagram of the specific process of step 106 in one embodiment.

[0082] In this embodiment, as Figure 3 As shown, step 106 includes sub-steps 302 to 306.

[0083] In step 302, based on the instance segmentation results, determine multiple instance segmentation masks, instance rotation centers, instance rotation angles, and rotation box scales.

[0084] The instance segmentation mask can be an assigned mask for each individual instance in the image. The instance rotation center can be the rotation target detection center point for each individual instance in the image. The instance rotation angle can be the rotation angle of each individual instance in the image. The rotation box scale can be the width and height values ​​of a preset rotation selection box. Optionally, the instance rotation center can be the center coordinates of a preset rotation selection box. The instance rotation angle can be the rotation angle of a preset rotation selection box.

[0085] Step 304: Determine the positioning information of multiple instance segmentation masks based on the instance rotation center, instance rotation angle, and rotation frame scale.

[0086] The positioning information of multiple instance segmentation masks can be the relative position of the relative coding area on the edge of the product packaging.

[0087] Determining the positioning information of multiple instance segmentation masks based on the instance rotation center, instance rotation angle, and rotation box scale includes: determining the instance rotation matrix based on the instance rotation angle; determining the corner coordinates of a preset horizontal selection box based on a preset horizontal selection box, instance rotation center, and rotation box scale; and determining the positioning information of multiple instance segmentation masks based on the instance rotation matrix and the corner coordinates of the preset horizontal selection box. Optionally, the corner coordinates can be the position coordinates of the four corner points of the preset horizontal selection box.

[0088] Step 306: Based on the positioning information of the segmented mask from multiple instances, determine the positioning information of the inkjet printing area.

[0089] The scenarios for determining the location information of the inkjet printing area based on the location information of multiple instance segmentation masks include: determining the instance target area based on the location information of multiple instance segmentation masks; and determining the location information of the inkjet printing area based on the instance target area.

[0090] The instance target region can be formed based on multiple instance segmentation masks, and is an image region that can be located at the edge of the product packaging. The positioning information of the inkjet printing area can be the position information of the inkjet printing area relative to the edge of the product packaging.

[0091] The inkjet printing area positioning method provided in this embodiment determines the positioning information of multiple instance segmentation masks by using the instance rotation center, instance rotation angle, and rotation frame scale. Based on the positioning information of multiple instance segmentation masks, the precise position of the instance target area in the image is determined. Finally, combined with an edge detection algorithm, the product packaging edge is precisely located within the instance target area.

[0092] For example, suppose the center of rotation is c. (x,y) = (x0, y0), with a rotation angle of θ, and the height and width of the rotated rectangle are h and w, respectively.

[0093] Based on the rotation angle of the example, the rotation matrix R is as follows:

[0094]

[0095] To locate the blue edge of the rotated rectangle, the coordinates of the center point of the blue edge before rotation can be obtained from the rotation center in the example: p. (x,y) = (x1, y1), where:

[0096]

[0097] Then the rotated p'(x,y)=(x'1,y'1), after expansion, is:

[0098] p':(cosθ·x1-sinθ·y1,sinθ·x1+cosθ·y1)

[0099] Based on the coordinates above, we can determine as follows: Figure 4 The coordinates of the four corner points of the target area of ​​the blue border instance, namely LT, RT, RB, and LB, are shown below. Among them, w' = w - ε, h' = 20, ε represents a smaller value to avoid the width from coinciding with the preset rotating selection box, and the height is fixed at 20 pixels for better effect.

[0100]

[0101] The coordinates of the four corner points LT, RT, RB, and LB after rotation can be obtained by multiplying the rotation matrices:

[0102]

[0103] After unfolding, you will get:

[0104]

[0105] Based on the coordinates of these four corner points, an instance segmentation mask is created, with the inside of the mask being 1 (or True) and the outside being 0 (or False). The instance segmentation mask is applied to the image acquisition sample to obtain the instance target region. Then, within this instance target region, an edge detection algorithm (such as Candy) is used to find the product packaging edge. The localization of the other product packaging edges follows the same principle, using the rotation target detection results and the instance segmentation mask to quickly locate the product packaging edges.

[0106] It should be noted that, as Figure 5 As shown, for the positioning of the inkjet printing area of ​​an unobstructed product packaging, due to the lack of interference from redundant instance segmentation masks in other locations, the edge of the product packaging can be quickly located directly by using the instance rotation center and instance rotation angle, and then the inkjet printing area position can be located.

[0107] like Figure 6 As shown, for the positioning of the inkjet printing area of ​​a product packaging with obstructions, the product packaging edge is still quickly located based on the instance rotation center and instance rotation angle. However, due to obstructions, some product packaging edges may not be able to be located. In this case, the inkjet printing area is found on the product packaging edges that can be located.

[0108] It should be understood that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least one sub-step described above may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps. It should be noted that the different embodiments described above can be combined with each other.

[0109] Figure 7 This is a schematic block diagram of the structure of the inkjet printing area positioning device in one embodiment.

[0110] In this embodiment, as Figure 7 As shown, the inkjet printing area positioning device includes an acquisition module 20, a feature analysis module 40, and a positioning module 60.

[0111] The acquisition module 20 is used to acquire image samples containing the inkjet printing area and preprocess the image samples.

[0112] The feature analysis module 40, connected to the acquisition module 20, is used to determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample based on the preprocessed image acquisition sample.

[0113] The positioning module 60, connected to the feature analysis module 40, is used to determine the positioning information of the inkjet printing area based on the instance segmentation results and the rotation target detection results.

[0114] In this embodiment, each module is used to execute Figure 1 For details of each step in the corresponding embodiment, please refer to the documentation. Figure 1 as well as Figure 1 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0115] The inkjet printing area positioning device provided in this embodiment acquires an image sample containing the inkjet printing area and preprocesses the image sample. Based on the preprocessed image sample, it extracts features to determine the instance segmentation result and rotation target detection result of the target to be detected in the image sample that can reflect the feature distribution. Then, based on the obtained instance segmentation result and rotation target detection result, it determines the positioning information of the inkjet printing area. Compared with the traditional inkjet printing area positioning method, it introduces a rotation detection mechanism that can adapt to different shapes, sizes and arrangements of inkjet printing areas in the image sample. This enables rapid extraction of the feature distribution of the inkjet printing area in the image sample, and thus rapid and accurate positioning of the inkjet printing area. It effectively improves the problem that it is difficult to ensure efficient and accurate detection of the inkjet printing area on each product packaging due to the different shapes, sizes and arrangements of product packaging, and meets the higher requirements of inkjet printing.

[0116] Figure 8 This is a schematic block diagram of the specific structure of the feature analysis module 40 in one embodiment.

[0117] In this embodiment, as Figure 8 As shown, the feature analysis module 40 includes a feature information determination unit 410, a feature fusion determination unit 420, and a feature analysis unit 430.

[0118] The feature information determination unit 410 is used to perform primary feature extraction processing on the preprocessed image acquisition sample to determine the multi-scale feature information map.

[0119] The feature fusion determination unit 420, connected to the feature information determination unit 410, is used to perform feature fusion processing on the multi-scale feature information map after primary feature extraction to determine the multi-scale feature fusion map.

[0120] The feature analysis unit 430, connected to the feature fusion determination unit 420, is used to determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample based on the preset rotation selection box and the multi-scale feature fusion map.

[0121] In this embodiment, each unit is used to perform Figure 2 For details of each step in the corresponding embodiment, please refer to the documentation. Figure 2 as well as Figure 2 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0122] Figure 9 This is a schematic block diagram of the specific structure of the positioning module 60 in one embodiment.

[0123] In this embodiment, as Figure 9 As shown, the positioning module 60 includes an instance information determination unit 610, a segmentation mask positioning unit 620, and a coding area positioning unit 630.

[0124] The instance information determination unit 610 is used to determine multiple instance segmentation masks, instance rotation centers, instance rotation angles, and rotation box scales based on the instance segmentation results.

[0125] The segmentation mask positioning unit 620 is connected to the instance information determination unit 610 and is used to determine the positioning information of multiple instance segmentation masks based on the instance rotation center, instance rotation angle and rotation frame scale.

[0126] The inkjet printing area positioning unit 630 is connected to the segmentation mask positioning unit 620 and is used to determine the positioning information of the inkjet printing area based on the positioning information of multiple instance segmentation masks.

[0127] In this embodiment, each unit is used to perform Figure 3 For details of each step in the corresponding embodiment, please refer to the documentation. Figure 3 as well as Figure 3 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0128] Each unit in the above embodiments is used to execute the steps in the corresponding embodiments described above. For details, please refer to the relevant descriptions in the corresponding embodiments described above, which will not be repeated here.

[0129] The division of the modules in the above-mentioned inkjet printing area positioning device is only for illustrative purposes. In other embodiments, the inkjet printing area positioning device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned inkjet printing area positioning device.

[0130] Specific limitations regarding the coding area positioning device can be found in the limitations of the coding area positioning method above, and will not be repeated here. Each module in the aforementioned coding area positioning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0131] Figure 10 This is a schematic diagram of the structure of a computer device in one embodiment.

[0132] In this embodiment, as Figure 10 As shown, the computer device includes a memory A1 and a processor A2; it may also include a display screen A3, a communications interface, and a bus. Optionally, the computer device may be a laser computer device.

[0133] The memory A1, processor A2, display screen A3, and communication interface can communicate with each other via a bus; the display screen A3 is configured to display the user operation interface preset in the initial setting mode, and the display screen A3 can also display the process control window; the communication interface can transmit information; the memory A1 stores computer programs, and the processor A2 can call the logical instructions in the memory A1 to execute the methods in the above embodiments.

[0134] Furthermore, the logic instructions in the aforementioned memory A1 can be implemented as software functional units and, when sold or used as independent workpieces, can be stored in a computer-readable storage medium.

[0135] Memory A1, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this application. Processor A2 executes functional applications and data processing by running the software programs, instructions, or modules stored in memory A1, thereby implementing the methods in the above embodiments.

[0136] Memory A1 includes a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, memory A1 may include high-speed random access memory and may also include non-volatile memory.

[0137] Processor A2 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0138] This application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, cause the processors to perform the methods described above.

[0139] This application also provides a computer program product that, when run on a terminal device, causes the terminal device to execute the methods described in the above embodiments.

[0140] The inkjet printing area positioning method, apparatus, computer equipment, and readable storage medium provided in the above embodiments acquire image samples containing inkjet printing areas, preprocess the image samples, and extract features based on the preprocessed image samples. This allows for the determination of instance segmentation results and rotation target detection results of the target to be detected in the image samples, reflecting the feature distribution. Based on the obtained instance segmentation and rotation target detection results, the positioning information of the inkjet printing area is determined. Compared to traditional inkjet printing area positioning methods, this method introduces a rotation detection mechanism that can adapt to different shapes, sizes, and arrangements of inkjet printing areas in image samples. This enables rapid extraction of the feature distribution of inkjet printing areas in image samples, leading to fast and accurate positioning of the inkjet printing area. This effectively improves the problem of difficulty in efficiently and accurately detecting inkjet printing areas on each product packaging due to differences in shape, size, and arrangement, meeting higher requirements for inkjet printing applications and possessing significant economic and practical value.

[0141] Any references to memory, storage, databases, or other media used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).

[0142] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0143] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for locating a coding area, characterized in that, include: Acquire an image sample containing the inkjet-printed area and preprocess the image sample; Based on the preprocessed image acquisition sample, determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample; Based on the instance segmentation results and the rotating target detection results, the positioning information of the inkjet printing area is determined; The step of determining the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample based on the preprocessed image acquisition sample includes: Obtain a preset rotation selection box corresponding to the preprocessed image acquisition sample; perform feature extraction processing on the preprocessed image acquisition sample according to the preset rotation selection box, and determine the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample; The step of performing feature extraction processing on the preprocessed image acquisition sample according to the preset rotation selection box, and determining the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample, includes: The preprocessed image acquisition sample is subjected to primary feature extraction processing to determine a multi-scale feature information map; the multi-scale feature information map after primary feature extraction is subjected to feature fusion processing to determine a multi-scale feature fusion map; based on the preset rotation selection box and the multi-scale feature fusion map, the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample are determined.

2. The inkjet printing area positioning method according to claim 1, characterized in that, The step of determining the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample based on the preset rotation selection box and the multi-scale feature fusion map includes: Based on the multi-scale feature fusion map, the initial instance segmentation result of the target to be detected in the image acquisition sample is determined; Based on the preset rotation selection box and the initial instance segmentation result, the rotation target detection result of the target to be detected in the image acquisition sample is determined; Based on the initial instance segmentation result and the rotated target detection result, the instance segmentation result of the target to be detected in the image acquisition sample is determined.

3. The inkjet printing area positioning method according to claim 1, characterized in that, The instance segmentation result includes an instance segmentation mask, and the rotated target detection result includes the instance rotation center, instance rotation angle, and rotation box scale; The step of determining the positioning information of the inkjet printing area based on the instance segmentation result and the rotating target detection result includes: Based on the instance segmentation results, determine multiple instance segmentation masks, instance rotation centers, instance rotation angles, and rotation box scales; Based on the instance rotation center, the instance rotation angle, and the rotation frame scale, determine the positioning information of multiple instance segmentation masks; The positioning information of the inkjet printing area is determined based on the positioning information of the segmented mask of multiple instances.

4. The inkjet printing area positioning method according to claim 3, characterized in that, The step of determining the positioning information of multiple instance segmentation masks based on the instance rotation center, the instance rotation angle, and the rotation frame scale includes: Determine the instance rotation matrix based on the instance rotation angle; The corner coordinates of the preset horizontal selection box are determined based on the preset horizontal selection box, the rotation center of the instance, and the scale of the rotation box. Based on the instance rotation matrix and the corner coordinates of the preset horizontal selection box, the positioning information of the plurality of instance segmentation masks is determined.

5. The inkjet printing area positioning method according to claim 3, characterized in that, The step of determining the positioning information of the inkjet printing area based on the positioning information of the segmented mask from multiple instances includes: Based on the positioning information of the segmentation masks of multiple instances, the target region of the instance is determined; Based on the target area of ​​the instance, determine the positioning information of the inkjet printing area.

6. A coding area positioning device, characterized in that, include: The acquisition module is used to acquire image samples containing the inkjet printing area and preprocess the image samples. The feature analysis module, connected to the acquisition module, is used to determine the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample based on the preprocessed image acquisition sample; A positioning module, connected to the feature analysis module, is used to determine the positioning information of the inkjet printing area based on the instance segmentation result and the rotating target detection result; The step of determining the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample based on the preprocessed image acquisition sample includes: Obtain a preset rotation selection box corresponding to the preprocessed image acquisition sample; perform feature extraction processing on the preprocessed image acquisition sample according to the preset rotation selection box, and determine the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample; The step of performing feature extraction processing on the preprocessed image acquisition sample according to the preset rotation selection box, and determining the instance segmentation result and rotation target detection result of the target to be detected in the image acquisition sample, includes: The preprocessed image acquisition sample is subjected to primary feature extraction processing to determine a multi-scale feature information map; the multi-scale feature information map after primary feature extraction is subjected to feature fusion processing to determine a multi-scale feature fusion map; based on the preset rotation selection box and the multi-scale feature fusion map, the instance segmentation result and the rotation target detection result of the target to be detected in the image acquisition sample are determined.

7. A computer device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 5.