Marker positioning method, device, electronic device and computer-readable storage medium

By arranging scene identification in large scenarios and using image recognition and feature comparison, the high hardware cost problem caused by relying on expensive external devices in the prior art is solved, and an efficient and economical user positioning solution is achieved.

CN113989372BActive Publication Date: 2025-04-01GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111266870.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2025-04-01
Estimated Expiration
2041-10-28

AI Technical Summary

Technical Problem

Existing large-scenario positioning technologies rely on expensive external auxiliary equipment, resulting in high hardware costs.

Method used

By arranging scene identifiers in the scene area, using the method of image recognition and feature comparison, the scene identifiers and coordinate points in the first scene image are identified, feature information is extracted, and the position of the identification to be measured is calculated.

Benefits of technology

A pure visual solution for user positioning in large scenarios is realized, reducing hardware costs and improving positioning accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989372B_ABST
    Figure CN113989372B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and computer-readable storage medium for positioning identification, the method comprising: identifying a scene identification of a scene area in a first scene image to obtain a scene identification position; selecting a coordinate point from the first scene image, extracting first feature information corresponding to the coordinate point, and recording the coordinate point position of the coordinate point respectively; identifying a marker to be tested in a second scene image of the scene area to obtain the marker position to be tested, extracting second feature information at the marker position to be tested; searching for a target coordinate point whose first feature information matches the second feature information from each coordinate point, and calculating the position of the marker to be tested in the scene area according to the coordinate point position corresponding to the target coordinate point and the position of the scene identification in the scene area. The present invention provides a purely visual user positioning solution, which greatly reduces the hardware cost of large-scene user positioning compared to the current large-scene positioning method that relies on expensive external auxiliary equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a marking positioning method, device, electronic device and computer-readable storage medium. Background Art

[0002] At present, in some application fields, it is necessary to locate users in large scenes in real time. For example, users wear VR (Virtual Reality) / AR (Augmented Reality) devices to move in the scene and experience the superposition of virtual scenes and real scenes. However, the current large-scene positioning technology mostly relies on expensive external auxiliary equipment, such as setting up dense sensors and other positioning devices in the scene to capture the specific position in the scene. This positioning method has high hardware costs. Summary of the invention

[0003] The main purpose of the present invention is to provide an identification positioning method, device, electronic device and computer-readable storage medium, aiming to solve the technical problem of high hardware cost when relying on expensive external auxiliary equipment to locate users in large scenes.

[0004] To achieve the above object, the present invention provides a marker positioning method, the marker positioning method comprising:

[0005] Identifying a scene identifier of a scene area in a first scene image to obtain a scene identifier position of the scene identifier in the first scene image;

[0006] Selecting a plurality of coordinate points from the first scene image, extracting first feature information corresponding to each of the coordinate points according to image information of the first scene image, and recording the coordinate point position of each of the coordinate points in the first scene image relative to the scene identification position;

[0007] Identify the marker to be measured in the second scene image of the scene area to obtain the position of the marker to be measured, and extract the second feature information at the position of the marker to be measured according to the position of the marker to be measured;

[0008] Search the target coordinate point whose first characteristic information matches the second characteristic information from each of the coordinate points, and calculate the position of the marker to be tested in the scene area according to the coordinate point position corresponding to the target coordinate point and the position of the scene marker in the scene area.

[0009] Optionally, the scene identifiers are arranged at respective endpoints of the scene area, and the respective endpoints enclose the scene area; and the step of selecting a plurality of coordinate points from the first scene image comprises:

[0010] Extracting feature points from the first scene image;

[0011] Determining the centroid of the first scene image, and dividing the first scene image into a plurality of first-level image regions according to the connection lines between each of the scene identifiers and the centroid;

[0012] At least one feature point is selected from the first-level image area as a coordinate point.

[0013] Optionally, after the step of determining the centroid of the first scene image and dividing the first scene image into a plurality of first-level image regions according to the connection lines between each of the scene identifiers and the centroid, the method further includes:

[0014] Using the centroid as the root node of a multi-branch tree, using each of the first-level image regions as a child node of the root node in the multi-branch tree, and initializing the target node as the root node;

[0015] Determine whether the number of the feature points in the image area of ​​each child node of the target node is greater than a preset number;

[0016] If not, then one of the feature points is determined from the image area of ​​each child node of the target node as a coordinate point in the corresponding image area.

[0017] Optionally, after the step of determining whether the number of the feature points in the image area of ​​each child node of the target node is greater than a preset number, the step further includes:

[0018] If so, the image areas of each child node of the target node are divided into multiple next-level image areas, each next-level image area is used as a child node corresponding to the previous-level image area, the target node is updated to each child node of the target node in sequence, and then the step of determining whether the number of feature points in the image area of ​​each child node of the target node is greater than the preset number is returned to execute.

[0019] Optionally, the step of respectively determining one of the feature points in the image area of ​​each child node of the target node as a coordinate point in the corresponding image area includes:

[0020] If there are multiple feature points in the image area of ​​the child node of the target node, a feature point with the largest grayscale environment gradient value is selected from the multiple feature points as a coordinate point in the image area.

[0021] Optionally, the step of searching, from among the coordinate points, a target coordinate point whose first characteristic information matches the second characteristic information includes:

[0022] Taking the first-level image area including the mark to be tested as the target image area;

[0023] Find the target coordinate points where the first feature information matches the second feature information from the coordinate points in the target image area.

[0024] Optionally, the step of finding out, from the coordinate points in the target image area, target coordinate points where the first feature information matches the second feature information includes:

[0025] A pre-order traversal is performed in the multi-branch tree starting from the child node corresponding to the target image area to find a target coordinate point whose first feature information matches the second feature information from each of the coordinate points.

[0026] Optionally, the step of extracting first feature information corresponding to each of the coordinate points according to the image information of the first scene image includes:

[0027] Sampling the position of the coordinate point in the first scene image using a preset sampling window to obtain first feature information of the coordinate point based on image information of the sampling point;

[0028] The step of extracting the second feature information at the position of the mark to be detected according to the image information of the second scene image comprises:

[0029] The preset sampling window is used to perform sampling at the position of the mark to be measured in the second scene image, so as to obtain second feature information at the position of the mark to be measured based on the image information of the sampling points.

[0030] Optionally, before the step of sampling the position of the coordinate point in the first scene image using a preset sampling window to obtain the first feature information of the coordinate point based on the image information of the sampling point, the method further includes:

[0031] Acquire an initial sampling window as a current sampling window, and use the current sampling window to sample the position of the coordinate point in the first scene image, so as to obtain current feature information of the coordinate point based on image information of the sampling point;

[0032] Taking each of the coordinate points as a target point in turn, determining a preset number of adjacent coordinate points that are closest to the target point in the first scene image, and calculating a feature difference value between the current feature information of the target point and the current feature information of the adjacent coordinate points;

