A method and apparatus for positioning a flexible sheet metal member

By preprocessing the flexible thin part and matching its vertical state, the problem of inaccurate positioning of the flexible thin part was solved, and a high-precision positioning effect was achieved.

CN115239942BActive Publication Date: 2026-04-14GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG UNIV OF TECH
Filing Date
2022-07-26
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing positioning methods for flexible thin parts have low accuracy, especially during vibration when rotation or reversal can easily occur, leading to inaccurate positioning.

Method used

By preprocessing the image to be processed, the material outline and rotation angle are extracted, and after being adjusted to a vertical state, they are matched with the preset material outline template. The position of the flexible thin part is determined by combining the rotation angle and the matching degree.

Benefits of technology

This method improves the positioning accuracy of flexible thin parts, achieves accurate positioning, and solves the problem of inaccurate positioning in existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115239942B_ABST
    Figure CN115239942B_ABST
Patent Text Reader

Abstract

The application discloses a flexible component positioning method and device, and the method comprises the following steps: preprocessing an obtained picture to be processed to obtain a pretreated picture; determining a material contour of the flexible component to be positioned and a first rotation angle corresponding to the material contour in the pretreated picture; obtaining a matching contour picture of the flexible component to be positioned in a vertical state based on the material contour; matching the matching contour picture with a plurality of preset material contour template pictures, and determining a matching material contour picture, wherein the matching material contour picture is a material contour template picture matched with the matching contour picture in the plurality of material contour template pictures; and obtaining position information of the flexible component to be positioned by comprehensively considering the first rotation angle and the matching material contour picture. The technical problem of low accuracy of the existing flexible component positioning method is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision, and more particularly to a method and apparatus for positioning flexible thin parts. Background Technology

[0002] With the development of science and technology, various types of robots have emerged, such as food delivery robots, package delivery robots, navigation robots, and industrial robots. Among them, industrial robots can not only reduce manual labor but also improve delivery efficiency and reduce costs, thus they have been widely used in the industrial field.

[0003] When industrial robots process or grasp workpieces, they need to position the workpieces. However, the workpieces may rotate due to vibration during production and transfer. Some flexible thin parts, such as nickel electrode sheets, may even rotate in reverse. This is not conducive to the positioning of flexible thin parts, resulting in low accuracy of existing positioning methods for flexible thin parts. Summary of the Invention

[0004] In view of this, this application provides a positioning method and device for flexible thin parts, which can accurately position flexible thin parts and solves the technical problem of low accuracy in existing positioning methods for flexible thin parts.

[0005] The first aspect of this application provides a method for positioning a flexible thin part, comprising:

[0006] The obtained image to be processed is preprocessed to obtain a preprocessed image;

[0007] Determine the material outline of the flexible thin part to be positioned in the preprocessed image and the first rotation angle corresponding to the material outline;

[0008] Based on the material profile, obtain the matching profile diagram of the flexible thin part to be positioned in a vertical state;

[0009] The outline to be matched is matched with several preset material outline templates, and the matching material outline is determined. The matching material outline is the material outline template that matches the outline to be matched among the several material outline templates.

[0010] By combining the first rotation angle and the matching material contour map, the position information of the flexible thin part to be positioned is obtained.

[0011] Optionally, the step of preprocessing the acquired image to obtain a preprocessed image specifically includes:

[0012] The image to be processed is segmented to obtain N segmented images;

[0013] Each segmented image is transmitted to the GPU thread corresponding to the segmented image, so that the corresponding segmented image is preprocessed in the GPU thread to obtain a preprocessed segmented image.

[0014] Obtain the preprocessed segmented images sent by each of the GPU threads;

[0015] The preprocessed image is obtained by stitching together N preprocessed segmented images.

[0016] Optionally, determining the material outline of the flexible thin part to be positioned in the preprocessed image and the first rotation angle corresponding to the material outline specifically includes:

[0017] The contour of the flexible thin part to be positioned in the preprocessed image is extracted to obtain the material contour corresponding to the flexible thin part to be positioned.

[0018] Determine the minimum bounding rectangle of the material profile and the rotation angle corresponding to the minimum bounding rectangle, and determine the first rotation angle of the material profile based on the rotation angle.

[0019] Optionally, obtaining the matching contour map of the flexible thin part to be positioned in a vertical state based on the material contour specifically includes:

