Method, device, equipment and storage medium for determining coordinates of position points in an image

By assigning target identifiers in the image and performing inverse transformation, the problems of difficulty in locating position points and coordinate errors after image transformation are solved, and a fast and efficient positioning effect is achieved.

CN114494413BActive Publication Date: 2025-09-09GUANGZHOU XAIRCRAFT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111625732.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-09-09
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In the prior art, after image transformation, the position points cannot be located efficiently and there is a problem of coordinate error.

Method used

By assigning a target identifier in the target image and performing an inverse transformation of the geometric transformation, the coordinates of the target point in the restored initial image are determined.

Benefits of technology

It achieves fast and efficient positioning of position points and reduces the errors caused by coordinate transformation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494413B_ABST
    Figure CN114494413B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention disclose a method, apparatus, device, and storage medium for determining the coordinates of a location point in an image. The method comprises: determining a target point in a target image, where the target image is obtained by geometrically transforming an initial image; assigning a target identifier to the target point; performing an inverse transformation of the geometric transformation on the target image to obtain a restored initial image; and determining the target point coordinates of the target point in the restored initial image based on the target identifier. This solution achieves rapid and efficient location of the location point while reducing coordinate errors caused by coordinate transformation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a method, apparatus, device, and storage medium for determining the coordinates of a position point in an image. Background Art

[0002] With the development of image processing technology, it is being applied to an increasing number of scenarios. Global or local geometric transformations of images are widely used as a key component of image processing. Examples include image reduction in convolutional neural network models and local geometric transformations required when solving image coordinates.

[0003] In the prior art, when performing geometric transformation of an image, since the position points undergo coordinate transformation, it becomes difficult to locate the position points that originally have a corresponding relationship. At the same time, after the position points undergo coordinate transformation, the transformation of the coordinate system will also cause coordinate errors, which needs to be improved. Summary of the Invention

[0004] Embodiments of the present invention provide a method, apparatus, device, and storage medium for determining the coordinates of position points in an image, which solve the problem in the prior art that position points cannot be efficiently located and have coordinate errors after image transformation, and achieve fast and efficient positioning of position points while reducing the coordinate errors caused by coordinate transformation.

[0005] In a first aspect, an embodiment of the present invention provides a method for determining the coordinates of a position point in an image, the method comprising:

[0006] Determining a target point in a target image, wherein the target image is obtained by geometrically transforming the initial image;

[0007] assigning a target identifier to the target point;

[0008] An inverse transformation of the geometric transformation is performed on the target image to obtain a restored initial image, and the target point coordinates of the target point in the restored initial image are determined according to the target identifier.

[0009] In a second aspect, an embodiment of the present invention further provides another method for determining the coordinates of a position point in an image, the method comprising:

[0010] Determine the target point in the target image;

[0011] generating a position recording mask according to a pixel matrix corresponding to the target image, wherein each matrix position point in the position recording mask has the same coordinates as a corresponding position of a matrix position point in the pixel matrix;

[0012] assigning a target identifier to the target point in the position recording mask according to a correspondence between the pixel matrix and the position recording mask;

[0013] When geometric transformation is performed on the target image, the coordinates in the position recording mask are subjected to the same geometric transformation to obtain an updated position mask, and the target point coordinates of the target point in the updated position mask are determined according to the target identifier.

[0014] In a third aspect, an embodiment of the present invention further provides a device for determining the coordinates of a position point in an image, the device comprising:

[0015] A position point acquisition module is used to determine a target point in a target image, where the target image is obtained from an initial image through geometric transformation;

[0016] An identification assignment module, configured to assign a target identification to the target point;

[0017] A geometric transformation module, configured to perform an inverse transformation of the geometric transformation on the target image to obtain a restored initial image;

[0018] A position point coordinate calculation module is used to determine the target point coordinates of the target point in the restored initial image according to the target identifier.

[0019] In a fourth aspect, an embodiment of the present invention further provides another device for determining the coordinates of a position point in an image, the device comprising:

[0020] A position point acquisition module is used to determine a target point in a target image, where the target image is obtained from an initial image through geometric transformation;

[0021] a position mask generating module, configured to generate a position recording mask according to a pixel matrix corresponding to the target image, wherein each matrix position point in the position recording mask has the same coordinates as a position corresponding to a matrix position point in the pixel matrix;

[0022] an identifier assignment module, configured to assign a target identifier to the target point in the position recording mask according to a correspondence between the pixel matrix and the position recording mask;

[0023] a geometric transformation module, configured to perform an inverse transformation of the geometric transformation on the coordinates in the position recording mask to obtain an updated position mask;

[0024] A position point coordinate calculation module is used to determine the target coordinates of the target point in the updated position mask according to the target identifier.

[0025] In a fifth aspect, an embodiment of the present invention further provides a device for determining the coordinates of a position point in an image, the device comprising:

[0026] one or more processors;

[0027] a storage device for storing one or more programs,