[0033] The feature difference values ​​corresponding to the coordinate points are summed to obtain a total difference value, a first preset threshold is subtracted from the total difference value to obtain a difference value, and it is determined whether the difference value is less than a second preset threshold value;

[0034] If the difference is less than the second preset threshold, taking the current sampling window as the preset sampling window;

[0035] If the difference is not less than the second preset threshold, the window parameters of the current sampling window are updated, and the step of sampling the position of the coordinate point in the first scene image using the current sampling window is returned to obtain the current feature information of the coordinate point based on the image information of the sampling point.

[0036] Optionally, the preset sampling window is a circular sampling window, and the step of sampling the position of the coordinate point in the first scene image using the preset sampling window to obtain the first feature information of the coordinate point based on the image information of the sampling point includes:

[0037] placing the center of the circular sampling window at the coordinate point in the first scene image, sampling from the circular sampling window to obtain N sampling points, and obtaining grayscale values ​​of the N sampling points according to image information of the first scene image;

[0038] If the grayscale value of the i-th sampling point is greater than the grayscale value of the i+1-th sampling point, the description information of the i-th sampling point is set to 1, where 1≤i≤N-1;

[0039] If the grayscale value of the i-th sampling point is not greater than the grayscale value of the i+1-th sampling point, the description information of the i-th sampling point is set to 0;

[0040] The first feature information of the coordinate point is obtained according to the description information of the 1st to N-1th sampling points.

[0041] The present invention also provides a marking and positioning device, the marking and positioning device comprising:

[0042] A recognition module, used to recognize a scene identifier of a scene area in the first scene image to obtain a scene identifier position;

[0043] a first extraction module, configured to select a plurality of coordinate points from the first scene image, extract first feature information corresponding to each of the coordinate points according to image information of the first scene image, and respectively record the coordinate point position of each of the coordinate points in the first scene image relative to the scene identification position;

[0044] A second extraction module is used to identify the marker to be tested in the second scene image of the scene area to obtain the position of the marker to be tested, and extract the second feature information at the position of the marker to be tested according to the position of the marker to be tested;

[0045] A matching module is used to search for a target coordinate point that matches the first feature information with the second feature information from each of the coordinate points, and calculate the position of the marker to be tested in the scene area based on the coordinate point position corresponding to the target coordinate point and the scene marker position.

[0046] The present invention also provides an electronic device, which is a physical device, and includes: a memory, a processor, and a program of the identification positioning method stored in the memory and executable on the processor. When the program of the identification positioning method is executed by the processor, the steps of the identification positioning method as described above can be implemented.

[0047] The present invention also provides a computer-readable storage medium, on which is stored a program for implementing the identification positioning method, and when the program of the identification positioning method is executed by a processor, the steps of the identification positioning method as described above are implemented.

[0048] The present invention provides a method, device, electronic device and computer-readable storage medium for positioning identification. The present invention arranges scene identification in a scene area, identifies the scene identification of the scene area in a first scene image, so as to obtain the scene identification position of the scene identification in the first scene image; selects multiple coordinate points in the first scene image, extracts first feature information corresponding to each coordinate point according to the image information of the first scene image, and records the coordinate point position of each coordinate point relative to the scene identification position in the first scene image; obtains a second scene image of a target user active in the scene area, identifies the identification to be tested in the second scene image of the scene area to obtain the identification position to be tested, and extracts the second feature information at the identification position to be tested according to the identification position to be tested; searches for target coordinate points whose first feature information matches the second feature information in each coordinate point, and calculates the position of the identification to be tested in the scene area according to the coordinate point position corresponding to the target coordinate point and the position of the scene identification in the scene area. The present invention provides a purely visual user positioning solution, which only sets some scene identifications in the scene area, and can obtain the position of the user in the scene area by image recognition and feature comparison. Compared with the large scene positioning method that currently relies on expensive external auxiliary equipment, the user positioning solution provided by the present invention greatly reduces the hardware cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0051] Figure 1 This is a schematic diagram of the flow chart of the first embodiment of the identification and positioning method of the present invention;

[0052] Figure 2 A schematic diagram of a scene area involved in an embodiment of a marking and positioning method of the present invention;

[0053] Figure 3 A schematic diagram of scene image area division involved in an embodiment of a marker positioning method of the present invention;

[0054] Figure 4 The figure is a schematic diagram of the device structure of the hardware operating environment involved in the identification and positioning method in the embodiment of the present invention.

[0055] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0056] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0057] Embodiment 1

[0058] See also Figure 1 , an embodiment of the present invention provides a method for positioning a marker, comprising:

[0059] Step S10, identifying a scene identifier of a scene area in a first scene image to obtain a scene identifier position of the scene identifier in the first scene image;

[0060] In this embodiment, in order to solve the technical problem of high hardware cost when relying on expensive external auxiliary equipment for large-scene user positioning, a purely visual identification positioning method is proposed to locate the position of the user in the scene area, but it is not limited to large-scene user positioning, that is, it can also be used for positioning other objects in the scene. The following embodiments are described by taking user positioning as an example.

[0061] The scene area can be any selected area where users are active. For example, in one embodiment, the shopping area of ​​a supermarket is defined as the scene area, and at least one user wears a VR or AR device and moves in the scene area. Through the VR or AR device, the user can watch a virtual scene combined with the real scene area to achieve a virtual and real shopping or gaming experience. In this process, the user's position in the scene area needs to be located so as to be reflected in the virtual scene.

[0062] Some scene markers may be arranged in the scene area. The physical form of the scene markers is not limited in this embodiment, but when the scene marker is captured in an image, the position of the scene marker in the image can be identified through image recognition. For example, in some embodiments, the scene marker may be a conspicuous marker, a QR code carrying information, a flash light, etc. The number of scene markers may be one or more, and the number is not limited in this embodiment. It is understandable that since the scene markers are artificially arranged in the scene area, the position of the scene marker in the scene area can be measured in advance.

[0063] An image of the scene area (hereinafter referred to as the first scene image) may be captured by a camera device, or the first scene image of the scene area may be captured by other image acquisition devices, which is not limited in the present embodiment. The first scene image includes the entire scene area. In one embodiment, the first scene image may be an image including the entire scene area, and this image may be obtained by photographing the scene area at a top-down angle using a camera device with a large field of view, or may be obtained by photographing multiple images of different small areas of the scene area at a top-down angle using a camera device, and then stitching the multiple images together. In another embodiment, the first scene image may also be multiple images, and the areas included in the multiple images are combined to form the scene area, and correspondingly, at least one scene identifier is provided in each of the areas included in the multiple images.