[0020] Adjust the material outline to a vertical position to obtain a vertical material outline diagram;

[0021] Determine the circumscribed rectangle corresponding to the vertical material outline, and extract a region of interest of a preset size from the circumscribed rectangle to obtain the outline to be matched.

[0022] Optionally, adjusting the material outline to a vertical state to obtain a vertical material outline diagram specifically includes:

[0023] Using the first rotation angle, calculate the corresponding spatial correction transformation matrix;

[0024] The material outline is adjusted to a vertical state using the spatial correction transformation matrix, resulting in a vertical material outline diagram.

[0025] Optionally, the step of matching the contour image to be matched with a plurality of preset material contour template images and determining the matching material contour image, wherein the matching material contour image is: among the plurality of material contour template images, the material contour template image that matches the contour image to be matched specifically includes:

[0026] The outline image to be matched is matched one by one with a number of preset material outline template images;

[0027] Determine the matching score between the outline image to be matched and each of the material outline template images, and take the material outline template image with the highest matching score as the matched material outline image.

[0028] Optionally, the number of material outline templates is M;

[0029] The step of matching the outline to be matched with a number of preset material outline templates one by one specifically includes:

[0030] Step S1: Perform pixel-by-pixel matching between the contour image to be matched and the preset m-th material contour template image;

[0031] Step S2: When the pixel values ​​of the outline to be matched and the m-th material outline template are the same and neither is 0 at the same pixel, the matching score of the m-th material outline template is incremented by one.

[0032] Step S3: After all pixels in the m-th material outline template have been matched, let m = m + 1 and return to step S1 until m = M.

[0033] Optionally, the material outline template diagrams include: a first material outline template diagram, a second material outline template diagram, a third material outline template diagram, and a fourth material outline template diagram;

[0034] The first material outline template is in a vertical position, facing upwards, and the material outline template therein is tilted upwards;

[0035] The second material outline template is obtained by replacing the first material outline on the left.

[0036] The third material outline template image is obtained by transforming the first material outline image downwards and then leftwards.

[0037] The specific steps of combining the first rotation angle and the matching material contour map to obtain the position information of the flexible thin part to be positioned include:

[0038] Determine the orientation and coordinates of the matching material outline diagram;

[0039] Based on the orientation and the magnitude of the first rotation angle, the target rotation angle in the position information of the flexible thin part to be positioned is determined;

[0040] The matching contour coordinates are used as the position coordinates in the position information of the flexible thin part to be positioned.

[0041] Optionally, determining the target rotation angle in the position information of the flexible thin part to be positioned based on the orientation and the magnitude of the first rotation angle specifically includes:

[0042] When the orientation is upward and the matching material outline diagram is the first material outline template diagram or the second material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle.

[0043] When the orientation is upward, the first rotation angle is greater than 0, and the matching material outline diagram is the third material outline template diagram or the fourth material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle - 180°.

[0044] When the orientation is upward, the first rotation angle is less than 0, and the matching material outline diagram is the third material outline template diagram or the fourth material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be: the first rotation angle + 180°.

[0045] When the orientation is downward and the matching material outline diagram is the third material outline template diagram or the fourth material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle.

[0046] When the orientation is downward, the first rotation angle is greater than 0, and the matching material outline diagram is a first material outline template diagram or a second material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle - 180°.

[0047] When the orientation is downward, the first rotation angle is less than 0, and the matching material outline diagram is either the first material outline template diagram or the second material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle + 180°.

[0048] A second aspect of this application provides a positioning device for a flexible thin part, including a processor and a memory;

[0049] The memory is used to store program code and transmit the program code to the processor;

[0050] The processor is configured to execute any of the positioning methods for the flexible thin-film described in the first aspect according to the instructions in the program code.

[0051] As can be seen from the above technical solutions, this application has the following advantages:

[0052] The positioning method for flexible thin parts in this application includes: preprocessing an acquired image to obtain a preprocessed image; determining the material outline of the flexible thin part to be positioned and the first rotation angle corresponding to the material outline in the preprocessed image; based on the material outline, obtaining a matching outline diagram of the flexible thin part to be positioned in a vertical state; matching the matching outline diagram with several preset material outline template diagrams, and determining the matching material outline diagram, wherein the matching material outline diagram is: the material outline template diagram that matches the matching outline in the several material outline template diagrams; and combining the first rotation angle and the matching material outline diagram to obtain the position information of the flexible thin part to be positioned.

