[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2022011517A1 - Infrared positioning method, infrared positioning apparatus, and infrared positioning system - Google Patents

Infrared positioning method, infrared positioning apparatus, and infrared positioning system Download PDF

Info

Publication number
WO2022011517A1
WO2022011517A1 PCT/CN2020/101725 CN2020101725W WO2022011517A1 WO 2022011517 A1 WO2022011517 A1 WO 2022011517A1 CN 2020101725 W CN2020101725 W CN 2020101725W WO 2022011517 A1 WO2022011517 A1 WO 2022011517A1
Authority
WO
WIPO (PCT)
Prior art keywords
infrared
points
isosceles triangle
image
object image
Prior art date
Application number
PCT/CN2020/101725
Other languages
French (fr)
Chinese (zh)
Inventor
冯涛
宋来喜
余扬
Original Assignee
深圳盈天下视觉科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳盈天下视觉科技有限公司 filed Critical 深圳盈天下视觉科技有限公司
Priority to CN202080001234.1A priority Critical patent/CN112136158B/en
Priority to PCT/CN2020/101725 priority patent/WO2022011517A1/en
Publication of WO2022011517A1 publication Critical patent/WO2022011517A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Definitions

  • the application belongs to the technical field of virtual reality and positioning, and in particular relates to an infrared positioning method, an infrared positioning device and an infrared positioning system.
  • Virtual Reality (VR) technology is a computer simulation system that can create and experience virtual worlds. It uses computers to generate a virtual environment, and the virtual environment provides users with a three-dimensional dynamic vision of multi-source information fusion and interaction. Immerse the user in this virtual environment.
  • virtual reality applications have also been widely used. For example, obtaining the position of the car in real time in simulated virtual driving, or obtaining the heat map of the position of the human body in the exhibition hall, or obtaining the relative position of the physical object in an interactive game, in these virtual reality applications, it is necessary to locate according to the real position of the object. A virtual system is developed to match this real location.
  • Some existing positioning methods applied to virtual reality can only locate and identify objects, but cannot determine the direction of movement of objects, which is difficult to meet the immersion and interaction needs of users in virtual reality applications.
  • One of the purposes of the embodiments of the present application is to provide an infrared positioning method, infrared positioning and infrared positioning system, which can accurately locate and obtain the moving direction of an object in a virtual reality application, so as to satisfy the user's immersion in the virtual reality application. sense and interaction needs.
  • an infrared positioning method includes:
  • the infrared point identification processing is performed on the object to be located based on the object image, and infrared point information corresponding to the object to be located is obtained, wherein the infrared point information includes coordinate data of three infrared points, and After the step of distributing the three infrared points in an isosceles triangle, it includes:
  • the position of the center of gravity of the isosceles triangle is calculated according to the principle of triangle geometry, and the position of the center of gravity of the isosceles triangle is determined as the position of the object to be positioned.
  • the infrared point identification processing is performed on the object to be located based on the object image, and infrared point information corresponding to the object to be located is obtained, wherein the infrared point information includes coordinate data of three infrared points, and
  • the steps that the three infrared points are distributed in an isosceles triangle include:
  • the coordinate data of the three infrared points are acquired.
  • the method includes:
  • the camera image opened through the CCV computer vision library is angled according to the preset adjustment rule Adjust, and re-acquire the second object image based on the adjusted camera image;
  • the coordinate data of the three infrared points are acquired.
  • the method includes:
  • three infrared points distributed in an isosceles triangle are selected from all infrared points identified from the first object image , and obtain the coordinate data of the three infrared points.
  • an infrared positioning device in a second aspect, and the infrared positioning device includes:
  • the acquisition module is configured to perform infrared point identification processing on the object to be located based on the object image, and acquire infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, and the three The infrared points are distributed in an isosceles triangle;
  • the generating module is used to identify the vertex and base midpoint of the isosceles triangle according to the coordinate data of the three infrared points, and generate a direction vector pointing to the vertex according to the vertex and base midpoint of the isosceles triangle , the direction vector represents the movement direction of the object to be positioned;
  • the calculation module is configured to calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle.
  • an infrared positioning system is provided.
  • the infrared positioning system is used to implement the steps of the infrared positioning method according to any one of the above-mentioned first aspects, and includes a camera end, a detection end and a positioning calculation end, wherein:
  • the camera terminal is used to capture an image of the object to be positioned and obtain infrared point information from the image, wherein the infrared point information contains coordinate data of the infrared point;
  • the detection end is configured to receive the infrared point information obtained by the camera end, and identify three infrared points corresponding to the object to be located from the obtained infrared point information, wherein the three infrared points are Isosceles triangle distribution;
  • the positioning calculation terminal is used to combine the coordinate point data of three infrared points distributed in an isosceles triangle, determine the position of the object to be located in the virtual reality environment by calculating the position of the center of gravity of the isosceles triangle, and characterize the undetermined by calculation.
  • the vector angle between the direction vector of the moving direction of the object and the preset coordinate system of the virtual environment determines the moving direction of the object to be positioned in the virtual reality environment, wherein the direction vector representing the moving direction of the object to be positioned is determined by etc.
  • the midpoint of the base of the waist triangle points to the vertex of the isosceles triangle.
  • the positioning computing terminal may also be used to perform verification processing on the position and movement direction of the object to be positioned in the virtual reality determined by calculation, and if the verification result fails, the The verification result is fed back to the detection terminal and triggers the detection terminal to re-identify the three infrared points corresponding to the object to be located from the acquired infrared point information, so that the positioning calculation terminal can recalculate the to-be-determined object. position and movement direction of the object in virtual reality until the verification result is passed.
  • the positioning calculation terminal adopts the working mode of a queue to perform positioning calculation, by acquiring multiple sets of infrared point data in real time and performing the calculation on the object to be located determined by the calculation according to the multiple sets of infrared point data.
  • Verification processing is performed on the position and movement direction in virtual reality, wherein each group of infrared point data includes coordinate data of three infrared points distributed in an isosceles triangle, and the verification processing includes performing a verification process on the multiple groups of infrared point data.
  • the detection end regularly receives the infrared point information obtained by the camera end through a preset data template, wherein the data type in the preset data module is configured as a list data type.
  • an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the first method when the processor executes the computer program The steps of the infrared positioning method described in the aspect.
  • a fifth aspect provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the infrared positioning method according to any one of the first aspect .
  • the embodiment of the present application has the beneficial effect that: by carrying infrared lamps distributed in an isosceles triangle on the object, the infrared point identification processing of the object to be located is performed based on the image of the object, and the three infrared lamps corresponding to the three infrared lamps are identified. The position of the three infrared points distributed in an isosceles triangle in the image, and the coordinate data of the three infrared points is obtained according to the position.
  • the vertices and the midpoints of the bases of the isosceles triangle are identified, and the direction vectors pointing to the vertices are generated according to the vertices and the midpoints of the bases of the isosceles triangles.
  • the current movement direction of the object to be positioned is determined by the vector angle.
  • the motion direction of the object to be positioned is determined in the virtual reality application, so that the user can still identify the direction when immersed in the virtual environment, which enhances the user's sense of immersion in the virtual environment, and by identifying the direction in the virtual environment It can also realize the interaction between people and people and between people and things in the virtual environment, so as to meet the interaction needs of users in the virtual environment.
  • FIG. 1 is a schematic flowchart of a basic method of an infrared positioning method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for obtaining infrared point information corresponding to an object in the infrared positioning method provided by the embodiment of the present application;
  • FIG. 3 is a schematic flowchart of another method for obtaining infrared point information corresponding to an object in the infrared positioning method provided by the embodiment of the present application;
  • FIG. 4 is a schematic structural diagram of an infrared positioning device according to an embodiment of the present application.
  • FIG. 5 is a basic schematic block diagram of an infrared positioning system provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an electronic device implementing an infrared positioning method according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a basic method of an infrared positioning method provided by an embodiment of the present application. Details are as follows:
  • step S101 infrared point identification processing is performed on the object to be located based on the object image, and infrared point information corresponding to the object to be located is obtained, wherein the infrared point information includes coordinate data of three infrared points, and the three The infrared points are distributed in an isosceles triangle.
  • the object to be positioned is a VR (Virtual Reality, virtual reality) device used in a virtual reality application, such as VR glasses, a VR helmet, and the like.
  • VR Virtual Reality, virtual reality
  • Three infrared lamps are mounted on the object to be positioned, and when the infrared lamps are mounted, the three infrared lamps are distributed in an isosceles triangle.
  • an image of the object to be positioned can be captured by a camera, and then infrared point recognition processing of the object to be positioned based on the image is performed, for example, by configuring an infrared filter on the camera end , filter the image captured by the camera to identify the positions of the three infrared lights mounted on the object to be positioned corresponding to the three infrared points in the image, and the combination of the positions of the three infrared points is distributed in an isosceles triangle.
  • the coordinate data of the three infrared points can be acquired based on the positions of the three infrared points in combination with the coordinate system preset in the virtual environment.
  • step S102 the vertex and the midpoint of the base of the isosceles triangle are identified, and a direction vector pointing to the vertex is generated according to the vertex of the isosceles triangle and the midpoint of the base, and the direction vector represents the object to be positioned. direction of movement;
  • the isosceles triangle can be obtained by identifying the length of each side of the isosceles triangle After identifying the long side of the isosceles triangle, the length of the long side is divided into two equal parts, and the point corresponding to the division of the two equal parts is the midpoint of the base of the isosceles triangle.
  • step S103 the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment is calculated, and the movement direction of the object to be positioned in the virtual environment is determined according to the vector angle.
  • the preset coordinate system of the virtual environment is a two-dimensional coordinate system set in the virtual reality application based on the top view of the camera, and the two-dimensional coordinate system and the direction vector of the object are located on the same plane.
  • the origin of the two-dimensional coordinate system can be specified in the virtual environment constructed by the virtual reality application according to the calculation requirements, and the specified principle is for the convenience of calculation.
  • the X-axis direction and the Y-axis direction of the two-dimensional coordinate system can be determined according to the four directions of east, west, northwest, for example, the east direction is the positive direction of the X axis, and the north direction is the positive direction of the Y axis.
  • the moving direction of the object to be positioned in the virtual environment can be determined.
  • the moving direction of the object when determining the moving direction of the object to be positioned in the virtual environment by calculating the vector angle between the direction vector of the object to be positioned and the positive direction of the X-axis in the two-dimensional coordinate system, the moving direction of the object can be preset.
  • the determination rule is: for the vector angle between the direction vector of the object and the positive direction of the X axis in the two-dimensional coordinate system, in the counterclockwise direction, the object is determined when the angle is in the interval of 0° ⁇ vector angle ⁇ 90°
  • the direction of movement is east-north + vector angle; when the angle is 90° ⁇ vector angle ⁇ 180°, the motion direction of the object is determined to be north-west + (vector angle -90°); the angle is 180° ⁇ vector
  • the angle is less than 270°
  • the moving direction of the object is determined to be west by south + (vector angle -180°); when the angle is within the range of 270° ⁇ vector angle ⁇ 360°, the object movement direction is south by east + (vector angle included angle -270°).
  • the vector angle between the direction vector of the object to be positioned and the positive direction of the X-axis in the two-dimensional coordinate system is calculated to be 30°, then it can be determined that the movement direction of the object to be positioned is eastward. 30° north direction.
  • the moving direction of the object to be positioned in the virtual environment or the direction of the object to be positioned is determined by calculating the vector angle between the direction vector of the object to be positioned and the positive direction of the Y-axis in the two-dimensional coordinate system.
  • the vector angle between the vector and the positive direction of the X-axis in the two-dimensional coordinate system and the vector angle between the direction vector of the object to be positioned and the positive direction of the Y-axis in the two-dimensional coordinate system determine the object to be positioned
  • the determination rule for the movement direction of the object to be positioned can be preset, and then the movement direction of the object to be positioned in the virtual environment is determined based on the determination rule.
  • the setting of the determination rule of the movement direction is similar to the above example, and will not be repeated here.
  • the infrared lamps distributed in an isosceles triangle are mounted on the object, and infrared point recognition processing is performed on the object to be located based on the image of the object, and three infrared lamps are identified corresponding to the isosceles triangle distribution in the image. position of the three infrared points, and obtain the coordinate data of the three infrared points according to the position.
  • the vertices and the midpoints of the bases of the isosceles triangle are identified, and the direction vectors pointing to the vertices are generated according to the vertices and the midpoints of the bases of the isosceles triangles.
  • the current movement direction of the object to be positioned is determined by the vector angle.
  • the motion direction of the object to be positioned is determined in the virtual reality application, so that the user can still identify the direction when immersed in the virtual environment, which enhances the user's sense of immersion in the virtual environment, and by identifying the direction in the virtual environment It can also realize the interaction between people and people and between people and things in the virtual environment, so as to meet the interaction needs of users in the virtual environment.
  • the position of the center of gravity of the isosceles triangle can be calculated according to the principle of triangle geometry in combination with the coordinate data of the three infrared points, thereby The position of the center of gravity of the isosceles triangle is determined as the position of the object to be positioned. Specifically, according to the principle of triangle geometry, the intersection of the midlines of each side is the center of gravity of an isosceles triangle.
  • FIG. 2 is a schematic flowchart of a method for acquiring infrared point information corresponding to an object in the infrared positioning method provided by the embodiments of the present application. Details are as follows:
  • step S201 the camera picture is opened through the CCV computer vision library, and the first object image containing the object to be positioned is obtained from the picture captured by the camera;
  • step S202 infrared point identification processing is performed on the first object image, and all infrared points in the first object image are identified;
  • step S203 the number of all infrared points in the first object image is statistically processed to obtain the number of infrared points identified from the first object image;
  • step S204 if the number of infrared points identified from the first object image is three, verify whether the three infrared points are distributed in an isosceles triangle;
  • step S205 if the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired.
  • CCV computer vision library cached computer vision library
  • CCV computer vision library is a modern computer vision library with cache based on C language. It has a built-in cache mechanism, simple functional interface, transparent cache and image preprocessing.
  • infrared lamps are mounted on the object to be located, and then the infrared points corresponding to the object to be located in the image of the first object are obtained by means of CCV and infrared recognition, making full use of the CCV computer vision library for processing
  • CCV and infrared recognition makes full use of the CCV computer vision library for processing
  • the accuracy of the image data and at the same time, by cooperating with infrared recognition, it solves the defects of CCV being susceptible to external interference and low discrimination of designated objects.
  • other infrared points other than the infrared lamp may be generated because the first object image may be disturbed by external factors.
  • the number of infrared points identified in the object image is counted to determine whether there are and only three infrared points identified in the first object image. If the number of infrared points obtained by statistics is three, verify the Whether the three infrared points are distributed in an isosceles triangle. It should be noted that when three infrared lamps are mounted on the object to be positioned, the three infrared lamps are distributed in an isosceles triangle. Therefore, the infrared points corresponding to the three infrared lamps identified from the image of the first object should also be in the form of an isosceles triangle. Isosceles triangle distribution.
  • the three infrared points in the first object image is three, it is further verified whether the three infrared points are three infrared points corresponding to the three infrared lamps mounted on the object to be positioned. Specifically, verification can be performed according to the characteristics of an isosceles triangle. For example, the distance between the three infrared points is calculated according to the coordinate data of the three infrared points, the lengths of the three sides of the triangle are obtained, and the length of the three sides is determined.
  • the coordinate data obtained here is the coordinate data in the camera coordinate system based on the camera configuration.
  • a custom coordinate system that is convenient for calculation can also be customized in the virtual environment, and then, The obtained coordinate data in the camera coordinate system is converted into the coordinate data in the coordinate system of the custom configuration of the virtual environment by mapping in the coordinates.
  • FIG. 3 is a schematic flowchart of another method for acquiring infrared point information corresponding to an object in the infrared positioning method provided by the embodiments of the present application. Details are as follows:
  • step S301 if the number of infrared points is less than three or the number of infrared points is equal to three but is not distributed in an isosceles triangle, then according to the preset adjustment rule, the information opened by the CCV computer vision library is processed. The angle of the camera image is adjusted, and the second object image is re-acquired based on the adjusted camera image;
  • step S302 infrared point identification processing is performed on the second object image, and all infrared points in the second object image are identified;
  • step S303 the number of all infrared points in the second object image is statistically processed to obtain the number of infrared points identified from the second object image;
  • step S304 if the number of infrared points identified from the second object image is three, verify whether the three infrared points are distributed in an isosceles triangle;
  • step S305 if the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired.
  • the image captured by the camera may fail to normally capture the position where the object to be positioned is equipped with the infrared camera, which may cause the number of infrared points in the image of the first object captured by the camera to be less than three or less than the number of infrared points. Equal to three but not distributed in an isosceles triangle.
  • infrared points other than the infrared lamp are generated, and at this time, there will be a large number of infrared points identified from the first object image. in three cases.
  • all infrared points in the first object image can be identified first, and then filtered through the set filtering rules, such as the feature of an isosceles triangle (there are only two equal side), that is, by drawing a triangle for every three infrared points, based on the coordinate data of the infrared points, it is determined whether there are and only two sides of the triangle are equal, so that three infrared points distributed in an isosceles triangle can be screened out.
  • FIG. 4 is a schematic structural diagram of an infrared positioning device provided by an embodiment of the present application, and the details are as follows:
  • the infrared positioning device includes: an acquisition module 401 , a generation module 402 , and a ratio and calculation module 403 .
  • the acquisition module 401 is configured to perform infrared point identification processing on the object to be located based on the object image, and acquire infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, And the three infrared points are distributed in an isosceles triangle.
  • the generating module 402 is configured to identify the vertices and the midpoints of the bases of the isosceles triangle according to the coordinate data of the three infrared points, and generate the vertices pointing to the vertices according to the vertices and the midpoints of the bases of the isosceles triangles.
  • a direction vector where the direction vector represents the moving direction of the object to be positioned.
  • the calculation module 403 is configured to calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle.
  • the infrared positioning device corresponds to the above-mentioned infrared positioning method one by one, and details are not repeated here.
  • FIG. 5 is a basic schematic block diagram of an infrared positioning system provided by an embodiment of the present application.
  • the infrared positioning system 50 includes a camera end 51 , a detection end 52 and a positioning calculation end 53 . in:
  • the camera end 51 is used to capture an image of the object to be positioned and obtain infrared point information from the image, wherein the infrared point information contains coordinate data of the infrared point.
  • the camera end 51 uses infrared combined with the open-source CCV computer vision library to perform object recognition, making full use of the accuracy of the CCV computer vision library for processing image data, and at the same time solving the problem that CCV is susceptible to external interference by cooperating with infrared recognition. Defects with low discrimination for specified objects.
  • the camera terminal is started by connecting, and then the CCV computer vision library is used to open the camera terminal screen, and then the parameters of the CCV computer vision library are adjusted to adjust the camera terminal screen, and the object image is obtained from the camera terminal screen. the infrared point.
  • the recognition area of the object image can also be set to avoid the interference of external factors, and the infrared point information can be transmitted to the detection terminal 52 in real time.
  • the detection end 52 is configured to receive the infrared point information obtained by the camera end, and identify three infrared points corresponding to the object to be located from the obtained infrared point information, wherein the three infrared points are equal to each other. Waist triangle distribution.
  • the detection terminal 52 uses the tuio protocol to receive infrared point information from the camera terminal 51 . Specifically, after receiving the infrared point information from the camera end 51, the infrared point information is firstly counted to confirm the number of infrared points obtained from the object image.
  • the number of isosceles triangles it is determined whether the number of isosceles triangles (three) can be formed, and if so, the coordinate data of the three infrared points are sent to the positioning calculation terminal 53 for calculation. Otherwise, if the number of infrared points is more than three, it can be filtered by setting a filtering rule, for example, by drawing a triangle for every three infrared points, and based on the coordinate data of the infrared points to determine whether there are and only two sides in the triangle Therefore, three infrared points distributed in an isosceles triangle are screened out, and then the coordinate data of the three infrared points are sent to the positioning calculation terminal 53 for calculation. If the infrared points are less than three or equal to three but not distributed in an isosceles triangle, the detection operation is ended and the tuio information is monitored, waiting to receive the next infrared point information from the camera end 51 .
  • a filtering rule for example, by drawing a triangle for
  • the detection end 52 may receive infrared point information from the camera end 51 through a preset data template.
  • a data template is designed to have the function of converting standard tuio protocol data into a list data type that is easy to parse, and the data template is associated with a timer, so that the data template is based on the time interval set by the timer.
  • the timer is set to 20ms, that is, 50 sets of infrared point information are acquired per second, which realizes low data delay between the actual environment and the virtual environment, and avoids the actual environment and virtual environment data in virtual reality applications. asymmetrical problem.
  • the positioning calculation terminal 53 is used to combine the coordinate point data of the three infrared points distributed in an isosceles triangle, determine the position of the object to be positioned in the virtual reality environment by calculating the position of the center of gravity of the isosceles triangle, and characterize the position to be positioned by calculating The vector angle between the direction vector of the moving direction of the object and the preset coordinate system of the virtual environment determines the moving direction of the object to be positioned in the virtual reality environment, wherein the direction vector representing the moving direction of the object to be positioned is determined by isosceles.
  • the midpoint of the base of the triangle points to the vertex of the isosceles triangle.
  • the positioning calculation terminal 53 may also perform verification processing on the position and movement direction of the object to be positioned in the virtual reality determined by calculation. If the verification result fails, the verification result is fed back to the detection terminal 52 and Trigger the detection terminal 52 to re-identify the three infrared points corresponding to the object to be located from the acquired infrared point information, and then recalculate the position and movement direction of the object to be located in the virtual reality by the positioning calculation terminal 53, until the verification result passes until.
  • the positioning computing terminal 53 uses a queue-first-in-first-out working mode to perform data calculation, and during the calculation process, n groups of infrared point data are stored in real time, wherein each group of infrared point data contains the coordinate data of three infrared points distributed in an isosceles triangle. Then, the expected value and variance value of the n groups (for example, 10 groups) of data are calculated in real time, so as to verify the position and movement direction of the object to be located in virtual reality determined by calculation, with the help of the expected value and variance value Excluding unexpected data makes the positioning information of the object to be positioned more accurate and reliable.
  • FIG. 6 is a schematic diagram of an electronic device implementing an infrared positioning method according to an embodiment of the present application.
  • the electronic device 6 of this embodiment includes: a processor 61 , a memory 62 , and a computer program 63 stored in the memory 62 and executable on the processor 61 , such as an infrared positioning program.
  • the processor 61 executes the computer program 62, the steps in each of the foregoing infrared positioning method embodiments are implemented.
  • the processor 61 executes the computer program 63, the functions of the modules/units in the foregoing device embodiments are implemented.
  • the computer program 63 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 62 and executed by the processor 61 to complete the this application.
  • the one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 63 in the electronic device 6 .
  • the computer program 63 can be divided into:
  • the acquisition module is configured to perform infrared point identification processing on the object to be located based on the object image, and acquire infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, and the three The infrared points are distributed in an isosceles triangle;
  • the generating module is used to identify the vertex and base midpoint of the isosceles triangle according to the coordinate data of the three infrared points, and generate a direction vector pointing to the vertex according to the vertex and base midpoint of the isosceles triangle , the direction vector represents the movement direction of the object to be positioned;
  • the calculation module is configured to calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle.
  • the electronic device may include, but is not limited to, the processor 61 and the memory 62 .
  • FIG. 6 is only an example of the electronic device 6, and does not constitute a limitation on the electronic device 6, and may include more or less components than the one shown, or combine some components, or different components
  • the electronic device may further include an input and output device, a network access device, a bus, and the like.
  • the so-called processor 61 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuits) Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 62 may be an internal storage unit of the electronic device 6 , such as a hard disk or a memory of the electronic device 6 .
  • the memory 62 may also be an external storage device of the electronic device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the electronic device 6 card, Flash Card, etc.
  • the memory 62 may also include both an internal storage unit of the electronic device 6 and an external storage device.
  • the memory 62 is used to store the computer program and other programs and data required by the electronic device.
  • the memory 62 may also be used to temporarily store data that has been output or is to be output.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
  • the embodiments of the present application provide a computer program product, when the computer program product runs on a mobile terminal, the steps in the foregoing method embodiments can be implemented when the mobile terminal executes the computer program product.
  • the integrated modules/units if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signal telecommunication signal and software distribution medium, etc.
  • the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Excluded are electrical carrier signals and telecommunication signals.
  • the disclosed apparatus/terminal device and method may be implemented in other manners.
  • the apparatus/terminal device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