[0064] Acquire a first scene image of the scene area, identify the first scene image, and obtain the position of the scene identifier in the first scene image (hereinafter referred to as the scene identifier position). Specifically, depending on the different physical forms of the scene identifier, there may be certain differences in the specific implementation methods for identifying the position of the scene identifier in the first scene image. For example, in one implementation, when the scene identifier is a conspicuous sign or flash, an image of the scene identifier (called an identifier image) can be captured separately in advance, and the identifier image can be matched with the image information of each pixel of the first scene image; if an image area in the first scene image successfully matches the identifier image, the position of the image area (or a point that can represent the area) in the first scene image is used as the position of the scene identifier in the first scene image; the matching method of the two image areas is not limited in this embodiment.

[0065] Step S20, selecting a plurality of coordinate points from the first scene image, extracting first feature information corresponding to each of the coordinate points according to image information of the first scene image, and recording the coordinate point position of each of the coordinate points in the first scene image relative to the scene identification position;

[0066] After acquiring the first scene image, multiple coordinate points may be selected from the first scene image. Specifically, the method for selecting the coordinate points and the number of the coordinate points are not limited in this embodiment. For example, in one embodiment, an image coordinate system may be established in the first scene image, and some coordinate values ​​may be selected from each coordinate axis of the image coordinate system by equally sampling, and the points defined by the selected coordinate values ​​on each coordinate axis are used as coordinate points.

[0067] After the coordinate points are selected, the positions of the respective coordinate points in the first scene image relative to the scene identification positions (hereinafter referred to as the coordinate point positions) may be recorded, that is, the positions of the coordinate points in the first scene image may be determined based on the coordinate point positions and the scene identification positions. In one embodiment, when there are three or more scene identifications, the coordinate point positions may only include the distances between the coordinate point and the respective scene identification positions in the first scene image, and the positions of the coordinate points in the first scene image may be located based on the distances between the coordinate point and the plurality of scene identification positions. In another embodiment, when there are less than three scene identifications, the coordinate point positions may include, in addition to the distances between the coordinate point and the respective scene identification positions in the first scene image, the direction of the coordinate point relative to the scene identification position in the first scene image.

[0068] After the coordinate points are selected, feature information corresponding to each coordinate point (hereinafter referred to as first feature information) can be extracted based on the image information of the first scene image. The image information may include information such as the grayscale value and RGB value of the pixel point. The first feature information is used to describe the features exhibited by the image information of the coordinate point or a certain range of pixels around it. The method for extracting the first feature information is not limited in this embodiment. For example, in one embodiment, the ORB algorithm can be used to extract the feature vector of the coordinate point, and the feature vector is used as the first feature information of the coordinate point.

[0069] Furthermore, in some implementations, after the first feature information and the position of each coordinate point are acquired, each scene identifier arranged in the scene area may be removed.

[0070] Step S30, identifying a marker to be detected in a second scene image of the scene area to obtain a position of the marker to be detected, and extracting second feature information at the position of the marker to be detected according to the position of the marker to be detected;

[0071] When a user is active in a scene area and it is necessary to locate the user's position in the scene area, each user to be located is referred to as a target user. A second scene image of the scene area can be obtained, wherein the second scene image can be the first scene image, or an image obtained at a different time from the first scene image. For example, an image of a target user active in the scene area can be taken in real time by a camera device as the second scene image. In a specific embodiment, the camera device can be fixedly installed above the scene area, or it can be moved and followed by the target user through mechanical or manual control.

[0072] The target user may carry a user identifier. Similar to the scene identifier, the physical form of the user identifier is not limited in this embodiment, but when the user identifier is captured in the image, the position of the user identifier in the image can be identified through image recognition. When there are multiple users, the user identifier of each user is distinctive, that is, different user identifiers can be distinguished through image recognition, for example, using markers of different shapes, QR codes carrying different user numbers, flash lights of different colors, etc. Further, in some embodiments, if the scene identifier in the scene area is not removed, the user identifier and the scene identifier are also distinctive. The user identifier is referred to as the identifier to be tested below.

[0073] After acquiring the second scene image, the second scene image is recognized to obtain the position of the marker to be tested in the second scene image (hereinafter referred to as the marker position to be tested). The specific recognition method can refer to the recognition method of the scene marker position, which will not be repeated here.

[0074] After the position of the mark to be measured is identified, feature information (hereinafter referred to as the second feature information) at the position of the mark to be measured can be extracted based on the image information of the second scene image. The image information may include information such as the grayscale value and RGB value of the pixel. The second feature information is used to describe the features exhibited by the image information of the pixel at the position of the mark to be measured or a certain range around it. The method for extracting the second feature information is not limited in this embodiment. For example, in one embodiment, an ORB algorithm can be used to extract a feature vector at the position of the mark to be measured, and the feature vector is used as the second feature information at the position of the mark to be measured. In order to improve the accuracy of subsequent feature information matching, the first feature information and the second feature information can be extracted using the same extraction method.

[0075] Step S40, searching for a target coordinate point that matches the first characteristic information with the second characteristic information from each of the coordinate points, and calculating the position of the marker to be tested in the scene area according to the coordinate point position corresponding to the target coordinate point and the position of the scene marker in the scene area.

[0076] After obtaining the second feature information, the second feature information can be matched with the first feature information of each coordinate point respectively, and the first feature information matching the second feature information can be searched, and the coordinate point corresponding to the first feature information matching the second feature information can be used as the target coordinate point. The matching method of the first feature information and the second feature information is not limited in this embodiment. For example, when the first feature information and the second feature information are feature vectors extracted by the ORB algorithm, the Hamming distance can be calculated to determine whether the two feature information match. When the Hamming distance between the two feature information is less than a certain distance, it is determined that the two feature information match, otherwise it is determined that the two feature information do not match; further, if the Hamming distances of multiple first feature information and second feature information are all less than a certain distance, the first feature information with the smallest Hamming distance to the second feature information can be selected from them, and the first feature information is used as the feature information matching the second feature information.

[0077] After the target coordinate point is found, the position of the marker to be tested in the scene area can be calculated based on the coordinate point position corresponding to the target coordinate point and the position of the scene marker in the scene area. It can be understood that since the position of the scene marker in the scene area is known, the distance between each scene marker in the scene area is also known. After the scene marker position is obtained, the distance between each scene marker in the first scene image can also be calculated, and then the scale of the first scene image and the scene area can be calculated. According to the scale, the coordinate point position of the target coordinate point (the position of the target coordinate point in the first scene image relative to the scene marker position) can be converted into the position of the marker to be tested in the scene area relative to the scene marker. The position of the scene marker in the scene area is known, and then the position of the marker to be tested in the scene area can be calculated. It can be understood that when the marker to be tested is a user marker carried by a user, the calculated position of the marker to be tested in the scene area is the position of the user in the scene area.

