An image positioning method, system, device and medium

By processing point cloud images, the derivatives and extreme points of the contour lines are obtained. The coordinates of the positioning points are determined by using the relationship between the difference value and the difference threshold. This solves the problem that the fixed threshold method cannot adapt to changes and achieves more accurate image positioning.

CN115482239BActive Publication Date: 2026-04-21HANGZHOU ANMAISHENG INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU ANMAISHENG INTELLIGENT TECH CO LTD
Filing Date
2022-10-24
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, image positioning methods with fixed thresholds cannot adapt to changes in products or images, resulting in inaccurate positioning.

Method used

By acquiring point cloud information from the point cloud image, the initial localization region is determined. The derivative of the contour line is calculated to obtain the derivative values ​​of each point on the contour line and the first derivative values ​​of the extreme points. Differential processing is performed, and the coordinates of the localization point are determined based on the relationship between the differential value and the differential threshold.

Benefits of technology

It achieves more robust image localization, can adapt to changes in products or images, and improves localization accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482239B_ABST
    Figure CN115482239B_ABST
Patent Text Reader

Abstract

The application discloses an image positioning method, system, device and medium, and mainly relates to the field of image recognition. After a point cloud image collected by an image collection device is acquired, the point cloud image is processed according to point cloud information, an initial positioning area is determined, and an outline is acquired; the derivative of the outline and extreme points are used to describe point features of the image to be positioned; the point features of the image can change with the change of products or images, and the method of setting a fixed threshold value cannot adapt to the change of products or images because the threshold value is fixed. A derivative difference value is obtained by subtracting the first derivative value of the extreme points from the average value of the derivative of the outline, the positioning point coordinates are determined according to the relationship between the derivative difference value and a difference threshold value, and more accurate image positioning is finally realized. Therefore, the image positioning method provided by the application is more robust than the method of setting a fixed threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition, and in particular to an image localization method, system, device and medium. Background Technology

[0002] With the development of computer technology and the widespread application of computer vision principles, research on real-time product positioning in industrial automation using computer image processing technology is becoming increasingly popular. In industry and manufacturing, there is a significant amount of work involved in product dimensional measurement. Introducing automated inspection methods using machine vision can greatly reduce the labor intensity of workers compared to manual inspection, offering high accuracy and speed, and effectively ensuring product qualification rates.

[0003] The features of points to be located in an image are often grayscale values, point cloud information with high contrast or large abrupt changes. Currently, the method of setting a fixed threshold is commonly used. However, the fixed threshold method cannot adapt to changes in products or images, has poor robustness, and affects the accuracy of positioning.

[0004] Therefore, finding a positioning method that can adapt to changes in products or images and accurately locate images is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide an image positioning method, system, device, and medium to solve the problem that setting a fixed threshold cannot adapt to changes in the product or image, resulting in inaccurate image positioning.

[0006] To address the aforementioned technical problems, this application provides an image localization method, comprising:

[0007] Acquire point cloud images captured by the image acquisition device;

[0008] Acquire point cloud information from the point cloud image, process the point cloud image based on the point cloud information, and determine the initial localization region;

[0009] The outline is obtained by using point cloud information and the initial localization area;

[0010] Take the derivative of the contour line to obtain the derivative value of each point on the contour line, the mean value of the derivative value, the extreme points of the contour line, and the first derivative value of the extreme points.

[0011] The mean and first derivative values ​​are differentially processed, and the coordinates of the positioning point are determined based on the relationship between the differential value and the differential threshold.

[0012] Preferably, the derivative of the contour line is calculated to obtain the derivative values ​​at each point on the contour line, the mean value of the derivative values, the extreme points of the contour line, and the first derivative values ​​of the extreme points, including:

[0013] Take the first derivative of the contour line to obtain the derivative value at each point on the contour line, and calculate the mean value corresponding to the derivative value.