[0053] In this application, when positioning the flexible thin part to be positioned, the matching contour diagram of the flexible thin part to be positioned is in a vertical state, and at the same time, several material contour template diagrams are also in a vertical state. Matching under the same spatial state can significantly improve the matching accuracy and achieve accurate positioning of the flexible thin part to be positioned, thereby solving the technical problem of low accuracy of existing positioning methods for flexible thin parts. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments 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.

[0055] Figure 1 This is a flowchart illustrating one embodiment of a positioning method for a flexible thin component according to this application.

[0056] Figure 2 This is a schematic diagram illustrating the preparation process of the matching material profile map in the embodiments of this application. Figure 1 ;

[0057] Figure 3 This is a schematic diagram illustrating the preparation process of the matching material profile map in the embodiments of this application. Figure 2 ;

[0058] Figure 4 This is a schematic diagram illustrating the effect of matching material outlines in the embodiments of this application;

[0059] Figure 5 This is a flowchart illustrating a second embodiment of a positioning method for a flexible thin component according to the present application.

[0060] Figure 6 This is a schematic diagram of the segmentation of the image to be processed in an embodiment of this application. Detailed Implementation

[0061] This application provides a positioning method and device for flexible thin parts, which solves the technical problem of low accuracy in existing positioning methods for flexible thin parts.

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

[0063] The first aspect of this application provides an embodiment of a positioning method for a flexible thin part.

[0064] Please see Figure 1 The following is a flowchart illustrating an embodiment of a positioning method for a flexible thin component in this application.

[0065] The positioning method for the flexible thin part in this embodiment includes:

[0066] Step 101: Preprocess the obtained image to be processed to obtain a preprocessed image.

[0067] Step 102: Determine the material outline of the flexible thin part to be positioned and the first rotation angle corresponding to the material outline in the preprocessed image.

[0068] Step 103: Based on the material profile, obtain the matching profile diagram of the flexible thin part to be positioned in a vertical state.

[0069] Step 104: Match the outline to be matched with several preset material outline templates, and determine the matching material outline. The matching material outline is the material outline template that matches the outline to be matched among the several material outline templates.

[0070] It should be noted that in this embodiment, the outlines of several matching materials are also in a vertical state.

[0071] The number of material outline templates can be set according to positioning needs. In this embodiment, the number of material outline templates is 4. Specifically, this embodiment takes 4 material outline templates as an example to explain the configuration process of the material outline templates in detail as follows:

[0072] 1) The configuration material map containing flexible thin parts is divided into multiple blocks and passed to the GPU thread. In each thread, the sub-map is preprocessed using a binarization algorithm and median filtering. After processing, it is passed to the CPU for splicing to generate a preprocessed material map.

[0073] 2) Manually select a template on the preprocessed material map, and obtain the second rotation angle by finding the smallest bounding rectangle of the selected template's outline.

[0074] Understandably, since the contour operator's rotation angle ranges from 0 to -90°, the specific second rotation angle is determined based on the different aspect ratios of the minimum bounding rectangle:

[0075] When the width is greater than the height, the second rotation angle is the output angle of the minimum bounding rectangle + 90°;

[0076] When the width is less than the height, the second rotation angle is the output angle of the minimum bounding rectangle;

[0077] To prevent the loss of contour information during spatial correction transformation, the manually selected template is 28*80 (width*height), with zero (black) pixels filled at the edges. After obtaining the selected template, to prevent the image information of the flexible thin part from being cropped later, the selected template can be filled to 128*180 (width*height) to obtain the intermediate template, such as... Figure 2 As shown.

[0078] After obtaining the second rotation angle, the spatial correction transformation matrix M is obtained from this angle. Based on M, a spatial correction transformation is performed on the intermediate template to transform the template image on the intermediate template into a vertical image. Then, a circumscribed rectangle is selected from the intermediate template, the circumscribed rectangle is cut off, and it is scaled to 28*80 (width*height) to obtain the vertical template image (e.g., ...). Figure 3 As shown, using the zeroth-order geometric moments of the image, the centroid position of the template is located to determine whether the template is facing upwards or downwards. Specifically, if the centroid position is in the region above the center point of the template, the template is determined to be facing upwards; if the centroid position is in the region below the center point of the template, the template is determined to be facing downwards.