An infrared positioning method, an infrared positioning apparatus, and an infrared positioning system. The method comprises: performing, on the basis of an object image, infrared point recognition processing on an object to be positioned to obtain infrared point information corresponding to said object, wherein the infrared point information comprises coordinate data of three infrared points, and the three infrared points are distributed in a shape of an isosceles triangle (S101); recognizing the vertices of the isosceles triangle and the midpoint of the bottom edge according to the coordinate data of the three infrared points, and generating, according to the vertices of the isosceles triangle and the midpoint of the bottom edge, a direction vector pointing to the vertices, the direction vector representing the movement direction of the object to be positioned (S102); and calculating a vector included angle between the direction vector of the object to be positioned and a preset coordinate system in a virtual environment, and determining, according to the vector included angle, the current movement direction of the object to be positioned (S103). By means of the method, a user can discern the direction even when immersing in the virtual environment, thereby enhancing the immersion of the user in the virtual environment; and the interaction between a person and a person or between a person and an object in the virtual environment is achieved, thereby satisfying the interaction requirement of the user in the virtual environment.

Description

红外定位方法、红外定位装置及红外定位系统Infrared positioning method, infrared positioning device and infrared positioning system 技术领域technical field

本申请属于虚拟现实、定位技术领域,尤其涉及一种红外定位方法、红外定位装置及红外定位系统。The application belongs to the technical field of virtual reality and positioning, and in particular relates to an infrared positioning method, an infrared positioning device and an infrared positioning system.