[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement the coordinate determination method of a position point in an image according to an embodiment of the present invention.

[0029] In a sixth aspect, an embodiment of the present invention further provides a storage medium storing computer-executable instructions, which, when executed by a computer processor, are used to execute the method for determining the coordinates of a position point in an image described in an embodiment of the present invention.

[0030] In an embodiment of the present invention, by determining a target point in a target image, the target image is obtained from an initial image through a geometric transformation, a target identifier is assigned to the target point, the target image is subjected to an inverse transformation of the geometric transformation to obtain a restored initial image, and the target point coordinates of the target point in the restored initial image are determined based on the target identifier, thereby achieving rapid and efficient positioning of the position point and reducing the coordinate error caused by the coordinate transformation. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A flowchart of a method for determining the coordinates of a position point in an image provided by an embodiment of the present invention;

[0032] Figure 2 A flowchart of another method for determining the coordinates of a position point in an image provided by an embodiment of the present invention;

[0033] Figure 3 A flowchart of another method for determining the coordinates of a position point in an image provided by an embodiment of the present invention;

[0034] Figure 4 A flowchart of another method for determining the coordinates of a position point in an image provided by an embodiment of the present invention;

[0035] Figure 5 A flowchart of another method for determining the coordinates of a position point in an image provided by an embodiment of the present invention;

[0036] Figure 6 A schematic diagram of a module of a device for determining the coordinates of a position point in an image provided by an embodiment of the present invention;

[0037] Figure 7 A schematic diagram of a module of another device for determining the coordinates of a position point in an image provided by an embodiment of the present invention;

[0038] Figure 8A schematic structural diagram of a device for determining the coordinates of a position point in an image provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0040] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0041] The following describes in detail the method for determining the coordinates of a position point in an image provided by the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0042] Figure 1 This is a flow chart of a method for determining the coordinates of a point in an image provided by an embodiment of the present invention. This embodiment can accurately and efficiently locate the point during image transformation processing. The method can be implemented by a device with computing capabilities, such as a server, unmanned equipment, a mobile phone, a remote control, a customized handheld device, a desktop computer, a tablet computer, or a laptop, and specifically includes the following steps:

[0043] Step S101: Determine a target point in a target image, where the target image is obtained from an initial image through geometric transformation.

[0044] Among them, the target image is the image obtained after the initial image is geometrically transformed. The geometric transformation can be a reduction, enlargement or rotation of the initial image. Taking the unmanned equipment automatic operation scene as an example, the target image and the initial image are image images corresponding to the unmanned equipment operation area. Taking the user recognition scene as an example, the target image and the initial image can be photographed images containing the user's face. The specific content of the target image and the initial image is not limited in this solution. In one embodiment, the initial image can be a partial image cut from an image. For example, a large image is cut into 256 initial images of equal size, and the target image is obtained by transforming one of the 256 initial images.

[0045] The target point is one or more specific locations identified in the target image. These locations can be used in subsequent scene functions, such as determining the height of a crop or using them as a location. If there are multiple target points, they can include at least one pair of corresponding first and second target points.

[0046] Optionally, determining the target point in the target image includes determining a first target point and a second target point in the target image. The first target point and the second target point are associated points in the target image. The two are in a mutually corresponding and dependent relationship. Taking a cotton field image as an example, a target image that meets the requirements is obtained by geometrically transforming the initial image, and after using the target image to determine the reference points and the plant vertices corresponding to the reference points, the plant height is finally determined based on the reference points and the plant vertices. At this time, the reference points and plant vertices that correspond to each other in the target image can be used as the first target point and the second target point.

[0047] In one embodiment, the process of determining the first target point and the second target point in the target image may be to obtain a first target point and a corresponding second target point that are already set or selected in the target image. Alternatively, the process may be to calculate the first target point and the second target point that meet the requirements in the target image based on an algorithm or preset rules.

[0048] Step S102: assign a target identifier to the target point.

[0049] Optionally, taking the example that the target points include at least one group of a first target point and a second target point having a corresponding relationship, it includes assigning a first identifier to the first target point and assigning a second identifier to the second target point.

[0050] In one embodiment, after determining the corresponding first target point and the second target point, a first identifier and a second identifier are assigned thereto respectively. Optionally, the first identifier value may be 1 and the second identifier value may be 2. Accordingly, after assigning corresponding identifiers to the first target point and the second target point respectively, the assigned first identifier and the second identifier are associated. In one embodiment, the number and specific values ​​of the assigned identifiers are uniformly set. For example, taking the example of dividing an image into multiple partial images, the total number of the assigned identifiers is equal to the product of the number of the divided partial images and the number of identifiers required for a single partial image, and a unique specific value is set for each identifier for the purpose of assigning the identifiers.

[0051] In another embodiment, different types of first and second identifiers are pre-assigned and are related to each other, assuming that the first target point and the second target point are different types of location points. Taking the cotton field area as an example, the first target point is a mulch type, that is, the first target point is located in the mulch area in the image; the second target point is a crop type, that is, the second target point is located in the crop area in the image. Exemplarily, 60 first identifiers of the mulch type can be set, which are recorded as 1-60 respectively; and 60 second identifiers of the crop type can be set, which are also recorded as 1-60 respectively. At this time, the first identifier 1 of the mulch type is assigned to the first target point, and the second identifier 1 of the crop type is assigned to the second target point, wherein the first identifier 1 of the mulch type and the second identifier 1 of the crop type are associated.