[0079] 3) After obtaining the vertical template image, which is the first material outline template image, perform pixel operations to transform the vertical template image left to obtain the second material outline template image, then transform the vertical template image down to obtain the third material outline template image, and finally transform the vertical template image down followed by a left transformation to obtain the fourth material outline template image. The final material outline template image is as follows. Figure 4 As shown.

[0080] Step 105: Combine the first rotation angle and the matching material contour diagram to obtain the position information of the flexible thin part to be positioned.

[0081] In this embodiment, the acquired image to be processed is first preprocessed to obtain a preprocessed image. Then, the material outline of the flexible thin part to be positioned and the first rotation angle corresponding to the material outline are determined in the preprocessed image. Next, based on the material outline, a matching outline image of the flexible thin part to be positioned in a vertical state is obtained. Then, the matching outline image is matched with several preset material outline template images, and the matching material outline image is determined. Finally, the position information of the flexible thin part to be positioned is obtained by combining the first rotation angle and the matching material outline image. Through the above process, it can be seen that when the flexible thin part to be positioned is positioned in this embodiment, the matching outline image of the flexible thin part to be positioned is in a vertical state, and at the same time, several material outline template images are also in a vertical state. Matching in the same spatial state can significantly improve the matching accuracy and achieve accurate positioning of the flexible thin part to be positioned, thereby solving the technical problem of low accuracy of existing flexible thin part positioning methods.

[0082] The above is an embodiment of a positioning method for a flexible thin part provided in this application. The following is an embodiment of a positioning method for a flexible thin part provided in this application.

[0083] The first aspect of this application provides an embodiment of a positioning method for a flexible thin part.

[0084] Please see Figure 5 The following is a flowchart illustrating a second embodiment of a positioning method for a flexible thin component in this application.

[0085] The positioning method for the flexible thin part in this embodiment includes:

[0086] Step 501: Preprocess the obtained image to be processed to obtain a preprocessed image.

[0087] Image processing programs typically run on the CPU, but the CPU architecture itself requires a lot of space to house storage and control units. In contrast, the computing unit occupies only a small portion, which severely limits its ability to perform large-scale parallel computing (i.e., its ability to process multiple images simultaneously is poor).

[0088] GPUs have more processing cores, making them particularly suitable for data-parallel, computationally intensive tasks, such as large matrix operations. They can break down large images into n*n smaller images and then process these smaller images in parallel, thus improving efficiency. Therefore, in image processing, using the CPU to handle logically complex serial programs and the GPU to handle data-intensive parallel computation programs can significantly reduce program execution time and improve algorithm efficiency.

[0089] like Figure 6 As shown, in this embodiment, the obtained image to be processed is preprocessed to obtain a preprocessed image, specifically including:

[0090] The image to be processed is segmented to obtain N segmented images;

[0091] Each segmented image is transmitted to the GPU thread corresponding to that segmented image, so that the corresponding segmented image is preprocessed in the GPU thread to obtain a preprocessed segmented image.

[0092] Obtain the pre-processed segmented images sent by each GPU thread;

[0093] The preprocessed segmented images are stitched together to obtain the preprocessed image.

[0094] In traditional CPU serial processing, the CPU core processes image blocks of data one after another sequentially. The total processing time is the sum of the processing times for all the smaller image blocks, such as... Figure 6 As shown in (b) in the figure. In this application, multiple cores of the graphics card core are used to process image data in parallel. The total image processing time is the time it takes for one core to calculate a small piece of the image. Finally, the stitching and subsequent serial logic program are completed in the CPU.

[0095] Understandably, due to potential dust in industrial settings and background contamination during the transport of flexible thin parts, preprocessing operations can include filtering. Specifically, median filtering is chosen, which effectively eliminates occasional noise while avoiding complex filtering algorithms, ensuring processing efficiency. The denoising principle is as follows: using the neighborhood of the pixel to be processed, the grayscale values ​​of pixels within that neighborhood are sorted, and the median value is selected as the median for median filtering. The grayscale value of the pixel to be processed is then replaced with this median value. It should be noted that preprocessing operations can also include binarization.