[0014] By taking the second derivative of the contour line, we can obtain the extreme points corresponding to the contour line and the first derivative values ​​corresponding to the extreme points.

[0015] Preferably, the mean and first derivative values ​​are differentially processed, and the coordinates of the positioning point are determined based on the relationship between the differential value and the differential threshold.

[0016] The difference between the first derivative value corresponding to each extreme point and the mean value is obtained by performing a difference operation on the first derivative value corresponding to each extreme point.

[0017] Determine if there exists an extreme point whose difference value is greater than the difference threshold;

[0018] If so, determine the coordinates corresponding to the extreme point as the coordinates of the location point;

[0019] If not, lower the difference threshold and return to the step of determining whether there is an extreme point whose difference value is greater than the difference threshold.

[0020] Preferably, the point cloud image is processed based on the point cloud information to determine the initial localization region, including:

[0021] The point cloud image is binarized based on the point cloud information to determine the initial localization region corresponding to the point cloud image.

[0022] Preferably, after acquiring the point cloud image, but before acquiring the point cloud information of the point cloud image, the process further includes:

[0023] Preprocess the point cloud image to obtain the preprocessed point cloud image.

[0024] Preferably, the preprocessing is mean filtering and / or median filtering and / or Gaussian filtering.

[0025] Preferably, obtaining the contour line using point cloud information and the initial localization region includes:

[0026] Obtain a line perpendicular to the initial positioning region rectangle;

[0027] Obtain the height values ​​of each point in the point cloud image corresponding to the straight line, and form a height array;

[0028] Obtain the contour line corresponding to the point cloud image using the height array.

[0029] To address the aforementioned technical problems, this application also provides an image positioning system, comprising:

[0030] The first acquisition module is used to acquire point cloud images captured by the image acquisition device;

[0031] The second acquisition module is used to acquire point cloud information of the point cloud image, process the point cloud image based on the point cloud information, and determine the initial localization region.

[0032] The third acquisition module is used to acquire the outline line through point cloud information and the initial localization area;

[0033] The fourth acquisition module is used to calculate the derivative of the contour line, obtain the derivative value of each point on the contour line and the mean value of the derivative value, as well as the extreme points of the contour line and the first derivative value of the extreme points.

[0034] The determination module is used to perform difference processing on the mean and the first derivative value, and determine the coordinates of the positioning point based on the relationship between the difference value after difference processing and the difference threshold.

[0035] To address the aforementioned technical problems, this application also provides an image positioning device, including a memory for storing computer programs;

[0036] A processor is used to implement image localization methods when executing computer programs.

[0037] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of an image positioning method.

[0038] The image localization method provided in this application acquires a point cloud image from an image acquisition device, processes the point cloud image based on the point cloud information, determines the initial localization region, and obtains the contour line. It uses the derivative and extreme points of the contour line to describe the features of the points to be located in the image. This description of the image's point features can change with variations in the product or image. In contrast, methods using a fixed threshold cannot adapt to changes in the product or image because the threshold is fixed. Therefore, the image localization method provided in this application is more robust than methods using a fixed threshold. The derivative difference value is obtained by subtracting the first derivative value of the extreme points from the mean derivative value of the contour line. The coordinates of the localization point are determined based on the relationship between the derivative difference value and the difference threshold, ultimately achieving more accurate image localization.

[0039] The image positioning system, device, and medium provided in this application have the same beneficial effects as described above. Attached Figure Description

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

[0041] Figure 1This is a flowchart of the image localization method provided in the embodiments of this application;

[0042] Figure 2 This is a preliminary region localization effect diagram of the point cloud image provided in the embodiments of this application;

[0043] Figure 3 This is a schematic diagram of the outline provided for an embodiment of this application;

[0044] Figure 4 A point cloud image localization result diagram provided in an embodiment of this application;

[0045] Figure 5 A schematic diagram of the first derivative of the point cloud contour provided in an embodiment of this application;