[0052] In one embodiment, a specific method of assigning a first identifier to a first target point and assigning a second identifier to a second target point may be to determine a first pixel position corresponding to the first target point and a second pixel position corresponding to the second target point in a pixel matrix corresponding to the target image, add the first identifier to the coordinates corresponding to the first pixel position, and add the second identifier to the coordinates corresponding to the second pixel position. For example, assuming that the pixel coordinates corresponding to the first target point are (317, 458) and the pixel coordinates corresponding to the second target point are (317, 490), the first identifier is 1, and the second identifier is 2, then the first identifier is added to the coordinates corresponding to the first pixel position to obtain {1, (317, 458)}, and the second identifier is added to the coordinates corresponding to the second pixel point to obtain {2, (317, 490)}.

[0053] Step S103 : performing an inverse transformation of the geometric transformation on the target image to obtain a restored initial image, and determining the target point coordinates of the target point in the restored initial image according to the target identifier.

[0054] In one embodiment, the target identification includes a first identification assigned to a first target point and a second identification assigned to a second target point as an example. Assuming that the initial image is an orthophoto of a cotton field area, in order to determine the plant height of the cotton field area, a first target point of the ground film type and a second target point of the crop type corresponding to the first target point need to be determined in the initial image. When determining the first target point and the second target point, it is necessary to perform a geometric transformation on the initial image so that the determined first target point and the second target point meet the selection conditions. The specific selection conditions are not limited in this solution and can be set according to the specific method of obtaining the plant height. Among them, the initial image corresponds to an elevation image containing geographic location information. When obtaining the plant height, the geographic location coordinates of the first target point and the second target point in the elevation image are queried to obtain the plant height. At this time, the target image is subjected to the inverse transformation of the aforementioned geometric transformation to obtain the initial image before the target image is transformed, so as to determine the plant height using the elevation image of the initial image and the transformed first target point and the second target point.

[0055] Wherein, after the target image is inversely transformed to obtain the initial image, the first target point and the second target point are located after the transformation based on the first identifier and the second identifier assigned to the first target point and the second target point. Taking the above example, in the target image, the first identifier is assigned to the first target point to obtain {1, (317, 458)}, and the second identifier is assigned to the second target point to obtain {2, (317, 490)}. When the target image is inversely transformed to obtain the initial image, the pixel coordinates in the target image are inversely transformed. At this time, it is assumed that the result of the inverse transformation of the first target point coordinates in the initial image is {1, (200, 300)}, and the result of the inverse transformation of the second target point coordinates in the initial image is {2, (220, 335)}. According to the consistency relationship between the first identifier and the second identifier, the coordinates (200, 300) of the position point identified as 1 in the initial image are determined as the coordinates of the first target point, and the coordinates (220, 335) of the position point identified as 2 are determined as the coordinates of the second target point.

[0056] From the above, it can be seen that by determining the target point in the target image, wherein the target image is obtained from the initial image through geometric transformation, a target identifier is assigned to the target point, and the target image is inversely transformed by the geometric transformation to obtain the initial image, and the target point coordinates of the target point in the restored initial image are determined according to the target identifier, rapid and efficient positioning of the position point is achieved, while reducing the coordinate error caused by the coordinate transformation.

[0057] It should be noted that the geometric transformation in the above solution can be a single transformation or multiple continuous transformations, and the specific number of transformations and the transformation form are not limited in this solution.

[0058] Figure 2 A flowchart of another method for determining the coordinates of a position point in an image provided by an embodiment of the present invention. A specific method for assigning identifiers to a target image containing multiple associated first and second target points is given, such as Figure 2 Specifically, the following are included:

[0059] Step S201: Determine a first point set containing a first target point in a target image, and a second point set containing a second target point in the target image, wherein the position points in the first point set and the second point set correspond to each other one-to-one.

[0060] In one embodiment, the target image includes a plurality of first target points and a second target point corresponding to each first target point. For example, the target image includes 60 first target points and 60 second target points. The 60 first target points constitute a first point set, and the 60 second target points constitute a second point set. The position points in the first point set and the second point set correspond one-to-one.

[0061] Step S202: Generate a corresponding number of first identifiers and second identifiers according to the number of the first target points, assign a first identifier to each first target point in turn, and assign a corresponding second identifier to each second target point in turn according to the correspondence between each second target point and the first target point.

[0062] Alternatively, assuming that the number of first target points is 60, 60 first identifiers and 60 second identifiers are generated accordingly. Alternatively, assuming that the number of first target points is 60, 60 different identifier values ​​can be generated, and both the first identifier and the second identifier use these 60 different identifier values, and are distinguished by different types of the first identifier and the second identifier.

[0063] For example, the first point set contains 60 first target points, which are sequentially labeled as first target point 1, first target point 2, through first target point 60. First target point 1 is assigned a first identifier of 1, second target point 2 is assigned a second identifier of 2, and so on. Since each first target point corresponds to a second target point, there are also 60 corresponding second target points. Assuming that first target point 1 corresponds to second target point 1, first target point 2 corresponds to second target point 2, and so on, second target point 1 is assigned a second identifier of 1, second target point 2 is assigned a second identifier of 2, and so on. Accordingly, second target point 1 is assigned a second identifier of 1, second target point 2 is assigned a second identifier of 2, and so on until second target point 60 is assigned a second identifier of 60.