[0078] In this embodiment, by arranging scene identifiers in the scene area, identifying the scene identifier of the scene area in the first scene image, so as to obtain the scene identifier position of the scene identifier in the first scene image; selecting multiple coordinate points in the first scene image, extracting the first feature information corresponding to each coordinate point according to the image information of the first scene image, and recording the coordinate point position of each coordinate point relative to the scene identifier position in the first scene image; obtaining a second scene image of a target user active in the scene area, identifying the marker to be tested in the second scene image of the scene area to obtain the marker position to be tested, and extracting the second feature information at the marker position to be tested according to the marker position to be tested; searching for the target coordinate point whose first feature information matches the second feature information in each coordinate point, and calculating the position of the marker to be tested in the scene area according to the coordinate point position corresponding to the target coordinate point and the position of the scene identifier in the scene area. This embodiment provides a purely visual user positioning solution, which only sets some scene identifiers in the scene area, and can obtain the position of the user in the scene area by image recognition and feature comparison. Compared with the current large scene positioning method that relies on expensive external auxiliary equipment, the user positioning solution provided by this embodiment greatly reduces the hardware cost.

[0079] Embodiment 2

[0080] On the basis of the above-mentioned embodiment 1, the scene identifiers in the above-mentioned embodiment are arranged at each end point of the scene area, and each end point encloses the scene area. The step of selecting multiple coordinate points from the first scene image in step S20 may include steps S201 to S203, and this situation is introduced below. In this embodiment, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later.

[0081] Step S201, extracting feature points in the first scene image;

[0082] Since the scene area is not necessarily a regular shape such as a quadrilateral, in this embodiment, a solution is proposed to dynamically select coordinate points in the scene area through an adaptive multi-branch tree.

[0083] Specifically, the scene identifiers may be arranged at the end points of the scene area, and the end points enclose the scene area. Figure 2 A pentagonal scene area is shown, and the endpoints are the vertices of the pentagon. Figure 2 A feasible camera installation angle is also shown in the figure, and the first scene image of the pentagonal scene area is captured by the camera.

[0084] A preset feature point extraction algorithm can be used to extract feature points in the first scene image. Generally, multiple feature points are identified. The preset feature point extraction algorithm can be set as needed and is not limited in this embodiment. For example, an ORB (Oriented FAST and Rotated BRIEF) algorithm can be used to extract feature points. It is understandable that there may be some small areas with rich visual features such as color and texture in the scene area. Accordingly, these small areas will have more corresponding feature points in the first scene image.

[0085] Step S202, determining the centroid of the first scene image, and dividing the first scene image into a plurality of first-level image regions according to the connection lines between each of the scene identifiers and the centroid;

[0086] After identifying the scene identification positions of each scene identification in the first scene image, the centroid of each scene identification in the first scene image can be determined as the centroid of the first scene image according to the scene identification positions, or the centroid of the first scene image can be directly determined, and the first scene image can be divided into multiple image areas (hereinafter referred to as first-level image areas) according to the connection lines between each scene identification and the centroid. Figure 3 As shown, the first scene image corresponding to the scene area is a pentagonal image, and the first scene image can be divided into five first-level image areas according to the lines connecting each scene identifier and the centroid.

[0087] Step S203: Select at least one feature point from the first-level image area as a coordinate point.

[0088] After obtaining the first-level image area, at least one feature point can be selected from each first-level image area as a coordinate point. Specifically, in one embodiment, a number can be set, and a set number of feature points can be selected from each first-level image area as coordinate points, that is, the number of coordinate points of each first-level image area is the same, so that the distribution of coordinate points in the first scene image is more uniform. Furthermore, in one embodiment, for each first-level image area, if there are multiple feature points in the first-level image area, the gradient values ​​of the multiple feature points in a grayscale environment can be calculated, and feature points with gradient values ​​ranked in front of a preset number of places from each feature point are selected as coordinate points in the first-level image area to select a set number of coordinate points. Feature points with large gradient values ​​have more significant features, so selecting feature points with large gradient values ​​as coordinate points can make the features of the coordinate points more significant.

[0089] Furthermore, in one embodiment, the step S202 may further include steps S204 to S206; in another specific embodiment, steps S204 to S206 may be executed in parallel with step S203, or may be executed alternatively with step S203, that is, steps S204 to S206 or step S203 are executed after step S202.

[0090] Step S204, taking the centroid as the root node of the multi-branch tree, taking each of the first-level image regions as a child node of the root node in the multi-branch tree, and initializing the target node as the root node;

[0091] After the centroid is determined and the first-level image region is obtained by division, the centroid can be used as the root node of the multi-branch tree, and the multi-branch tree is dynamically constructed starting from the root node. Specifically, each first-level image region can be used as a child node of the root node in the multi-branch tree, which can be understood as one child node corresponding to one first-level image region; a target node can be defined and initialized as the root node.

[0092] Step S205, determining whether the number of the feature points in the image area of ​​each child node of the target node is greater than a preset number;

[0093] For the target node, determine whether the number of feature points in the image area of ​​each child node of the target node is greater than the preset number. It can be understood that when the target node is a root node, the child nodes of the target node are each first-level image area, and determine whether the number of feature points in each first-level image area is greater than the preset number. The preset number can be set as needed. When it is necessary to select denser coordinate points, the preset number can be set to a smaller value. For example, in one embodiment, the preset number can be set to 1.

[0094] Step S206: If not, then determine one of the feature points in the image area of ​​each child node of the target node as a coordinate point in the corresponding image area.

[0095] If the number of feature points in the image area of ​​each child node of the target node is not greater than the preset number, that is, the number of feature points in at least one image area is less than the preset number, it means that there is no need to further divide the image area of ​​this level, and the division of coordinate points has reached the density requirement. At this time, a feature point can be determined from the image area of ​​each child node of the target node as the coordinate point in the corresponding image area. It can be understood that if there is only one feature point in the image area, the feature point can be used as the coordinate point in the image area; if there is no feature point in the image area, the node corresponding to the image area can be deleted in the multi-branch tree, or the centroid of the image area can be selected as the coordinate point in the image area; if there are multiple feature points in an image area, a feature point can be selected as the coordinate point to ensure the uniformity of the selection of coordinate points, so as to avoid a local small area with rich visual features on the first scene image being calibrated with too dense coordinate points, resulting in a waste of computing resources.

[0096] Furthermore, in one embodiment, the step S205 may further include:

[0097] Step S207, if yes, then the image areas of each child node of the target node are divided into a plurality of next-level image areas, each next-level image area is used as a child node corresponding to the previous-level image area, the target node is updated to each child node of the target node in sequence, and then the process returns to the step of determining whether the number of feature points in the image area of ​​each child node of the target node is greater than a preset number;

[0098] If the number of feature points in the image area of ​​each child node of the target node is greater than the preset number, it means that the image area of ​​this level can be further divided into finer parts, and then more dense coordinate points can be selected to achieve a more accurate positioning effect. At this time, the image area of ​​each child node of the target node can be further divided into multiple image areas. For the divided image area, the divided image area is the image area of ​​the next level of the divided image area, that is, the image area obtained by dividing the first-level image area is the second-level image area, and the image area obtained by dividing the second-level image area is the third-level image area, and so on.