[0046] Figure 6 This is a schematic diagram of the second derivative of the point cloud contour provided in the embodiments of this application;

[0047] Figure 7 The preprocessed point cloud image provided in the embodiments of this application;

[0048] Figure 8 A structural diagram of an image positioning system provided in an embodiment of this application;

[0049] Figure 9 This is a structural diagram of an image positioning device provided in an embodiment of this application. Detailed Implementation

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

[0051] The core of this application is to provide an image positioning method, system, device, and medium to solve the problem that setting a fixed threshold cannot adapt to changes in the product or image, resulting in inaccurate image positioning.

[0052] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0053] This application provides an image localization method, primarily applied in product measurement in industry or manufacturing. This method allows for the use of different detection standards for different images, thereby enabling more accurate representation of image features or information and more precise image localization. The method requires acquiring product images using an image acquisition device, such as a camera (e.g., a 3D camera). The camera includes a memory for storing data and results generated during processor processing. The processor performs relevant processing on the acquired images to obtain localization information. Figure 1 This is a flowchart of the image localization method provided in the embodiments of this application, such as... Figure 1 As shown, it includes:

[0054] S10: Acquire point cloud images captured by the image acquisition device.

[0055] This application does not limit the image acquisition device; the image acquisition device can be a 3D camera. After the image acquisition device acquires a point cloud image, it obtains that point cloud image. The acquisition can be manually controlled or automatically acquired at a set acquisition frequency.

[0056] S11: Obtain the point cloud information of the point cloud image, process the point cloud image based on the point cloud information, and determine the initial localization region.

[0057] Obtain point cloud information from the point cloud image, such as numerical values ​​representing the object's height. The initial localization region is typically rectangular, for example... Figure 2 As shown, Figure 2 This is an example of the initial localization region of a point cloud image provided in this application embodiment. The rectangle represents the approximate location area of ​​the object in the point cloud image. Based on the acquired point cloud information, the point cloud image is processed to determine the initial localization region. This application embodiment does not limit the processing method for the point cloud image, as long as the initial localization region of the point cloud image can be determined. As a preferred option, the image can be binarized to reduce invalid areas and interference, thereby accelerating the image processing speed.

[0058] S12: Obtain the outline using point cloud information and the initial localization area.

[0059] Based on the point cloud information obtained in the previous step, an outline is obtained in the initial positioning region. This embodiment does not limit the method for obtaining the outline; for example, it may involve obtaining a straight line perpendicular to the rectangle of the initial positioning region, obtaining the height value of each point in the point cloud image corresponding to the straight line, forming a height array, and thus obtaining the point cloud outline. Figure 3 As shown, Figure 3 This is a schematic diagram of the outline provided for an embodiment of this application.

[0060] S13: Take the derivative of the contour line to obtain the derivative value of each point on the contour line, the mean value of the derivative value, the extreme points of the contour line, and the first derivative value of the extreme points.

[0061] The derivative of the contour line obtained in step S12 is calculated to obtain the derivative values ​​of each point on the contour line, and the mean value corresponding to the derivative values. This mean value can be the mean of all derivative values ​​or the mean of a preset number of derivative values. This embodiment of the application does not limit this, but as a preferred method, selecting a preset number of derivative values ​​and obtaining their mean can reduce the amount of calculation. This embodiment of the application does not limit the method of obtaining the extreme points corresponding to the contour line. As a preferred method, the second derivative of the contour line is calculated. The extreme points where the second derivative value of the contour line is 0 are the extreme points of the first derivative of the contour line, and the coordinates of multiple extreme points can be obtained. The first derivative values ​​corresponding to multiple extreme points can be obtained based on the coordinates of the extreme points and the array of first derivatives.

[0062] S14: Perform differential processing on the mean and first derivative values, and determine the coordinates of the positioning point based on the relationship between the differential value after differential processing and the differential threshold.