[0064] Step S203: Perform an inverse transformation of the geometric transformation on the target image to obtain a restored initial image, and determine the first position coordinates and the second position coordinates of the first target point and the second target point in the restored initial image according to the first identifier and the second identifier, respectively.

[0065] It can be seen from the above scheme that when image transformation is required and the coordinates of specific associated position points after the transformation need to be obtained, by determining the first point set containing the first target point in the target image and the second point set containing the second target point in the target image, a corresponding number of first identifiers and second identifiers are generated according to the number of first target points, and the first identifier is assigned to each first target point in turn. According to the correspondence between each second target point and the first target point, the corresponding second identifier is assigned to each second target point in turn, so as to locate the first target point and the corresponding second target point after the image transformation, thereby solving the problem of complex position point positioning caused by image transformation, optimizing the position point positioning method, improving the positioning efficiency, and providing convenience for the subsequent process execution.

[0066] Figure 3 A flowchart of another method for determining the coordinates of a position point in an image provided by an embodiment of the present invention. A specific method for assigning identifiers and determining the coordinates of the position point based on the identifiers is given, such as Figure 3 Specifically, the following are included:

[0067] Step S301: Determine a first target point and a second target point in a target image, wherein the first target point and the second target point have a corresponding relationship, and the target image is obtained from an initial image through geometric transformation.

[0068] Step S302, determine the third position coordinates of the first target point in the target image, and the fourth position coordinates of the second target point in the target image, determine the first identifier assigned to the first target point, and the second identifier assigned to the second target point, combine the first identifier and the third coordinates into first positioning information, and combine the second identifier and the fourth coordinates into second positioning information.

[0069] The target image can be represented by a corresponding matrix. For example, if the target image is 1024*1024 in size, it can be represented by a 1024*1024 matrix, where each matrix point in the 1024*1024 matrix corresponds to each pixel in the 1024*1024 size. The third position coordinate of the first target point in the target image is the position of the pixel point where the first target point is located in the matrix, exemplarily (300, 500). Similarly, the fourth coordinate determined exemplarily is (320, 550). Assuming that the first identifier assigned to the first target point is 10 and the second identifier assigned to the second target point is 20, the first positioning information of the first target point consisting of the first identifier and the third coordinate is recorded as {10, (300, 500)}, and the second positioning information of the second target point consisting of the second identifier and the fourth coordinate is recorded as {20, (320, 550)}.

[0070] Step S303: Perform an inverse transformation of the geometric transformation on the target image, and perform corresponding inverse transformation on the coordinate values ​​in the first positioning information and the second positioning information to obtain an initial image.

[0071] In one embodiment, during the geometric transformation of the target image, the coordinate values ​​in the first positioning information and the second positioning information are transformed in the same way. It is assumed that the transformed first positioning information is {10, (500, 620)} and the transformed second positioning information is {20, (100, 130)}.

[0072] Step S304: Determine first position coordinates and second position coordinates of the first target point and the second target point in the restored initial image according to the first identifier and the second identifier, respectively.

[0073] In one embodiment, the first target point and the second target point are located respectively using the first identifier in the first positioning information and the second identifier in the second positioning information. Specifically, before and after the geometric transformation, the coordinates of the transformation under the same identifier are determined as the coordinates of the same position point before and after the geometric transformation. That is, the {10, (500, 620)} coordinate (500, 620) in the first positioning information is determined as the first position coordinate, and the {20, (100, 130)} coordinate (100, 130) in the second positioning information is determined as the second position coordinate.

[0074] It can be seen from the above scheme that corresponding positioning information is assigned to the first target point and the second target point respectively. During the image transformation, the same coordinate transformation is performed on the assigned positioning information to obtain the coordinates of the position point in the transformed image after the image transformation. This solves the problem of position point positioning and reduces the error caused by the coordinate transformation, thereby achieving fast, efficient and accurate positioning of the position point.

[0075] Figure 4 A flow chart of another method for determining the coordinates of a position point in an image provided by an embodiment of the present invention. A method for determining the geographic location based on the coordinates of the position point after determining the coordinates of the position point is given, such as Figure 4 As shown, specifically including:

[0076] Step S401: Determine a first target point and a second target point in a target image, wherein the first target point and the second target point have a corresponding relationship, and the target image is obtained from an initial image through geometric transformation.

[0077] Step S402: assign a first identifier to the first target point, and assign a second identifier to the second target point.

[0078] Step S403: Perform an inverse transformation of the geometric transformation on the target image to obtain a restored initial image, and determine the first position coordinates and the second position coordinates of the first target point and the second target point in the restored initial image according to the first identifier and the second identifier, respectively.

[0079] Step S404: Acquire an elevation image corresponding to the initial image, and determine the geographical locations corresponding to the first target point and the second target point respectively according to the elevation image, the first position coordinates, and the second position coordinates.