[0096] Step 502: Extract the contour of the flexible thin part to be positioned in the preprocessed image to obtain the material contour corresponding to the flexible thin part to be positioned.

[0097] It is understandable that when there are multiple flexible thin parts to be positioned, they are prone to stacking and overlapping. Therefore, in this embodiment, when extracting the contours of the flexible thin parts to be positioned in the preprocessed image, the overlapping of the flexible thin parts is identified. After identification, the contours of the individual non-overlapping flexible thin parts to be positioned are sorted. That is, if the material contour is larger than the actual perimeter of a single flexible thin part to be positioned, the material contour is considered to be an overlapping contour, the center coordinates of the contour are output, and the material contour is filled with the background color of the image (0). The remaining contours are sorted from 0 to n, and the material contours are selected in order for subsequent matching and positioning.

[0098] Step 503: Determine the minimum bounding rectangle of the material outline and the rotation angle corresponding to the minimum bounding rectangle, and determine the first rotation angle of the material outline based on the rotation angle.

[0099] In this embodiment, the minimum bounding rectangle of the material outline is found, the rotation angle of the minimum bounding rectangle is obtained, and then the first rotation angle is determined as follows:

[0100] When the width of the minimum bounding rectangle is greater than its height, the first rotation angle is the output angle of the minimum bounding rectangle + 90°;

[0101] When the width of the minimum bounding rectangle is less than its height, the first rotation angle is the output angle of the minimum bounding rectangle.

[0102] Step 504: Adjust the material outline to a vertical state to obtain a vertical material outline diagram.

[0103] Specifically, adjusting the material outline to a vertical position to obtain a vertical material outline diagram includes:

[0104] Calculate the corresponding spatial correction transformation matrix using the first rotation angle;

[0105] By using a spatial correction transformation matrix, the material outline is adjusted to a vertical state, resulting in a vertical material outline diagram.

[0106] Step 505: Determine the circumscribed rectangle corresponding to the vertical material outline, and extract the region of interest of a preset size from the circumscribed rectangle to obtain the outline to be matched.

[0107] After obtaining the first rotation angle, solve the spatial correction transformation matrix M, and use M to perform spatial correction transformation of the material contour to a vertical state. Select the circumscribed rectangle, cut out the region of interest, and scale the ROI size to a 20*80 (width*height) contour map to be matched.

[0108] Step 506: Match the outline to be matched with several preset material outline templates one by one.

[0109] Specifically, in this embodiment, the number of material outline templates is M;

[0110] The process involves matching the outline image to be matched with several preset material outline template images one by one, specifically including:

[0111] Step S1: Perform pixel-by-pixel matching between the outline image to be matched and the preset m-th material outline template image;

[0112] Step S2: When the pixel values ​​of the outline to be matched and the m-th material outline template are the same and neither is 0 at the same pixel, the matching score of the m-th material outline template is incremented by one.

[0113] Step S3: After all pixels in the m-th material outline template have been matched, let m = m + 1 and return to step S1 until m = M.

[0114] Step 507: Determine the matching score between the outline diagram to be matched and the outline template diagrams of each material, and take the outline template diagram of the material with the highest matching score as the matching material outline diagram.

[0115] Step 508: Determine the orientation and coordinates of the matching material outline.

[0116] Step 509: Based on the orientation and the magnitude of the first rotation angle, determine the target rotation angle in the position information of the flexible thin part to be positioned.

[0117] Understandably, in one example, determining the target rotation angle in the position information of the flexible thin part to be positioned, based on the orientation and the magnitude of the first rotation angle, specifically includes:

[0118] When the orientation is upward and the matching material outline is the first material outline template or the second material outline template, the target rotation angle in the position information of the flexible thin part to be positioned is determined as the first rotation angle.

[0119] When the orientation is upward, the first rotation angle is greater than 0, and the matching material outline diagram is the third material outline template diagram or the fourth material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle - 180°.

[0120] When the orientation is upward, the first rotation angle is less than 0, and the matching material outline is the third material outline template or the fourth material outline template, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be: the first rotation angle + 180°.

[0121] When the orientation is downward and the matching material outline is the third material outline template or the fourth material outline template, the target rotation angle in the position information of the flexible thin part to be positioned is determined as the first rotation angle.