[0063] Subtracting the mean obtained in step S13 from the first derivative obtained in step S13 completes the difference processing between the mean and the first derivative, yielding the difference value. This embodiment does not limit the relationship between the difference value and the difference threshold; it can be a comparison of magnitudes or a ratio. This embodiment also does not limit the difference threshold; it can be a preset value or a dynamic value that can be adjusted according to actual conditions. When the relationship between the difference value and the difference threshold meets certain conditions, the coordinates of the extreme point corresponding to the difference value are used as the coordinates of the positioning point, such as... Figure 4 , Figure 4 This is a point cloud image localization result diagram provided in an embodiment of this application.

[0064] The image localization method provided in this application acquires a point cloud image from an image acquisition device, processes the point cloud image based on the point cloud information, determines the initial localization region, and obtains the contour line. The derivative and extreme points of the contour line are used to describe the features of the points to be located in the image. This description of the image's point features can change with variations in the product or image. In contrast, methods that set a fixed threshold cannot adapt to changes in the product or image because the threshold is fixed. Therefore, the image localization method provided in this application is more robust than methods that set a fixed threshold. The derivative difference value is obtained by subtracting the first derivative value of the extreme points from the mean derivative value of the contour line. The coordinates of the localization point are determined based on the relationship between the derivative difference value and the difference threshold, ultimately achieving more accurate image localization.

[0065] The above embodiments do not limit the differentiation of the contour line, the acquisition of the derivative values ​​of each point on the contour line and the mean of the derivative values, and the extreme points and the first derivative values ​​of the extreme points. As a preferred embodiment, this application includes the following:

[0066] Take the first derivative of the contour line to obtain the derivative value at each point on the contour line, and calculate the mean value corresponding to the derivative value.

[0067] By taking the second derivative of the contour line, we can obtain the extreme points corresponding to the contour line and the first derivative values ​​corresponding to the extreme points.

[0068] The formula for the first derivative of the contour line is shown below:

[0069]

[0070] Taking the first derivative of the contour line according to the above formula, where x is a straight line perpendicular to the initial positioning region rectangle, and y is the height value of each point in the point cloud image corresponding to the straight line, when the increment of x at x0 is Δx, the corresponding increment of y is Δy = f(x0 + Δx) - f(x0). Figure 5 , Figure 5 This is a schematic diagram of the first derivative of the point cloud contour line provided in an embodiment of this application. The derivative values ​​on the contour line are obtained. Taking the first num derivative values ​​of the derivative array as an example, as shown in Table 1, where num is a preset number, the average of these num derivative values ​​is calculated to obtain the average derivative value of the point cloud contour line. This average value changes with the product or image. Therefore, obtaining the average first derivative value in this way is more robust and more accurately represents image features or information than setting a fixed threshold.

[0071] Table 1

[0072] Serial Number 0 1 2 3 ... num-2 num-1 derivative value 49 61 57 63 ... 52 55

[0073] The formula for the second derivative of the contour line is shown below:

[0074]

[0075] Where f'(x0) is the second derivative when x is x0, f'(x0) is the first derivative when x is x0, f'(x0+Δx) is the first derivative when x is x0+Δx, and Δx is the increment of the independent variable x at x0. Taking the second derivative of the contour line according to the above formula, the second derivative is 0, which indicates an extreme point of the first derivative. From this, the coordinates of multiple extreme points can be obtained. Based on the coordinates of the extreme points and the array of first derivatives, the corresponding first derivative values ​​of the multiple extreme points can be obtained; for example... Figure 6 As shown, Figure 6 This is a schematic diagram of the second derivative of the point cloud contour provided in an embodiment of this application. The coordinates of multiple extreme points and the corresponding first derivative values ​​are shown in Table 2.

[0076] Table 2

[0077] Serial Number 0 1 2 3 4 5 ... coordinate 22 34 47 59 85 212 ... First derivative value 58.09 54.68 59.40 55.55 91.71 -129.48 ...