[0080] An elevation image is a ground elevation model image that includes the heights of various objects in the target area (e.g., operating areas, non-operating areas, operating targets, water outlets, etc.). It encompasses the elevation of the ground and other surface information beyond the ground, reflecting the undulations of the ground. This elevation image can be generated using aerial survey software or converted from a point cloud image measured by a laser radar (LiDAR) carried by unmanned equipment. The elevation image provides the elevation information for corresponding points in the image.

[0081] In one embodiment, after determining the first position coordinates and the second position coordinates in the initial image, the geographical locations corresponding to the first target point and the second target point are respectively obtained based on the elevation image corresponding to the initial image, so as to realize applications of various scenarios that require the use of elevation information of the position points.

[0082] As can be seen from the above scheme, during the image transformation process, positioning is performed by assigning identifiers to location points, so as to subsequently determine the geographical location corresponding to the location points conveniently and accurately, which can be applied to various scenarios.

[0083] In another embodiment, the initial image is an image obtained by segmenting a global image. After determining the first and second position coordinates of the first and second target points in the restored initial image, the method further includes: restoring the initial image to the global image, determining the third and fourth position coordinates of the first and second target points in the global image based on the first and second identifiers, and determining the actual geographic locations corresponding to the first and second target points based on the geographic location information recorded in the global image and the third and fourth coordinates. The global image is an image containing geographic location information, and the initial image is an image obtained by segmenting the global image, such as segmenting the global image into 24 initial images. After determining the coordinates of the target point in the initial image, when further restoring the initial image to the global image, the target point is mapped to the global image based on the position mapping relationship during the restoration process. Specifically, the position of the target point in the corresponding global image can be obtained based on the target identifier record, and the actual geographic location of the target point can be determined based on the position in the global image and the geographic location information contained in the global image.

[0084] Figure 5 Flowchart of another method for determining the coordinates of a position point in an image provided by an embodiment of the present invention. Figure 5 As shown, specifically including:

[0085] Step S501: Determine a first target point and a second target point in a target image, where the first target point and the second target point have a corresponding relationship.

[0086] The first target point and the second target point are associated points in the target image. The two are in a mutually corresponding and dependent relationship. The target image can be, for example, an image of a cotton field.

[0087] Step S502 : generating a position recording mask according to the pixel matrix corresponding to the target image, wherein the coordinates of each matrix position point in the position recording mask are the same as the coordinates of the corresponding position of the matrix position point in the pixel matrix.

[0088] The target image can be represented by a pixel matrix. For example, if the target image is 1024*1024 in size, it can be represented by a 1024*1024 pixel matrix, where each matrix point in the 1024*1024 pixel matrix corresponds to each pixel point in the 1024*1024 size. A position record mask is generated based on this pixel matrix. This position record mask is also a 1024*1024 matrix, where each matrix position point in the position record mask has the same coordinates as the corresponding position of the matrix position point in the pixel matrix.

[0089] Step S503: According to the correspondence between the pixel matrix and the position recording mask, a first identifier is assigned to the first target point and a second identifier is assigned to the second target point in the position recording mask.

[0090] For example, assuming the coordinates of the first target point in the target image are (200, 300) and the coordinates of the second target point are (220, 330), then correspondingly, a first identifier is added to the coordinates (200, 300) in the position recording mask, and a second identifier is added to the coordinates (220, 330). If the first identifier value is 1 and the second identifier value is 2, the added information record is: {1, (200, 300)} and {2, (220, 330)}.

[0091] The definitions and corresponding relationship between the first identifier and the second identifier are explained in the aforementioned embodiment and will not be repeated here.

[0092] Step S504: When performing a geometric transformation on the target image, perform the same geometric transformation on the coordinates in the position recording mask to obtain an updated position mask, and determine the first position coordinates and the second position coordinates of the first target point and the second target point in the updated position mask based on the first identifier and the second identifier.

[0093] The process of geometrically transforming the target image is the process of transforming the pixel matrix corresponding to the target image. In one embodiment, while the target image is geometrically transformed, the corresponding position in the position recording mask is synchronously transformed.

[0094] For example, assume that the coordinates of the first target point in the target image are (200, 300), and the first identification value assigned to it is 1. The coordinates of the second target point are (220, 330), and the second identification value assigned to it is 2. Identification value 1 and identification value 2 are associated with each other. After geometric transformation, the coordinates of the first target point are (100, 200), and the coordinates of the second target point are (320, 430). The original recorded position record mask consists of {1, (200, 300)} and {2, (220, 330)}, and the corresponding transformation is {1, (100, 200)} and {2, (320, 430)}. Using the same identification value as the tracking basis, the first position coordinates of the first target point in the updated position mask are obtained as (100, 200), and the second position coordinates of the second target point in the updated position mask are obtained as (320, 430).

[0095] In one embodiment, after obtaining the first position coordinates and the second position coordinates, the method further includes: obtaining an elevation image corresponding to the geometrically transformed image of the target image; and determining the geographic locations corresponding to the first target point and the second target point based on the elevation image, the first position coordinates, and the second position coordinates. The specific process of obtaining the elevation image and determining the geographic locations corresponding to the first target point and the second target point based on the elevation image, the first position coordinates, and the second position coordinates is described in the explanation section of the previous embodiment and will not be repeated here.