背景技术Background technique

虚拟现实(Virtual Reality,简称VR)技术是一种可以创建和体验虚拟世界的计算机仿真系统,其利用计算机生成虚拟环境,由该虚拟环境为用户提供一个多源信息融合交互的三维动态视景,让用户沉浸在该虚拟环境中。 Virtual Reality (VR) technology is a computer simulation system that can create and experience virtual worlds. It uses computers to generate a virtual environment, and the virtual environment provides users with a three-dimensional dynamic vision of multi-source information fusion and interaction. Immerse the user in this virtual environment.

随着通信技术的不断进步和高速发展,虚拟现实应用也得到了广泛的使用。例如模拟虚拟驾驶中实时获取小车的位置,或是展厅中获取人体的位置热力图,又或是互动游戏中获取实物的相对位置,在这些虚拟现实应用中,需要根据物体的真实位置进行定位,开发出一套虚拟系统来与该真实位置匹配。现有的一些应用于虚拟现实的定位方法仅能对物体进行定位识别,无法确定物体的运动方向,难以满足虚拟现实应用中用户的沉浸感需求和交互需求。With the continuous progress and rapid development of communication technology, virtual reality applications have also been widely used. For example, obtaining the position of the car in real time in simulated virtual driving, or obtaining the heat map of the position of the human body in the exhibition hall, or obtaining the relative position of the physical object in an interactive game, in these virtual reality applications, it is necessary to locate according to the real position of the object. A virtual system is developed to match this real location. Some existing positioning methods applied to virtual reality can only locate and identify objects, but cannot determine the direction of movement of objects, which is difficult to meet the immersion and interaction needs of users in virtual reality applications.

技术问题technical problem

本申请实施例的目的之一在于:提供了一种红外定位方法、红外定位置以及红外定位系统,可以在虚拟现实应用中准确地定位并获取物体的运动方向,满足虚拟现实应用中用户的沉浸感需求和交互需求。One of the purposes of the embodiments of the present application is to provide an infrared positioning method, infrared positioning and infrared positioning system, which can accurately locate and obtain the moving direction of an object in a virtual reality application, so as to satisfy the user's immersion in the virtual reality application. sense and interaction needs.

技术解决方案technical solutions

为解决上述技术问题,本申请实施例采用的技术方案是:In order to solve the above-mentioned technical problems, the technical solutions adopted in the embodiments of the present application are:

第一方面,提供了一种红外定位方法,所述红外定位方法包括:In a first aspect, an infrared positioning method is provided, and the infrared positioning method includes:

基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布;Perform infrared point recognition processing on the object to be located based on the object image, and obtain infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, and the three infrared points are equal to waist triangle distribution;

根据所述三个红外点的坐标数据识别所述等腰三角形的顶点和底边中点,根据所述等腰三角形的顶点和底边中点生成指向所述顶点的方向向量,所述方向向量表征所述待定位物体的运动方向;Identify the vertices and the midpoint of the base of the isosceles triangle according to the coordinate data of the three infrared points, and generate a direction vector pointing to the vertex according to the vertices and the midpoint of the base of the isosceles triangle, and the direction vector Characterize the moving direction of the object to be positioned;

计算所述待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,根据所述向量夹角确定所述待定位物体的运动方向。Calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle.

在一个实施例中,所述基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布的步骤之后,包括:In one embodiment, the infrared point identification processing is performed on the object to be located based on the object image, and infrared point information corresponding to the object to be located is obtained, wherein the infrared point information includes coordinate data of three infrared points, and After the step of distributing the three infrared points in an isosceles triangle, it includes:

结合所述三个红外点的坐标数据,按照三角形几何原理计算出所述等腰三角形的重心位置,将所述等腰三角形的重心位置确定为所述待定位物体的位置。Combined with the coordinate data of the three infrared points, the position of the center of gravity of the isosceles triangle is calculated according to the principle of triangle geometry, and the position of the center of gravity of the isosceles triangle is determined as the position of the object to be positioned.

在一个实施例中,所述基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布的步骤,包括:In one embodiment, the infrared point identification processing is performed on the object to be located based on the object image, and infrared point information corresponding to the object to be located is obtained, wherein the infrared point information includes coordinate data of three infrared points, and The steps that the three infrared points are distributed in an isosceles triangle include:

通过CCV计算机视觉库打开摄像机画面,从摄像机拍摄的画面中获取含有待定位物体的第一物体图像;Open the camera image through the CCV computer vision library, and obtain the first object image containing the object to be positioned from the image captured by the camera;

对所述第一物体图像进行红外点识别处理,识别出所述第一物体图像中的所有红外点;Perform infrared point identification processing on the first object image, and identify all infrared points in the first object image;

对所述第一物体图像中的所有红外点进行个数统计处理,获取从所述第一物体图像中识别出的红外点个数;Counting all infrared points in the first object image to obtain the number of infrared points identified from the first object image;

若从所述第一物体图像中识别出的红外点个数为三个,则验证三个红外点是否呈等腰三角形分布;If the number of infrared points identified from the first object image is three, verify whether the three infrared points are distributed in an isosceles triangle;

若所述三个红外点呈等腰三角形分布,则获取所述三个红外点的坐标数据。If the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired.

在一个实施例中,所述对所述第一物体图像中的所有红外点进行个数统计处理,获取从所述第一物体图像中识别出的红外点个数的步骤之后,包括:In one embodiment, after the step of performing statistical processing on the number of all infrared points in the first object image, and acquiring the number of infrared points identified from the first object image, the method includes:

若所述红外点个数少于三个或所述红外点个数等于三个但不呈等腰三角形分布,则按照预设的调整规则对所述通过CCV计算机视觉库打开的摄像机画面进行角度调整,并基于调整后的摄像机画面重新获取第二物体图像;If the number of the infrared points is less than three or the number of infrared points is equal to three but not distributed in an isosceles triangle, the camera image opened through the CCV computer vision library is angled according to the preset adjustment rule Adjust, and re-acquire the second object image based on the adjusted camera image;

对所述第二物体图像进行红外点识别处理,识别出所述第二物体图像中的所有红外点;Perform infrared point identification processing on the second object image, and identify all infrared points in the second object image;

对所述第二物体图像中的所有红外点进行个数统计处理,获取从所述第二物体图像中识别出的红外点个数;Counting all infrared points in the second object image to obtain the number of infrared points identified from the second object image;

若从所述第二物体图像中识别出的红外点个数为三个,则验证三个红外点是否呈等腰三角形分布;If the number of infrared points identified from the second object image is three, verify whether the three infrared points are distributed in an isosceles triangle;

若所述三个红外点呈等腰三角形分布,则获取所述三个红外点的坐标数据。If the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired.

在一个实施例中,所述对所述第一物体图像中的所有红外点进行个数统计处理,获取从所述第一物体图像中识别出的红外点个数的步骤之后,包括:In one embodiment, after the step of performing statistical processing on the number of all infrared points in the first object image, and acquiring the number of infrared points identified from the first object image, the method includes:

若所述从所述第一物体图像中识别出的红外点个数多于三个,则从所述第一物体图像识别出的所有红外点中筛选出呈等腰三角形分布的三个红外点,并获取所述三个红外点的坐标数据。If the number of infrared points identified from the first object image is more than three, three infrared points distributed in an isosceles triangle are selected from all infrared points identified from the first object image , and obtain the coordinate data of the three infrared points.

第二方面,提供了一种红外定位装置,所述红外定位装置包括:In a second aspect, an infrared positioning device is provided, and the infrared positioning device includes:

获取模块,用于基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布;The acquisition module is configured to perform infrared point identification processing on the object to be located based on the object image, and acquire infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, and the three The infrared points are distributed in an isosceles triangle;

生成模块,用于根据所述三个红外点的坐标数据识别所述等腰三角形的顶点和底边中点,根据所述等腰三角形的顶点和底边中点生成指向所述顶点的方向向量,所述方向向量表征所述待定位物体的运动方向;The generating module is used to identify the vertex and base midpoint of the isosceles triangle according to the coordinate data of the three infrared points, and generate a direction vector pointing to the vertex according to the vertex and base midpoint of the isosceles triangle , the direction vector represents the movement direction of the object to be positioned;

计算模块,用于计算所述待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,根据所述向量夹角确定所述待定位物体的运动方向。The calculation module is configured to calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle.

第三方面,提供了一种红外定位系统,所述红外定位系统用于实现上述第一方面任意一项所述红外定位方法的步骤,包括摄像端、检测端和定位计算端,其中:In a third aspect, an infrared positioning system is provided. The infrared positioning system is used to implement the steps of the infrared positioning method according to any one of the above-mentioned first aspects, and includes a camera end, a detection end and a positioning calculation end, wherein:

所述摄像端用于拍摄待定位物体的图像并从所述图像中获取红外点信息其中,所述红外点信息中含有红外点的坐标数据;The camera terminal is used to capture an image of the object to be positioned and obtain infrared point information from the image, wherein the infrared point information contains coordinate data of the infrared point;

所述检测端用于接收所述摄像端获取的红外点信息,从所述获取的红外点信息中识别出与所述待定位物体对应的三个红外点,其中,所述三个红外点呈等腰三角形分布;The detection end is configured to receive the infrared point information obtained by the camera end, and identify three infrared points corresponding to the object to be located from the obtained infrared point information, wherein the three infrared points are Isosceles triangle distribution;

所述定位计算端用于结合呈等腰三角形分布的三个红外点的坐标点数据,通过计算等腰三角形的重心位置确定所述待定位物体的在虚拟现实环境中的位置以及通过计算表征待定位物体运动方向的方向向量与虚拟环境预设坐标系之间的向量夹角确定所述待定位物体在虚拟现实环境中的运动方向,其中,所述表征待定位物体运动方向的方向向量由等腰三角形的底边中点指向等腰三角形的顶点获得。The positioning calculation terminal is used to combine the coordinate point data of three infrared points distributed in an isosceles triangle, determine the position of the object to be located in the virtual reality environment by calculating the position of the center of gravity of the isosceles triangle, and characterize the undetermined by calculation. The vector angle between the direction vector of the moving direction of the object and the preset coordinate system of the virtual environment determines the moving direction of the object to be positioned in the virtual reality environment, wherein the direction vector representing the moving direction of the object to be positioned is determined by etc. The midpoint of the base of the waist triangle points to the vertex of the isosceles triangle.