[0078] In this embodiment of the application, after taking the derivative of the contour line twice, the derivative value of the contour line, the mean value corresponding to the derivative value, the extreme point corresponding to the contour line, and the first derivative value of the extreme point are obtained.

[0079] The above embodiments do not perform differential processing on the mean and first derivative values, and the determination of the positioning point coordinates based on the relationship between the differential value and the differential threshold is limited. This application embodiment, as a preferred embodiment, performs differential processing on the mean and first derivative values, and determines the positioning point coordinates based on the relationship between the differential value and the differential threshold, including:

[0080] The difference between the first derivative value corresponding to each extreme point and the mean value is obtained by performing a difference operation on the first derivative value corresponding to each extreme point.

[0081] Determine if there exists an extreme point whose difference value is greater than the difference threshold;

[0082] If so, determine the coordinates corresponding to the extreme point as the coordinates of the location point;

[0083] If not, lower the difference threshold and return to the step of determining whether there is an extreme point whose difference value is greater than the difference threshold.

[0084] Subtracting the first derivative from the mean completes the difference processing, yielding the difference values ​​corresponding to each extreme point. The difference threshold is a preset value set based on the current point cloud information. The system checks if the difference value corresponding to each extreme point is greater than the threshold. If so, the extreme point corresponding to the first difference value greater than the threshold is the location point, and its coordinates are the coordinates of the location point. If no extreme point has a difference value greater than the threshold, the threshold is lowered, and the system continues to check if there is an extreme point with a difference value greater than the threshold. For example, if the difference threshold is 20, the first derivative difference values ​​are shown in Table 3. From the information in Table 3, we can see that the fourth extreme point is the location point to be found, and its coordinates are the coordinates of the location point.

[0085] Table 3

[0086] Serial Number 0 1 2 3 4 5 ... coordinate 22 34 47 59 85 212 ... First derivative difference 2.52 -0.89 3.83 -0.02 36.14 -184.57 ... Is the difference greater than 20? no no no no yes no ...

[0087] In this embodiment, the coordinates of the positioning point are determined by the difference value corresponding to the extreme point, the difference threshold, and the coordinates of the extreme point. When the preset difference threshold cannot determine the coordinates of the positioning point, the positioning point can be determined by lowering the difference threshold.

[0088] The above embodiments do not limit the processing method for processing point cloud images based on point cloud information. As a preferred embodiment, this application describes a method for processing point cloud images based on point cloud information to determine the initial localization region, including:

[0089] The point cloud image is binarized based on the point cloud information to determine the initial localization region corresponding to the point cloud image.

[0090] Binarization of point cloud images involves setting the grayscale value of each pixel in the point cloud image to either 0 or 255. Pixels with a grayscale value greater than or equal to a threshold are identified as belonging to a specific object and have a grayscale value of 255. Otherwise, these pixels are excluded from the object region and have a grayscale value of 0, representing the background or an exceptional object region. Essentially, this process gives the entire point cloud image a distinct black-and-white effect. Binarization significantly reduces the amount of data in the point cloud image, thereby highlighting the outlines of objects and determining the initial localization region.

[0091] This application embodiment reduces the amount of data in the point cloud image by performing binarization processing, thereby accelerating the point cloud image processing speed, highlighting the outline of objects in the image, and determining the initial localization region corresponding to the point cloud image.

[0092] The above embodiments do not perform preprocessing on the acquired point cloud images, such as... Figure 7 As shown, Figure 7 The preprocessed point cloud image provided in this application embodiment, as a preferred embodiment, includes, after acquiring the point cloud image and before acquiring the point cloud information of the point cloud image, the following steps:

[0093] Preprocess the point cloud image to obtain the preprocessed point cloud image.

[0094] The embodiments of this application do not limit the preprocessing method, which can be mean filtering, Gaussian filtering, etc. After the preprocessing is completed, the point cloud image is obtained.