[0099] The method of dividing the image area of ​​each child node of the target node into the next-level image areas is not limited in this embodiment. For example, in one embodiment, the image area can be divided into three parts using the lines connecting the centroid and the endpoints of the image area to obtain three next-level image areas.

[0100] For the divided image area of ​​the next level, the image area is used as a child node of the image area of ​​the previous level. The image area of ​​the previous level corresponding to the image area of ​​the next level is the image area from which the image area of ​​the next level is divided. That is, each second-level image area divided from a first-level image area is used as a child node of the first-level image area, each third-level image area divided from a second-level image area is used as a child node of the second-level image area, and so on.

[0101] After obtaining the child nodes of the child nodes of the target node, each child node of the target node can be updated to the target node in sequence, and step S204 is returned for each updated target node to achieve the purpose of looping and iterating to construct the multi-branch tree. It can be understood that after looping and iterating to construct the multi-branch tree, each leaf node of the multi-branch tree corresponds to a coordinate point on the image area.

[0102] In this embodiment, by setting scene identifiers at the endpoints of the scene area, and dividing the first scene image into multiple image areas based on the line connecting the scene identifier and the centroid, the image area is hierarchically divided in a cyclical manner according to the number of feature points by adaptively constructing a multi-branch tree, and coordinate points are dynamically selected according to the visual features of the scene area, so that the features of the selected coordinate points are more significant and the distribution is more even, thereby improving the accuracy of matching the first feature information with the second feature information, and then improving the accuracy of user positioning in large scenes.

[0103] Further, in one embodiment, the position of each coordinate point relative to the centroid of the scene marker in the first scene image can be recorded as the coordinate point position. It can be understood that since the relative positions of the centroid and the scene marker in the first scene image are known, the position of the coordinate point relative to the scene marker position can be calculated based on the position of the coordinate point relative to the centroid. Therefore, recording the position of the coordinate point relative to the centroid is equivalent to recording the position of the coordinate point relative to the scene marker position.

[0104] Further, in one embodiment, step S206 includes:

[0105] Step S2061: If there are multiple feature points in the image area of ​​the child node of the target node, a feature point with the largest grayscale environment gradient value is selected from the multiple feature points as a coordinate point in the image area.

[0106] If there are multiple feature points in the image area of ​​the child node of the target node, the gradient values ​​of the multiple feature points in the grayscale environment can be calculated, and the feature point with the largest gradient value is selected from each feature point as the coordinate point in the image area. The feature point with the largest gradient value has the most significant feature, so selecting this feature point as the coordinate point can make the feature of the coordinate point more significant.

[0107] Further, in one embodiment, the step of searching for a target coordinate point whose first characteristic information matches the second characteristic information from each of the coordinate points in step S40 includes:

[0108] Step S401, taking the first-level image area including the mark to be tested as the target image area;

[0109] In order to improve the speed of finding the target coordinate point, when the first scene image and the second scene image are the same image, the first-level image area including the mark to be tested can be determined first, and the first-level image area can be used as the target image area. Among them, in a specific embodiment, two scene identifiers that are closest to the position of the mark to be tested in the first scene image can be selected from each scene identifier, and the image area clamped by the line connecting the two scene identifiers and the centroid in each first-level image area is used as the first-level image area including the mark to be tested, that is, as the target image area. It can be understood that the position of the mark to be tested in the first scene image reflects the position of the user in the scene area. The closer the position of the mark to be tested in the first scene image (the position of the mark to be tested) is to which scene identifier, the closer the user is to which scene identifier in the scene area. Therefore, the user is most likely to be in the area clamped by the line connecting the two scene identifiers closest to the user identifier and the centroid, that is, the target coordinate point is most likely to be in the target image area.

[0110] Step S402: Find the target coordinate points whose first characteristic information matches the second characteristic information from the coordinate points in the target image area.

[0111] After determining the target image area, the search may be started from the coordinate points within the target image area. Since the target coordinate points are most likely within the target image area, starting the search from the coordinate points within the target image area can increase the speed of matching the target coordinate points.

[0112] Further, in one embodiment, step S402 includes:

[0113] Step S4021 , performing a pre-order traversal in the multi-branch tree starting from the child node corresponding to the target image area, so as to find a target coordinate point whose first feature information matches the second feature information from each of the coordinate points.

[0114] After determining the target image area, you can start from the child node corresponding to the target image area and perform a pre-order traversal in the multi-branch tree, that is, first traverse each leaf node under the child node corresponding to the target image area, and then traverse each leaf node of the child node corresponding to other first-level image areas except the target image area. Each time you traverse to a leaf node, match the first feature information of the coordinate point in the image area corresponding to the leaf node with the second feature information at the position of the mark to be tested. If the match is successful, the coordinate point in the image area corresponding to the leaf node is used as the target coordinate point. If the match is unsuccessful, continue to traverse the next leaf node.

[0115] Since the target coordinate point is most likely within the target image region, starting the traversal from the coordinate points within the target image region first can increase the speed of finding the target coordinate point.

[0116] Furthermore, in one embodiment, when there are multiple first scene images and the areas contained in each first scene image are combined to obtain a scene area, after constructing a multi-branch tree for each first scene image, each multi-branch tree can be combined into a multi-branch tree, that is, a new root node is generated, and the root nodes of each multi-branch tree are used as child nodes of the newly generated root node. When searching for the target coordinate point, the combined multi-branch tree is traversed.

[0117] Embodiment 3

[0118] On the basis of the above-mentioned embodiment 1 and / or embodiment 2, the step of extracting the first feature information corresponding to each coordinate point according to the image information of the first scene image in step S20 of the identification positioning method in the above-mentioned embodiment may also include step S208, and the step of extracting the second feature information at the position of the identification to be measured according to the position of the identification to be measured in step S30 may also include step S301, and this situation is introduced below. Among them, in this embodiment, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later.

[0119] Step S208, sampling the position of the coordinate point in the first scene image using a preset sampling window to obtain first feature information of the coordinate point based on image information of the sampling point;

[0120] In this embodiment, a sampling window, i.e., a preset sampling window, may be pre-set, and the position of the coordinate point is sampled using the preset sampling window to obtain the first feature information of the coordinate point. Among them, the window parameters such as the shape, size, and number of sampling points of the preset sampling window may be set as needed, and are not limited in this embodiment. For example, in one embodiment, a circular sampling window may be used.

[0121] For each coordinate point, a preset sampling window is used for sampling. Specifically, the preset sampling window can be placed in the first scene image, and the placement position is such that the coordinate point falls within the preset sampling window. Pixel points falling within the preset sampling window and / or pixel points on the preset sampling window in the first scene image are sampled. The sampling method is limited by window parameters such as the number of sampling points and the sampling interval. Multiple sampling points are obtained by sampling in accordance with the sampling method limited by the window parameters. The first feature information of the coordinate point is obtained based on the image information of the sampling point. Specifically, the image information of the sampling point can be combined to obtain the first feature information of the coordinate point. In this embodiment, the combination method is not limited.