在一个实施例中,所述定位计算端还可以用于对所述经过计算确定的所述待定位物体在虚拟现实中的位置及运动方向进行验证处理,若验证结果不通过,则将所述验证结果反馈至所述检测端并触发所述检测端重新从所述获取的红外点信息中识别与所述待定位物体对应的三个红外点,以使所述定位计算端重新计算所述待定位物体在虚拟现实中的位置及运动方向,直至验证结果通过为止。In one embodiment, the positioning computing terminal may also be used to perform verification processing on the position and movement direction of the object to be positioned in the virtual reality determined by calculation, and if the verification result fails, the The verification result is fed back to the detection terminal and triggers the detection terminal to re-identify the three infrared points corresponding to the object to be located from the acquired infrared point information, so that the positioning calculation terminal can recalculate the to-be-determined object. position and movement direction of the object in virtual reality until the verification result is passed.

在一个实施例中,所述定位计算端采用队列的工作模式进行定位计算,通过实时获取多组红外点数据并根据所述多组红外点数据对所述经过计算确定的所述待定位物体在虚拟现实中的位置及运动方向进行验证处理,其中,每一组红外点数据中包含有等腰三角形分布的三个红外点的坐标数据,所述验证处理包括对所述多组红外点数据进行期望值计算处理和方差值计算处理。In one embodiment, the positioning calculation terminal adopts the working mode of a queue to perform positioning calculation, by acquiring multiple sets of infrared point data in real time and performing the calculation on the object to be located determined by the calculation according to the multiple sets of infrared point data. Verification processing is performed on the position and movement direction in virtual reality, wherein each group of infrared point data includes coordinate data of three infrared points distributed in an isosceles triangle, and the verification processing includes performing a verification process on the multiple groups of infrared point data. Expected value calculation processing and variance value calculation processing.

在一个实施例中,所述检测端通过预设的数据模板定时接收所述摄像端获取的红外点信息,其中,所述预设的数据模块中的数据类型被配置为列表数据类型。In one embodiment, the detection end regularly receives the infrared point information obtained by the camera end through a preset data template, wherein the data type in the preset data module is configured as a list data type.

第四方面,提供了一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面所述红外定位方法的步骤。In a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the first method when the processor executes the computer program The steps of the infrared positioning method described in the aspect.

第五方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面任一项所述红外定位方法的步骤。A fifth aspect provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the infrared positioning method according to any one of the first aspect .

有益效果beneficial effect

本申请实施例与现有技术相比存在的有益效果在于:通过在物体上搭载呈等腰三角形分布的红外灯,基于物体图像对待定位物体进行红外点识别处理,识别出三个红外灯对应在图像中呈等腰三角形分布的三个红外点的位置,并按照该位置获取三个红外点的坐标数据。进而,根据三个红外点的坐标数据识别出等腰三角形的顶点和底边中点并根据该等腰三角形的顶点和底边中点生成指向所述顶点的方向向量。最后,通过计算待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,由该向量夹角确定该待定位物体当前的运动方向。由此,实现了在虚拟现实应用中确定待定位物体的运动方向,使得用户沉浸在虚拟环境中时仍能够辨别方向,增强了用户在虚拟环境中的沉浸感,而且通过在虚拟环境中辨别方向还可以实现人与人、人与物在虚拟环境中进行互动,满足用户在虚拟环境中的互动需求。Compared with the prior art, the embodiment of the present application has the beneficial effect that: by carrying infrared lamps distributed in an isosceles triangle on the object, the infrared point identification processing of the object to be located is performed based on the image of the object, and the three infrared lamps corresponding to the three infrared lamps are identified. The position of the three infrared points distributed in an isosceles triangle in the image, and the coordinate data of the three infrared points is obtained according to the position. Furthermore, according to the coordinate data of the three infrared points, the vertices and the midpoints of the bases of the isosceles triangle are identified, and the direction vectors pointing to the vertices are generated according to the vertices and the midpoints of the bases of the isosceles triangles. Finally, by calculating the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, the current movement direction of the object to be positioned is determined by the vector angle. As a result, the motion direction of the object to be positioned is determined in the virtual reality application, so that the user can still identify the direction when immersed in the virtual environment, which enhances the user's sense of immersion in the virtual environment, and by identifying the direction in the virtual environment It can also realize the interaction between people and people and between people and things in the virtual environment, so as to meet the interaction needs of users in the virtual environment.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或示范性技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or exemplary technologies. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本申请实施例提供的一种红外定位方法的基本方法流程示意图;1 is a schematic flowchart of a basic method of an infrared positioning method provided by an embodiment of the present application;

图2为本申请实施例提供的红外定位方法中获取与物体对应的红外点信息的一种方法流程示意图;2 is a schematic flowchart of a method for obtaining infrared point information corresponding to an object in the infrared positioning method provided by the embodiment of the present application;

图3为本申请实施例提供的红外定位方法中获取与物体对应的红外点信息的另一种方法流程示意图;3 is a schematic flowchart of another method for obtaining infrared point information corresponding to an object in the infrared positioning method provided by the embodiment of the present application;

图4为本申请实施例提供的一种红外定位装置的结构示意图;4 is a schematic structural diagram of an infrared positioning device according to an embodiment of the present application;

图5为本申请实施例提供的一种红外定位系统的基本示意框图;5 is a basic schematic block diagram of an infrared positioning system provided by an embodiment of the present application;

图6为本申请实施例提供的一种实现红外定位方法的电子设备的示意图。FIG. 6 is a schematic diagram of an electronic device implementing an infrared positioning method according to an embodiment of the present application.

本发明的实施方式Embodiments of the present invention

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present application.

需说明的是,当部件被称为“固定于”或“设置于”另一个部件,它可以直接在另一个部件上或者间接在该另一个部件上。当一个部件被称为是“连接于”另一个部件,它可以是直接或者间接连接至该另一个部件上。术语“上”、“下”、“左”、“右”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。术语“第一”、“第二”仅用于便于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明技术特征的数量。“多个”的含义是两个或两个以上,除非另有明确具体的限定。It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it can be directly on the other component or indirectly on the other component. When an element is referred to as being "connected to" another element, it can be directly or indirectly connected to the other element. The orientation or positional relationship indicated by the terms "upper", "lower", "left", "right", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of description, rather than indicating or implying the referred device Or the elements must have a specific orientation, be constructed and operated in a specific orientation, so it cannot be construed as a limitation to the present application, and those of ordinary skill in the art can understand the specific meanings of the above terms according to specific situations. The terms "first" and "second" are only used for the purpose of description, and should not be understood as indicating or implying relative importance or implying indicating the number of technical features. "Plurality" means two or more, unless expressly specifically limited otherwise.

为了说明本申请所提供的技术方案,以下结合具体附图及实施例进行详细说明。In order to illustrate the technical solutions provided in the present application, the following detailed description is given in conjunction with the specific drawings and embodiments.

本申请的一些实施例中,请参阅图1,图1为本申请实施例提供的一种红外定位方法的基本方法流程示意图。详述如下:In some embodiments of the present application, please refer to FIG. 1 , which is a schematic flowchart of a basic method of an infrared positioning method provided by an embodiment of the present application. Details are as follows:

步骤S101中,基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布。In step S101, infrared point identification processing is performed on the object to be located based on the object image, and infrared point information corresponding to the object to be located is obtained, wherein the infrared point information includes coordinate data of three infrared points, and the three The infrared points are distributed in an isosceles triangle.

本实施例中,待定位物体为在虚拟现实应用中使用的VR(Virtual Reality,虚拟现实)设备,例如VR眼镜、VR头盔等等。通过在待定位物体上搭载有三个红外灯,并在搭载红外灯时使该三个红外灯呈等腰三角形分布。由此,在虚拟现实应用中对待定位物体进行定位时,可以通过摄像机拍摄出该待定位物体的图像,然后基于该图像对待定位物体进行红外点识别处理,例如通过在摄像机端配置红外滤光片,对摄像机拍摄的图像进行滤光处理识别出待定位物体上搭载的三个红外灯对应在图像中的三个红外点的位置,这三个红外点的位置组合呈等腰三角形分布。并且,基于该三个红外点的位置结合虚拟环境中预设置的坐标系即可获取该三个红外点的坐标数据。In this embodiment, the object to be positioned is a VR (Virtual Reality, virtual reality) device used in a virtual reality application, such as VR glasses, a VR helmet, and the like. Three infrared lamps are mounted on the object to be positioned, and when the infrared lamps are mounted, the three infrared lamps are distributed in an isosceles triangle. Therefore, when positioning the object to be positioned in a virtual reality application, an image of the object to be positioned can be captured by a camera, and then infrared point recognition processing of the object to be positioned based on the image is performed, for example, by configuring an infrared filter on the camera end , filter the image captured by the camera to identify the positions of the three infrared lights mounted on the object to be positioned corresponding to the three infrared points in the image, and the combination of the positions of the three infrared points is distributed in an isosceles triangle. Moreover, the coordinate data of the three infrared points can be acquired based on the positions of the three infrared points in combination with the coordinate system preset in the virtual environment.

步骤S102中,识别所述等腰三角形的顶点和底边中点,根据所述等腰三角形的顶点和底边中点生成指向所述顶点的方向向量,所述方向向量表征所述待定位物体的运动方向;In step S102, the vertex and the midpoint of the base of the isosceles triangle are identified, and a direction vector pointing to the vertex is generated according to the vertex of the isosceles triangle and the midpoint of the base, and the direction vector represents the object to be positioned. direction of movement;

本实施例中,获得待定位物体搭载的三个红外灯对应在图像中的三个红外点的位置之后,根据该三个红外点呈现的等腰三角形,识别出该等腰三角形中的顶点和底边中点,具体地,在等腰三角形中,两条短边相交的点为顶点,顶点相对的边即为底边,由此通过识别等腰三角形的各边长度即可获得等腰三角形的顶点,而识别出等腰三角形的长边后,对该长边的长度分为二等份,其二等份分割所对应的点即为等腰三角形的底边中点。当识别出等腰三角形的顶点和底边中点之后,根据该等腰三角形的顶点和底边中点生成指向顶点的方向向量,并以此方向向量来表征待定位物体的运动方向。In this embodiment, after obtaining the positions of the three infrared lamps mounted on the object to be positioned corresponding to the three infrared points in the image, the vertices and The midpoint of the base, specifically, in an isosceles triangle, the point where the two short sides intersect is the vertex, and the side opposite the vertex is the base, so the isosceles triangle can be obtained by identifying the length of each side of the isosceles triangle After identifying the long side of the isosceles triangle, the length of the long side is divided into two equal parts, and the point corresponding to the division of the two equal parts is the midpoint of the base of the isosceles triangle. After identifying the vertex and the midpoint of the base of the isosceles triangle, generate a direction vector pointing to the vertex according to the vertex and midpoint of the base of the isosceles triangle, and use this direction vector to represent the motion direction of the object to be positioned.

步骤S103中,计算所述待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,根据所述向量夹角确定所述待定位物体在虚拟环境中的运动方向。In step S103, the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment is calculated, and the movement direction of the object to be positioned in the virtual environment is determined according to the vector angle.

本实施例中,虚拟环境预设坐标系是在虚拟现实应用中基于摄像机端俯视视角下设置的二维坐标系,二维坐标系与物体的方向向量位于同一个平面上。另外,二维坐标系的原点可以根据计算需求在虚拟现实应用构建的虚拟环境中进行指定,指定的原则为便于计算。在一些具体实现中,可以按照东南西北四个方位来确定该二维坐标系的X轴方向和Y轴方向,例如东方向为X轴的正方向,北方向为Y轴正方向,此时,通过计算待定位物体的方向向量与该二维坐标系中的X轴正方向之间的向量夹角和/或计算待定位物体的方向向量与该二维坐标系中的Y轴正方向之间的向量夹角,根据该计算得出的向量夹角即可确定待定位物体在虚拟环境中的运动方向。In this embodiment, the preset coordinate system of the virtual environment is a two-dimensional coordinate system set in the virtual reality application based on the top view of the camera, and the two-dimensional coordinate system and the direction vector of the object are located on the same plane. In addition, the origin of the two-dimensional coordinate system can be specified in the virtual environment constructed by the virtual reality application according to the calculation requirements, and the specified principle is for the convenience of calculation. In some specific implementations, the X-axis direction and the Y-axis direction of the two-dimensional coordinate system can be determined according to the four directions of east, west, northwest, for example, the east direction is the positive direction of the X axis, and the north direction is the positive direction of the Y axis. By calculating the vector angle between the direction vector of the object to be positioned and the positive direction of the X axis in the two-dimensional coordinate system and/or calculating the angle between the direction vector of the object to be positioned and the positive direction of the Y axis in the two-dimensional coordinate system According to the vector angle obtained by the calculation, the moving direction of the object to be positioned in the virtual environment can be determined.