[0095] Preprocessing point cloud images can reduce the impact of noise, which helps in the subsequent acquisition of contour lines.

[0096] Since the above embodiments do not limit the method of preprocessing point cloud images, the embodiments of this application, as a preferred embodiment, preprocessing is mean filtering and / or median filtering and / or Gaussian filtering.

[0097] Mean filtering has the advantages of being simple to operate, efficient, and easy to implement, and can provide a rough description of the characteristics of an object.

[0098] Median filtering is a non-linear smoothing technique that sets the gray value of each pixel to the median of the gray values ​​of all pixels within a neighborhood window. Median filtering is effective at filtering impulse noise, and in particular, it preserves edges by removing noise and preventing them from becoming blurred.

[0099] Most image noise is Gaussian noise, therefore Gaussian filters are widely used for image denoising. Gaussian filtering is a linear smoothing filter, suitable for eliminating Gaussian noise.

[0100] The embodiments of this application employ one or more of mean filtering, median filtering, and Gaussian filtering to preprocess the point cloud image, which can reduce the influence of noise and facilitate the subsequent acquisition of contour lines.

[0101] The above embodiments do not limit the method for obtaining the contour line. As a preferred embodiment, this application describes obtaining the contour line using point cloud information and a localized initial region, including:

[0102] Obtain a line perpendicular to the initial positioning region rectangle;

[0103] Obtain the height values ​​of each point in the point cloud image corresponding to the straight line, and form a height array;

[0104] Obtain the contour line corresponding to the point cloud image using the height array.

[0105] The method for obtaining point cloud image contour lines provided in this application embodiment is simple and convenient to write, and the obtained contour lines are relatively accurate.

[0106] In the above embodiments, the image positioning method has been described in detail. This application also provides embodiments corresponding to the image positioning device. It should be noted that this application describes the embodiments of the device part from two perspectives: one is based on the functional modules, and the other is based on the hardware.

[0107] From the perspective of functional modules, embodiments of this application provide an image positioning system, such as... Figure 8 As shown, Figure 8 This application provides a structural diagram of an image positioning system, which includes:

[0108] The first acquisition module 80 is used to acquire point cloud images acquired by the image acquisition device;

[0109] The second acquisition module 81 is used to acquire point cloud information of the point cloud image, process the point cloud image according to the point cloud information, and determine the initial positioning region.

[0110] The third acquisition module 82 is used to acquire the outline line through point cloud information and the initial positioning area;

[0111] The fourth acquisition module 83 is used to calculate the derivative of the contour line, obtain the derivative value of each point on the contour line and the mean value corresponding to the derivative value, as well as the extreme points of the contour line and the first derivative value of the extreme points.

[0112] The determination module 84 is used to perform differential processing on the mean and the first derivative value, and determine the coordinates of the positioning point based on the relationship between the differential value after differential processing and the differential threshold.

[0113] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, and they will not be repeated here.

[0114] The image information positioning system provided in this embodiment corresponds to the method described above, and therefore has the same beneficial effects as the method described above.

[0115] From a hardware perspective, such as Figure 9 As shown, Figure 9 This is a structural diagram of an image positioning device provided in an embodiment of this application. The image positioning device includes: a memory 20 for storing computer programs;

[0116] The processor 21 is configured to execute a computer program to implement the steps of the image localization method as described in the above embodiments.

[0117] The image positioning device provided in this embodiment may include, but is not limited to, laptops or desktop computers.

[0118] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.

[0119] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the image localization method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, point cloud images and point cloud information.

[0120] In some embodiments, the image positioning device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.

[0121] Those skilled in the art will understand that Figure 9 The structure shown does not constitute a limitation on the image positioning device and may include more or fewer components than illustrated.

[0122] The image localization method provided in this application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: image localization method.

[0123] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.

[0124] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they 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 executes 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.