[0096] It can be seen from the above scheme that by determining the first target point and the second target point in the target image, there is a corresponding relationship between the first target point and the second target point, and a position recording mask is generated according to the pixel matrix corresponding to the target image. The coordinates of each matrix position point in the position recording mask are the same as the coordinates of the corresponding position of the matrix position point in the pixel matrix. According to the corresponding relationship between the pixel matrix and the position recording mask, a first identifier is assigned to the first target point and a second identifier is assigned to the second target point in the position recording mask. When the target image is geometrically transformed, the coordinates in the position recording mask are subjected to the same geometric transformation to obtain an updated position mask. The first position coordinates and the second position coordinates of the first target point and the second target point in the updated position mask are determined according to the first identifier and the second identifier, thereby realizing fast and efficient positioning of the position points and reducing the coordinate error caused by the coordinate transformation.

[0097] Figure 6 This is a schematic diagram of a module of a device for determining the coordinates of a position point in an image provided by an embodiment of the present invention. The device is used to execute the method for determining the coordinates of a position point in an image described above, and has functional modules and beneficial effects corresponding to the execution method. Figure 6 As shown, the device specifically includes: a position point acquisition module 101, an identification allocation module 102, a geometric transformation module 103 and a position point coordinate calculation module 104, wherein,

[0098] A position point acquisition module 101 is used to determine a target point in a target image, where the target image is obtained from an initial image through geometric transformation;

[0099] The identifier allocation module 102 is used to allocate a target identifier to the target point;

[0100] A geometric transformation module 103 is configured to perform an inverse transformation of the geometric transformation on the target image to obtain a restored initial image;

[0101] The position point coordinate calculation module 104 is configured to determine the target point coordinates of the target point in the restored initial image according to the target identifier.

[0102] It can be seen from the above scheme that the target point in the target image is determined, the target image is obtained by geometric transformation of the initial image, a target identifier is assigned to the target point, the target image is inversely transformed by the geometric transformation to obtain the restored initial image, and the target point coordinates of the target point in the restored initial image are determined according to the target identifier, thereby realizing fast and efficient positioning of the position point and reducing the coordinate error caused by the coordinate transformation.

[0103] In a possible embodiment, the target point includes at least one set of a first target point and a second target point having a corresponding relationship, and the position point acquisition module 101 is specifically configured to:

[0104] determining a first target point and a second target point in the target image;

[0105] The identification allocation module 102 is specifically configured to:

[0106] assigning a first identifier to the first target point, and assigning a second identifier to the second target point;

[0107] The determining the target point coordinates of the target point in the restored initial image according to the target identifier includes:

[0108] The position point coordinate calculation module 104 is specifically used to:

[0109] The first position coordinates and the second position coordinates of the first target point and the second target point in the restored initial image are determined according to the first identifier and the second identifier respectively.

[0110] In a possible embodiment, the location point acquisition module 101 is specifically configured to:

[0111] Determine a first point set including a first target point in a target image, and a second point set including a second target point in the target image, wherein the position points in the first point set and the second point set correspond to each other one-to-one;

[0112] The identification allocation module 102 is specifically configured to:

[0113] Generate a corresponding number of first identifiers and second identifiers according to the number of the first target points, wherein the identifier value of each first identifier is different, and the identifier value of each second identifier is consistent with one of the first identifier values;

[0114] A first identifier is sequentially assigned to each first target point, and a corresponding second identifier is sequentially assigned to each second target point according to a correspondence between each second target point and the first target point.

[0115] In a possible embodiment, the identifier allocation module 102 is specifically configured to:

[0116] Determining a third position coordinate of the first target point in the target image, and a fourth position coordinate of the second target point in the target image;

[0117] Determine a first identifier assigned to the first target point and a second identifier assigned to the second target point, combine the first identifier and the third coordinates into first positioning information, and combine the second identifier and the fourth coordinates into second positioning information.

[0118] In a possible embodiment, the geometric transformation module 103 is specifically used to

[0119] When performing an inverse transformation of the geometric transformation on the target image, corresponding inverse transformations are performed on the coordinate values ​​in the first positioning information and the second positioning information to obtain an initial image.

[0120] In a possible embodiment, the position point coordinate calculation module 104 is further configured to:

[0121] After determining the first position coordinates and the second position coordinates of the first target point and the second target point in the restored initial image, acquiring an elevation image corresponding to the initial image;

[0122] The geographical locations corresponding to the first target point and the second target point are determined according to the elevation image, the first position coordinates and the second position coordinates.

[0123] In a possible embodiment, the initial image is an image obtained by segmenting the global image, and the position point coordinate calculation module 104 is further configured to:

[0124] Restoring the initial image to a global image, and determining third position coordinates and fourth position coordinates of the first target point and the second target point in the global image according to the first identifier and the second identifier;

[0125] The actual geographical locations corresponding to the first target point and the second target point are determined according to the geographical location information recorded in the global image and the third location coordinates and the fourth location coordinates.