[0122] When the orientation is downward, the first rotation angle is greater than 0, and the matching material outline is the first material outline template or the second material outline template, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle - 180°.

[0123] When the orientation is downward, the first rotation angle is less than 0, and the matching material outline is either the first material outline template or the second material outline template, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle + 180°.

[0124] Step 510: Use the matching contour coordinates as the position coordinates in the position information of the flexible thin part to be positioned.

[0125] It is understandable that after obtaining the position information of the flexible thin part to be positioned, the orientation of the flexible thin part to be positioned can be determined. When the matching material outline diagram is the first material outline template diagram or the fourth material outline template diagram, the flexible thin part to be positioned is upright, and vice versa.

[0126] In this embodiment, the acquired image to be processed is first preprocessed to obtain a preprocessed image. Then, the material outline of the flexible thin part to be positioned and the first rotation angle corresponding to the material outline are determined in the preprocessed image. Next, based on the material outline, a matching outline image of the flexible thin part to be positioned in a vertical state is obtained. Then, the matching outline image is matched with several preset material outline template images, and the matching material outline image is determined. Finally, the position information of the flexible thin part to be positioned is obtained by combining the first rotation angle and the matching material outline image. Through the above process, it can be seen that when the flexible thin part to be positioned is positioned in this embodiment, the matching outline image of the flexible thin part to be positioned is in a vertical state, and at the same time, several material outline template images are also in a vertical state. Matching in the same spatial state can significantly improve the matching accuracy and achieve accurate positioning of the flexible thin part to be positioned, thereby solving the technical problem of low accuracy of existing flexible thin part positioning methods.

[0127] The second aspect of this application provides an embodiment of a positioning device for a flexible thin part.

[0128] A positioning device for a flexible thin part includes a processor and a memory; the memory is used to store program code and transmit the program code to the processor; the processor is used to execute the positioning method for the flexible thin part according to the instructions in the program code.

[0129] In this embodiment, the positioning device first preprocesses the acquired image to be processed to obtain a preprocessed image. Then, it determines the material outline of the flexible thin part to be positioned and the first rotation angle corresponding to the material outline in the preprocessed image. Next, based on the material outline, it obtains a matching outline image of the flexible thin part to be positioned in a vertical state. Then, it matches the matching outline image with several preset material outline template images and determines the matching material outline image. Finally, it combines the first rotation angle and the matching material outline image to obtain the position information of the flexible thin part to be positioned. Through the above process, it can be seen that when the flexible thin part to be positioned is positioned in this embodiment, the matching outline image of the flexible thin part to be positioned is in a vertical state, and at the same time, several material outline template images are also in a vertical state. Matching in the same spatial state can significantly improve the matching accuracy and achieve accurate positioning of the flexible thin part to be positioned, thereby solving the technical problem of low accuracy of existing flexible thin part positioning methods.

[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0131] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another power grid network to be installed, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0132] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0133] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0134] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0135] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A positioning method for a flexible thin component, characterized in that, include: The obtained image to be processed is preprocessed to obtain a preprocessed image; Determine the material outline of the flexible thin part to be positioned in the preprocessed image and the first rotation angle corresponding to the material outline; Based on the material profile, obtain the matching profile diagram of the flexible thin part to be positioned in a vertical state; The outline image to be matched is matched with several preset material outline template images, and the matching material outline image is determined. The matching material outline image is: among the several material outline template images, the material outline template image that matches the outline image to be matched. By combining the first rotation angle and the matching material contour map, the position information of the flexible thin part to be positioned is obtained; The material outline template diagrams include: a first material outline template diagram, a second material outline template diagram, a third material outline template diagram, and a fourth material outline template diagram; The first material outline template is in a vertical position, facing upwards, and the material outline template therein is tilted upwards; The second material outline template is obtained by left-transforming the first material outline template. The third material outline template is obtained by down-transforming the first material outline template. The fourth material outline template is obtained by performing a down transformation followed by a left transformation on the first material outline template. The specific steps of combining the first rotation angle and the matching material contour map to obtain the position information of the flexible thin part to be positioned include: Determine the orientation and coordinates of the matching material outline diagram; Based on the orientation and the magnitude of the first rotation angle, the target rotation angle in the position information of the flexible thin part to be positioned is determined; The matching contour coordinates are used as the position coordinates in the position information of the flexible thin part to be positioned. The determination of the target rotation angle in the position information of the flexible thin part to be positioned based on the orientation and the magnitude of the first rotation angle specifically includes: When the orientation is upward and the matching material outline diagram is the first material outline template diagram or the second material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle. When the orientation is upward, the first rotation angle is greater than 0, and the matching material outline diagram is the third material outline template diagram or the fourth material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle - 180°. When the orientation is upward, the first rotation angle is less than 0, and the matching material outline diagram is the third material outline template diagram or the fourth material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be: the first rotation angle + 180°. When the orientation is downward and the matching material outline diagram is the third material outline template diagram or the fourth material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle. When the orientation is downward, the first rotation angle is greater than 0, and the matching material outline diagram is a first material outline template diagram or a second material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle - 180°. When the orientation is downward, the first rotation angle is less than 0, and the matching material outline diagram is either the first material outline template diagram or the second material outline template diagram, the target rotation angle in the position information of the flexible thin part to be positioned is determined to be the first rotation angle + 180°.