[0122] Step S301: sampling the position of the mark to be measured in the second scene image using the preset sampling window to obtain second feature information at the position of the mark to be measured based on image information of the sampling points.

[0123] In the second scene image, the preset sampling window is also used to sample the position of the marker to be detected to obtain the second feature information of the marker to be detected. The specific method can refer to the sampling method of the first feature information, which will not be described in detail here.

[0124] In this embodiment, by adopting a sampling frame for sampling and obtaining the first feature information of the coordinate point based on the image information of the sampling point, the representation ability of the first feature information in representing the visual features at the coordinate point can be improved (the representation ability is the ability to represent the difference between the visual features at the coordinate point and the visual features at other coordinate points, and the more accurate the difference is represented, the stronger the representation ability). Similarly, by adopting a sampling frame for sampling and obtaining the second feature information at the position of the mark to be measured based on the image information of the sampling point, the representation ability of the second feature information in representing the visual features at the coordinate point can also be improved, thereby improving the accuracy of matching the second feature information with the first feature information, avoiding positioning errors caused by mismatching, and improving positioning accuracy.

[0125] Furthermore, in one embodiment, before step S208, the following steps are further included:

[0126] Step A10, obtaining an initial sampling window as a current sampling window, and sampling the position of the coordinate point in the first scene image using the current sampling window to obtain current feature information of the coordinate point based on image information of the sampling point;

[0127] In order to further improve the representation ability of the first feature information and the second feature information, the pre-sampling window can be obtained through training, and the training process is intended to find a sampling window that can make the overall representation ability of the first feature information of each coordinate point in the first scene image the strongest.

[0128] Specifically, a sampling window may be initialized, and the window parameters of the sampling window may be initialized based on experience. The sampling window is used as the current sampling window to enter the first round of training.

[0129] For each coordinate point, the current sampling window is sampled at the position of the coordinate point in the first scene image to obtain feature information of the coordinate point (hereinafter referred to as current feature information) based on the image information of the sampling point. Specifically, the method of sampling to obtain the current feature information can refer to the sampling method of the first feature information described above, and will not be repeated here.

[0130] Step A20, taking each of the coordinate points as a target point in turn, determining a preset number of adjacent coordinate points that are closest to the target point in the first scene image, and calculating a feature difference value between the current feature information of the target point and the current feature information of the adjacent coordinate points;

[0131] After obtaining the current feature information corresponding to each coordinate point, each coordinate point can be used as a target point in turn. For the target point, a preset number of coordinate points (hereinafter referred to as adjacent coordinate points) that are closest to the target point (the distance on the first scene image) are determined from each coordinate point other than the target point. The preset number can be set as needed, for example, set to 3. After determining the adjacent coordinate points of the target point, the feature difference values ​​between the current feature information of the target point and the current feature information of each adjacent coordinate point are calculated respectively. The method for calculating the feature difference value between two feature information is not limited here, for example, the Hamming distance between the two feature information can be calculated.

[0132] After traversing all coordinate points, at least one feature difference value corresponding to each coordinate point can be obtained.

[0133] Step A30, summing the feature difference values ​​corresponding to the coordinate points to obtain a total difference value, subtracting the total difference value from the first preset threshold to obtain a difference value, and determining whether the difference value is less than a second preset threshold value;

[0134] The feature difference values ​​corresponding to each coordinate point are summed up to obtain the total difference value. The size of the total difference value represents the overall representation ability of the current feature information of each coordinate point to the visual features of each coordinate point. The larger the total difference value, the stronger the overall representation ability.

[0135] Two thresholds (hereinafter referred to as a first preset threshold and a second preset threshold, respectively) may be set in advance based on experience, with the first preset threshold being set larger and the second preset threshold being set smaller.

[0136] Step A40: if the difference is less than the second preset threshold, taking the current sampling window as the preset sampling window;

[0137] If the difference obtained by subtracting the total difference value from the first preset threshold is less than the second preset threshold, it means that the total difference value is large and the characterization ability of the current feature information is relatively strong. At this time, the current sampling window can be used as the preset sampling window and the training of the sampling window is stopped.

[0138] Step A50, if the difference is not less than the second preset threshold, the window parameters of the current sampling window are updated, and the step of sampling the position of the coordinate point in the first scene image using the current sampling window is returned to obtain the current feature information of the coordinate point based on the image information of the sampling point.

[0139] If the difference between the first preset threshold and the total difference value is not less than the second preset threshold, it means that the total difference value is small, the representation ability of the current feature information is relatively weak, and it is necessary to find a sampling window that can sample feature information with stronger representation ability. At this time, the window parameters of the current sampling window can be updated, and based on the current sampling window after the window parameters are updated, the step of using the current sampling window to sample the position of the coordinate point in the first scene image in step A20 is returned to obtain the current feature information of the coordinate point based on the image information of the sampling point, that is, the next round of training is performed based on the current sampling window after the window parameters are updated.

[0140] The window parameters of the sampling window may include one or more of the window size, window shape, and number of sampling points, which are not limited in this embodiment. The updating method of the window parameters is also not limited in this embodiment. For example, the following objective function can be constructed:

[0141] L=γ-θ(α)

[0142] Among them, γ is the first preset threshold, θ(α) is the function method for calculating the total difference value, α represents the window parameter, and the training goal is to optimize L and make it continuously decrease. α can be updated by the gradient descent method to optimize L.

[0143] Furthermore, in one embodiment, the preset sampling window is a circular sampling window, and the step S208 includes:

[0144] Step S2081, placing the center of the circular sampling window at the coordinate point in the first scene image, sampling from the circular sampling window to obtain N sampling points, and obtaining grayscale values ​​of the N sampling points according to image information of the first scene image;

[0145] When a circular sampling window is used to sample a coordinate point, the center of the circular sampling window can be placed at the coordinate point, and N sampling points can be obtained by sampling from the circular sampling window. Among them, N is the number of sampling points, which is the window parameter of the circular sampling window. The window parameter can also include a rotation step, a sampling starting point, and a window radius. Among them, the sampling starting point specifies which point on the circular sampling window to start sampling from, the rotation step refers to the angle of each rotation from the sampling starting point to determine the next sampling point, and the window radius is the radius of the circular sampling window.

[0146] After N sampling points are obtained through sampling, grayscale values ​​respectively corresponding to the N sampling points obtained through sampling can be obtained according to the image information of the first scene image.

[0147] Step S2082: if the gray value of the i-th sampling point is greater than the gray value of the i+1-th sampling point, the description information of the i-th sampling point is set to 1, where 1≤i≤N-1;

[0148] Step S2083, if the grayscale value of the i-th sampling point is not greater than the grayscale value of the i+1-th sampling point, the description information of the i-th sampling point is set to 0;