[0126] Figure 7 This is a module diagram of another device for determining the coordinates of a position point in an image provided by an embodiment of the present invention. The device is used to execute the method for determining the coordinates of a position point in a partial image described above, and has the corresponding functional modules and beneficial effects of the execution method. Figure 7As shown, the device specifically includes: a position point acquisition module 201, a position mask generation module 202, an identification allocation module 203, a geometric transformation module 204 and a position point coordinate calculation module 205, wherein,

[0127] A position point acquisition module 201 is used to determine a first target point and a second target point in a target image, wherein the first target point and the second target point have a corresponding relationship, and the target image is obtained from an initial image through geometric transformation;

[0128] A position mask generating module 202 is configured to generate a position recording mask according to a pixel matrix corresponding to the target image, wherein each matrix position point in the position recording mask has the same coordinates as a corresponding position of a matrix position point in the pixel matrix;

[0129] an identifier assigning module 203, configured to assign a first identifier to the first target point and a second identifier to the second target point in the position recording mask according to a correspondence between the pixel matrix and the position recording mask;

[0130] A geometric transformation module 204 is configured to perform an inverse transformation of the geometric transformation on the coordinates in the position recording mask to obtain an updated position mask;

[0131] The position point coordinate calculation module 205 is configured to determine the first position coordinates and the second position coordinates of the first target point and the second target point in the updated position mask according to the first identifier and the second identifier.

[0132] It can be seen from the above scheme that by determining the first target point and the second target point in the target image, there is a corresponding relationship between the first target point and the second target point, and a position recording mask is generated according to the pixel matrix corresponding to the target image. The coordinates of each matrix position point in the position recording mask are the same as the coordinates of the corresponding position of the matrix position point in the pixel matrix. According to the corresponding relationship between the pixel matrix and the position recording mask, a first identifier is assigned to the first target point and a second identifier is assigned to the second target point in the position recording mask. When the target image is geometrically transformed, the coordinates in the position recording mask are subjected to the same geometric transformation to obtain an updated position mask. The first position coordinates and the second position coordinates of the first target point and the second target point in the updated position mask are determined according to the first identifier and the second identifier, thereby realizing fast and efficient positioning of the position points and reducing the coordinate error caused by the coordinate transformation.

[0133] In a possible embodiment, the position point coordinate calculation module 205 is further configured to:

[0134] After determining the first position coordinates and the second position coordinates of the first target point and the second target point in the updated position mask based on the first identifier and the second identifier, obtain an elevation image corresponding to the image after the geometric transformation of the target image; determine the geographical locations corresponding to the first target point and the second target point respectively based on the elevation image, the first position coordinates and the second position coordinates.

[0135] Figure 8 A schematic diagram of a device for determining the coordinates of a position point in an image provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, the device includes a processor 301, a memory 302, an input device 303 and an output device 304; the number of processors 301 in the device can be one or more. Figure 8 In the embodiment, a processor 301 is used as an example; the processor 301, the memory 302, the input device 303 and the output device 304 in the device can be connected by a bus or other means. Figure 8 The example of the connection via bus is taken. The memory 302, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the method for determining the coordinates of a position point in an image in an embodiment of the present invention. The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 302, that is, realizes the above-mentioned method for determining the coordinates of a position point in an image. The input device 303 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device 304 may include a display device such as a display screen.

[0136] An embodiment of the present invention further provides a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, the computer-executable instructions are used to perform a method for determining the coordinates of a position point in an image. The method includes:

[0137] Determining a target point in a target image, wherein the target image is obtained by geometrically transforming the initial image;

[0138] assigning a target identifier to the target point;

[0139] Performing an inverse transformation of the geometric transformation on the target image to obtain a restored initial image, and determining the target point coordinates of the target point in the restored initial image according to the target identifier. Or,

[0140] Determine the target point in the target image;

[0141] generating a position recording mask according to a pixel matrix corresponding to the target image, wherein each matrix position point in the position recording mask has the same coordinates as a corresponding position of a matrix position point in the pixel matrix;

[0142] assigning a target identifier to the target point in the position recording mask according to a correspondence between the pixel matrix and the position recording mask;

[0143] When geometric transformation is performed on the target image, the coordinates in the position recording mask are subjected to the same geometric transformation to obtain an updated position mask, and the target point coordinates of the target point in the updated position mask are determined according to the target identifier.

[0144] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be an unmanned device, a mobile phone, a computer, a server or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0146] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A method for determining the coordinates of a position point in an image, characterized in that: include: Determining target points in a target image, where the target image is obtained by geometric transformation of the initial image, and the target points include at least one set of first target points and second target points that have a corresponding relationship; assigning a target identifier to the target point; Performing an inverse transformation of the geometric transformation on the target image to obtain a restored initial image, and determining the target point coordinates of the target point in the restored initial image according to the target identifier; Among them, determining the target point in the target image and assigning a target identifier to the target point includes: determining a first target point and a second target point in the target image, determining the third position coordinates of the first target point in the target image, and the fourth position coordinates of the second target point in the target image, determining a first identifier assigned to the first target point, and a second identifier assigned to the second target point, combining the first identifier and the third coordinates to form first positioning information, and combining the second identifier and the fourth coordinates to form second positioning information.