举例说明,通过计算待定位物体的方向向量与该二维坐标系中的X轴正方向之间的向量夹角来确定待定位物体在虚拟环境中的运动方向时,可以预先设定物体运动方向的确定规则为:对于物体的方向向量与该二维坐标系中的X轴正方向之间的向量夹角,沿逆时针方向,满足角度在0°<向量夹角<90°区间时确定物体运动方向为东偏北+向量夹角;满足角度在90°<向量夹角<180°区间时确定物体运动方向为北偏西+(向量夹角-90°);满足角度在180°<向量夹角<270°区间时确定物体运动方向为西偏南+(向量夹角-180°);满足角度在270°<向量夹角<360°区间时确定物体运动方向为南偏东+(向量夹角-270°)。据此,若计算得出待定位物体的方向向量与该二维坐标系中的X轴正方向之间的向量夹角为30°,则此时可以确定该待定位物体的运动方向为东偏北30°方向。For example, when determining the moving direction of the object to be positioned in the virtual environment by calculating the vector angle between the direction vector of the object to be positioned and the positive direction of the X-axis in the two-dimensional coordinate system, the moving direction of the object can be preset. The determination rule is: for the vector angle between the direction vector of the object and the positive direction of the X axis in the two-dimensional coordinate system, in the counterclockwise direction, the object is determined when the angle is in the interval of 0°<vector angle<90° The direction of movement is east-north + vector angle; when the angle is 90° < vector angle < 180°, the motion direction of the object is determined to be north-west + (vector angle -90°); the angle is 180° < vector When the angle is less than 270°, the moving direction of the object is determined to be west by south + (vector angle -180°); when the angle is within the range of 270° < vector angle < 360°, the object movement direction is south by east + (vector angle included angle -270°). Accordingly, if the vector angle between the direction vector of the object to be positioned and the positive direction of the X-axis in the two-dimensional coordinate system is calculated to be 30°, then it can be determined that the movement direction of the object to be positioned is eastward. 30° north direction.

可以理解的是,通过计算待定位物体的方向向量与该二维坐标系中的Y轴正方向之间的向量夹角来确定待定位物体在虚拟环境中的运动方向或者结合待定位物体的方向向量与该二维坐标系中的X轴正方向之间的向量夹角以及待定位物体的方向向量与该二维坐标系中的Y轴正方向之间的向量夹角来确定该待定位物体在虚拟环境中的运动方向时,均可以通过预先设定待定位物体运动方向的确定规则,然后基于确定规则来确定该待定位物体在虚拟环境中的运动方向。运动方向的确定规则的设定与上述举例类似,此处不作赘述。It can be understood that the moving direction of the object to be positioned in the virtual environment or the direction of the object to be positioned is determined by calculating the vector angle between the direction vector of the object to be positioned and the positive direction of the Y-axis in the two-dimensional coordinate system. The vector angle between the vector and the positive direction of the X-axis in the two-dimensional coordinate system and the vector angle between the direction vector of the object to be positioned and the positive direction of the Y-axis in the two-dimensional coordinate system determine the object to be positioned In the movement direction in the virtual environment, the determination rule for the movement direction of the object to be positioned can be preset, and then the movement direction of the object to be positioned in the virtual environment is determined based on the determination rule. The setting of the determination rule of the movement direction is similar to the above example, and will not be repeated here.

上述实施例提供的红外定位方法通过在物体上搭载呈等腰三角形分布的红外灯,基于物体图像对待定位物体进行红外点识别处理,识别出三个红外灯对应在图像中呈等腰三角形分布的三个红外点的位置,并按照该位置获取三个红外点的坐标数据。进而,根据三个红外点的坐标数据识别出等腰三角形的顶点和底边中点并根据该等腰三角形的顶点和底边中点生成指向所述顶点的方向向量。最后,通过计算待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,由该向量夹角确定该待定位物体当前的运动方向。由此,实现了在虚拟现实应用中确定待定位物体的运动方向,使得用户沉浸在虚拟环境中时仍能够辨别方向,增强了用户在虚拟环境中的沉浸感,而且通过在虚拟环境中辨别方向还可以实现人与人、人与物在虚拟环境中进行互动,满足用户在虚拟环境中的互动需求。In the infrared positioning method provided by the above-mentioned embodiments, the infrared lamps distributed in an isosceles triangle are mounted on the object, and infrared point recognition processing is performed on the object to be located based on the image of the object, and three infrared lamps are identified corresponding to the isosceles triangle distribution in the image. position of the three infrared points, and obtain the coordinate data of the three infrared points according to the position. Furthermore, according to the coordinate data of the three infrared points, the vertices and the midpoints of the bases of the isosceles triangle are identified, and the direction vectors pointing to the vertices are generated according to the vertices and the midpoints of the bases of the isosceles triangles. Finally, by calculating the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, the current movement direction of the object to be positioned is determined by the vector angle. As a result, the motion direction of the object to be positioned is determined in the virtual reality application, so that the user can still identify the direction when immersed in the virtual environment, which enhances the user's sense of immersion in the virtual environment, and by identifying the direction in the virtual environment It can also realize the interaction between people and people and between people and things in the virtual environment, so as to meet the interaction needs of users in the virtual environment.

本申请的一些实施例中,获取得到待定位物体对应的三个红外点坐标数据之后,还可以结合所述三个红外点的坐标数据,按照三角形几何原理计算出等腰三角形的重心位置,从而将该等腰三角形的重心位置确定为是该待定位物体的位置。具体地,按照三角形几何原理,各边中线的交点即为等腰三角形的重心。In some embodiments of the present application, after obtaining the coordinate data of the three infrared points corresponding to the object to be positioned, the position of the center of gravity of the isosceles triangle can be calculated according to the principle of triangle geometry in combination with the coordinate data of the three infrared points, thereby The position of the center of gravity of the isosceles triangle is determined as the position of the object to be positioned. Specifically, according to the principle of triangle geometry, the intersection of the midlines of each side is the center of gravity of an isosceles triangle.

本申请的一些实施例中,请参阅图2,图2为本申请实施例提供的红外定位方法中获取与物体对应的红外点信息的一种方法流程示意图。详细如下:In some embodiments of the present application, please refer to FIG. 2 , which is a schematic flowchart of a method for acquiring infrared point information corresponding to an object in the infrared positioning method provided by the embodiments of the present application. Details are as follows:

步骤S201中,通过CCV计算机视觉库打开摄像机画面,从摄像机拍摄的画面中获取含有待定位物体的第一物体图像;In step S201, the camera picture is opened through the CCV computer vision library, and the first object image containing the object to be positioned is obtained from the picture captured by the camera;

步骤S202中,对所述第一物体图像进行红外点识别处理,识别出所述第一物体图像中的所有红外点;In step S202, infrared point identification processing is performed on the first object image, and all infrared points in the first object image are identified;

步骤S203中,对所述第一物体图像中的所有红外点进行个数统计处理,获取从所述第一物体图像中识别出的红外点个数;In step S203, the number of all infrared points in the first object image is statistically processed to obtain the number of infrared points identified from the first object image;

步骤S204中,若从所述第一物体图像中识别出的红外点个数为三个,则验证三个红外点是否呈等腰三角形分布;In step S204, if the number of infrared points identified from the first object image is three, verify whether the three infrared points are distributed in an isosceles triangle;

步骤S205中,若所述三个红外点呈等腰三角形分布,则获取所述三个红外点的坐标数据。In step S205, if the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired.

本实施例中,采用本申请提供的红外定位方法在虚拟现实应用中进行物体定位时,首先通过连接摄像机设备,然后,通过CCV计算机视觉库打开该摄像机画面,进而从摄像机拍摄的画面中获取含有待定位物体的第一物体图像,然后通过对该第一物体图像进行红外点识别处理,以识别出第一物体图像中的所有红外点。CCV计算机视觉库(cached computer vision library)是一个基于C语言的、带缓存的现代计算机视觉库,内置有缓存机制、功能接口简洁,能够透明缓存并图像进行预处理。在本实施例中,通过在待定位物体上搭载三个红外灯,然后由CCV配合红外识别的方式来获得第一物体图像中与待定位物体对应的红外点,充分利用了CCV计算机视觉库处理图像数据的准确性,同时通过配合红外识别解决了CCV易受外界干扰以及对指定物体的辨别度低的缺陷。在本实施例中,识别出第一物体图像中的所有红外点后,由于第一物体图像可能会受到外界因素干扰而产生出红外灯以外的其他红外点,因此,可以通过对从该第一物体图像中识别出的红外点进行个数统计处理,以判别从该第一物体图像中识别出的红外点是否有且只有三个,若统计得到的红外点个数为三个,则验证该三个红外点是否呈等腰三角形分布。需要说明的是,在待定位物体上搭载三个红外灯时,该三个红外灯呈等腰三角形分布,因此,从第一物体图像中识别出的三个红外灯对应的红外点也应呈等腰三角形分布。据此,当统计得到第一物体图像中红外点个数为三个时,进一步验证该三个红外点是否为与待定位物体上搭载的三个红外灯相对应的三个红外点。具体地,可以根据等腰三角形的特征进行验证,例如,根据三个红外点的坐标数据计算出该三个红外点两两之间的距离,得到三角形的三条边的边长,判断三条边的边长中是否有两条边长相等,若有,则确认该三个红外点呈等腰三角形分布,也即验证该三个红外点为与待定位物体上搭载的三个红外灯相对应的三个红外点。当验证确认该三个红外点呈等腰三角形分布后,获取该三个红外点的坐标数据。可以理解的是,此处获得的坐标数据为基于摄像机配置的相机坐标系中的坐标数据,在一些具体实现中,还可以在虚拟环境中自定义配置一个便于计算的自定义坐标系,进而,通过坐标中映射的方式将获得的相机坐标系中的坐标数据转化为虚拟环境自定义配置坐标系中的坐标数据。In this embodiment, when using the infrared positioning method provided by the present application to locate objects in a virtual reality application, first connect a camera device, and then open the camera screen through the CCV computer vision library, and then obtain images containing The first object image of the object to be positioned is then processed by infrared point identification processing on the first object image to identify all infrared points in the first object image. CCV computer vision library (cached computer vision library) is a modern computer vision library with cache based on C language. It has a built-in cache mechanism, simple functional interface, transparent cache and image preprocessing. In this embodiment, three infrared lamps are mounted on the object to be located, and then the infrared points corresponding to the object to be located in the image of the first object are obtained by means of CCV and infrared recognition, making full use of the CCV computer vision library for processing The accuracy of the image data, and at the same time, by cooperating with infrared recognition, it solves the defects of CCV being susceptible to external interference and low discrimination of designated objects. In this embodiment, after all infrared points in the first object image are identified, other infrared points other than the infrared lamp may be generated because the first object image may be disturbed by external factors. The number of infrared points identified in the object image is counted to determine whether there are and only three infrared points identified in the first object image. If the number of infrared points obtained by statistics is three, verify the Whether the three infrared points are distributed in an isosceles triangle. It should be noted that when three infrared lamps are mounted on the object to be positioned, the three infrared lamps are distributed in an isosceles triangle. Therefore, the infrared points corresponding to the three infrared lamps identified from the image of the first object should also be in the form of an isosceles triangle. Isosceles triangle distribution. Accordingly, when the number of infrared points in the first object image is three, it is further verified whether the three infrared points are three infrared points corresponding to the three infrared lamps mounted on the object to be positioned. Specifically, verification can be performed according to the characteristics of an isosceles triangle. For example, the distance between the three infrared points is calculated according to the coordinate data of the three infrared points, the lengths of the three sides of the triangle are obtained, and the length of the three sides is determined. Whether two of the side lengths are equal in length, if so, confirm that the three infrared points are distributed in an isosceles triangle, that is, verify that the three infrared points correspond to the three infrared lamps mounted on the object to be positioned. Three infrared dots. After the verification confirms that the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired. It can be understood that the coordinate data obtained here is the coordinate data in the camera coordinate system based on the camera configuration. In some specific implementations, a custom coordinate system that is convenient for calculation can also be customized in the virtual environment, and then, The obtained coordinate data in the camera coordinate system is converted into the coordinate data in the coordinate system of the custom configuration of the virtual environment by mapping in the coordinates.