[0149] Step S2084: Obtain first feature information of the coordinate point according to the description information of the 1st to N-1th sampling points.

[0150] The N sampling points can be sorted according to their arrangement order on the circular sampling window, and the sampling starting point is generally taken as the first sampling point. For the i-th sampling point, the grayscale value of the i-th sampling point can be compared with the grayscale value of the i+1-th sampling point. If the grayscale value of the i-th sampling point is greater than the grayscale value of the i+1-th sampling point, the description information of the i-th sampling point can be set to 1. If the grayscale value of the i-th sampling point is not greater than the grayscale value of the i+1-th sampling point, the description information of the i-th sampling point is set to 0. Among them, 1≤i≤N-1. After obtaining the description information of the 1st to N-1 sampling points, the first feature information of the coordinate point can be obtained according to the description information of the 1st to N-1 sampling points. Specifically, the description information of the 1st to N-1 sampling points can be sequentially composed into a vector. It can be understood that the vector is a vector that only includes 0 and 1 elements.

[0151] Embodiment 4

[0152] Corresponding to the above-mentioned embodiment 1, embodiment 2 and embodiment 3, the embodiment of the present invention further provides a marking positioning device, the marking positioning device comprising:

[0153] A recognition module, used to recognize a scene identifier of a scene area in the first scene image to obtain a scene identifier position;

[0154] a first extraction module, configured to select a plurality of coordinate points from the first scene image, extract first feature information corresponding to each of the coordinate points according to image information of the first scene image, and respectively record the coordinate point position of each of the coordinate points in the first scene image relative to the scene identification position;

[0155] A second extraction module is used to identify the marker to be tested in the second scene image of the scene area to obtain the position of the marker to be tested, and extract the second feature information at the position of the marker to be tested according to the position of the marker to be tested;

[0156] A matching module is used to search for a target coordinate point that matches the first feature information with the second feature information from each of the coordinate points, and calculate the position of the marker to be tested in the scene area based on the coordinate point position corresponding to the target coordinate point and the scene marker position.

[0157] Furthermore, the scene identifiers are arranged at respective endpoints of the scene area, and the respective endpoints enclose the scene area; and the first extraction module includes:

[0158] An extraction unit, used to extract feature points in the first scene image;

[0159] a dividing unit, configured to determine the centroid of the first scene image, and divide the first scene image into a plurality of first-level image regions according to the connection lines between each of the scene identifiers and the centroid;

[0160] The selection unit is used to select at least one feature point from the first-level image area as a coordinate point.

[0161] Furthermore, the first extraction module also includes:

[0162] A first determining unit, configured to use the centroid as a root node of a multi-branch tree, use each of the first-level image regions as a child node of the root node in the multi-branch tree, and initialize a target node as the root node;

[0163] A judging unit, used to judge whether the number of the feature points in the image area of ​​each subnode of the target node is greater than a preset number;

[0164] The second determining unit is configured to, if not, determine one of the feature points from the image area of ​​each child node of the target node as a coordinate point in the corresponding image area.

[0165] Furthermore, the first extraction module also includes:

[0166] A loop unit is used to, if yes, divide the image area of ​​each child node of the target node into multiple next-level image areas, use each next-level image area as a child node corresponding to the previous-level image area, update the target node to each child node of the target node in sequence, and then return to execute the judgment whether the number of the feature points in the image area of ​​each child node of the target node is greater than a preset number.

[0167] Furthermore, the second determining unit is further configured to:

[0168] If there are multiple feature points in the image area of ​​the child node of the target node, a feature point with the largest grayscale environment gradient value is selected from the multiple feature points as a coordinate point in the image area.

[0169] Furthermore, the matching module includes:

[0170] A third determining unit, configured to use the first-level image area including the mark to be detected as a target image area;

[0171] A search unit is used to search for a target coordinate point where the first characteristic information matches the second characteristic information from the coordinate points in the target image area.

[0172] Furthermore, the search unit is also used for:

[0173] A pre-order traversal is performed in the multi-branch tree starting from the child node corresponding to the target image area to find a target coordinate point whose first feature information matches the second feature information from each of the coordinate points.

[0174] Furthermore, the first extraction module includes:

[0175] A first sampling unit, configured to sample the position of the coordinate point in the first scene image using a preset sampling window to obtain first feature information of the coordinate point based on image information of the sampling point;

[0176] The second extraction module comprises:

[0177] The second sampling unit is used to sample the position of the mark to be measured in the second scene image using the preset sampling window to obtain second feature information at the position of the mark to be measured based on image information of the sampling points.

[0178] Furthermore, the device also includes:

[0179] A sampling module, used to obtain an initial sampling window as a current sampling window, and use the current sampling window to sample the position of the coordinate point in the first scene image, so as to obtain current feature information of the coordinate point based on image information of the sampling point;

[0180] A first determination module, configured to sequentially take each of the coordinate points as a target point, determine a preset number of adjacent coordinate points that are closest to the target point in the first scene image, and calculate a feature difference value between the current feature information of the target point and the current feature information of the adjacent coordinate points;

[0181] A calculation module, configured to sum the feature difference values ​​corresponding to the coordinate points to obtain a total difference value, subtract the total difference value from a first preset threshold to obtain a difference value, and determine whether the difference value is less than a second preset threshold value;

[0182] A second determining module, configured to use the current sampling window as the preset sampling window if the difference is less than the second preset threshold;

[0183] A loop module is used to update the window parameters of the current sampling window if the difference is not less than the second preset threshold, and call the sampling unit to perform sampling of the position of the coordinate point in the first scene image using the current sampling window to obtain the current feature information of the coordinate point based on the image information of the sampling point.

[0184] Furthermore, the preset sampling window is a circular sampling window, and the first sampling unit is further used for:

[0185] placing the center of the circular sampling window at the coordinate point in the first scene image, sampling from the circular sampling window to obtain N sampling points, and obtaining grayscale values ​​of the N sampling points according to image information of the first scene image;

[0186] If the grayscale value of the i-th sampling point is greater than the grayscale value of the i+1-th sampling point, the description information of the i-th sampling point is set to 1, where 1≤i≤N-1;

[0187] If the grayscale value of the i-th sampling point is not greater than the grayscale value of the i+1-th sampling point, the description information of the i-th sampling point is set to 0;

[0188] The first feature information of the coordinate point is obtained according to the description information of the 1st to N-1th sampling points.

[0189] Among them, in the embodiments of the present invention, for the contents that are the same as or corresponding to Embodiment 1, Embodiment 2 or Embodiment 3, please refer to the above introduction and will not be repeated later.