2. The method for determining the coordinates of a position point in an image according to claim 1, wherein: The determining the target point coordinates of the target point in the restored initial image according to the target identifier includes: The first position coordinates and the second position coordinates of the first target point and the second target point in the restored initial image are determined according to the first identifier and the second identifier respectively.

3. The method for determining the coordinates of a position point in an image according to claim 2, wherein: The determining of the first target point and the second target point in the target image includes: Determine a first point set including a first target point in a target image, and a second point set including a second target point in the target image, wherein the position points in the first point set and the second point set correspond to each other one-to-one; The allocating a first identifier to the first target point and allocating a second identifier to the second target point includes: Generate a corresponding number of first identifiers and second identifiers according to the number of the first target points, wherein the identifier value of each first identifier is different, and the identifier value of each second identifier is consistent with one of the first identifier values; A first identifier is sequentially assigned to each first target point, and a corresponding second identifier is sequentially assigned to each second target point according to a correspondence between each second target point and the first target point.

4. The method for determining the coordinates of a position point in an image according to claim 1, wherein: The step of performing an inverse transformation of the geometric transformation on the target image to obtain a restored initial image includes: When performing an inverse transformation of the geometric transformation on the target image, corresponding inverse transformations are performed on the coordinate values ​​in the first positioning information and the second positioning information to obtain an initial image.

5. The method for determining the coordinates of a position point in an image according to any one of claims 2 to 4, characterized in that: After determining the first position coordinates and the second position coordinates of the first target point and the second target point in the restored initial image, the method further includes: Acquire an elevation image corresponding to the initial image; The geographical locations corresponding to the first target point and the second target point are determined according to the elevation image, the first position coordinates and the second position coordinates.

6. The method for determining the coordinates of a position point in an image according to any one of claims 2 to 4, characterized in that: The initial image is an image obtained by segmenting the global image. After determining the first position coordinates and the second position coordinates of the first target point and the second target point in the restored initial image, the method further includes: Restoring the initial image to a global image, and determining third position coordinates and fourth position coordinates of the first target point and the second target point in the global image according to the first identifier and the second identifier; The actual geographical locations corresponding to the first target point and the second target point are determined according to the geographical location information recorded in the global image and the third location coordinates and the fourth location coordinates.

7. A method for determining the coordinates of a position point in an image, characterized in that: include: Determine the target point in the target image; generating a position recording mask according to a pixel matrix corresponding to the target image, wherein each matrix position point in the position recording mask has the same coordinates as a corresponding position of a matrix position point in the pixel matrix; assigning a target identifier to the target point in the position recording mask according to a correspondence between the pixel matrix and the position recording mask; When performing geometric transformation on the target image, performing the same geometric transformation on the coordinates in the position recording mask to obtain an updated position mask, and determining the target point coordinates of the target point in the updated position mask according to the target identifier; Obtaining an elevation image corresponding to the geometrically transformed image of the target image; The geographical location corresponding to the target point is determined according to the elevation image and the coordinates of the target point.

8. A device for determining the coordinates of a position point in an image, characterized in that: include: A position point acquisition module is used to determine target points in a target image, where the target image is obtained from an initial image through geometric transformation, and the target points include at least one set of first target points and second target points that have a corresponding relationship; an identification assignment module, configured to assign a target identification to the target point, the identification assignment module being specifically configured to determine a first target point and a second target point in a target image, determine a third position coordinate of the first target point in the target image, and a fourth position coordinate of the second target point in the target image, determine a first identification assigned to the first target point, and a second identification assigned to the second target point, combine the first identification and the third coordinates into first positioning information, and combine the second identification and the fourth coordinates into second positioning information; A geometric transformation module, configured to perform an inverse transformation of the geometric transformation on the target image to obtain a restored initial image; A position point coordinate calculation module is used to determine the target point coordinates of the target point in the restored initial image according to the target identifier.

9. A device for determining the coordinates of a position point in an image, characterized in that: include: A position point acquisition module is used to determine a target point in a target image, where the target image is obtained from an initial image through geometric transformation; a position mask generating module, configured to generate a position recording mask according to a pixel matrix corresponding to the target image, wherein each matrix position point in the position recording mask has the same coordinates as a position corresponding to a matrix position point in the pixel matrix; an identifier assignment module, configured to assign a target identifier to the target point in the position recording mask according to a correspondence between the pixel matrix and the position recording mask; a geometric transformation module, configured to perform an inverse transformation of the geometric transformation on the coordinates in the position recording mask to obtain an updated position mask; The position point coordinate calculation module is used to determine the target coordinates of the target point in the updated position mask according to the target identifier. The position point coordinate calculation module is also used to obtain the elevation image corresponding to the image after the geometric transformation of the target image, and determine the geographical location corresponding to the target point according to the elevation image and the target point coordinates.

10. A device for determining the coordinates of a position point in an image, the device comprising: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, so that the one or more processors implement the coordinate determination method of a position point in an image according to any one of claims 1 to 7.

11. A storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to perform the method for determining the coordinates of a position point in an image according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image correction method and device

    CN110084236A

  • Multi-channel video image splicing method

    CN113506214A

  • Image processing method and device thereof, equipment and storage medium

    CN113516131A