本申请的一些实施例中,请参阅图3,图3为本申请实施例提供的红外定位方法中获取与物体对应的红外点信息的另一种方法流程示意图。详细如下:In some embodiments of the present application, please refer to FIG. 3 , which is a schematic flowchart of another method for acquiring infrared point information corresponding to an object in the infrared positioning method provided by the embodiments of the present application. Details are as follows:

步骤S301中,若所述红外点个数少于三个或所述红外点个数等于三个但不呈等腰三角形分布,则按照预设的调整规则对所述通过CCV计算机视觉库打开的摄像机画面进行角度调整,并基于调整后的摄像机画面重新获取第二物体图像;In step S301, if the number of infrared points is less than three or the number of infrared points is equal to three but is not distributed in an isosceles triangle, then according to the preset adjustment rule, the information opened by the CCV computer vision library is processed. The angle of the camera image is adjusted, and the second object image is re-acquired based on the adjusted camera image;

步骤S302中,对所述第二物体图像进行红外点识别处理,识别出所述第二物体图像中的所有红外点;In step S302, infrared point identification processing is performed on the second object image, and all infrared points in the second object image are identified;

步骤S303中,对所述第二物体图像中的所有红外点进行个数统计处理,获取从所述第二物体图像中识别出的红外点个数;In step S303, the number of all infrared points in the second object image is statistically processed to obtain the number of infrared points identified from the second object image;

步骤S304中,若从所述第二物体图像中识别出的红外点个数为三个,则验证三个红外点是否呈等腰三角形分布;In step S304, if the number of infrared points identified from the second object image is three, verify whether the three infrared points are distributed in an isosceles triangle;

步骤S305中,若所述三个红外点呈等腰三角形分布,则获取所述三个红外点的坐标数据。In step S305, if the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired.

本实施例中,摄像机拍摄的画面可能存在未能正常拍摄到待定位物体搭载红外定的位置,因而可能造成摄像机拍摄的第一物体图像中的红外点个数少于三个或红外点个数等于三个但不呈等腰三角形分布的情况。此时,当统计得出第一物体图像中的红外点个数少于三个或等于三个但不呈等腰三角形分布时,可以通过对CCV计算机视觉库打开的摄像机画面进行角度调整,以使摄像机拍摄的画面正常拍摄到待定位物体搭载红外定的位置,进而在摄像机拍摄画面的角度调整完成后,基于调整后的摄像机画面重新获取第二物体图像。进而根据第二物体图像来获取与待定位物体对应的三个呈等腰三角形分布的红外点。在本实施例中,步骤S302-步骤S305与前述实施例中的步骤S202-步骤S205内容基本一致,此处不再赘述。In this embodiment, the image captured by the camera may fail to normally capture the position where the object to be positioned is equipped with the infrared camera, which may cause the number of infrared points in the image of the first object captured by the camera to be less than three or less than the number of infrared points. Equal to three but not distributed in an isosceles triangle. At this time, when the statistics show that the number of infrared points in the first object image is less than three or equal to three but not distributed in an isosceles triangle, you can adjust the angle of the camera screen opened by the CCV computer vision library to The image captured by the camera is normally captured to the position where the object to be positioned is equipped with infrared positioning, and after the angle adjustment of the image captured by the camera is completed, the image of the second object is re-acquired based on the adjusted camera image. Then, three infrared points distributed in an isosceles triangle corresponding to the object to be positioned are acquired according to the second object image. In this embodiment, the contents of steps S302 to S305 are basically the same as those of steps S202 to S205 in the foregoing embodiments, and details are not repeated here.

本申请的一些实施例中,由于第一物体图像可能会受到外界因素干扰而产生出红外灯以外的其他红外点,此时会出现从所述第一物体图像中识别出的红外点个数多于三个的情况。对于此种情况,在本实施例中,可以先识别出第一物体图像中的所有红外点,然后通过设定的筛选规则来进行筛选,例如等腰三角形的特征(有且只有两条相等的边),即通过每三个红外点绘制一个三角形,基于红外点的坐标数据判别三角形中是否有且只有两条边相等,由此即可筛选出呈等腰三角形分布的三个红外点。当从第一物体图像中的所有红外点中确定出呈等腰三角形分布的三个红外点后,获取该三个红外点的坐标数据。可以理解的是,若前述实施例中的第二物体图像中出现识别出的红外点个数多于三个的情况时,亦可根据本实施例提供的方法进行处理。In some embodiments of the present application, since the first object image may be disturbed by external factors, other infrared points other than the infrared lamp are generated, and at this time, there will be a large number of infrared points identified from the first object image. in three cases. In this case, in this embodiment, all infrared points in the first object image can be identified first, and then filtered through the set filtering rules, such as the feature of an isosceles triangle (there are only two equal side), that is, by drawing a triangle for every three infrared points, based on the coordinate data of the infrared points, it is determined whether there are and only two sides of the triangle are equal, so that three infrared points distributed in an isosceles triangle can be screened out. After three infrared points distributed in an isosceles triangle are determined from all the infrared points in the first object image, coordinate data of the three infrared points are acquired. It can be understood that, if more than three infrared points are identified in the second object image in the foregoing embodiment, processing can also be performed according to the method provided in this embodiment.

可以理解的是,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It can be understood that the size of the sequence number of each step in the above-mentioned embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any implementation process of the embodiments of the present application. limited.

在本申请的一些实施例中,请参阅图4,图4为本申请实施例提供的一种红外定位装置的结构示意图,详述如下:In some embodiments of the present application, please refer to FIG. 4 , which is a schematic structural diagram of an infrared positioning device provided by an embodiment of the present application, and the details are as follows:

本实施例中,所述红外定位装置包括:获取模块401、生成模块402、比以及计算模块403。其中,所述获取模块401用于基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布。所述生成模块402用于根据所述三个红外点的坐标数据识别所述等腰三角形的顶点和底边中点,根据所述等腰三角形的顶点和底边中点生成指向所述顶点的方向向量,所述方向向量表征所述待定位物体的运动方向。所述计算模块403用于计算所述待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,根据所述向量夹角确定所述待定位物体的运动方向。In this embodiment, the infrared positioning device includes: an acquisition module 401 , a generation module 402 , and a ratio and calculation module 403 . The acquisition module 401 is configured to perform infrared point identification processing on the object to be located based on the object image, and acquire infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, And the three infrared points are distributed in an isosceles triangle. The generating module 402 is configured to identify the vertices and the midpoints of the bases of the isosceles triangle according to the coordinate data of the three infrared points, and generate the vertices pointing to the vertices according to the vertices and the midpoints of the bases of the isosceles triangles. A direction vector, where the direction vector represents the moving direction of the object to be positioned. The calculation module 403 is configured to calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle.

所述红外定位装置,与上述的红外定位方法一一对应,此处不再赘述。The infrared positioning device corresponds to the above-mentioned infrared positioning method one by one, and details are not repeated here.

本申请的一些实施例中,请参阅图5,图5为本申请实施例提供的一种红外定位系统的基本示意框图。如图5所示,所述红外定位系统50包括有摄像端51、检测端52和定位计算端53。其中:In some embodiments of the present application, please refer to FIG. 5 , which is a basic schematic block diagram of an infrared positioning system provided by an embodiment of the present application. As shown in FIG. 5 , the infrared positioning system 50 includes a camera end 51 , a detection end 52 and a positioning calculation end 53 . in:

摄像端51用于拍摄待定位物体的图像并从所述图像中获取红外点信息其中,所述红外点信息中含有红外点的坐标数据。在本实施例中,摄像端51采用红外结合开源的CCV计算机视觉库来进行物体识别,充分利用了CCV计算机视觉库处理图像数据的准确性,同时通过配合红外识别解决了CCV易受外界干扰以及对指定物体的辨别度低的缺陷。在一些具体实现中,通过连接启动摄像端,然后采用CCV计算机视觉库打开摄像端画面,进而通过调节CCV计算机视觉库参数来调整摄像端的画面,从摄像端画面中获取物体图像并识别物体图像中的红外点。在一些具体实现中,还可以通过设置物体图像的识别区域来避免外界因素的干扰,实时向检测端52传输红外点信息。The camera end 51 is used to capture an image of the object to be positioned and obtain infrared point information from the image, wherein the infrared point information contains coordinate data of the infrared point. In this embodiment, the camera end 51 uses infrared combined with the open-source CCV computer vision library to perform object recognition, making full use of the accuracy of the CCV computer vision library for processing image data, and at the same time solving the problem that CCV is susceptible to external interference by cooperating with infrared recognition. Defects with low discrimination for specified objects. In some specific implementations, the camera terminal is started by connecting, and then the CCV computer vision library is used to open the camera terminal screen, and then the parameters of the CCV computer vision library are adjusted to adjust the camera terminal screen, and the object image is obtained from the camera terminal screen. the infrared point. In some specific implementations, the recognition area of the object image can also be set to avoid the interference of external factors, and the infrared point information can be transmitted to the detection terminal 52 in real time.

检测端52用于接收所述摄像端获取的红外点信息,从所述获取的红外点信息中识别出与所述待定位物体对应的三个红外点,其中,所述三个红外点呈等腰三角形分布。在本实施例中,检测端52采用tuio协议接收来自摄像端51的红外点信息。具体地,接收到来自摄像端51的红外点信息后,首先对这些红外点信息进行统计,确认从物体图像中获得的红外点的数量。进而,根据该获得的红外点的数量判断是否为可以形成等腰三角形的数量(三个),如果是则将该三个红外点的坐标数据传送至定位计算端53进行计算。否则,若红外点的数量多于三个,则可以通过设定筛选规则来进行筛选,例如通过每三个红外点绘制一个三角形,基于红外点的坐标数据判别三角形中是否有且只有两条边相等,由此筛选出呈等腰三角形分布的三个红外点,进而将该三个红外点的坐标数据传送至定位计算端53进行计算。若红外点少于三个或者等于三个但不呈等腰三角形分布,则结束检测操作并监听tuio信息,等待接收下一次的来自摄像端51的红外点信息。The detection end 52 is configured to receive the infrared point information obtained by the camera end, and identify three infrared points corresponding to the object to be located from the obtained infrared point information, wherein the three infrared points are equal to each other. Waist triangle distribution. In this embodiment, the detection terminal 52 uses the tuio protocol to receive infrared point information from the camera terminal 51 . Specifically, after receiving the infrared point information from the camera end 51, the infrared point information is firstly counted to confirm the number of infrared points obtained from the object image. Further, according to the obtained number of infrared points, it is determined whether the number of isosceles triangles (three) can be formed, and if so, the coordinate data of the three infrared points are sent to the positioning calculation terminal 53 for calculation. Otherwise, if the number of infrared points is more than three, it can be filtered by setting a filtering rule, for example, by drawing a triangle for every three infrared points, and based on the coordinate data of the infrared points to determine whether there are and only two sides in the triangle Therefore, three infrared points distributed in an isosceles triangle are screened out, and then the coordinate data of the three infrared points are sent to the positioning calculation terminal 53 for calculation. If the infrared points are less than three or equal to three but not distributed in an isosceles triangle, the detection operation is ended and the tuio information is monitored, waiting to receive the next infrared point information from the camera end 51 .

在一些具体实现中,检测端52可以通过一预设的数据模板来接收来自摄像端51的红外点信息。具体地,设计一数据模板,使其具备将标准tuio协议数据转换成易于解析的列表(list)数据类型的功能,并且将该数据模板关联定时器,使得该数据模板按照定时器设置的时间间隔进行定时的数据获取处理。在本实施例中,定时器设定为20ms,即每秒获取50组红外点信息,实现了实际环境与虚拟环境之间的数据低时延,避免了虚拟现实应用中实际环境与虚拟环境数据不对称的问题。In some specific implementations, the detection end 52 may receive infrared point information from the camera end 51 through a preset data template. Specifically, a data template is designed to have the function of converting standard tuio protocol data into a list data type that is easy to parse, and the data template is associated with a timer, so that the data template is based on the time interval set by the timer. Perform timed data acquisition processing. In this embodiment, the timer is set to 20ms, that is, 50 sets of infrared point information are acquired per second, which realizes low data delay between the actual environment and the virtual environment, and avoids the actual environment and virtual environment data in virtual reality applications. asymmetrical problem.