[0125] The foregoing has provided a detailed description of an image positioning method, system, apparatus, and medium provided in this application. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0126] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. An image localization method, characterized in that, include: Acquire point cloud images captured by the image acquisition device; Obtain the point cloud information of the point cloud image, and process the point cloud image according to the point cloud information to determine the initial localization region; The outline is obtained using the point cloud information and the initial positioning region; The derivative of the contour line is calculated to obtain the derivative value of each point on the contour line, the mean value of the derivative value, the extreme point of the contour line, and the first derivative value of the extreme point; the second derivative of the contour line is calculated, and the point where the second derivative value of the contour line is 0 is the extreme point of the contour line; the first derivative of the contour line is calculated to obtain the first derivative value of the extreme point. The mean and the first derivative are differentially processed, and the coordinates of the positioning point are determined based on the relationship between the differential value and the differential threshold.

2. The image localization method according to claim 1, characterized in that, The step of taking the derivative of the contour line to obtain the derivative value of each point on the contour line, the mean value corresponding to the derivative value, the extreme point corresponding to the contour line, and the first derivative value corresponding to the extreme point includes: The first derivative of the contour line is obtained to obtain the derivative value of each point on the contour line, and the mean value corresponding to the derivative value is calculated. The second derivative of the contour line is calculated to obtain the extreme point corresponding to the contour line and the first derivative value corresponding to the extreme point.

3. The image localization method according to claim 2, characterized in that, The step of performing a difference processing on the mean and the first derivative, and determining the coordinates of the positioning point based on the relationship between the difference value after the difference processing and the difference threshold, includes: The difference value corresponding to each extreme point is obtained by performing a difference operation between the first derivative value and the mean value. Determine whether there exists a difference value corresponding to the extreme point that is greater than the difference threshold; If so, determine the coordinates corresponding to the extreme point as the coordinates of the positioning point; If not, lower the difference threshold and return to the step of determining whether there is a difference value greater than the difference threshold corresponding to the extreme point.

4. The image localization method according to claim 1, characterized in that, The step of processing the point cloud image based on the point cloud information to determine the initial localization region includes: The point cloud image is binarized based on the point cloud information to determine the initial localization region corresponding to the point cloud image.

5. The image localization method according to claim 1, characterized in that, After acquiring the point cloud image, but before acquiring the point cloud information of the point cloud image, the process also includes: The point cloud image is preprocessed to obtain the preprocessed point cloud image.

6. The image localization method according to claim 5, characterized in that, The preprocessing is mean filtering and / or median filtering and / or Gaussian filtering.

7. The image localization method according to any one of claims 1 to 6, characterized in that, The step of obtaining the contour line using the point cloud information and the initial positioning region includes: Obtain a straight line perpendicular to the rectangle of the initial positioning region; Obtain the height values ​​of each point in the point cloud image corresponding to the straight line, and form a height array; The contour line corresponding to the point cloud image is obtained through the height array.

8. An image positioning system, characterized in that, include: The first acquisition module is used to acquire point cloud images captured by the image acquisition device; The second acquisition module is used to acquire point cloud information of the point cloud image, and process the point cloud image according to the point cloud information to determine the initial positioning region. The third acquisition module is used to acquire the outline line through the point cloud information and the initial positioning region; The fourth acquisition module is used to calculate the derivative of the contour line, obtain the derivative value of each point on the contour line and the mean value corresponding to the derivative value, as well as the extreme point of the contour line and the first derivative value corresponding to the extreme point; calculate the second derivative of the contour line, and the point where the second derivative value of the contour line is 0 is the extreme point of the contour line; calculate the first derivative of the contour line to obtain the first derivative value corresponding to the extreme point. The determination module is used to perform differential processing on the mean and the first derivative value, and determine the coordinates of the positioning point based on the relationship between the differential value after differential processing and the differential threshold.

9. An image positioning device, characterized in that, Includes memory used to store computer programs; A processor, configured to implement the steps of the image localization method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the image localization method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Welding defect detection method based on point cloud information

    CN114240944A