Positioning method and device
Through the visual beacon area recognition method, the image acquisition device is used to identify the object identification sub-area and feature sub-area, and the feature point position is obtained, which solves the problem of wireless signal interference in robot positioning and achieves high-precision target object positioning.
Patent Information
- Application Number
- CN202210810431.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-11
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-07-11
AI Technical Summary
In the prior art, wireless signals during robot positioning are easily interfered by environmental noise, resulting in low positioning accuracy.
The visual beacon area recognition method is adopted to identify the object identification sub-area and feature sub-area in the visual beacon area through the image acquisition device, obtain the image position of the feature point, and use the calibration parameters of the image acquisition device for positioning.
The accuracy of positioning is improved, the wireless signal is prevented from being interfered with by environmental noise, the positioning cost is reduced, and the accuracy of feature point location information is improved.
Smart Images

Figure CN115187769B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a positioning method and device. Background Art
[0002] In recent years, robotics-related technologies have rapidly developed, leading to their widespread application across various industries. Robots need to perform different tasks on different objects, requiring precise positioning of the objects they are tasked with. For example, a robot needs to transport a roller to a corresponding machine and dock it with the machine. Similarly, a robot needs to accurately locate the corresponding machine to deliver goods to a specific shelf.
[0003] Conventional technology often involves attaching radio frequency cards to various objects within a robot's workspace. The robot uses the wireless signals transmitted by these cards to locate the object. However, in real-world scenarios, wireless signals are easily interfered with by noise in the environment, causing distortion in the signals received by the robot and, in turn, reducing the accuracy of object positioning. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a positioning method and apparatus to improve the accuracy of positioning the target. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present invention provides a positioning method, the method comprising:
[0006] Identifying a visual beacon region in a target image captured by an image acquisition device;
[0007] determining an object identification sub-region within the visual beacon region;
[0008] If the object identification subregion represents that the object with the visual beacon is the target object, obtaining the image position of the feature point in the feature subregion of the visual beacon region in the visual beacon region, wherein the feature subregion does not overlap with the object identification subregion;
[0009] The target object is located based on the obtained image position and the calibration parameters of the image acquisition device.
[0010] In one embodiment of the present invention, the visual beacon includes at least one beacon unit.
[0011] Each beacon unit includes: an object identification sub-region and a plurality of characteristic sub-regions, each characteristic sub-region being adjacent to the object identification sub-region;
[0012] or
[0013] Each beacon unit includes: an object identification sub-area and a feature sub-area.
[0014] In one embodiment of the present invention, each beacon unit includes: an object identification sub-region and an even number of feature sub-regions, the number of feature sub-regions distributed on the left and right sides of the object identification sub-region is the same, and the graphics in the feature sub-regions distributed on the left and right sides of the object identification sub-region are symmetrical to each other.
[0015] In one embodiment of the present invention, the characteristic sub-region includes: a first graphic and a second graphic, the first graphic is used to provide a preset characteristic point, and the second graphic is used to determine the relative position relationship between the characteristic sub-region and the object identification sub-region;
[0016] The obtaining of the image position of the feature point in the feature sub-region of the visual beacon region in the visual beacon region comprises:
[0017] Identify preset feature points provided by the first graphic in each feature sub-area in the visual beacon area;
[0018] Obtaining an image position of the identified feature point in the visual beacon area;
[0019] Positioning the target object based on the obtained image position and calibration parameters of the image acquisition device includes:
[0020] identifying the second graphic in each characteristic sub-area of the visual beacon area;
[0021] Determining a relative positional relationship between each characteristic sub-region and the object identification sub-region based on the graphic information of the second graphic in each characteristic sub-region;
[0022] According to the relative position relationship, selecting the spatial position corresponding to the feature point in each feature sub-region from the preset spatial positions of each feature point;
[0023] The target object is located according to the image position and spatial position corresponding to the feature points in each feature sub-area and the calibration parameters of the image acquisition device.
[0024] In one embodiment of the present invention, the second graphics in different characteristic sub-regions in the same beacon unit have at least one of the following differences:
[0025] The second graphic has a different color;
[0026] The second graphic has a different layout;
[0027] The number of the second graphics is different;
[0028] The second figures have different shapes;
[0029] The second graphics have different sizes.
[0030] In one embodiment of the present invention,
[0031] The number of beacon units included in the visual beacon is determined by the viewing angle range of the image acquisition device;
[0032] and / or
[0033] The number of characteristic sub-regions included in the beacon unit is determined by the viewing angle range of the image acquisition device;
[0034] In one embodiment of the present invention, determining the object identification sub-region in the visual beacon region includes:
[0035] Determining the object identification sub-region from the visual beacon region based on preset position information of the object identification sub-region in the visual beacon;
[0036] or
[0037] determining the object identification sub-region from the visual beacon region based on a preset target color parameter of the object identification sub-region;
[0038] or
[0039] The object identification sub-region is determined from the visual beacon region based on a preset second target image feature of the object identification sub-region.
[0040] In a second aspect, an embodiment of the present invention provides a positioning device, the device comprising:
[0041] A visual beacon area recognition module is used to recognize the visual beacon area in the target image captured by the image acquisition device;
[0042] an object identification sub-region determining module, configured to determine an object identification sub-region in the visual beacon region;
[0043] a position obtaining module configured to obtain an image position of a feature point in a characteristic subregion within the visual beacon region within the visual beacon region if the object identification subregion indicates that the object to which the visual beacon is posted is the target object, wherein the characteristic subregion does not overlap with the object identification subregion;
[0044] The target object positioning module is used to locate the target object based on the obtained image position and the calibration parameters of the image acquisition device.
[0045] In one embodiment of the present invention, the visual beacon includes at least one beacon unit.
[0046] Each beacon unit includes: an object identification sub-region and a plurality of characteristic sub-regions, each characteristic sub-region being adjacent to the object identification sub-region;
[0047] or
[0048] Each beacon unit includes: an object identification sub-area and a feature sub-area.
[0049] In one embodiment of the present invention, each beacon unit includes: an object identification sub-region and an even number of feature sub-regions, the number of feature sub-regions distributed on the left and right sides of the object identification sub-region is the same, and the graphics in the feature sub-regions distributed on the left and right sides of the object identification sub-region are symmetrical to each other.
[0050] In one embodiment of the present invention, the characteristic sub-region includes: a first graphic and a second graphic, the first graphic is used to provide a preset characteristic point, and the second graphic is used to determine the relative position relationship between the characteristic sub-region and the object identification sub-region;
[0051] The position acquisition module is specifically configured to identify preset feature points provided by the first graphic in each feature sub-area of the visual beacon area; and obtain image positions of the identified feature points in the visual beacon area;
[0052] The target object positioning module is specifically used to identify the second graphic in each characteristic sub-area of the visual beacon area; determine the relative position relationship between each characteristic sub-area and the object identification sub-area based on the graphic information of the second graphic in each characteristic sub-area; select the spatial position corresponding to the characteristic point in each characteristic sub-area from the preset spatial position of each characteristic point based on the relative position relationship; and locate the target object based on the image position and spatial position corresponding to the characteristic point in each characteristic sub-area and the calibration parameters of the image acquisition device.
[0053] In one embodiment of the present invention, the second graphics in different characteristic sub-regions in the same beacon unit have at least one of the following differences:
[0054] The second graphic has a different color;
[0055] The second graphic has a different layout;
[0056] The number of the second graphics is different;
[0057] The second figures have different shapes;
[0058] The second graphics have different sizes.
[0059] In one embodiment of the present invention,
[0060] The number of beacon units included in the visual beacon is determined by the viewing angle range of the image acquisition device;
[0061] and / or
[0062] The number of characteristic sub-regions included in the beacon unit is determined by the viewing angle range of the image acquisition device.
[0063] In one embodiment of the present invention, the object identification sub-region determining module is specifically configured to determine the object identification sub-region from the visual beacon region based on preset position information of the object identification sub-region in the visual beacon;
[0064] or
[0065] determining the object identification sub-region from the visual beacon region based on a preset target color parameter of the object identification sub-region;
[0066] or
[0067] The object identification sub-region is determined from the visual beacon region based on a preset second target image feature of the object identification sub-region.
[0068] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0069] Memory for storing computer programs;
[0070] The processor is configured to implement the positioning method described in the first aspect when executing the program stored in the memory.
[0071] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the positioning method described in the first aspect is implemented.
[0072] In a fifth aspect, an embodiment of the present invention provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the positioning method described in the first aspect above.
[0073] As can be seen from the above, when the solution provided by the embodiment of the present invention is applied to locate an object, a visual beacon area is first identified from the target image captured by the image acquisition device. The visual beacon area contains non-overlapping object identification sub-areas and feature sub-areas. When the information in the object identification sub-area is identified as the target object, the image position of the feature point in the above feature sub-area can be further obtained. In this way, based on the above image position and the calibration parameters of the image acquisition device, the target object can be located.
[0074] In addition, when the solution provided by the embodiment of the present invention is used to locate an object, wireless signals are no longer relied upon, so the entire positioning process does not involve the situation where the wireless signal is interfered with by environmental noise signals. Therefore, the accuracy of locating the object can be improved.
[0075] Furthermore, in the solution provided in the embodiment of the present invention, the visual beacon is divided into non-overlapping object identification sub-areas and feature sub-areas, wherein the object identification sub-area is used to identify the target object, and the feature sub-area is used to provide rich feature points to locate the target object. This ensures that the above two sub-areas do not interfere with each other, improves the accuracy of the feature point position information extracted in the feature sub-area, and further improves the accuracy of positioning the target object based on the position information of the above feature points.
[0076] Of course, it is not necessary to achieve all of the advantages described above simultaneously in order to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0078] Figure 1 A schematic diagram of a flow chart of a first positioning method provided in an embodiment of the present invention;
[0079] Figure 2 A schematic diagram of a first visual beacon provided by an embodiment of the present invention;
[0080] Figure 3 A schematic diagram of a second visual beacon provided by an embodiment of the present invention;
[0081] Figure 4 A schematic diagram of a third visual beacon provided in an embodiment of the present invention;
[0082] Figure 5A schematic diagram of a fourth visual beacon provided by an embodiment of the present invention;
[0083] Figure 6 A schematic diagram of a flow chart of a second positioning method provided in an embodiment of the present invention;
[0084] Figure 7 A schematic structural diagram of a positioning device provided by an embodiment of the present invention;
[0085] Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0086] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described 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 based on this application are within the scope of protection of the present invention.
[0087] First, the execution subject of the solution provided by the embodiment of the invention is described:
[0088] The execution subject of the solution provided by the embodiment of the present invention can be a robot equipped with an image acquisition device and having a data processing function, or it can be any electronic device that can communicate data with the robot and has a data processing function.
[0089] The positioning method provided by the embodiment of the present invention is described in detail below by taking a robot as an example.
[0090] See also Figure 1 , Figure 1 This is a flow chart of a first positioning method provided by an embodiment of the present invention. The method includes the following steps S101-S104.
[0091] Step S101: Identify a visual beacon area in a target image captured by an image capture device.
[0092] The image acquisition device may be any device capable of acquiring images. In one embodiment, the image acquisition device may be a monocular camera.
[0093] The visual beacon area is the area occupied by the visual beacon in the target image. After the robot obtains the target image captured by the image acquisition device, in order to determine that the image acquisition device has captured the visual beacon, it is necessary to identify the visual beacon area from the target image.
[0094] When identifying the visual beacon area, the visual beacon area can be identified from the target image according to the pre-set visual beacon features. Specifically, the visual beacon area can be identified in the following manner.
[0095] In one embodiment, the first target image feature of the visual identification area can be pre-set. In this case, when determining the visual identification area in the target image, the image features of the target image can be extracted, and the image area corresponding to the features in the image features that match the first target image features can be determined as the visual identification area in the target image.
[0096] In another embodiment, the boundary line shape of the object identification sub-region can be pre-set, and then edge image features of the target image can be extracted. The visual beacon region in the target image can then be identified based on the edge image features. For example, a rectangular boundary line can be pre-set for the visual beacon, and then the region enclosed by the rectangle consisting of continuous edge feature points can be selected as the visual beacon region.
[0097] Step S102: Determine an object identification sub-region in the visual beacon region.
[0098] First, let's introduce the visual beacon. In the solution provided by the embodiments of the present invention, the visual beacon includes two sub-areas: a feature sub-area and an object identification sub-area. The feature sub-area is composed of at least one specific graphic and is used to provide feature points. A detailed description of the feature sub-area is provided in step S103, which will not be discussed here. The object identification sub-area carries identification information of the object to which the visual beacon is attached and is used to identify the object to which the visual beacon is attached. This will be discussed in detail later.
[0099] It should be noted that the solution provided in the embodiment of the present invention does not limit the number of feature sub-areas and object identification sub-areas contained in the visual beacon, but no matter how many feature sub-areas and object identification sub-areas are included, the feature sub-areas and object identification sub-areas do not overlap.
[0100] For example, a visual beacon region can contain an object identification subregion and a feature subregion. Figure 2 , Figure 2 This is a schematic diagram of a first visual beacon provided by an embodiment of the present invention. As can be seen from the figure, the visual beacon includes an object identification sub-region and a feature sub-region, and the object identification sub-region and the feature sub-region do not overlap.
[0101] It is understandable that Figure 2This is only one of the various visual beacons provided in the embodiments of the present invention. The embodiments of the present invention do not limit the specific form and layout of each sub-area in the visual beacon. Other implementations of the sub-area layout in the visual beacon are detailed in subsequent embodiments and will not be described in detail here.
[0102] Next, the object identification sub-area is introduced in detail.
[0103] The specific form of the object identification sub-area can be a two-dimensional code such as a DM (Data Matrix) code or a QR (Quick Response) code that carries identification information, or a barcode or ARUCO code that carries identification information, or a pattern that carries identification information and is generated based on other coding rules. The above-mentioned identification information can be the number of the object to which the visual beacon is posted, such as the number of a shelf or a machine; it can also include other information about the object to which the visual beacon is posted, such as the capacity of the shelf, the type of goods stored on the shelf, etc., depending on the actual scenario. In addition, the embodiment of the present invention does not limit the size, color, shape, etc. of the object identification sub-area.
[0104] Specifically, the object identification sub-region in the visual beacon region may be determined in the following manner.
[0105] In one embodiment, a target color parameter for the object identification subregion can be pre-set, and based on the target color parameter, the object identification subregion is determined from the visual beacon region. Specifically, an area within the visual beacon region whose color parameter is the target color parameter is identified, and the identified area is determined as the object identification subregion in the target image. For example, the target color of the object identification subregion can be set to a color that is distinguishable from other areas within the visual beacon region.
[0106] In another embodiment, a second target image feature of the object identification subregion can be pre-set, and based on this second target image feature, the object identification subregion can be determined from the visual beacon area. In this case, when determining the object identification subregion in the target image, the image features of the target image can be extracted, and the image region corresponding to the features within the image features that match the second target image feature is determined as the object identification subregion in the target image. For example, if the object identification subregion is a QR code carrying information, since the image features of the QR code are relatively obvious, feature matching can be used to determine the object identification subregion.
[0107] In another embodiment, the object identification sub-region can be determined from the visual beacon region based on the preset position information of the object identification sub-region in the visual beacon. Since the visual beacon is pre-set and the position of the object identification sub-region in the visual beacon is predetermined, the preset position information of the object identification sub-region in the visual beacon can be obtained. The following two cases are used as examples to illustrate how to determine the object identification sub-region based on the different preset information.
[0108] In the first case, the preset position information may be the relative position of the object identification sub-region in the visual beacon. For example, the preset position information may be that the object identification sub-region is located in the left half of the visual beacon, or that the object identification sub-region is located in the middle third of the visual beacon, etc.
[0109] In the second case, the preset position information can be the coordinates of the corner points of the object identification sub-area in the visual beacon. Taking one of the corner points in the object identification sub-area as an example, if the coordinates of the corner point in the visual beacon are (20, 10), and the length and width of the visual beacon are 40 units and 20 units respectively, it can be calculated that the ratio of the horizontal and vertical coordinates of the coordinates to the length and width of the visual beacon are both 0.5; if the length and width of the visual beacon area in the target image are 800 pixels and 400 pixels respectively, then the product of the above ratio and the length and width of the visual beacon area is calculated, and the coordinates of the corner point in the visual beacon area object can be obtained as (400, 200). In this way, the pixel coordinates corresponding to the remaining three corner points of the object identification sub-area in the visual beacon area can be determined, and then the area enclosed by the rectangle whose corner point coordinates are the above pixel coordinates can be determined as the object identification sub-area in the visual beacon area.
[0110] In the third case, the preset position information can be the distance of each side of the object identification sub-region relative to the visual beacon boundary. Taking one side of the object identification sub-region as an example, if the distance between that side and the upper boundary of the visual beacon is 5 units, and the visual beacon width is 20 units, the ratio of that distance to the visual beacon width can be calculated as 0.25. If the width of the visual beacon region in the target image is 400 pixels, then the product of this ratio and the width of the visual beacon region yields the distance of that side relative to the upper boundary of the visual beacon region as 400 × 0.25 = 100 pixels. The distances of the remaining three sides of the object identification sub-region relative to the visual beacon region can be determined in this sequential manner, and the area enclosed by these four sides can then be determined as the object identification sub-region within the visual beacon region.
[0111] In this way, based on the preset position information of the object identification sub-region in the visual beacon, the object identification sub-region can be accurately determined from the visual beacon area.
[0112] Step S103: If the object identification sub-region indicates that the object with the visual beacon is the target object, the image position of the feature point in the feature sub-region of the visual beacon region in the visual beacon region is obtained.
[0113] The target object varies depending on the task the robot is performing. For example, if the robot is transporting a roller to a corresponding machine and docking the roller with the machine, the target object is the corresponding machine; if the robot is delivering goods to a specific shelf, the target object is the designated shelf.
[0114] Because the object identification subregion carries the identification information of the object displayed by the visual beacon, the above information can be read from the object identification subregion. If the above information indicates that the object displayed by the visual beacon is the target object, it means that the object displayed by the visual beacon is the object to be located. In order to locate the target object, the information in the characteristic subregion of the visual beacon region can be further obtained.
[0115] Next, the characteristic sub-regions are introduced in detail.
[0116] The characteristic sub-region is composed of at least one specific shape. For example, the characteristic sub-region can be a combination of a rectangle, a circle, a triangle, a trapezoid, or a combination of multiple shapes.
[0117] The embodiment of the present invention does not limit the number of specific graphics constituting the characteristic sub-region.
[0118] The embodiments of the present invention do not limit the colors of the specific graphics within the characteristic sub-region; the colors of the specific graphics can be the same or different. In one embodiment, the color of the specific graphics constituting the characteristic sub-region can be a color that contrasts significantly with the color of the object identification sub-region. For example, the object identification sub-region can be black and white, while the specific graphics constituting the characteristic sub-region can be red.
[0119] Next, the method of obtaining the image position of feature points in the feature sub-region is introduced.
[0120] Specifically, the characteristic sub-region in the visual beacon area can be determined first, and then the characteristic points in the above characteristic sub-region can be extracted. The pixel coordinates of the characteristic points in the visual beacon area are obtained according to the extracted characteristic points as the image position of the characteristic points in the visual beacon area.
[0121] The meaning of the above feature points is determined according to the specific graphics that constitute the feature sub-region. For example, if the feature sub-region is composed of a rectangle, such as Figure 2As shown, the corner points of the rectangle can be extracted as feature points; if the feature sub-region is composed of a circle with a center, the center of the circle can be extracted as the feature point; if the feature sub-region is composed of a rectangle and a circle, the corner points of the rectangle and the center of the circle can be extracted as feature points.
[0122] The characteristic sub-region in the visual beacon region may be determined in the following manner.
[0123] In one embodiment, the characteristic sub-region in the visual beacon region can be determined by referring to the method of determining the object identification sub-region in the aforementioned step S102. The only difference is that the object identification sub-region is replaced by the characteristic sub-region, which will not be repeated here.
[0124] In another embodiment, since the object identification subregion in the visual beacon region has been determined, the region excluding the object identification subregion in the visual beacon region may be determined as a feature subregion.
[0125] Step S104: Positioning the target object based on the obtained image position and calibration parameters of the image acquisition device.
[0126] In this step, the calibration parameters of the image acquisition device can be pre-calibrated and stored in the memory of the robot.
[0127] The calibration parameters of the above-mentioned image acquisition device may be internal parameters and / or external parameters of the image acquisition device.
[0128] The internal parameter may be an internal parameter matrix of the image acquisition device, which includes information such as the focal length of the image acquisition device. The internal parameter may be pre-calibrated and stored using a chessboard calibration method or other methods.
[0129] The extrinsic parameter can be the spatial position of the image acquisition device when capturing the target image, that is, the position of the image acquisition device in the world coordinate system when capturing the target image. The above extrinsic parameter can be determined by the robot based on the acquisition time of the target image and the positioning device inside the robot. For example, the acquisition time of target image A is time a, and the robot can obtain the spatial position of the image acquisition device at time a through the positioning device. In this way, the spatial position determined by the robot can be obtained as the above extrinsic parameter.
[0130] After obtaining the image position of the feature point and the calibration parameters of the image acquisition device, the target object can be located by combining the spatial position corresponding to the feature point. The spatial position of the feature point can be the position of the feature point in the world coordinate system.
[0131] Since the visual beacon is pre-set, the spatial position of the feature point in the visual beacon is predetermined. Therefore, the spatial position of each feature point in the feature sub-region can be determined by simply obtaining the correspondence between each feature point in the feature sub-region and each feature point with preset spatial coordinates in the visual beacon. Specifically, the spatial position corresponding to the feature point can be obtained from the preset spatial position using the following method.
[0132] In one embodiment, the spatial position corresponding to each feature point can be determined from the preset spatial positions of the feature points in the feature sub-region in a specific order. For example, the spatial position corresponding to each feature point can be determined from the preset spatial positions in the order in which the feature points appear from top to bottom and from left to right in the feature sub-region.
[0133] In another embodiment, the relative position relationship between the feature sub-region and the object identification sub-region can be determined first, and the spatial position corresponding to the feature point can be determined based on the relative position relationship. Figure 6 Steps S605-S607 in the illustrated implementation are not described in detail here.
[0134] Specifically, based on the image position of the feature points, the calibration parameters of the image acquisition device, and the spatial position corresponding to the feature points, the PNP algorithm can be used to perform pose calculation to determine the rotation matrix and translation matrix of the camera's phase plane relative to the visual beacon plane. The rotation matrix represents the rotation angle of the camera's phase plane relative to the visual beacon plane, and the translation matrix represents the translation distance of the camera's phase plane relative to the visual beacon plane. Since the camera's phase plane can be understood as the plane where the robot is located and the plane of the visual beacon is the plane where the target object is located, the position of the target object relative to the robot can be determined based on the rotation angle and translation distance of the robot relative to the target object, thus achieving the positioning of the target object.
[0135] As can be seen from the above, when the method provided in the embodiment of the present invention is applied for positioning, the visual beacon area is first identified from the target image captured by the image acquisition device. The visual beacon area contains non-overlapping object identification sub-areas and feature sub-areas. When the information in the object identification sub-area is identified as the target object, the image position of the feature point in the above feature sub-area can be further obtained. In this way, based on the above image position and the pre-calibrated parameters of the image acquisition device, the target object can be positioned.
[0136] In addition, when the solution provided by the embodiment of the present invention is used to locate an object, wireless signals are no longer relied upon, so the entire positioning process does not involve the situation where the wireless signal is interfered with by environmental noise signals. Therefore, the accuracy of locating the object can be improved.
[0137] Furthermore, in the solution provided in the embodiment of the present invention, the visual beacon is divided into non-overlapping object identification sub-areas and feature sub-areas, wherein the object identification sub-area is used to identify the target object, and the feature sub-area is used to provide rich feature points to locate the target object. This ensures that the above two sub-areas do not interfere with each other, improves the accuracy of the feature point position information extracted in the feature sub-area, and further improves the accuracy of positioning the target object based on the position information of the above feature points.
[0138] Furthermore, it can be seen that the embodiment of the present invention can achieve high-accuracy target object positioning by using only a single image acquisition device installed in the robot and pre-posted visual beacons. Compared with positioning using radio frequency technology, positioning based on 3D depth sensors, etc., it effectively reduces the cost of positioning while ensuring a higher positioning accuracy.
[0139] Other implementations of the sub-region layout of the visual beacon are described below.
[0140] In one embodiment, the visual beacon may include an object identification sub-region and multiple feature sub-regions, and each feature sub-region is adjacent to the object identification sub-region.
[0141] The plurality of characteristic sub-regions may be arranged on the same side of the object identification sub-region, or on different sides of the object identification sub-region. For example, each characteristic sub-region may be located on the left or right side of the object identification sub-region, or on the upper side or lower side of the object identification sub-region.
[0142] In one case, the visual beacon may include: an object identification sub-region and an even number of feature sub-regions, the number of feature sub-regions distributed on the left and right sides of the object identification sub-region is the same, and the graphics in the feature sub-regions distributed on the left and right sides of the object identification sub-region are symmetrical to each other.
[0143] For example, see Figure 3 , Figure 3 The schematic diagram of the second visual beacon provided in an embodiment of the present invention shows that the visual beacon includes an object identification sub-region, feature sub-region 1, and feature sub-region 2. There is a feature sub-region on each side of the object identification sub-region, and the graphics in the feature sub-regions on the left and right sides of the object identification sub-region are symmetrical. With this visual beacon sub-region layout, the two feature sub-regions can provide more feature points, thereby obtaining the image positions of more feature points, which is beneficial for improving the accuracy of locating the target object based on these image positions.
[0144] For example, see Figure 4 , Figure 4The schematic diagram of the third visual beacon provided for an embodiment of the present invention shows that the visual beacon includes an object identification sub-region and four feature sub-regions, namely feature sub-region 1, feature sub-region 2, feature sub-region 3, and feature sub-region 4. Two feature sub-regions are distributed on the left and right sides of the object identification sub-region, and the graphics in the feature sub-regions distributed on the left and right sides of the object identification sub-region are symmetrical to each other. With this visual beacon sub-region layout, the four feature sub-regions can provide more feature points, thereby obtaining the image positions of more feature points, making the positioning of the target object based on the above image positions more accurate.
[0145] In another embodiment, the visual beacon may include at least one beacon unit, and the sub-areas in each beacon unit may have the following layout:
[0146] Each beacon unit includes: an object identification sub-region and multiple characteristic sub-regions, each characteristic sub-region is adjacent to the object identification sub-region; or
[0147] Each beacon unit includes: an object identification sub-region and a feature sub-region; or
[0148] Each beacon unit includes: an object identification sub-region and an even number of feature sub-regions. The number of feature sub-regions distributed on the left and right sides of the object identification sub-region is the same, and the patterns in the feature sub-regions distributed on the left and right sides of the object identification sub-region are symmetrical to each other.
[0149] The sub-area layout of the beacon unit has been described above when introducing the sub-area layout of the visual beacon, and will not be repeated here.
[0150] For example, see Figure 5 , Figure 5 A schematic diagram of a fourth visual beacon provided by an embodiment of the present invention, comprising Figure 5 It can be seen that the visual beacon includes two beacon units: beacon unit A and beacon unit B. Each beacon unit contains a feature sub-region and an object identification sub-region: beacon unit A contains feature sub-regions A1 and A2 and object identification sub-region A; beacon unit B contains feature sub-regions B1 and B2 and object identification sub-region B.
[0151] It should be noted that the beacon units contained in the visual beacon can be exactly the same, or the object identification sub-areas can be the same while the number of feature sub-areas is different, or the object identification sub-areas can be the same while the layout of the feature sub-areas and the object identification sub-areas is different, etc.
[0152] Under this visual beacon sub-area layout, each beacon unit in the visual beacon contains an object identification sub-area and a feature sub-area. This ensures that as long as the image acquisition area captures any beacon unit in the visual beacon, it can locate the target object based on the information contained in the object identification sub-area and feature sub-area in the above beacon unit, thereby reducing the difficulty of the image acquisition device to capture the target image containing the visual beacon and improving the efficiency of target object positioning.
[0153] In one embodiment of the present invention, the number of beacon units included in the above-mentioned visual beacon can be determined by the viewing angle range of the image acquisition device. For example, if the acquisition range of the image acquisition device is large, it can be as follows: Figure 5 As shown, the visual beacon includes multiple beacon units; the acquisition range of the image acquisition device is small, which can be as follows Figure 2 、 Figure 3 or Figure 4 As shown, the visual beacon is set to include only one beacon unit.
[0154] For example, the correspondence between the viewing angle range of the image acquisition device and the number of beacon units included in the visual beacon can be preset, and then the number of beacon units included in the visual beacon can be set according to the above correspondence.
[0155] The number of beacon units included in the visual beacon is selected based on the viewing angle range of the image acquisition device. This can fully utilize the viewing angle range of the image acquisition device, facilitate the image acquisition device to capture the target image containing the visual beacon area, and improve the efficiency of target object positioning.
[0156] In another embodiment of the present invention, the number of characteristic sub-regions included in the beacon unit can be determined by the viewing angle range of the image acquisition device. For example, if the acquisition range of the image acquisition device is large, the beacon unit can be set to include multiple characteristic sub-regions. Figure 3 As shown in the figure, the visual beacon includes a beacon unit, which includes two feature sub-regions. Figure 4 As shown in the figure, the visual beacon includes a beacon unit, which includes 4 characteristic sub-regions; if the acquisition range of the image acquisition device is small, the beacon unit can be set to include only 1 characteristic sub-region. Figure 2 As shown, the visual beacon in the figure includes a beacon unit, and the beacon unit only includes one feature sub-region.
[0157] For example, the correspondence between the viewing angle range of the image acquisition device and the number of characteristic sub-regions included in the beacon unit can be preset, and then the number of beacon units included in the visual beacon can be set according to the above correspondence.
[0158] The number of characteristic sub-areas included in the beacon unit is selected based on the viewing angle range of the image acquisition device. This can fully utilize the viewing angle range of the image acquisition device, facilitate the image acquisition device to capture the target image containing the visual beacon area, and improve the efficiency of target object positioning.
[0159] Of course, in one implementation, the number of beacon units included in the visual beacon and the number of characteristic sub-regions included in the beacon unit can both be determined by the viewing angle range of the image acquisition device.
[0160] exist Figure 1 Based on the illustrated embodiment, the characteristic subregion may include a first graphic and a second graphic. The first graphic is used to provide preset characteristic points, and the second graphic is used to determine the relative positional relationship between the characteristic subregion and the object identification subregion. In this case, the image position of the characteristic points in the first graphic can be obtained, and the spatial position corresponding to the characteristic points can be determined based on the relative positional relationship between the characteristic subregion and the object identification subregion. In view of the above situation, an embodiment of the present invention provides another positioning method.
[0161] See also Figure 6 , Figure 6 This is a flow chart of a second positioning method provided by an embodiment of the present invention. The method includes the following steps S601-S608.
[0162] Step S601: Identify a visual beacon area in a target image captured by an image capture device.
[0163] Step S602: Determine an object identification sub-region in the visual beacon region.
[0164] The above steps S601 and S602 are the same as the above steps S101 and S102, and are not repeated here.
[0165] Step S603: If the object identification sub-region indicates that the object with the visual beacon is the target object, then identifying the preset feature points provided by the first graphic in each feature sub-region of the visual beacon region.
[0166] In this step, the characteristic sub-regions include a first graphic and a second graphic. The first graphic provides characteristic points, while the second graphic identifies the relative positional relationship between each characteristic sub-region and the object identification sub-region. A detailed description of the second graphic is provided in subsequent steps S605-S606 and will not be discussed in detail here.
[0167] The function of the first graphic is to provide feature points. Therefore, any graphic that is convenient for extracting feature points can be used as the first graphic. The embodiment of the present invention does not limit the specific shape of the second graphic and the types it contains. The first graphic can contain only one type of graphic, or it can contain multiple types of graphics. For example, the first graphic can be a rectangle. In this case, the corner points of the rectangle can be extracted as feature points; the first graphic can be a circle with a center. In this case, the center of the circle can be extracted as a feature point; the first graphic can also contain a rectangle and a circle. In this case, the corner points of the rectangle and the center of the circle can be extracted as feature points. In addition, the color of the first graphic can be any color, and the present invention does not limit the color of the first graphic.
[0168] In one embodiment of the present invention, the target image may be pre-processed, and feature points provided by the first graphic in the image may be extracted based on the processed image. Specific implementations are described in subsequent embodiments and will not be described in detail here.
[0169] In another embodiment of the present invention, after extracting the feature points, the identified feature points can be verified based on the preset distribution relationship between each feature point and the second graphic. Specific implementation methods are detailed in subsequent embodiments and are not described in detail here.
[0170] Step S604: Obtain the image position of the identified feature point in the visual beacon area.
[0171] The above-mentioned image position may be the pixel coordinate of the feature point in the visual beacon area.
[0172] Specifically, after identifying each feature point provided by the first graphic, the pixel coordinates of each feature point in the visual beacon area may be determined as the image position.
[0173] Step S605: Identify the second graphics in each characteristic sub-area of the visual beacon area.
[0174] The second graphic is used to identify the relative positional relationship between each feature sub-region and the object identification sub-region. The embodiments of the present invention do not limit the specific shape or types of the second graphic. The second graphic may include only one type of graphic or multiple types of graphics. For example, the second graphic may be a circle, a triangle, or a combination of a circle and a triangle. Furthermore, the color of the first graphic may be any color, and the embodiments of the present invention do not limit the color of the second graphic.
[0175] Specifically, edge image features of the target image can be extracted, and then the second graphic within each characteristic sub-region of the visual beacon region of the target image can be identified based on the edge image features. For example, if the second graphic of characteristic sub-region A is a circle, a circle consisting of continuous edge feature points can be selected as the second graphic within characteristic sub-region A.
[0176] In one embodiment of the present invention, before identifying the second graphic, the target image may be pre-processed, and the second graphic may be extracted based on the processed image. Specific implementations are described in subsequent embodiments and will not be described in detail here.
[0177] Step S606: Determine the relative positional relationship between each characteristic sub-region and the object identification sub-region based on the graphic information of the second graphic in each characteristic sub-region.
[0178] The relative position relationship can be determined based on different graphic information of the second graphic in each characteristic sub-region, wherein the graphic information can include the color, shape, quantity, layout, size, etc. of the second graphic.
[0179] Specifically, the second graphics in different characteristic sub-regions may have at least one of the following differences:
[0180] The second graphics have different colors. This allows the relative positional relationship to be determined based on the color of the second graphics in each characteristic subregion. For example, if the second graphics in characteristic subregion A is red, it indicates that characteristic subregion A is to the left of the object identification subregion; if the second graphics in characteristic subregion B is blue, it indicates that characteristic subregion B is to the right of the object identification subregion, and so on.
[0181] The layout of the second graphics is different. In this way, the above relative position relationship can be determined based on the layout of the second graphics in each characteristic sub-region. For example, the second graphics of characteristic sub-region C is located in the upper half of characteristic sub-region C, indicating that characteristic sub-region C is to the left of the object identification sub-region; the second graphics of characteristic sub-region D is located in the lower half of characteristic sub-region C, indicating that characteristic sub-region D is to the left of the object identification sub-region, etc. For another example, the second graphics in characteristic sub-region E and the second graphics in characteristic sub-region F are mirror images of each other, and the above relative position relationship can be determined based on the different mirror features of the above second graphics.
[0182] The number of second graphics varies. Thus, the relative positional relationship can be determined based on the number of second graphics in each characteristic subregion. For example, characteristic subregion G contains one second graphic, indicating that characteristic subregion G is above the object identification subregion, while characteristic subregion H contains two second graphics, indicating that characteristic subregion H is below the object identification subregion, and so on.
[0183] The second graphics have different shapes. Thus, the relative positional relationship can be determined based on the shape of the second graphics in each characteristic subregion. For example, the second graphics in characteristic subregion I are circular, indicating that characteristic subregion I is above the object identification subregion, while the second graphics in characteristic subregion J are triangular, indicating that characteristic subregion J is below the object identification subregion, and so on.
[0184] The sizes of the second graphics vary. This allows the aforementioned relative positional relationship to be determined based on the size of the second graphics in each characteristic subregion. For example, the second graphics in characteristic subregion K have a larger side length, indicating that characteristic subregion K is above the object identification subregion, while the second graphics in characteristic subregion L have a smaller side length, indicating that characteristic subregion L is below the object identification subregion.
[0185] The different features of the second graphics in the above-mentioned characteristic sub-regions are merely examples. The embodiment of the present invention does not limit the method of using the features of the second graphics to determine the relative positional relationship between the characteristic sub-region and the object identification sub-region.
[0186] By setting different graphic information of the second graphic, it is convenient to quickly determine the position of each characteristic sub-region relative to the object identification sub-region based on the graphic information of the second graphic of each characteristic sub-region.
[0187] Step S607: selecting the spatial position corresponding to the feature point in each feature sub-region from the preset spatial positions of each feature point according to the relative position relationship.
[0188] Specifically, since the relative position relationship between each feature sub-region and the object identification sub-region is determined, for each feature sub-region, the target preset spatial position of the feature point with the same position as the above relative relationship can be selected from the preset spatial position based on the above relative position relationship, and then the spatial position corresponding to the feature point in each feature sub-region can be further selected from the above target preset spatial position.
[0189] For example, if the feature sub-region A is located on the left side of the object identification sub-region, then the target preset spatial position of the feature point located on the left side of the object identification sub-region can be selected first. This is equivalent to narrowing the selection range, and then the spatial position corresponding to the feature point in each feature sub-region can be selected from the target preset spatial position.
[0190] Among them, the method of further selecting the spatial position corresponding to the feature point in each feature sub-region from the target preset spatial position can be referred to the aforementioned Figure 1 The method given in step 104 in the illustrated embodiment determines the spatial position corresponding to each feature point from the target preset spatial position in a specific order, which will not be described in detail here.
[0191] In one embodiment of the present invention, a rectangular coordinate system can be established with the geometric center of the second figure in the feature sub-region as the origin. The distance between each feature point and the origin, as well as the angle between the line connecting each feature point to the origin and the horizontal line, are then obtained. Based on these distances and angles, the spatial position corresponding to the feature point in each feature sub-region is selected. For example, a feature point with a distance of 10 units from the origin and an angle of 30 degrees corresponds to spatial position a, a feature point with a distance of 15 units from the origin and an angle of 50 degrees corresponds to spatial position b, and so on.
[0192] Step S608: Positioning the target object according to the image position and spatial position corresponding to the feature points in each feature sub-region and the calibration parameters of the image acquisition device.
[0193] The implementation of the above step S608 has been described in the above step S104 and will not be repeated here.
[0194] As can be seen from the above, the image position of the feature point can be quickly obtained through the first graphic, and the relative position relationship between the feature sub-area and the object identification sub-area can be determined based on the second graphic, which can facilitate the determination of the spatial position corresponding to each feature point from the preset spatial position more quickly based on the above relative position relationship.
[0195] The following describes the method of extracting the feature points provided by the first graphic, the second graphic, and verifying the feature points through steps A to C.
[0196] Step A: Preprocess the target image.
[0197] In one embodiment, the preprocessing may be to perform gradient detection on the target image and convert the target image into a gradient image based on the detection result. The gradient image can represent the change information of edges, textures, etc. at various locations in the image.
[0198] In another embodiment, there may be noise in the target image. In order to remove the noise, the preprocessing may be image filtering, such as Gaussian filtering or mean filtering.
[0199] In another embodiment, the preprocessing may be morphological processing of the target image to make the first and second graphics in the target image more distinct, thereby facilitating subsequent identification of the first and second graphics from the target image based on information such as connected components. The morphological processing may be image erosion, image dilation, or the like.
[0200] Step B: Based on the processed image, extract the first graphic and the second graphic in the image.
[0201] Specifically, since the target image has been preprocessed, the aforementioned method of extracting edge features can more quickly and accurately extract the first graphic and the second graphic from the processed image.
[0202] Step C: extracting feature points from the first graphic, and verifying the extracted feature points based on a preset distribution relationship between the second graphic and each feature point.
[0203] Specifically, the distribution relationship between the extracted feature points and the extracted second graphic can be compared with a preset distribution relationship, and feature points whose distribution relationship does not conform to the preset distribution relationship can be determined as invalid feature points. For example, if the feature points are pre-set above the second graphic, if any of the extracted feature points are distributed below the second graphic, then these feature points can be considered to be misidentified feature points and thus can be determined as invalid feature points. This can further improve the accuracy of the extracted feature points.
[0204] Corresponding to the above positioning method, an embodiment of the present invention further provides a positioning device.
[0205] See also Figure 7 , Figure 7 This is a schematic structural diagram of a positioning device provided by an embodiment of the present invention. The device includes the following modules 701-704.
[0206] A visual beacon region identification module 701 is used to identify a visual beacon region in a target image captured by an image acquisition device;
[0207] An object identification sub-region determining module 702 is configured to determine an object identification sub-region in the visual beacon region;
[0208] a position obtaining module 703 for obtaining an image position of a feature point in a characteristic subregion within the visual beacon region within the visual beacon region if the object identification subregion indicates that the object to which the visual beacon is posted is the target object, wherein the characteristic subregion does not overlap with the object identification subregion;
[0209] The target object positioning module 704 is configured to locate the target object based on the obtained image position and calibration parameters of the image acquisition device.
[0210] As can be seen from the above, when the method provided in the embodiment of the present invention is applied for positioning, the visual beacon area is first identified from the target image captured by the image acquisition device. The visual beacon area contains non-overlapping object identification sub-areas and feature sub-areas. When the information in the object identification sub-area is identified as the target object, the image position of the feature point in the above feature sub-area can be further obtained. In this way, based on the above image position and the pre-calibrated parameters of the image acquisition device, the target object can be positioned.
[0211] In addition, when the solution provided by the embodiment of the present invention is used to locate an object, wireless signals are no longer relied upon, so the entire positioning process does not involve the situation where the wireless signal is interfered with by environmental noise signals. Therefore, the accuracy of locating the object can be improved.
[0212] Furthermore, in the solution provided in the embodiment of the present invention, the visual beacon is divided into non-overlapping object identification sub-areas and feature sub-areas, wherein the object identification sub-area is used to identify the target object, and the feature sub-area is used to provide rich feature points to locate the target object. This ensures that the above two sub-areas do not interfere with each other, improves the accuracy of the feature point position information extracted in the feature sub-area, and further improves the accuracy of positioning the target object based on the position information of the above feature points.
[0213] In one embodiment of the present invention, the visual beacon includes at least one beacon unit.
[0214] Each beacon unit includes: an object identification sub-region and a plurality of characteristic sub-regions, each characteristic sub-region being adjacent to the object identification sub-region;
[0215] or
[0216] Each beacon unit includes: an object identification sub-area and a feature sub-area.
[0217] Under this visual beacon sub-area layout, each beacon unit in the visual beacon contains an object identification sub-area and a feature sub-area. This ensures that as long as the image acquisition area captures any beacon unit in the visual beacon, it can locate the target object based on the information contained in the object identification sub-area and feature sub-area in the above beacon unit, thereby reducing the difficulty of the image acquisition device to capture the target image containing the visual beacon and improving the efficiency of target object positioning.
[0218] In one embodiment of the present invention, each beacon unit includes: an object identification sub-region and an even number of feature sub-regions, the number of feature sub-regions distributed on the left and right sides of the object identification sub-region is the same, and the graphics in the feature sub-regions distributed on the left and right sides of the object identification sub-region are symmetrical to each other.
[0219] In one embodiment of the present invention,
[0220] The characteristic sub-region includes: a first graphic and a second graphic, the first graphic is used to provide a preset characteristic point, and the second graphic is used to determine the relative position relationship between the characteristic sub-region and the object identification sub-region;
[0221] The position acquisition module 703 is specifically configured to identify preset feature points provided by the first graphic in each feature sub-area of the visual beacon area; and obtain image positions of the identified feature points in the visual beacon area;
[0222] The target object positioning module 704 is specifically used to identify the second graphic in each characteristic sub-region of the visual beacon area; determine the relative position relationship between each characteristic sub-region and the object identification sub-region based on the graphic information of the second graphic in each characteristic sub-region; select the spatial position corresponding to the characteristic point in each characteristic sub-region from the preset spatial position of each characteristic point based on the relative position relationship; and locate the target object based on the image position and spatial position corresponding to the characteristic point in each characteristic sub-region and the calibration parameters of the image acquisition device.
[0223] As can be seen from the above, the image position of the feature point can be quickly obtained through the first graphic, and the relative position relationship between the feature sub-area and the object identification sub-area can be determined based on the second graphic, which can facilitate the determination of the spatial position corresponding to each feature point from the preset spatial position more quickly based on the above relative position relationship.
[0224] In one embodiment of the present invention, the second graphics in different characteristic sub-regions in the same beacon unit have at least one of the following differences:
[0225] The second graphic has a different color;
[0226] The second graphic has a different layout;
[0227] The number of the second graphics is different;
[0228] The second figures have different shapes;
[0229] The second graphics have different sizes.
[0230] By setting different graphic information of the second graphic, it is convenient to quickly determine the position of each characteristic sub-region relative to the object identification sub-region based on the graphic information of the second graphic of each characteristic sub-region.
[0231] In one embodiment of the present invention,
[0232] The number of beacon units included in the visual beacon is determined by the viewing angle range of the image acquisition device;
[0233] In this way, selecting the number of beacon units included in the visual beacon based on the viewing angle range of the image acquisition device can make full use of the viewing angle range of the image acquisition device, which is conducive to the image acquisition device capturing the target image containing the visual beacon area and improves the efficiency of target object positioning.
[0234] and / or
[0235] The number of characteristic sub-regions included in the beacon unit is determined by the viewing angle range of the image acquisition device.
[0236] In this way, the number of characteristic sub-areas included in the beacon unit is selected based on the viewing angle range of the image acquisition device, which can fully utilize the viewing angle range of the image acquisition device, facilitate the image acquisition device to capture the target image containing the visual beacon area, and improve the efficiency of target object positioning.
[0237] In one embodiment of the present invention, the object identification sub-region determining module 702 is specifically configured to determine the object identification sub-region from the visual beacon region based on preset position information of the object identification sub-region in the visual beacon region;
[0238] or
[0239] determining the object identification sub-region from the visual beacon region based on a preset target color parameter of the object identification sub-region;
[0240] or
[0241] The object identification sub-region is determined from the visual beacon region based on a preset second target image feature of the object identification sub-region.
[0242] In this way, based on the preset position information of the object identification sub-region in the visual beacon, the object identification sub-region can be accurately determined from the visual beacon area.
[0243] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.
[0244] Memory 803, used for storing computer programs;
[0245] The processor 801 is configured to implement the positioning method provided in the embodiment of the present invention when executing the program stored in the memory 803 .
[0246] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0247] The communication interface is used for communication between the above electronic device and other devices.
[0248] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0249] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0250] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the positioning method provided in the embodiment of the present invention is implemented.
[0251] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the positioning method provided in the embodiment of the present invention.
[0252] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0253] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0254] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device, electronic device, and storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, refer to the descriptions of the method embodiments.
[0255] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A positioning method, characterized in that: The method comprises: Identifying a visual beacon region in a target image captured by an image acquisition device; determining an object identification sub-region within the visual beacon region; If the object identification subregion represents that the object with the visual beacon is the target object, obtaining the image position of the feature point in the feature subregion of the visual beacon region in the visual beacon region, wherein the feature subregion does not overlap with the object identification subregion; Positioning the target object based on the obtained image position and calibration parameters of the image acquisition device; The visual beacon includes at least one beacon unit, Each beacon unit includes: an object identification sub-region and multiple feature sub-regions, each feature sub-region is adjacent to the object identification sub-region, and the multiple feature sub-regions are: an even number of feature sub-regions, the number of feature sub-regions distributed on the left and right of the object identification sub-region is the same, and the graphics in the feature sub-regions distributed on the left and right sides of the object identification sub-region are symmetrical to each other.
2. The method according to claim 1, characterized in that The characteristic sub-region includes: a first graphic and a second graphic, the first graphic is used to provide a preset characteristic point, and the second graphic is used to determine the relative position relationship between the characteristic sub-region and the object identification sub-region; The obtaining of the image position of the feature point in the feature sub-region of the visual beacon region in the visual beacon region comprises: Identify preset feature points provided by the first graphic in each feature sub-area in the visual beacon area; Obtaining an image position of the identified feature point in the visual beacon area; Positioning the target object based on the obtained image position and calibration parameters of the image acquisition device includes: identifying the second graphic in each characteristic sub-area of the visual beacon area; Determining a relative positional relationship between each characteristic sub-region and the object identification sub-region based on the graphic information of the second graphic in each characteristic sub-region; According to the relative position relationship, selecting the spatial position corresponding to the feature point in each feature sub-region from the preset spatial positions of each feature point; The target object is located according to the image position and spatial position corresponding to the feature points in each feature sub-area and the calibration parameters of the image acquisition device.
3. The method according to claim 2, characterized in that The second graphics in different characteristic sub-areas in the same beacon unit have at least one of the following differences: The second graphic has a different color; The second graphic has a different layout; The number of the second graphics is different; The second figures have different shapes; The second graphics have different sizes.
4. The method according to any one of claims 1 to 3, characterized in that The number of beacon units included in the visual beacon is determined by the viewing angle range of the image acquisition device; and / or The number of characteristic sub-regions included in the beacon unit is determined by the viewing angle range of the image acquisition device.
5. The method according to any one of claims 1 to 3, characterized in that Determining the object identification sub-area in the visual beacon area includes: Determining the object identification sub-region from the visual beacon region based on preset position information of the object identification sub-region in the visual beacon; or determining the object identification sub-region from the visual beacon region based on a preset target color parameter of the object identification sub-region; or The object identification sub-region is determined from the visual beacon region based on a preset second target image feature of the object identification sub-region.
6. A positioning device, characterized in that: The device comprises: A visual beacon area recognition module is used to recognize the visual beacon area in the target image captured by the image acquisition device; an object identification sub-region determining module, configured to determine an object identification sub-region in the visual beacon region; a position obtaining module configured to obtain an image position of a feature point in a characteristic subregion within the visual beacon region within the visual beacon region if the object identification subregion indicates that the object to which the visual beacon is posted is the target object, wherein the characteristic subregion does not overlap with the object identification subregion; a target object positioning module, configured to locate the target object based on the obtained image position and calibration parameters of the image acquisition device; The visual beacon includes at least one beacon unit, Each beacon unit includes: an object identification sub-region and multiple feature sub-regions, each feature sub-region is adjacent to the object identification sub-region, and the multiple feature sub-regions are: an even number of feature sub-regions, the number of feature sub-regions distributed on the left and right of the object identification sub-region is the same, and the graphics in the feature sub-regions distributed on the left and right sides of the object identification sub-region are symmetrical to each other.
7. The device according to claim 6, characterized in that The characteristic sub-region includes: a first graphic and a second graphic, the first graphic is used to provide a preset characteristic point, and the second graphic is used to determine the relative position relationship between the characteristic sub-region and the object identification sub-region; The position acquisition module is specifically configured to identify preset feature points provided by the first graphic in each feature sub-area of the visual beacon area; and obtain image positions of the identified feature points in the visual beacon area; The target object positioning module is specifically configured to identify the second graphic within each characteristic sub-region of the visual beacon area; determine the relative positional relationship between each characteristic sub-region and the object identification sub-region based on the graphic information of the second graphic within each characteristic sub-region; select the spatial position corresponding to the characteristic point in each characteristic sub-region from the preset spatial positions of each characteristic point based on the relative positional relationship; and locate the target object based on the image position and spatial position corresponding to the characteristic point in each characteristic sub-region and the calibration parameters of the image acquisition device; or The second graphics in different characteristic sub-areas in the same beacon unit have at least one of the following differences: The second graphic has a different color; The second graphic has a different layout; The number of the second graphics is different; The second figures have different shapes; The second graphics have different sizes; or The number of beacon units included in the visual beacon is determined by the viewing angle range of the image acquisition device; and / or the number of characteristic sub-areas included in the beacon unit is determined by the viewing angle range of the image acquisition device; or The object identification sub-area determination module is specifically used to determine the object identification sub-area from the visual beacon area based on preset position information of the object identification sub-area in the visual beacon; or to determine the object identification sub-area from the visual beacon area based on a preset target color parameter of the object identification sub-area; or to determine the object identification sub-area from the visual beacon area based on a preset second target image feature of the object identification sub-area.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and apparatus for establishing beacon map on basis of visual beacons
EP3995988A1
Additional information service system and image pickup device
JP2012033073A