定位计算端53用于结合呈等腰三角形分布的三个红外点的坐标点数据,通过计算等腰三角形的重心位置确定所述待定位物体的在虚拟现实环境中的位置以及通过计算表征待定位物体运动方向的方向向量与虚拟环境预设坐标系之间的向量夹角确定所述待定位物体在虚拟现实环境中的运动方向,其中,所述表征待定位物体运动方向的方向向量由等腰三角形的底边中点指向等腰三角形的顶点获得。在本实施例中,获得呈等腰三角形分布的三个红外点的坐标数据后,通过记录该三个红外点的坐标并将该三个红外点的坐标数据作为一组数据添加至计算队列中,以采用队列先进先出的工作模式进行数据计算。按照队列顺序对队列中的每一组数据进行等腰三角形重心位置的计算以及方向向量与虚拟环境预设坐标系之间向量夹角的计算,由此确定出待定位物体的在虚拟现实环境中的位置以及运动方向。The positioning calculation terminal 53 is used to combine the coordinate point data of the three infrared points distributed in an isosceles triangle, determine the position of the object to be positioned in the virtual reality environment by calculating the position of the center of gravity of the isosceles triangle, and characterize the position to be positioned by calculating The vector angle between the direction vector of the moving direction of the object and the preset coordinate system of the virtual environment determines the moving direction of the object to be positioned in the virtual reality environment, wherein the direction vector representing the moving direction of the object to be positioned is determined by isosceles. The midpoint of the base of the triangle points to the vertex of the isosceles triangle. In this embodiment, after obtaining the coordinate data of three infrared points distributed in an isosceles triangle, record the coordinates of the three infrared points and add the coordinate data of the three infrared points as a set of data to the calculation queue , to perform data calculation in a queue-first-in-first-out working mode. Calculate the position of the center of gravity of the isosceles triangle and calculate the vector angle between the direction vector and the preset coordinate system of the virtual environment for each group of data in the queue according to the queue order, thereby determining the position of the object to be positioned in the virtual reality environment. position and direction of movement.

在一些具体实现中,定位计算端53还可以对经计算确定的待定位物体在虚拟现实中的位置及运动方向进行验证处理,若验证结果不通过,则将该验证结果反馈至检测端52并触发该检测端52重新从获取的红外点信息中识别与待定位物体对应的三个红外点,进而由定位计算端53重新计算待定位物体在虚拟现实中的位置及运动方向,直至验证结果通过为止。具体地,在本实施例中,由定位计算端53采用队列先进先出的工作模式进行数据计算,进而在该计算过程中,会实时存储n组红外点数据,其中,每一组红外点数据中包含有等腰三角形分布的三个红外点的坐标数据。然后实时地计算出该n组(例如10组)数据的期望值和方差值,由此对对经计算确定的待定位物体在虚拟现实中的位置及运动方向进行验证,借助期望值和方差值排除意外数据,使得待定位物体的定位信息更加精确可靠。In some specific implementations, the positioning calculation terminal 53 may also perform verification processing on the position and movement direction of the object to be positioned in the virtual reality determined by calculation. If the verification result fails, the verification result is fed back to the detection terminal 52 and Trigger the detection terminal 52 to re-identify the three infrared points corresponding to the object to be located from the acquired infrared point information, and then recalculate the position and movement direction of the object to be located in the virtual reality by the positioning calculation terminal 53, until the verification result passes until. Specifically, in this embodiment, the positioning computing terminal 53 uses a queue-first-in-first-out working mode to perform data calculation, and during the calculation process, n groups of infrared point data are stored in real time, wherein each group of infrared point data contains the coordinate data of three infrared points distributed in an isosceles triangle. Then, the expected value and variance value of the n groups (for example, 10 groups) of data are calculated in real time, so as to verify the position and movement direction of the object to be located in virtual reality determined by calculation, with the help of the expected value and variance value Excluding unexpected data makes the positioning information of the object to be positioned more accurate and reliable.

本申请的一些实施例中,请参阅图6,图6为本申请实施例提供的一种实现红外定位方法的电子设备的示意图。如图6所示,该实施例的电子设备6包括:处理器61、存储器62以及存储在所述存储器62中并可在所述处理器61上运行的计算机程序63,例如红外定位程序。所述处理器61执行所述计算机程序62时实现上述各个红外定位方法实施例中的步骤。或者,所述处理器61执行所述计算机程序63时实现上述各装置实施例中各模块/单元的功能。In some embodiments of the present application, please refer to FIG. 6 , which is a schematic diagram of an electronic device implementing an infrared positioning method according to an embodiment of the present application. As shown in FIG. 6 , the electronic device 6 of this embodiment includes: a processor 61 , a memory 62 , and a computer program 63 stored in the memory 62 and executable on the processor 61 , such as an infrared positioning program. When the processor 61 executes the computer program 62, the steps in each of the foregoing infrared positioning method embodiments are implemented. Alternatively, when the processor 61 executes the computer program 63, the functions of the modules/units in the foregoing device embodiments are implemented.

示例性的,所述计算机程序63可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器62中,并由所述处理器61执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序63在所述电子设备6中的执行过程。例如,所述计算机程序63可以被分割成:Exemplarily, the computer program 63 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 62 and executed by the processor 61 to complete the this application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 63 in the electronic device 6 . For example, the computer program 63 can be divided into:

获取模块,用于基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布;The acquisition module is configured to perform infrared point identification processing on the object to be located based on the object image, and acquire infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, and the three The infrared points are distributed in an isosceles triangle;

生成模块,用于根据所述三个红外点的坐标数据识别所述等腰三角形的顶点和底边中点,根据所述等腰三角形的顶点和底边中点生成指向所述顶点的方向向量,所述方向向量表征所述待定位物体的运动方向;The generating module is used to identify the vertex and base midpoint of the isosceles triangle according to the coordinate data of the three infrared points, and generate a direction vector pointing to the vertex according to the vertex and base midpoint of the isosceles triangle , the direction vector represents the movement direction of the object to be positioned;

计算模块,用于计算所述待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,根据所述向量夹角确定所述待定位物体的运动方向。The calculation module is configured to calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle.

所述电子设备可包括,但不仅限于,处理器61、存储器62。本领域技术人员可以理解,图6仅仅是电子设备6的示例,并不构成对电子设备6的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备还可以包括输入输出设备、网络接入设备、总线等。The electronic device may include, but is not limited to, the processor 61 and the memory 62 . Those skilled in the art can understand that FIG. 6 is only an example of the electronic device 6, and does not constitute a limitation on the electronic device 6, and may include more or less components than the one shown, or combine some components, or different components For example, the electronic device may further include an input and output device, a network access device, a bus, and the like.

所称处理器61可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 61 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuits) Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

所述存储器62可以是所述电子设备6的内部存储单元,例如电子设备6的硬盘或内存。所述存储器62也可以是所述电子设备6的外部存储设备,例如所述电子设备6上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器62还可以既包括所述电子设备6的内部存储单元也包括外部存储设备。所述存储器62用于存储所述计算机程序以及所述电子设备所需的其他程序和数据。所述存储器62还可以用于暂时地存储已经输出或者将要输出的数据。The memory 62 may be an internal storage unit of the electronic device 6 , such as a hard disk or a memory of the electronic device 6 . The memory 62 may also be an external storage device of the electronic device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the electronic device 6 card, Flash Card, etc. Further, the memory 62 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 62 is used to store the computer program and other programs and data required by the electronic device. The memory 62 may also be used to temporarily store data that has been output or is to be output.

需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information exchange, execution process and other contents between the above-mentioned devices/units are based on the same concept as the method embodiments of the present application. For specific functions and technical effects, please refer to the method embodiments section. It is not repeated here.

本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.

本申请实施例提供了一种计算机程序产品,当计算机程序产品在移动终端上运行时,使得移动终端执行时实现可实现上述各个方法实施例中的步骤。The embodiments of the present application provide a computer program product, when the computer program product runs on a mobile terminal, the steps in the foregoing method embodiments can be implemented when the mobile terminal executes the computer program product.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated to different functional units, Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。The integrated modules/units, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Excluded are electrical carrier signals and telecommunication signals.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.

在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the application, and should be included in the within the scope of protection of this application.

Claims (10)