2. The positioning method for flexible thin parts according to claim 1, characterized in that, The preprocessing of the acquired image to be processed to obtain a preprocessed image specifically includes: The image to be processed is segmented to obtain N segmented images; Each segmented image is transmitted to the GPU thread corresponding to the segmented image, so that the corresponding segmented image is preprocessed in the GPU thread to obtain a preprocessed segmented image. Obtain the preprocessed segmented images sent by each of the GPU threads; The preprocessed image is obtained by stitching together N preprocessed segmented images.

3. The positioning method for flexible thin parts according to claim 1, characterized in that, The determination of the material outline of the flexible thin part to be positioned in the preprocessed image and the first rotation angle corresponding to the material outline specifically includes: The contour of the flexible thin part to be positioned in the preprocessed image is extracted to obtain the material contour corresponding to the flexible thin part to be positioned. Determine the minimum bounding rectangle of the material profile and the rotation angle corresponding to the minimum bounding rectangle, and determine the first rotation angle of the material profile based on the rotation angle.

4. The positioning method for flexible thin parts according to claim 1, characterized in that, The step of obtaining the matching contour map of the flexible thin part to be positioned in a vertical state based on the material contour specifically includes: Adjust the material outline to a vertical position to obtain a vertical material outline diagram; Determine the circumscribed rectangle corresponding to the vertical material outline, and extract a region of interest of a preset size from the circumscribed rectangle to obtain the outline to be matched.

5. The positioning method for flexible thin parts according to claim 4, characterized in that, The step of adjusting the material outline to a vertical state to obtain a vertical material outline diagram specifically includes: Using the first rotation angle, calculate the corresponding spatial correction transformation matrix; The material outline is adjusted to a vertical state using the spatial correction transformation matrix, resulting in a vertical material outline diagram.

6. The positioning method for a flexible thin-film component according to claim 1, characterized in that, The step of matching the outline image to be matched with a plurality of preset material outline template images and determining the matching material outline image, wherein the matching material outline image is: among the plurality of material outline template images, the material outline template image that matches the outline image to be matched specifically includes: The outline image to be matched is matched one by one with a number of preset material outline template images; Determine the matching score between the outline image to be matched and each of the material outline template images, and take the material outline template image with the highest matching score as the matched material outline image.

7. The positioning method for flexible thin parts according to claim 6, characterized in that, The number of material outline templates is M; The step of matching the outline to be matched with a number of preset material outline templates one by one specifically includes: Step S1: Perform pixel-by-pixel matching between the outline image to be matched and the preset m-th material outline template image; Step S2: When the pixel values ​​of the outline to be matched and the m-th material outline template are the same and neither is 0 at the same pixel, the matching score of the m-th material outline template is incremented by one. Step S3: After all pixels in the m-th material outline template have been matched, set m=m+1 and return to step S1 until m=M.

8. A positioning device for a flexible thin part, characterized in that, Including the processor and memory; The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the positioning method for the flexible thin part according to any one of claims 1 to 7, based on the instructions in the program code.

Citation Information

Patent Citations

  • Image registration method based on contour detection and feature matching

    CN107452030A

  • Target object positioning and tracking method and device, computer equipment and storage medium

    CN114049380A