[0190] The identification positioning device of the present invention adopts the identification positioning method provided in the above-mentioned embodiment 1, which solves the technical problem of high hardware cost when the existing reliance on expensive external auxiliary equipment for large-scale user positioning. Compared with the prior art, the beneficial effects of the identification positioning device provided in the embodiment of the present invention are the same as the beneficial effects of the identification positioning method provided in the above-mentioned embodiment 1, and other technical features in the system are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0191] Embodiment 5

[0192] An embodiment of the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the identification and positioning method in the above-mentioned embodiment one.

[0193] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0194] like Figure 4 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0195] Typically, the following systems can be connected to the I / O interface: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and communication devices. The communication device can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0196] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0197] The electronic device provided by the present invention adopts the identification positioning method in the above-mentioned embodiment 1, embodiment 2 or embodiment 3, which solves the technical problem of high hardware cost when relying on expensive external auxiliary equipment to perform user positioning in large scenes.

[0198] Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present invention are the same as the beneficial effects of the identification positioning method provided by the above-mentioned embodiment 1, and other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0199] It should be understood that the various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0200] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0201] Embodiment 6

[0202] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the user positioning method in the above-mentioned embodiment 1.

[0203] The computer-readable storage medium provided in the embodiment of the present invention may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0204] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0205] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: identifies the scene identifier of the scene area in the first scene image to obtain the scene identifier position of the scene identifier in the first scene image; selects multiple coordinate points from the first scene image, and extracts the first feature information corresponding to each of the coordinate points based on the image information of the first scene image, and respectively records the coordinate point position of each of the coordinate points relative to the scene identifier position in the first scene image; identifies the marker to be tested in the second scene image of the scene area to obtain the marker position to be tested, and extracts the second feature information at the marker position to be tested based on the marker position to be tested; searches for the target coordinate point whose first feature information matches the second feature information from each of the coordinate points, and calculates the position of the marker to be tested in the scene area based on the coordinate point position corresponding to the target coordinate point and the position of the scene identifier in the scene area.

[0206] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0207] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0208] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.

[0209] The computer-readable storage medium provided by the present invention stores computer-readable program instructions for executing the above-mentioned identification positioning method, which solves the technical problem of high hardware cost when relying on expensive external auxiliary equipment for large-scale user positioning. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the identification positioning method provided by the above-mentioned embodiment 1, embodiment 2 or embodiment 3, and will not be repeated here.

[0210] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent scope of the present invention.

Claims

1. A marking positioning method, characterized in that: The identification positioning method comprises: Identifying a scene identifier of a scene area in a first scene image to obtain a scene identifier position of the scene identifier in the first scene image; Selecting a plurality of coordinate points from the first scene image, extracting first feature information corresponding to each of the coordinate points according to image information of the first scene image, and recording the coordinate point position of each of the coordinate points in the first scene image relative to the scene identification position; Identify the marker to be measured in the second scene image of the scene area to obtain the position of the marker to be measured, and extract the second feature information at the position of the marker to be measured according to the position of the marker to be measured; Searching for a target coordinate point matching the first characteristic information and the second characteristic information from each of the coordinate points, and calculating the position of the marker to be tested in the scene area according to the coordinate point position corresponding to the target coordinate point and the position of the scene marker in the scene area; The scene identifiers are arranged at the end points of the scene area, and the end points enclose the scene area; the step of selecting a plurality of coordinate points from the first scene image comprises: Extracting feature points from the first scene image; Determining the centroid of the first scene image, and dividing the first scene image into a plurality of first-level image regions according to the connection lines between each of the scene identifiers and the centroid; At least one feature point is selected from each of the first-level image regions as a coordinate point, so that the number of coordinate points in each first-level image region is the same.

2. The identification positioning method according to claim 1, characterized in that: After the step of determining the centroid of the first scene image and dividing the first scene image into a plurality of first-level image regions according to the connection lines between each of the scene identifiers and the centroid, the method further includes: Using the centroid as the root node of a multi-branch tree, using each of the first-level image regions as a child node of the root node in the multi-branch tree, and initializing the target node as the root node; Determine whether the number of the feature points in the image area of ​​each child node of the target node is greater than a preset number; If not, then determining one of the feature points from the image area of ​​each child node of the target node as a coordinate point in the corresponding image area; If so, the image areas of each child node of the target node are divided into multiple next-level image areas, each next-level image area is used as a child node corresponding to the previous-level image area, the target node is updated to each child node of the target node in sequence, and then the step of determining whether the number of feature points in the image area of ​​each child node of the target node is greater than the preset number is returned to execute.

3. The identification positioning method according to claim 2, characterized in that: The step of respectively determining one of the feature points in the image area of ​​each child node of the target node as a coordinate point in the corresponding image area comprises: If there are multiple feature points in the image area of ​​the child node of the target node, a feature point with the largest grayscale environment gradient value is selected from the multiple feature points as a coordinate point in the image area.

4. The identification positioning method according to claim 2, characterized in that: The step of searching for a target coordinate point whose first characteristic information matches the second characteristic information from each of the coordinate points comprises: Taking the first-level image area including the mark to be tested as the target image area; Find the target coordinate points where the first feature information matches the second feature information from the coordinate points in the target image area.

5. The identification positioning method according to claim 4, characterized in that: The step of finding the target coordinate point matching the first feature information with the second feature information from the coordinate points in the target image area comprises: A pre-order traversal is performed in the multi-branch tree starting from the child node corresponding to the target image area to find a target coordinate point whose first feature information matches the second feature information from each of the coordinate points.

6. A marking and positioning device, characterized in that: The identification and positioning device comprises: A recognition module, used to recognize a scene identifier of a scene area in the first scene image to obtain a scene identifier position; a first extraction module, configured to select a plurality of coordinate points from the first scene image, extract first feature information corresponding to each of the coordinate points according to image information of the first scene image, and respectively record the coordinate point position of each of the coordinate points in the first scene image relative to the scene identification position; A second extraction module is used to identify the marker to be tested in the second scene image of the scene area to obtain the position of the marker to be tested, and extract the second feature information at the position of the marker to be tested according to the position of the marker to be tested; A matching module, used to search for a target coordinate point whose first characteristic information matches the second characteristic information from each of the coordinate points, and calculate the position of the marker to be tested in the scene area according to the coordinate point position corresponding to the target coordinate point and the scene marker position; The scene identifier is arranged at each end point of the scene area, and each of the end points encloses the scene area; the first extraction module includes: An extraction unit, used to extract feature points in the first scene image; a dividing unit, configured to determine the centroid of the first scene image, and divide the first scene image into a plurality of first-level image regions according to the connection lines between each of the scene identifiers and the centroid; The selection unit is used to select at least one feature point from each of the first-level image regions as a coordinate point, so that the number of coordinate points in each first-level image region is the same.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the identification positioning method described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for implementing the identification positioning method, and the program for implementing the identification positioning method is executed by a processor to implement the steps of the identification positioning method as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image registration method and related device and equipment

    CN113393506A

  • Identification positioning method and computer readable storage medium

    CN114120085A