一种红外定位方法,其特征在于,包括: An infrared positioning method, comprising: 基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布;Perform infrared point recognition processing on the object to be located based on the object image, and obtain infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, and the three infrared points are equal to waist triangle distribution; 根据所述三个红外点的坐标数据识别所述等腰三角形的顶点和底边中点,根据所述等腰三角形的顶点和底边中点生成指向所述顶点的方向向量,所述方向向量表征所述待定位物体的运动方向;Identify the vertices and the midpoint of the base of the isosceles triangle according to the coordinate data of the three infrared points, and generate a direction vector pointing to the vertex according to the vertices and the midpoint of the base of the isosceles triangle, and the direction vector Characterize the moving direction of the object to be positioned; 计算所述待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,根据所述向量夹角确定所述待定位物体的运动方向。Calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle. 根据权利要求1所述的红外定位方法,其特征在于,所述基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布的步骤之后,包括: The infrared positioning method according to claim 1, wherein the infrared point identification processing is performed on the object to be located based on the object image, and infrared point information corresponding to the object to be located is obtained, wherein the infrared point information includes After the coordinate data of three infrared points, and the three infrared points are distributed in an isosceles triangle, it includes: 结合所述三个红外点的坐标数据,按照三角形几何原理计算出所述等腰三角形的重心位置,将所述等腰三角形的重心位置确定为所述待定位物体的位置。Combined with the coordinate data of the three infrared points, the position of the center of gravity of the isosceles triangle is calculated according to the principle of triangle geometry, and the position of the center of gravity of the isosceles triangle is determined as the position of the object to be positioned. 根据权利要求1所述的红外定位方法,其特征在于,所述基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布的步骤,包括: The infrared positioning method according to claim 1, wherein the infrared point identification processing is performed on the object to be located based on the object image, and infrared point information corresponding to the object to be located is obtained, wherein the infrared point information includes: The coordinate data of three infrared points, and the three infrared points are distributed in an isosceles triangle, including: 通过CCV计算机视觉库打开摄像机画面,从摄像机拍摄的画面中获取含有待定位物体的第一物体图像;Open the camera image through the CCV computer vision library, and obtain the first object image containing the object to be positioned from the image captured by the camera; 对所述第一物体图像进行红外点识别处理,识别出所述第一物体图像中的所有红外点;Perform infrared point identification processing on the first object image, and identify all infrared points in the first object image; 对所述第一物体图像中的所有红外点进行个数统计处理,获取从所述第一物体图像中识别出的红外点个数;Counting all infrared points in the first object image to obtain the number of infrared points identified from the first object image; 若从所述第一物体图像中识别出的红外点个数为三个,则验证三个红外点是否呈等腰三角形分布;If the number of infrared points identified from the first object image is three, verify whether the three infrared points are distributed in an isosceles triangle; 若所述三个红外点呈等腰三角形分布,则获取所述三个红外点的坐标数据。If the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired. 根据权利要求3所述的红外定位方法,其特征在于,所述对所述第一物体图像中的所有红外点进行个数统计处理,获取从所述第一物体图像中识别出的红外点个数的步骤之后,包括: The infrared positioning method according to claim 3, wherein the number of all infrared points in the first object image is statistically processed, and the number of infrared points identified from the first object image is obtained. After a few steps, including: 若所述红外点个数少于三个或所述红外点个数等于三个但不呈等腰三角形分布,则按照预设的调整规则对所述通过CCV计算机视觉库打开的摄像机画面进行角度调整,并基于调整后的摄像机画面重新获取第二物体图像;If the number of the infrared points is less than three or the number of infrared points is equal to three but not distributed in an isosceles triangle, the camera image opened through the CCV computer vision library is angled according to the preset adjustment rule Adjust, and re-acquire the second object image based on the adjusted camera image; 对所述第二物体图像进行红外点识别处理,识别出所述第二物体图像中的所有红外点;Perform infrared point identification processing on the second object image, and identify all infrared points in the second object image; 对所述第二物体图像中的所有红外点进行个数统计处理,获取从所述第二物体图像中识别出的红外点个数;Counting all infrared points in the second object image to obtain the number of infrared points identified from the second object image; 若从所述第二物体图像中识别出的红外点个数为三个,则验证三个红外点是否呈等腰三角形分布;If the number of infrared points identified from the second object image is three, verify whether the three infrared points are distributed in an isosceles triangle; 若所述三个红外点呈等腰三角形分布,则获取所述三个红外点的坐标数据。If the three infrared points are distributed in an isosceles triangle, the coordinate data of the three infrared points are acquired. 根据权利要求3所述的红外定位方法,其特征在于,所述对所述第一物体图像中的所有红外点进行个数统计处理,获取从所述第一物体图像中识别出的红外点个数的步骤之后,包括: The infrared positioning method according to claim 3, wherein the number of all infrared points in the first object image is statistically processed, and the number of infrared points identified from the first object image is obtained. After a few steps, including: 若所述从所述第一物体图像中识别出的红外点个数多于三个,则从所述第一物体图像识别出的所有红外点中筛选出呈等腰三角形分布的三个红外点,并获取所述三个红外点的坐标数据。If the number of infrared points identified from the first object image is more than three, three infrared points distributed in an isosceles triangle are selected from all infrared points identified from the first object image , and obtain the coordinate data of the three infrared points. 一种红外定位装置,其特征在于,所述红外定位装置包括: An infrared positioning device, characterized in that the infrared positioning device comprises: 获取模块,用于基于物体图像对待定位物体进行红外点识别处理,获取与所述待定位物体对应的红外点信息,其中,所述红外点信息包括三个红外点的坐标数据,且所述三个红外点呈等腰三角形分布;The acquisition module is configured to perform infrared point identification processing on the object to be located based on the object image, and acquire infrared point information corresponding to the object to be located, wherein the infrared point information includes coordinate data of three infrared points, and the three The infrared points are distributed in an isosceles triangle; 生成模块,用于根据所述三个红外点的坐标数据识别所述等腰三角形的顶点和底边中点,根据所述等腰三角形的顶点和底边中点生成指向所述顶点的方向向量,所述方向向量表征所述待定位物体的运动方向;The generating module is used to identify the vertex and base midpoint of the isosceles triangle according to the coordinate data of the three infrared points, and generate a direction vector pointing to the vertex according to the vertex and base midpoint of the isosceles triangle , the direction vector represents the movement direction of the object to be positioned; 计算模块,用于计算所述待定位物体的方向向量与虚拟环境预设坐标系之间的向量夹角,根据所述向量夹角确定所述待定位物体的运动方向。The calculation module is configured to calculate the vector angle between the direction vector of the object to be positioned and the preset coordinate system of the virtual environment, and determine the moving direction of the object to be positioned according to the vector angle. 一种红外定位系统,其特征在于,包括摄像端、检测端和定位计算端,其中: An infrared positioning system, characterized in that it includes a camera end, a detection end and a positioning calculation end, wherein: 所述摄像端用于拍摄待定位物体的图像并从所述图像中获取红外点信息其中,所述红外点信息中含有红外点的坐标数据;The camera terminal is used to capture an image of the object to be positioned and obtain infrared point information from the image, wherein the infrared point information contains coordinate data of the infrared point; 所述检测端用于接收所述摄像端获取的红外点信息,从所述获取的红外点信息中识别出与所述待定位物体对应的三个红外点,其中,所述三个红外点呈等腰三角形分布;The detection end is configured to receive the infrared point information obtained by the camera end, and identify three infrared points corresponding to the object to be located from the obtained infrared point information, wherein the three infrared points are Isosceles triangle distribution; 所述定位计算端用于结合呈等腰三角形分布的三个红外点的坐标点数据,通过计算等腰三角形的重心位置确定所述待定位物体的在虚拟现实环境中的位置以及通过计算表征待定位物体运动方向的方向向量与虚拟环境预设坐标系之间的向量夹角确定所述待定位物体在虚拟现实环境中的运动方向,其中,所述表征待定位物体运动方向的方向向量由等腰三角形的底边中点指向等腰三角形的顶点获得。The positioning calculation terminal is used to combine the coordinate point data of three infrared points distributed in an isosceles triangle, determine the position of the object to be located in the virtual reality environment by calculating the position of the center of gravity of the isosceles triangle, and characterize the undetermined by calculation. The vector angle between the direction vector of the moving direction of the object and the preset coordinate system of the virtual environment determines the moving direction of the object to be positioned in the virtual reality environment, wherein the direction vector representing the moving direction of the object to be positioned is determined by etc. The midpoint of the base of the waist triangle points to the vertex of the isosceles triangle. 根据权利要求7所述的红外定位系统,其特征在于,所述定位计算端还用于对所述经过计算确定的所述待定位物体在虚拟现实中的位置及运动方向进行验证处理,若验证结果不通过,则将所述验证结果反馈至所述检测端并触发所述检测端重新从所述获取的红外点信息中识别与所述待定位物体对应的三个红外点,以使所述定位计算端重新计算所述待定位物体在虚拟现实中的位置及运动方向,直至验证结果通过为止。 The infrared positioning system according to claim 7, wherein the positioning calculation terminal is further configured to perform verification processing on the position and movement direction of the object to be positioned in the virtual reality determined by calculation. If the result fails, the verification result will be fed back to the detection terminal and the detection terminal will be triggered to re-identify the three infrared points corresponding to the object to be located from the acquired infrared point information, so that the The positioning computing end recalculates the position and movement direction of the object to be positioned in the virtual reality until the verification result is passed. 根据权利要求8所述的红外定位系统,其特征在于,所述定位计算端采用队列的工作模式进行定位计算,通过实时获取多组红外点数据并根据所述多组红外点数据对所述经过计算确定的所述待定位物体在虚拟现实中的位置及运动方向进行验证处理,其中,每一组红外点数据中包含有等腰三角形分布的三个红外点的坐标数据,所述验证处理包括对所述多组红外点数据进行期望值计算处理和方差值计算处理。 The infrared positioning system according to claim 8, wherein the positioning calculation terminal adopts a queue working mode to perform positioning calculation, and obtains multiple sets of infrared point data in real time and analyzes the passing data according to the multiple sets of infrared point data. The calculated and determined position and movement direction of the object to be positioned in virtual reality are processed for verification, wherein each group of infrared point data includes coordinate data of three infrared points distributed in an isosceles triangle, and the verification processing includes: An expectation value calculation process and a variance value calculation process are performed on the multiple sets of infrared point data. 根据权利要求7所述的红外定位系统,其特征在于,所述检测端通过预设的数据模板定时接收所述摄像端获取的红外点信息,其中,所述预设的数据模块配置的数据类型为列表数据类型。 The infrared positioning system according to claim 7, wherein the detection end regularly receives the infrared point information obtained by the camera end through a preset data template, wherein the data type configured by the preset data module is a list data type.
PCT/CN2020/101725 2020-07-13 2020-07-13 Infrared positioning method, infrared positioning apparatus, and infrared positioning system WO2022011517A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080001234.1A CN112136158B (en) 2020-07-13 2020-07-13 Infrared positioning method, infrared positioning device and infrared positioning system
PCT/CN2020/101725 WO2022011517A1 (en) 2020-07-13 2020-07-13 Infrared positioning method, infrared positioning apparatus, and infrared positioning system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/101725 WO2022011517A1 (en) 2020-07-13 2020-07-13 Infrared positioning method, infrared positioning apparatus, and infrared positioning system

Publications (1)

Publication Number Publication Date
WO2022011517A1 true WO2022011517A1 (en) 2022-01-20

Family

ID=73852112

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/101725 WO2022011517A1 (en) 2020-07-13 2020-07-13 Infrared positioning method, infrared positioning apparatus, and infrared positioning system

Country Status (2)

Country Link
CN (1) CN112136158B (en)
WO (1) WO2022011517A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835449A (en) * 2021-02-03 2021-05-25 青岛航特教研科技有限公司 Virtual reality and somatosensory device interaction-based safety somatosensory education system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2420171A1 (en) * 2010-08-20 2012-02-22 LG Electronics, Inc. Cleaner
CN102442248A (en) * 2010-10-11 2012-05-09 现代自动车株式会社 System and method for alarming front impact danger coupled with driver viewing direction and vehicle using same
CN104052987A (en) * 2013-03-11 2014-09-17 佳能株式会社 Image display device and image display method
CN104792312A (en) * 2014-01-20 2015-07-22 广东工业大学 Indoor automatic transport vehicle positioning system with three fixed balls as visual marker
CN105094127A (en) * 2014-05-15 2015-11-25 Lg电子株式会社 Cleaner and method of controlling cleaner
CN108510545A (en) * 2018-03-30 2018-09-07 京东方科技集团股份有限公司 Space-location method, space orientation equipment, space positioning system and computer readable storage medium
CN111028266A (en) * 2019-12-16 2020-04-17 洛阳语音云创新研究院 Livestock and poultry checking method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108917758B (en) * 2018-02-24 2021-10-01 石化盈科信息技术有限责任公司 Navigation method and system based on AR
US11526568B2 (en) * 2018-05-25 2022-12-13 Yellcast, Inc. User interfaces and methods for operating a mobile computing device for location-based transactions
CN109529318A (en) * 2018-11-07 2019-03-29 艾葵斯(北京)科技有限公司 Virtual vision system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2420171A1 (en) * 2010-08-20 2012-02-22 LG Electronics, Inc. Cleaner
CN102442248A (en) * 2010-10-11 2012-05-09 现代自动车株式会社 System and method for alarming front impact danger coupled with driver viewing direction and vehicle using same
CN104052987A (en) * 2013-03-11 2014-09-17 佳能株式会社 Image display device and image display method
CN104792312A (en) * 2014-01-20 2015-07-22 广东工业大学 Indoor automatic transport vehicle positioning system with three fixed balls as visual marker
CN105094127A (en) * 2014-05-15 2015-11-25 Lg电子株式会社 Cleaner and method of controlling cleaner
CN108510545A (en) * 2018-03-30 2018-09-07 京东方科技集团股份有限公司 Space-location method, space orientation equipment, space positioning system and computer readable storage medium
CN111028266A (en) * 2019-12-16 2020-04-17 洛阳语音云创新研究院 Livestock and poultry checking method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112136158A (en) 2020-12-25
CN112136158B (en) 2025-01-28

Similar Documents

Publication Publication Date Title
CN111815754B (en) A method for determining three-dimensional information, a device for determining three-dimensional information, and a terminal device
WO2020119684A1 (en) 3d navigation semantic map update method, apparatus and device
CN112927363A (en) Voxel map construction method and device, computer readable medium and electronic equipment
WO2019196745A1 (en) Face modelling method and related product
CN109754464B (en) Method and apparatus for generating information
CN108363995A (en) Method and apparatus for generating data
CN112766215B (en) Face image processing method and device, electronic equipment and storage medium
CN109582122A (en) Augmented reality information providing method, device and electronic equipment
CN112766027A (en) Image processing method, device, equipment and storage medium
CN114049674B (en) A three-dimensional face reconstruction method, device and storage medium
CN115994944B (en) Training method of key point prediction model, three-dimensional key point prediction method and related equipment
CN110163113A (en) A kind of human body behavior similarity calculating method and device
EP3855386A2 (en) Method, apparatus, device and storage medium for transforming hairstyle and computer program product
CN116188742A (en) Virtual object control method, device, equipment and storage medium
CN112258647B (en) Map reconstruction method and device, computer readable medium and electronic equipment
WO2024164569A9 (en) Data processing method and apparatus, device, and storage medium
CN112528707A (en) Image processing method, device, equipment and storage medium
CN108573192A (en) Match the glasses try-on method and device of face
CN110740545A (en) on-site light spot arrangement method and system, storage medium and lamp control equipment
CN115861515A (en) Three-dimensional face reconstruction method, computer program product and electronic device
WO2022011517A1 (en) Infrared positioning method, infrared positioning apparatus, and infrared positioning system
CN114049403A (en) Multi-angle three-dimensional face reconstruction method and device and storage medium
CN109816791B (en) Method and apparatus for generating information
CN116858215A (en) An AR navigation map generation method and device
KR102534449B1 (en) Image processing method, device, electronic device and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20945486

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 07.06.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20945486

Country of ref document: EP

Kind code of ref document: A1