Method and system for target recognition and tracking in real-world scenarios
By comparing the positions of cameras and optical communication devices, combined with device attribute information, fast and accurate target recognition and tracking are achieved, solving the problems of high cost and inability to move virtual objects in the existing technology, and improving the application effect of augmented reality technology.
Patent Information
- Application Number
- CN201910917491.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-26
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2039-09-26
AI Technical Summary
In the existing technology, the cost of radar recognition is high, the time complexity of machine learning target detection and recognition is high, and the virtual objects in augmented reality cannot move with the real targets, which cannot meet the needs of fast, accurate, and low-cost target recognition and tracking.
Obtain the target position information through the camera, compare it with the equipment position information of the optical communication device, determine the matching target, and set target-related information according to the device attribute information to achieve target recognition and tracking. The virtual object can be accurately presented on the display medium and follow the target movement. .
Fast, accurate, and low-cost target recognition and tracking are achieved. Virtual objects can follow the movement of targets in real scenes in real time, improving the application effect of augmented reality technology.
Smart Images

Figure CN112561953B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of augmented reality, and in particular relates to a method and system for target recognition and tracking in a real scene. Background Art
[0002] The statements in this section are merely intended to provide background information related to the present invention to help understanding the present invention. Such background information does not necessarily constitute prior art.
[0003] At present, the commonly used means of target recognition and tracking include radar and computer vision. Among them, radar recognition uses the target feature information such as amplitude, phase, spectrum and polarization in the echo to estimate the physical parameters such as the size and shape of the target through various mathematical multi-dimensional space transformations, and then classifies and recognizes the target. Computer vision uses artificial intelligence technologies such as deep learning to train computers with large amounts of data to establish a high-precision target detection and recognition system.
[0004] Augmented Reality (AR), also known as mixed reality, uses computer technology to overlay virtual objects onto real scenes, so that real scenes and virtual objects can be presented in the same screen or space in real time, thereby enhancing the user's perception of the real world. Since AR can enhance the display output of the real environment, it can be used to calibrate targets in real scenes.
[0005] However, the cost of using radar for target recognition and tracking is high, and target detection and recognition through machine learning requires a lot of training and has high time complexity, which are not suitable for daily target recognition and detection. In addition, in augmented reality, the superimposed virtual objects cannot move with the movement of real targets in the real scene.
[0006] Therefore, in order to solve the above problems, a fast, accurate and low-cost target recognition and tracking method and system are urgently needed. Summary of the invention
[0007] The solution of the present invention provides a method and system for target recognition and tracking in a real scene, which obtains the position information of one or more targets through a camera, compares the position information of one or more targets with the position information of a device of a scanning optical communication device, determines the target that matches the device, and sets the relevant information of the target according to the attribute information of the device to achieve target recognition. Furthermore, identification information associated with the target can be set based on the relevant information of the target, and the identification information can be presented near the target in the image captured by the camera; a virtual object associated with the target can also be set based on the position and relevant information of the target, and the virtual object can be accurately presented on the display medium, and the presented virtual object can follow the target in the real scene to achieve target tracking.
[0008] One aspect of the present invention relates to a method for target recognition and tracking in a real scene, wherein a camera and an optical communication device are installed in the real scene, and the camera and the optical communication device have a relative posture. The method includes: tracking one or more targets in the real scene by a camera; obtaining position information of the one or more targets based on the tracking results of the camera; a server obtains information from a first device, and determines attribute information of the first device and position information of the first device based on the information from the first device, wherein the position information of the first device is obtained at least in part based on the position information of the first device relative to the optical communication device; the server compares the position information of the first device with the position information of the one or more targets to determine a target that matches the first device; and sets relevant information of the target that matches the first device based on the attribute information of the first device.
[0009] Optionally, obtaining the position information of the one or more targets according to the tracking results of the camera includes: obtaining the position information of the one or more targets relative to the camera according to the tracking results of the camera, and determining the position information of the one or more targets relative to the optical communication device according to the position information of the one or more targets relative to the camera and the relative posture information between the camera and the optical communication device.
[0010] Optionally, obtaining the position information of the one or more targets according to the tracking results of the camera includes: obtaining the position information of the one or more targets relative to the camera according to the tracking results of the camera, and determining the position information of the one or more targets in the real scene according to the position information of the one or more targets relative to the camera and the posture information of the camera in the real scene.
[0011] Optionally, the attribute information of the first device includes information related to a user of the first device.
[0012] Optionally, the first device determines its position information relative to the optical communication device at least in part by acquiring an image including the optical communication device and analyzing the image.
[0013] Optionally, the method further includes: setting identification information associated with the target based on relevant information of the target, and presenting the identification information near the target in the image captured by the camera.
[0014] Optionally, the method further includes: setting a virtual object associated with the target based on relevant information of the target, wherein spatial position information of the virtual object is determined according to the position information of the target; and sending relevant information of the virtual object to a second device, wherein the relevant information of the virtual object can be used by the second device to present the virtual object on its display medium based on its position information and posture information.
[0015] Optionally, the spatial position information of the virtual object is updated as the position information of the target changes, and is sent to the second device.
[0016] Optionally, the method further includes: obtaining posture information of the target according to the tracking result of the camera; and setting posture information of the virtual object according to the posture information of the target.
[0017] Optionally, the posture of the virtual object can be adjusted according to a change in position and / or posture of the second device relative to the virtual object.
[0018] Optionally, a certain orientation of the virtual object is always facing the second device.
[0019] Another invention of the present invention relates to a system for target identification and tracking in a real scene, comprising: one or more cameras installed in the real scene, which are used to track one or more targets in the real scene; one or more optical communication devices installed in the real scene, wherein the optical communication device and the camera have a relative posture; and a server, which is used to implement any of the methods described above.
[0020] Yet another aspect of the present invention relates to a storage medium storing a computer program, which can be used to implement the above method when the computer program is executed by a processor.
[0021] Yet another aspect of the present invention relates to an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it can be used to implement the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The embodiments of the present invention are further described below with reference to the accompanying drawings, in which:
[0023] Figure 1 An exemplary light tag is shown;
[0024] Figure 2 A realistic scenario for target recognition and tracking according to one embodiment is shown;
[0025] Figure 3 A method for target recognition and tracking in a real-world scenario according to an embodiment is shown;
[0026] Figure 4 A schematic diagram of a method for target recognition and tracking in a real scene according to an embodiment is shown;
[0027] Figure 5 A method for target recognition and tracking in a real-world scenario according to an embodiment is shown;
[0028] Figure 6 A schematic diagram showing a method for target recognition and tracking in a real scene according to an embodiment DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail by specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0030] Optical communication devices are also called optical tags, and the two terms can be used interchangeably in this article. Optical tags can transmit information through different light-emitting methods. They have the advantages of long recognition distance and loose visible light conditions. In addition, the information transmitted by optical tags can change over time, thus providing large information capacity and flexible configuration capabilities. Compared with traditional QR codes, optical tags have a longer recognition distance and stronger information interaction capabilities, thus providing great convenience for users.
[0031] An optical tag generally includes a controller and at least one light source. The controller can drive the light source through different driving modes to transmit different information to the outside. Figure 1An exemplary optical tag 100 is shown, which includes three light sources (a first light source 101, a second light source 102, and a third light source 103). The optical tag 100 also includes a controller (in Figure 1 The controller may be used to select a corresponding driving mode for each light source according to the information to be transmitted. For example, in different driving modes, the controller may use different driving signals to control the light emission mode of the light source, so that when the light tag 100 is photographed using a device with an imaging function, the image of the light source therein may present a different appearance (e.g., different colors, patterns, brightness, etc.). By analyzing the imaging of the light sources in the light tag 100, the driving mode of each light source at the moment can be parsed, thereby parsing the information transmitted by the light tag 100 at the moment.
[0032] In order to provide corresponding services to users based on light tags, each light tag can be assigned an identification information (ID), which is used by the manufacturer, manager or user of the light tag to uniquely identify or identify the light tag. Generally, the controller in the light tag can drive the light source to transmit the identification information to the outside, and the user can use the device to capture the image of the light tag to obtain the identification information transmitted by the light tag, so that the corresponding service can be accessed based on the identification information, for example, accessing the web page associated with the identification information of the light tag, obtaining other information associated with the identification information (for example, the location information of the light tag corresponding to the identification information), etc. The device mentioned in this article can be, for example, a device carried or controlled by the user (for example, a mobile phone with a camera, a tablet computer, smart glasses, AR glasses, a smart helmet, a smart watch, etc.), or a machine that can move autonomously (for example, a drone, an unmanned car, a robot, etc.). The device can capture the image of the light tag through the camera on it to obtain an image containing the light tag, and identify the information transmitted by the light tag by analyzing the imaging of the light tag (or each light source in the light tag) in the image.
[0033] The identification information (ID) and other information of each light tag can be saved on the server, such as service information related to the light tag, descriptive information or attributes related to the light tag, such as the location information, model information, physical size information, physical shape information, posture or orientation information of the light tag, etc. The light tag can also have unified or default physical size information and physical shape information, etc. The device can use the identification information of the identified light tag to query and obtain other information related to the light tag from the server. The location information of the light tag can refer to the actual location of the light tag in the physical world, which can be indicated by geographic coordinate information. The server can be a software program running on a computing device, a computing device, or a cluster composed of multiple computing devices. The light tag can be offline, that is, the light tag does not need to communicate with the server. Of course, it can be understood that online light tags that can communicate with the server are also feasible. Figure 2 A real scene for target recognition and tracking according to an embodiment is shown, including a system for target recognition and tracking. The system includes a camera, an optical tag, and a server ( Figure 2 ), wherein the camera and the light tag are each installed in a real scene at a specific position and posture (hereinafter collectively referred to as "posture").
[0034] In one embodiment, the server can obtain the pose information of the camera and the light tag, and can obtain the relative pose information between the camera and the light tag based on the pose information of the camera and the light tag. In one embodiment, the server can also directly obtain the relative pose information between the camera and the light tag. In this way, the server can obtain the transformation matrix between the camera coordinate system and the light tag coordinate system, and the transformation matrix can include, for example, the rotation matrix R and the displacement vector t between the two coordinate systems. Through the transformation matrix between the camera coordinate system and the light tag coordinate system, the coordinates in one coordinate system can be converted into coordinates in another coordinate system. In one embodiment, when the camera and the light tag are installed, the pose information of both can be manually calibrated, and the pose information can be stored in the server. The camera can be a camera installed in a fixed position and with a fixed orientation, but it can be understood that the camera can also be a movable camera (for example, it can change position or adjust direction), as long as its current pose information can be determined. The current pose information of the camera can be set by the server, and the movement of the camera can be controlled based on the pose information, or the camera itself or other devices can be used to control the movement of the camera, and the current pose information of the camera can be sent to the server. In some embodiments, more than one camera may be included in the system, and more than one light tag may be included.
[0035] In one embodiment, a scene coordinate system (which may also be referred to as a real-world coordinate system) may be established for a real scene, and a transformation matrix between the camera coordinate system and the scene coordinate system may be determined based on the position information of the camera in the real scene, and a transformation matrix between the light tag coordinate system and the scene coordinate system may be determined based on the position information of the light tag in the real scene. In this case, the coordinates in the camera coordinate system or the light tag coordinate system may be converted to the coordinates in the scene coordinate system without transforming between the camera coordinate system and the light tag coordinate system, but it is understood that the relative position information or transformation matrix between the camera and the light tag can still be known.
[0036] The camera is used to track a target in a real scene, which can be stationary or moving, and can be, for example, a person, a stationary object, a movable object, etc. Figure 2 In the scene shown, the system can track the positions of multiple targets therein by using a camera. The camera can be, for example, a monocular camera, a binocular camera, or other forms of cameras. The camera can be used to track the positions of people or objects in real scenes by various methods in the prior art. For example, in the case of using a single monocular camera, the position information of the target in the scene can be determined in combination with scene information (for example, information about the plane on which the person or object in the scene is located). In the case of using a binocular camera, the position information of the target can be determined based on the position of the target in the camera's field of view and the depth information of the target. In the case of using multiple cameras, the position information of the target can be determined based on the position of the target in the field of view of each camera.
[0037] In one embodiment, the process of determining the position information of the target in the scene can be performed by the camera, and the corresponding result can be sent to the server. In another embodiment, the position information of the target in the scene can be determined by the server based on the image captured by the camera. The server can convert the determined position information of the target into position information in the light tag coordinate system or the scene coordinate system.
[0038] A person in the scene who carries a device (for example, a mobile phone with a camera or AR glasses) can use the device to scan the light tag to determine its location information, and send the location information to the server through the device. The devices in the scene (for example, drones, unmanned vehicles, robots, etc.) can also use the camera installed on them to scan the light tag to determine their location information, and send the location information to the server. The above location information can, for example, be the location information of the device relative to the light tag. The device can also send attribute information of the device to the server, which can, for example, include any information related to the device or its user.
[0039] After the server obtains the target location information and the device location information, it can compare the device location information with the location information of each target in the scene, and determine the target that matches the device, and then set the relevant information of the target according to the device's attribute information to achieve target recognition.
[0040] Take the airport hall as an example. There are multiple cameras and light tags installed in the airport hall, and the relative position information between each camera and light tag is known. Airport staff can observe all passengers and their location information in the airport hall through the camera, but cannot identify the passengers, that is, they cannot obtain the passengers' personal information (such as name, nationality, ID number, flight number, etc.). When the passenger scans the light tag in the airport hall with the device he carries (such as a mobile phone, smart glasses, etc.) in exchange for an electronic registration card or go through other procedures, the server obtains information from the passenger's device, including the location information of the device and the attribute information of the device (which may include information related to the passenger). The specific passenger using the device is determined by comparing the location information of the device with the location information of all passengers collected by the camera, and the identity of the passenger is calibrated based on the personal information related to the passenger in the device to achieve passenger identity recognition.
[0041] Taking the hospital as an example, multiple cameras and light tags can be installed in the outpatient department or inpatient department of the hospital, and the relative position information between each camera and light tag is known. Medical staff can observe patients and their location information through the camera, but cannot determine the patient's identity, symptoms, outpatient clinic or ward, guardian or contact information, etc. When the patient scans the light tag in the hospital with the device he carries to register, pay or perform other operations, the server can obtain information from the patient's device, including the location information of the device and the attribute information of the device (which may also include information related to the patient). The specific patient using the device is determined by comparing the location information of the device with the location information of all patients collected by the camera, and the patient's identity is calibrated based on the patient information in the device, thereby achieving accurate identification of the patient's identity.
[0042] Figure 3 A method for target recognition and tracking in a real scene according to an embodiment is shown, the method comprising the following steps:
[0043] Step 310: Track one or more targets in a real scene through a camera.
[0044] By using one or more cameras to continuously capture images of real scenes, it is possible to visually track targets in real scenes. Camera-based visual tracking technology involves detecting, extracting, identifying or tracking targets in image sequences to obtain the position, posture, speed, acceleration or motion trajectory of the target. Visual tracking technology belongs to the prior art in this field and will not be described in detail here.
[0045] In one embodiment, when tracking a target, the camera may only perform continuous image acquisition and provide the acquired images as tracking results to the server, after which the server may analyze the images and determine the location information of each target. In another embodiment, the camera may further perform processing on the acquired images, such as image processing, target detection, target extraction, target recognition, determining the target position or posture, etc., and the corresponding processing results may be provided to the server as tracking results.
[0046] Step 320: Obtain position information of one or more targets in the scene according to the tracking result of the camera.
[0047] The server can receive the tracking result from the camera, and obtain the position information of the target in the real scene according to the tracking result. In one embodiment, the target position information finally obtained by the server can be the position information of the target in the camera coordinate system, the position information of the target in the light tag coordinate system, or the position information of the target in the scene coordinate system. The server can realize the conversion of the target position between different coordinate systems according to the transformation matrix between different coordinate systems. For example, the server can first obtain the position information of the target relative to the camera according to the tracking result of the camera (that is, the position information in the camera coordinate system), and then determine the position information of the target relative to the light tag according to the position information of the target relative to the camera and the relative posture information between the camera and the light tag (that is, the position information in the light tag coordinate system), or determine the position information of the target in the real scene according to the position information of the target relative to the camera and the posture information of the camera in the real scene (that is, the position information in the scene coordinate system).
[0048] In one embodiment, in addition to obtaining the location information of the target, the server may also obtain the posture information of the target, such as the orientation of a person or an object, according to the tracking result of the camera.
[0049] Step 330: The server obtains information from the first device, and determines attribute information of the first device and location information of the first device based on the information from the first device, wherein the location information of the first device is obtained at least in part based on location information of the first device relative to the optical tag.
[0050] The information from the first device may include attribute information of the first device, location information of the first device, and other information. The first device may identify the information transmitted by the optical tag by scanning the optical tag, and access the server based on the information to transmit the attribute information and location information of the first device to the server.
[0051] In one embodiment, the attribute information of the first device may include information related to the device, such as the device name, identification number, etc. In one embodiment, the attribute information of the first device may also include information related to the user using the device, such as the name, occupation, identity, gender, age of the device owner, account information of an application on the device, or information related to an operation performed by the user using the device (such as exchanging a boarding pass by scanning an optical tag in an airport scenario, or registering for an outpatient appointment or paying a fee by scanning an optical tag in a hospital scenario, etc.). In one embodiment, the attribute information of the first device also includes user-defined information, such as the user's nickname, avatar, signature, and other personalized settings.
[0052] The location information of the first device may be the location information of the first device relative to the light tag, or the location information of the first device in the real scene. In one embodiment, the server may extract the location information of the first device relative to the light tag from the information from the first device. In one embodiment, the server may obtain the location information of the first device relative to the light tag by analyzing the information from the first device. For example, the information from the first device may include an image containing the light tag taken by the first device, and the server may obtain the location information of the first device relative to the light tag by analyzing the image. In one embodiment, the server may obtain the location information of the first device in the real scene based on the location information relative to the light tag transmitted by the first device and the location information of the light tag itself. In one embodiment, the location information transmitted by the first device to the server may be obtained based on the location information relative to the light tag and the location information of the light tag itself, and the location information of the light tag itself may be obtained from the server. In one embodiment, the location information transmitted by the first device to the server may also be the new location information obtained by measuring or tracking the first device after scanning the light tag using a built-in accelerometer, gyroscope, camera, etc. through methods known in the art (e.g., inertial navigation, visual odometer, SLAM, VSLAM, SFM, etc.).
[0053] The device can determine its position information relative to the light tag by collecting an image including the light tag and analyzing the image. For example, the device can determine the relative distance between the light tag and the device (the larger the image, the closer the distance; the smaller the image, the farther the distance) by the image size of the light tag in the image and other optional information (for example, the actual physical size information of the light tag, the focal length of the camera of the device). The device can obtain the actual physical size information of the light tag from the server using the identification information of the light tag, or the light tag can have a uniform physical size and store the physical size on the device. The device can determine the direction information of the device relative to the light tag by the perspective deformation of the light tag imaging in the image including the light tag and other optional information (for example, the imaging position of the light tag). The device can obtain the physical shape information of the light tag from the server using the identification information of the light tag, or the light tag can have a uniform physical shape and store the physical shape on the device. In one embodiment, the device can also directly obtain the relative distance between the light tag and the device through a depth camera or a binocular camera installed thereon. The device can also use any other existing positioning method to determine its position information relative to the light tag. In one embodiment, the device can scan the light tag, and can determine its posture information relative to the light tag based on the imaging of the light tag. When the imaging position or imaging area of the light tag is located at the center of the imaging field of view of the second device, it can be considered that the second device is currently facing the light tag. The imaging direction of the light tag can be further considered when determining the posture of the device. As the posture of the device changes, the imaging position and / or imaging direction of the light tag on the device will change accordingly. Therefore, the posture information of the device relative to the light tag can be obtained based on the imaging of the light tag on the device. In one embodiment, the position and posture information of the device relative to the light tag can also be determined in the following manner. Specifically, a coordinate system can be established based on the light tag, which can be called the light tag coordinate system. Some points on the light tag can be determined as some spatial points in the light tag coordinate system, and the coordinates of these spatial points in the light tag coordinate system can be determined based on the physical size information and / or physical shape information of the light tag. Some points on the light tag can be, for example, the corners of the outer shell of the light tag, the ends of the light source in the light tag, some identification points in the light tag, and so on. According to the object structure features or geometric structure features of the light tag, the image points corresponding to these space points can be found in the image captured by the device camera, and the position of each image point in the image can be determined. According to the coordinates of each space point in the light tag coordinate system and the corresponding position of each image point in the image, combined with the internal parameter information of the device camera, the pose information (R, t) of the device camera in the light tag coordinate system when the image was captured can be calculated, where R is a rotation matrix, which can be used to represent the pose information of the device camera in the light tag coordinate system, and t is a displacement vector, which can be used to represent the position information of the device camera in the light tag coordinate system.The method of calculating R and t is known in the prior art. For example, the 3D-2D PnP (Perspective-n-Point) method can be used to calculate R and t. In order not to obscure the present invention, it will not be described in detail here.
[0054] Step 340: The server compares the location information of the first device with the location information of one or more targets in the real scene to determine the targets that match the first device.
[0055] For example, the server may select one of the location information of one or more targets collected by the camera that is closest to the location information of the first device, and consider that the target matches the first device.
[0056] Step 350: Set relevant information of the target that matches the first device according to the attribute information of the first device.
[0057] After determining the target that matches the first device, the server can, for example, add the attribute information of the first device to the relevant information of the target, or can modify the relevant information of the target according to the attribute information of the first device, etc., thereby realizing the identification of the target. In one embodiment, the attribute information of the first device may include information related to the device, such as the device name, identification number, etc. In one embodiment, the attribute information of the first device may also include relevant information of the user associated with the device, such as the name, occupation, identity, gender, age of the device owner, account information of an application on the device, or information related to an operation performed by the user using the device, such as the time of scanning and identifying the light tag, etc. In one embodiment, the attribute information of the first device also includes user-defined information, such as the user's nickname, avatar, signature and other personalized settings. Taking the airport hall mentioned above as an example, the attribute information from the passenger device may include, for example, the passenger's name, nationality, ID number, departure place, arrival place, airline, flight number, membership level, etc. After the server obtains the attribute information from the passenger device, it can set the relevant information of the passenger according to the attribute information.
[0058] In another embodiment of the present invention, after realizing target recognition based on the above method, the server can also set identification information (e.g., icon, text, number, etc.) associated with the target according to the relevant information of the target, and present the identification information near the target in the image captured by the camera, and the identification information can move with the target. Through the image captured by the camera, not only can each target in the real scene be tracked, but also the relevant information of each target can be presented. Figure 4 A schematic diagram of a method for target recognition and tracking according to an embodiment of the present invention is shown. Figure 4As shown, taking the airport hall mentioned above as an example, the identification information of the passenger (such as VIP passengers and ordinary passengers) is set according to the relevant information of the passenger and presented in the image captured by the camera, so that airport staff can easily observe the relevant information of each passenger in the airport hall, thereby greatly improving the airport's security, management, services, etc.
[0059] In another embodiment of the present invention, after target recognition is achieved based on the above method, the server can also set a virtual object associated with the target based on the relevant information of the target, wherein the virtual object has spatial position information, and the spatial position information is determined by the position information of the target; the server can send the relevant information of the virtual object to the second device, so that it can be used by the second device to present the virtual object on its display medium based on its position information and posture information.
[0060] Figure 5 A method for target recognition and tracking in a real scene according to an embodiment is shown. The method can further set a virtual object for a target matching with a first device and can be presented on a second device. Steps 510-550 are similar to Figure 3 Steps 310-350 are similar and will not be described again here. Figure 5 The method further comprises the steps of:
[0061] Step 560: The server sets a virtual object associated with the target based on the relevant information of the target matched with the first device, and the spatial position information of the virtual object is determined according to the position information of the target.
[0062] After obtaining the relevant information of the target matched with the first device, the server can, for example, set the virtual object associated with it based on the relevant information of the target, for example, set the relevant information of the virtual object. The relevant information of the virtual object is information used to describe the virtual object, for example, it can include pictures, text, numbers, icons, etc. contained in the virtual object, and can also include shape information, color information, size information, posture information, etc. of the virtual object. In one embodiment, the relevant information of the virtual object can include information related to the target device, for example, the device name, identification number, etc. In one embodiment, the relevant information of the virtual object can also include relevant information about the target, such as the name, occupation, identity, gender, age, account information of a certain application of the target, or information related to a certain operation performed by the target using the device, such as the time of scanning and identifying the light tag, etc. Taking the airport hall mentioned above as an example, the relevant information from the virtual object associated with the passenger can, for example, include the passenger's name, nationality, certificate number, departure place, arrival place, airline, flight number, membership level, etc. Based on this information, the device can present the corresponding virtual object. The server can configure the relevant information of the virtual object corresponding to the target according to the information related to the target, so that the corresponding virtual object can be customized for each target.
[0063] The relevant information of the virtual object may also include the spatial position information of the virtual object. The server may determine the spatial position information of its virtual object based on the position information of the target. For example, the spatial position of the virtual object may be configured to be located at a predetermined distance above the target position. The spatial position information of the virtual object may be, for example, its spatial position information relative to the light tag, or its position information in the scene coordinate system.
[0064] In one embodiment, the server may also set the posture information of the virtual object, and the posture information may be the posture information of the virtual object relative to the light tag, or the posture information of the virtual object in the real world coordinate system.
[0065] Step 570: Send relevant information of the virtual object to the second device, where the relevant information of the virtual object can be used by the second device to present the virtual object on its display medium based on its position information and posture information.
[0066] The server can send the relevant information of the virtual object to the second device in a variety of ways. In one embodiment, the server can directly send the information related to the virtual object to the second device, for example, via a wireless link. In one embodiment, the optical tag recognition device can identify the information (such as identification information) transmitted by the optical tag by scanning the optical tags arranged in the scene, and use the information to access the server (for example, access via a wireless signal) to obtain the relevant information of the virtual object from the server. In one embodiment, the server can use the optical tag to send the relevant information of the virtual object to the optical tag recognition device in an optical communication manner.
[0067] The information related to the virtual object can be used by the optical tag recognition device to present the virtual object on its display medium based on its position information and posture information.
[0068] Figure 6 FIG. 2 is a schematic diagram showing a second device presenting a virtual object in a target recognition and tracking method according to an embodiment of the present invention. Figure 6 As shown, taking the airport hall mentioned above as an example, after the server obtains the relevant information of the passenger, it can set a virtual object "VIP" associated with the passenger based on the relevant information of the passenger (such as VIP passengers and ordinary passengers), and send it to the second device that scans and identifies the light tag, so that it can be used by the second device to present the virtual object "VIP" on its display medium based on its position information and posture information.
[0069] As mentioned above, the device can determine its position information and attitude information through the light tag. The position information and attitude information of the device can be the position information and attitude information obtained by the device when scanning the light tag, or it can be the new position information and attitude information obtained by the device after scanning the light tag by using the built-in acceleration sensor, gyroscope, camera, etc. through methods known in the art (for example, inertial navigation, visual odometer, SLAM, VSLAM, SFM, etc.) to measure or track.
[0070] In one embodiment, as the target moves, the spatial position information of the virtual object may be updated based on the new position information of the target obtained by the camera and sent to the second device.
[0071] In the case where the virtual object has posture information, the posture of the virtual object can be adjusted with the position and / or posture of the device relative to the virtual object, for example, so that a certain orientation of the virtual object (for example, the front direction of the virtual object) is always facing the device. In one embodiment, a direction from the virtual object to the device can be determined in space based on the positions of the device and the virtual object, and the posture of the virtual object is determined based on the direction. Through the above method, the same virtual object can actually have different postures for devices at different positions.
[0072] In one embodiment of the present invention, the present invention may be implemented in the form of a computer program. The computer program may be stored in various storage media (e.g., a hard disk, an optical disk, a flash memory, etc.), and when the computer program is executed by a processor, it can be used to implement the method of the present invention.
[0073] In another embodiment of the present invention, the present invention may be implemented in the form of an electronic device. The electronic device includes a processor and a memory, in which a computer program is stored. When the computer program is executed by the processor, the method of the present invention can be implemented.
[0074] References herein to "various embodiments", "some embodiments", "one embodiment", or "an embodiment", etc. refer to that a particular feature, structure, or property described in conjunction with the embodiment is included in at least one embodiment. Therefore, the phrases "in various embodiments", "in some embodiments", "in one embodiment", or "in an embodiment", etc., appearing throughout this document, do not necessarily refer to the same embodiment. In addition, particular features, structures, or properties may be combined in any suitable manner in one or more embodiments. Therefore, a particular feature, structure, or property shown or described in conjunction with an embodiment may be combined in whole or in part with features, structures, or properties of one or more other embodiments without restriction, as long as the combination is not illogical or inoperable. Expressions similar to "according to A", "based on A", "through A", or "using A" appearing herein are intended to be non-exclusive, that is, "according to A" may cover "according only to A" or "according to A and B", unless otherwise stated or it is clear from the context that its meaning is "according only to A". In the present application, some exemplary operation steps are described in a certain order for the sake of clarity, but those skilled in the art will appreciate that each of these operation steps is not essential, and some of the steps may be omitted or replaced by other steps. These operation steps also do not have to be performed sequentially in the manner shown, on the contrary, some of these operation steps may be performed in different orders or in parallel according to actual needs, as long as the new execution method is not illogical or inoperable.
[0075] Having thus described several aspects of at least one embodiment of the present invention, it will be appreciated that various changes, modifications and improvements will readily occur to those skilled in the art. Such changes, modifications and improvements are intended to be within the spirit and scope of the present invention. Although the present invention has been described by preferred embodiments, the present invention is not limited to the embodiments described herein, and also includes various changes and variations made without departing from the scope of the present invention.
Claims
1. A method for target recognition and tracking in real-world scenarios, wherein: A camera and an optical communication device are installed in the real scene, and the camera and the optical communication device have a relative posture. The method includes: Tracking one or more targets in the real scene by using the camera; Obtaining location information of the one or more targets according to the tracking result of the camera; The server obtains information from a first device, and determines attribute information of the first device and location information of the first device according to the information from the first device, wherein the location information of the first device is obtained at least in part based on location information of the first device relative to the optical communication device; The server compares the location information of the first device with the location information of the one or more targets to determine a target matching the first device; Setting relevant information of a target matching the first device according to the attribute information of the first device, The attribute information of the first device includes information related to a user of the first device. The first device determines its position information relative to the optical communication device at least in part by collecting an image including the optical communication device and analyzing the image, The method further comprises: Setting a virtual object associated with the target based on the relevant information of the target, wherein the spatial position information of the virtual object is determined according to the position information of the target; sending the relevant information of the virtual object to a second device, wherein the relevant information of the virtual object can be used by the second device to present the virtual object on its display medium based on its position information and posture information, The spatial position information of the virtual object is updated as the position information of the target changes, and is sent to the second device.
2. The method according to claim 1, wherein: The obtaining the location information of the one or more targets according to the tracking result of the camera includes: obtaining position information of the one or more targets relative to the camera according to the tracking result of the camera, and The position information of the one or more targets relative to the optical communication device is determined according to the position information of the one or more targets relative to the camera and the relative posture information between the camera and the optical communication device.
3. The method according to claim 1, wherein: The obtaining the location information of the one or more targets according to the tracking result of the camera includes: obtaining position information of the one or more targets relative to the camera according to the tracking result of the camera, and The position information of the one or more targets in the real scene is determined according to the position information of the one or more targets relative to the camera and the posture information of the camera in the real scene.
4. The method according to claim 1, further comprising: Identification information associated with the target is set based on the relevant information of the target, and the identification information is presented near the target in the image captured by the camera.
5. The method according to claim 1, further comprising: Obtaining posture information of the target according to the tracking result of the camera; as well as The posture information of the virtual object is set according to the posture information of the target.
6. The method according to claim 1, wherein: The posture of the virtual object can be adjusted according to a change in the position and / or posture of the second device relative to the virtual object.
7. The method according to claim 6, wherein: A certain orientation of the virtual object is always toward the second device.
8. A system for target recognition and tracking in real-world scenarios, comprising: One or more cameras installed in the real scene, which are used to track one or more targets in the real scene; One or more optical communication devices installed in the real scene, wherein the optical communication device and the camera have a relative posture; as well as A server, configured to implement the method according to any one of claims 1 to 7.
9. A storage medium storing a computer program, wherein when the computer program is executed by a processor, the computer program can be used to implement the method according to any one of claims 1 to 7.
10. An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it can be used to implement the method according to any one of claims 1 to 7.
