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

WO2017143745A1 - Method and apparatus for determining movement information of to-be-detected object - Google Patents

Method and apparatus for determining movement information of to-be-detected object Download PDF

Info

Publication number
WO2017143745A1
WO2017143745A1 PCT/CN2016/096379 CN2016096379W WO2017143745A1 WO 2017143745 A1 WO2017143745 A1 WO 2017143745A1 CN 2016096379 W CN2016096379 W CN 2016096379W WO 2017143745 A1 WO2017143745 A1 WO 2017143745A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
point
tested
determining
nth frame
Prior art date
Application number
PCT/CN2016/096379
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 上海乐相科技有限公司
Publication of WO2017143745A1 publication Critical patent/WO2017143745A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/012Head tracking input arrangements

Definitions

  • the present invention relates to the field of virtual reality technologies, and in particular, to a method and apparatus for determining motion information of an object to be tested.
  • a virtual reality helmet refers to a helmet that guides a user to create a feeling in a virtual environment by using a helmet display to close a person's visual and auditory sense to the outside world.
  • virtual reality helmets have allowed users to control virtual images according to their viewpoints and locations in the virtual environment through a variety of advanced sensing methods, specifically, in the process of users using virtual reality helmets.
  • By presenting the motion state of the user's head the user is presented with different scenes.
  • An important experience of the virtual reality helmet is immersion. Therefore, whether the motion state of the user's head can be accurately and quickly perceived is an important indicator that affects the performance of the virtual reality helmet.
  • Embodiments of the present invention provide a method and apparatus for determining motion information of an object to be tested, so as to achieve accurate and rapid perception of a virtual reality helmet motion state.
  • an Nth frame image of the object to be tested collected by the camera device where the image of the Nth frame includes a point image of each physical marker point on the first side of the object to be tested;
  • the determining, according to the point image in the image of the Nth frame, the correspondence between the point image and the physical point including:
  • a reference mark point image in the image of the Nth frame is one of the mark point images in the image of the Nth frame
  • the number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
  • determining, according to the positional relationship between the point image and the reference point image in the image of the Nth frame, the number of each point image in the image of the Nth frame including:
  • the marker point image is determined based on at least a pixel value of each pixel of the Nth frame image, a number of pixel points on each contour, and a number of pixel points included in the contour.
  • the image of the marker point is determined according to at least a pixel value of each pixel of the image of the Nth frame, a number of pixels on each contour, and a number of pixels included in the contour, including:
  • the object to be tested is determined in the Nth frame according to the correspondence between the point image and the physical point, and the position information of each physical point and the image of each point
  • the motion information of the image corresponding to the moment including:
  • Determining the camera device by using a PnP algorithm according to the correspondence between the point image and the physical point, and the position information of each of the physical point and the image of each point The amount of rotation and the amount of translation for the object to be tested;
  • the motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
  • determining the motion information of the object to be tested at the time corresponding to the image of the Nth frame Also includes:
  • the amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
  • the physical mark point is an infrared point
  • the mark point image is an infrared point image
  • the method further includes:
  • the infrared point of the first side of the object to be tested is turned off, and the second side of the object to be tested is opened.
  • An infrared point; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
  • the N+1 frame image Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is
  • the N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired.
  • the N+2th frame image; the third side is obtained according to a preset cyclic sequence.
  • An embodiment of the present invention provides an apparatus for determining motion information of an object to be tested, including:
  • a first acquiring module configured to acquire an image of an Nth frame of the object to be tested collected by the camera, where the image of the Nth frame includes a point image of each physical point of the first side of the object to be tested;
  • a determining module configured to determine the mark point image according to the mark point image in the image of the Nth frame Corresponding relationship with the physical marker points;
  • a second acquiring module configured to acquire position information of each physical point of the first side of the object to be tested in a preset world coordinate system, and image points of the image of the Nth frame in preset image coordinates Location information in the system;
  • a processing module configured to determine, according to a correspondence between the mark point image and the physical mark point, and location information of each of the physical mark points and the image of each mark point, the object to be tested is at the Nth
  • the frame image corresponds to the motion information at the time.
  • the determining module is specifically configured to:
  • a reference mark point image in the image of the Nth frame is one of the mark point images in the image of the Nth frame
  • the number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
  • the determining module is specifically configured to:
  • M is an integer greater than or equal to 2;
  • the determining module is further configured to:
  • At least a pixel value of each pixel of the image of the Nth frame, a pixel point of each contour The number of pixels and the number of pixels included in the contour determine the image of the marker point.
  • the determining module is specifically configured to:
  • the processing module is specifically configured to:
  • the motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
  • the processing module is further configured to:
  • the amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
  • the physical mark point is an infrared point
  • the mark point image is an infrared point image
  • the processing module is further configured to:
  • the infrared point of the first side of the object to be tested is turned off, and the object to be tested is turned on.
  • An infrared point of the second side; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
  • the N+1 frame image Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is
  • the N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired.
  • the N+2th frame image; the third side is obtained according to a preset cyclic sequence.
  • the image of the Nth frame of the object to be tested collected by the camera device is acquired, and the image of the Nth frame includes the image of the point of each physical mark on the first side of the object to be tested;
  • the mark point image determines the correspondence relationship between the mark point image and the physical mark point; acquires the position information of each physical mark point of the first side of the object to be tested in the preset world coordinate system and the image of each mark point of the Nth frame image The position information in the preset image coordinate system; determining the object to be tested at the corresponding moment of the image of the Nth frame according to the correspondence between the point image and the physical point, and the position information of each physical point and each point image Sports information.
  • the motion information of the object to be tested is determined, which is compared with the prior art.
  • the method for obtaining a rotational posture by using a sensor such as a gyroscope can effectively determine the amount of translation of the object to be tested, thereby more accurately and quickly sensing the motion state of the object to be tested, and has high real-time performance, which can significantly improve the actual user. Experience.
  • FIG. 1 is a schematic structural diagram of a system applicable to an embodiment of the present invention
  • FIG. 2 is a schematic view showing the arrangement of infrared lamps on each side of the virtual reality helmet
  • FIG. 3 is a schematic flowchart of determining motion information of an object to be tested according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of preprocessing an image according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of determining a correspondence between a mark point image and a physical mark point according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of a marker point image number according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a process of performing prediction processing according to motion information of an object to be tested
  • FIG. 8 is a schematic structural diagram of an apparatus for determining motion information of an object to be tested according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of an apparatus for determining motion information of an object to be tested according to an embodiment of the present invention.
  • FIG. 1 exemplarily shows a system architecture diagram applicable to the embodiment of the present invention.
  • the system architecture includes a server 101, an imaging device 102, and an object to be tested 103.
  • the server 101 and the camera 102 can perform wired or wireless communication, that is, the information can be transmitted between the server 101 and the camera 102 by wired transmission or wireless transmission.
  • the camera 102 can be transmitted by wire or wirelessly.
  • the method sends the captured image to the server 101; the server 101 and the object to be tested 103 can also perform wired or wireless communication.
  • the server 101 sends the scene rendering data to the object to be tested 103 by wired transmission or wireless transmission. .
  • the server 101 may be a PC host with data processing capability.
  • the object to be tested 103 may be a virtual reality helmet including first to sixth sides (assuming that the normal use condition of the virtual reality helmet is worn on the user's head, based on which the first to sixth helmets may be determined
  • the side faces are front, back, top, bottom, left, and right with respect to the camera.
  • Infrared lights also called infrared dots
  • the routing rule in the embodiment of the present invention may be that the infrared lamps on each side are arranged in a manner of a convex polygon array, and may be based on the above-mentioned layout rules for different sides.
  • FIG. 2 it is a schematic diagram of the arrangement of infrared lamps on each side of the virtual reality helmet. It should be noted that FIG. 2 is only an exemplary representation of the arrangement of the infrared lamps, and there may be a difference in the proportion of the specific objects.
  • the camera device 102 can be an infrared camera, which is mainly used for capturing state information of the infrared lamp disposed on the virtual reality helmet, and transmits the captured image to the server 101, so that the server determines the motion information of the virtual reality helmet through correlation calculation (rotation) Matrix R and translation vector T).
  • the virtual reality helmet and the infrared camera are connected to the PC host through a USB data line, and both USB2.0 and USB3.0, preferably USB3.0.
  • the virtual reality helmet is also connected to the PC host through the HDMI interface to facilitate capturing scene rendering data.
  • FIG. 3 is a schematic flowchart of determining motion information of an object to be tested according to an embodiment of the present invention.
  • Step 301 Acquire an image of an Nth frame of the object to be tested collected by the camera, where the image of the Nth frame includes a point image of each physical mark on the first side of the object to be tested;
  • Step 302 Determine, according to the point image in the image of the Nth frame, a correspondence between the point image and the physical point;
  • Step 303 Acquire location information of each physical marker point of the first side of the object to be tested in a preset world coordinate system, and position of each marker image of the Nth frame image in a preset image coordinate system. information;
  • Step 304 according to the correspondence between the mark point image and the physical mark point, and the And determining, by the physical location points and the location information of the respective marker point images, motion information of the object to be tested at a time corresponding to the image of the Nth frame.
  • the motion information of the object to be tested is determined, which is compared with the prior art.
  • the method for obtaining a rotational posture by using a sensor such as a gyroscope can effectively determine the amount of translation of the object to be tested, thereby more accurately and quickly sensing the motion state of the object to be tested, and has high real-time performance, which can significantly improve the actual user. Experience.
  • the physical marker point in the embodiment of the present invention may be an infrared point, and the marker point image is an infrared point image.
  • the optical tracking process of the motion information (space shift amount) of the virtual reality helmet only the side of the six sides of the helmet that can be completely photographed by the camera is performed on the upper, the lower, the left, the right, the front and the back. deal with. Therefore, the following is a detailed description of the process of determining the motion information of the virtual reality helmet by a single side.
  • the image capturing device may interfere with the ambient light and other factors when capturing the image
  • the image of the Nth frame should be preprocessed. And determining, according to at least the pixel value of each pixel of the image of the Nth frame, the number of pixels on each contour, and the number of pixels included in the contour, the interference image is excluded, and the marker image is determined.
  • the first candidate point image is obtained according to the pixel value of the pixel of each image; wherein the pixel value of the pixel of the first candidate point image is greater than or equal to the first threshold; according to each first candidate mark Obtaining a second candidate point image by the number of pixels on the contour of the image; the number of pixels on the contour of the second candidate point image is greater than or equal to a second threshold and less than or equal to a third threshold; The number of pixels included in the contour of each second candidate point image obtains a third candidate point image; the number of pixels included in the contour of the third candidate point image is greater than or equal to a fourth threshold Determining an ellipse parameter of the third candidate point image, and determining a third candidate point image that matches the ellipse parameter to the preset parameter range as the point image.
  • the first threshold, the second threshold, the third threshold, the fourth threshold, and the preset parameter range may all be set by experience by those skilled in the art.
  • FIG. 4 is a schematic flowchart of pre-processing an image according to an embodiment of the present invention, including steps 401 to 408, which are specifically described below in conjunction with FIG. 4.
  • Step 401 Acquire an image of an Nth frame.
  • Step 402 Binarization processing, to obtain a first candidate point image; specifically: determining a maximum pixel value max of each pixel in the image of the Nth frame, using a*max as a binarization threshold (first threshold) Each pixel is traversed. If the pixel value of the pixel is less than a*max, the pixel value is set to 0. If the pixel value of the pixel is greater than or equal to a*max, the pixel value is set to 255. Where a is a weight, the value of a can be set by a person skilled in the art according to experience, for example, can be set to 0.9;
  • Step 403 Obtain a number of pixel points on a contour of each first candidate point image, where the contour is a position of a pixel point whose pixel value changes from 0 to 255 or changes from 255 to 0.
  • the contour is a position of a pixel point whose pixel value changes from 0 to 255 or changes from 255 to 0.
  • 8 neighborhood pixels can be obtained (except for the edge region of the image, each pixel is adjacent to 8 pixels, and the first pixel on the contour is determined.
  • Step 404 For each first candidate point image, delete an image whose number of pixels on the contour is smaller than a second threshold or greater than a third threshold, to obtain a second candidate point image;
  • Step 405 Delete, for each second candidate point image, an image whose number of pixels included in the contour is less than a fourth threshold, to obtain a third candidate point image;
  • Step 406 based on a preset image coordinate system (including an x-axis and a y-axis), fitting an ellipse parameter (including an ellipse center, a long and short axis, a tilt angle, and the like) of the third candidate point image by a fitting algorithm;
  • a preset image coordinate system including an x-axis and a y-axis
  • an ellipse parameter including an ellipse center, a long and short axis, a tilt angle, and the like
  • Step 407 For each third candidate point image, delete an image whose ellipse parameter does not meet the preset parameter range, and determine a third candidate point image whose ellipse parameter meets the preset parameter range as the point image.
  • Step 408 Output an ellipse parameter of the obtained point image, and determine position information of the point according to the ellipse parameter.
  • the image of the Nth frame is preprocessed by the foregoing process, thereby quickly and accurately eliminating interference factors in the environment, determining the image of the marker point, and determining the image and label of the marker point for subsequent determination.
  • the correspondence between the points has laid a good foundation.
  • the correspondence between the point image in the image of the Nth frame and the physical point of the first side is determined by determining an image of the reference point in the image of the Nth frame based on the envelope method;
  • the reference mark point image is one of the mark point images in the Nth frame image;
  • the number of the mark point image in the Nth frame image is determined according to the positional relationship between the mark point image and the reference mark point image in the Nth frame image;
  • the physical marker point with the same number as the marker point image is determined as the physical marker point corresponding to the marker point image, and the correspondence relationship between the marker point image and the physical marker point is obtained; the number of the physical marker point and the number of the marker point image are based on the same Numbering rules are obtained.
  • the present invention when determining the number of each point image in the image of the Nth frame according to the positional relationship between the point image in the image of the Nth frame and the image of the reference point image, Based on the envelope method, layer by layer, from the outermost layer to the innermost layer, specifically: determining the marking point of the first layer according to the positional relationship between the marked point image and the reference point image in the image of the Nth frame The image and the sorting of the image of the first layer of the marker point; the reference marker image is the marker image of the first layer; and the marker points other than the marker image of the first layer to the M-1 layer according to the image of the Nth frame The positional relationship between the image and the reference point image determines the order of the image of the mark of the Mth layer and the image of the mark of the Mth layer; M is an integer greater than or equal to 2; according to the image of the mark of the first layer to the Mth layer Sort to determine the number of the marker image of the first layer to the third layer.
  • M can be set by the person skilled in the art according to the experience and the arrangement of the infrared light on the side. In general, the value of M can be set to 3.
  • FIG. 5 is a schematic flowchart of determining a correspondence between a point image and a physical point according to an embodiment of the present invention, which includes steps 501 to 504, which are specifically described below with reference to FIG. 5.
  • Step 501 Determine, according to the convex hull algorithm, the reference mark point image and the mark image of the first layer (the outermost layer), and according to the distance between each mark point image of the first layer and the reference mark point, according to the small to
  • the order of the reference point images is specifically as follows: the point images of the image of the Nth frame are arranged in ascending order according to the y-axis coordinate, and if the same y-axis coordinate corresponds to multiple Marking the point image, the plurality of point images are arranged in ascending order according to the x-axis coordinate, and the point image with the largest y-axis coordinate and the smallest x-axis coordinate (ie, the point image in the lower left corner) is determined as the reference point image;
  • Step 502 determining four image points of the second layer (secondary outer layer), according to the distance between the four point image and the reference point image, arranged in order from small to large;
  • Step 503 determining three image points of the third layer (the innermost layer), according to the distance between the three point image and the reference point image, arranged in order from small to large;
  • Step 504 according to the first layer to the third layer obtained above, sequentially numbered in order from outer to inner, and the first layer number is 1-8, the second layer number is 9-12, and the third layer number is 13-15, as shown in FIG. 6, is a schematic diagram of the number of points of the marker point.
  • the first side physical mark point is obtained based on the same numbering rule as described above, if the number of the mark point image determined by the above method is normal, the physical mark point having the same number as the mark point image can be determined to correspond. Physical point points, the correspondence between the point image and the physical point is obtained.
  • the convex bundle algorithm is used to determine the correspondence between the point image and the physical marker point, so that the determination of the correspondence relationship is more accurate and fast, and lays a good foundation for subsequently determining the motion information of the object to be tested.
  • step 304 based on the correspondence between the point image and the physical point obtained in step 302, and the position information of each physical point and each point image obtained in step 303, the PnP algorithm is used to determine the camera relative to the test.
  • the amount of rotation and the amount of translation of the object, and the LM algorithm is used to optimize the amount of rotation and the amount of translation of the camera relative to the object to be tested; according to the amount of rotation and the amount of translation of the camera device relative to the object to be measured,
  • the motion information of the object to be tested at the time corresponding to the image of the Nth frame; the motion information of the object to be tested at the time corresponding to the image of the Nth frame is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the corresponding time of the image of the Nth frame.
  • FIG. 7 is a schematic diagram of a process of performing prediction processing according to motion information of an object to be tested.
  • the embodiment of the present invention further determines the prediction processing procedure shown in FIG. 7 after the object to be measured is rotated and translated by the camera at the corresponding time of the image of the Nth frame, specifically:
  • Step 701 Determine, by using a PnP algorithm and an LM algorithm, a rotation amount and a translation amount of the object to be tested relative to the imaging device at a corresponding time of the image of the Nth frame;
  • Step 702 determining that the motion information of the object to be tested at the time corresponding to the image of the Nth frame conforms to the preset motion amount range, specifically: whether the rotation amount is within a preset rotation amount range, and whether the translation amount is within a preset translation amount range; if yes, Then, step 703 is performed; if not, step 701 is performed; wherein the preset rotation amount range and the preset translation amount range can be obtained by a person skilled in the art according to experience or according to a large number of experiments;
  • Step 703 predict a second side according to the motion information of the object to be tested at the corresponding time of the image of the Nth frame, close the infrared point of the first side of the object to be tested, and open the infrared point of the second side of the object to be tested;
  • Step 704 Acquire an image of an N+1th frame acquired by the camera.
  • Step 705 determining whether the infrared point image of each infrared point of the second side of the object to be tested is included in the image of the N+1th frame, and if yes, executing step 701, determining, according to the image of the (N+1)th frame Determining the motion information of the object to be measured at the time corresponding to the (N+1)th frame image; if not, executing step 706;
  • Step 706 the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image of the N+2 frame acquired by the camera device is acquired; wherein the third side is It is obtained according to the preset cycle order.
  • the preset cycle order can be front, left, right, top, bottom, and back.
  • Step 707 Determine whether the infrared point image of each infrared point of the third side of the object to be tested is included in the image of the N+2 frame, and if yes, execute step 701, and determine the image according to the image of the N+2 frame.
  • the embodiment of the present invention further provides an apparatus for determining motion information of an object to be tested, and the specific content of the apparatus may be implemented by referring to the foregoing method.
  • FIG. 8 is a schematic structural diagram of an apparatus for determining motion information of an object to be tested according to an embodiment of the present invention.
  • the first obtaining module 801 is configured to acquire an image of the Nth frame of the object to be tested collected by the camera,
  • the image of the Nth frame includes a mark point image of each physical mark point of the first side of the object to be tested;
  • a determining module 802 configured to determine, according to the point image in the image of the Nth frame, a correspondence between the point image and the physical point;
  • a second acquiring module 803 configured to acquire position information of each physical mark point of the first side of the object to be tested in a preset world coordinate system, and image of each point of the Nth frame image in a preset image Position information in the coordinate system;
  • the processing module 804 is configured to determine, according to the correspondence between the mark point image and the physical mark point, and the position information of each physical mark point and the image of each mark point, the object to be tested is in the first
  • the N frame image corresponds to the motion information of the time.
  • the determining module 802 is specifically configured to:
  • a reference mark point image in the image of the Nth frame is one of the mark point images in the image of the Nth frame
  • the number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
  • the determining module 802 is specifically configured to:
  • M is an integer greater than or equal to 2;
  • Determining the first layer to the Mth according to the ordering of the image points of the first layer to the Mth layer The number of the point image of the layer.
  • the determining module 802 is further configured to:
  • the marker point image is determined based on at least a pixel value of each pixel of the Nth frame image, a number of pixel points on each contour, and a number of pixel points included in the contour.
  • the determining module 802 is specifically configured to:
  • processing module 804 is specifically configured to:
  • the motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
  • processing module 804 is further configured to:
  • the amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
  • the physical mark point is an infrared point
  • the mark point image is an infrared point image
  • the processing module 804 is further configured to:
  • the infrared point of the first side of the object to be tested is turned off, and the second side of the object to be tested is opened.
  • An infrared point; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
  • the N+1 frame image Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is
  • the N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired.
  • the N+2th frame image; the third side is obtained according to a preset cyclic sequence.
  • the image of the Nth frame of the object to be tested collected by the camera device is acquired, and the image of the Nth frame includes the image of the point of each physical mark on the first side of the object to be tested; Marking the point image to determine the correspondence between the point image and the physical point; obtaining the position information of each physical point of the first side of the object to be tested in a preset world coordinate system and the image of each point of the Nth frame image Position information in a preset image coordinate system; determining the motion of the object to be tested at the corresponding moment of the image of the Nth frame according to the correspondence between the point image and the physical point, and the position information of each physical point and each point image information.
  • the motion information of the object to be tested is determined, which is compared with the prior art.
  • the method for obtaining a rotational posture by using a sensor such as a gyroscope can effectively determine the amount of translation of the object to be tested, thereby more accurately and quickly sensing the motion state of the object to be tested, and has high real-time performance, which can significantly improve the actual user. Experience.
  • the embodiment of the present application provides another apparatus for determining motion information of an object to be tested.
  • the device for determining the motion information of the object to be tested provided by the embodiment of the present application is as shown in FIG. 9.
  • the device for determining the motion information of the object to be tested includes: a communication interface 901, a processor 902, and a memory. 903 and bus system 904;
  • the memory 903 is used to store a program.
  • the program can include program code, the program code including computer operating instructions.
  • the memory 903 may be a random access memory (RAM) or a non-volatile memory such as at least one disk storage. Only one memory is shown in the figure, of course, the memory can also be set to a plurality as needed. Memory 903 can also be a memory in processor 902.
  • the memory 903 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:
  • Operation instructions include various operation instructions for implementing various operations.
  • Operating system Includes a variety of system programs for implementing various basic services and handling hardware-based tasks.
  • the processor 902 controls the operation of the device that determines the motion information of the object to be tested, and the processor 902 may also be referred to as a CPU (Central Processing Unit).
  • the components of the device for determining the motion information of the object to be tested are coupled together by a bus system 904.
  • the bus system 904 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus.
  • various buses are labeled as bus system 904 in the figure. For ease of representation, only the schematic drawing is shown in FIG.
  • Processor 902 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 902 or an instruction in a form of software.
  • the processor 902 described above may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or discrete hardware. Component.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a random access memory. Flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. are well-known storage media in the field.
  • the storage medium is located in the memory 903, and the processor 902 reads the information in the memory 903 and performs the following steps in conjunction with its hardware:
  • an Nth frame image of the object to be tested collected by the camera device where the Nth frame image includes a mark point image of each physical mark point of the first side of the object to be tested; according to the mark in the image of the Nth frame a point image, determining a correspondence between the point image and the physical point; acquiring position information of each physical point of the first side of the object to be tested in a preset world coordinate system, and the Nth frame Position information of each point image of the image in a preset image coordinate system; according to the correspondence between the point image and the physical point, and the position of each physical point and the image of each point And determining information about the motion of the object to be tested at the time corresponding to the image of the Nth frame.
  • the processor 902 is specifically configured to:
  • a reference mark point image in the image of the Nth frame is one of the mark point images in the image of the Nth frame
  • the number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
  • the processor 902 is specifically configured to:
  • M is an integer greater than or equal to 2;
  • the processor 902 is further configured to:
  • the marker point image is determined based on at least a pixel value of each pixel of the Nth frame image, a number of pixel points on each contour, and a number of pixel points included in the contour.
  • the processor 902 is specifically configured to:
  • the processor 902 is specifically configured to:
  • the motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
  • the processor 902 is further configured to:
  • the amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
  • the physical mark point is an infrared point
  • the mark point image is an infrared point image
  • the processor 902 is further configured to:
  • the infrared point of the first side of the object to be tested is turned off, and the second side of the object to be tested is opened.
  • An infrared point; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
  • the N+1 frame image Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is
  • the N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired.
  • the N+2th frame image; the third side is obtained according to a preset cyclic sequence.
  • the image of the Nth frame of the object to be tested collected by the camera device is acquired, and the image of the Nth frame includes the image of the point of each physical mark on the first side of the object to be tested; Marking the point image to determine the correspondence between the point image and the physical point; obtaining the position information of each physical point of the first side of the object to be tested in a preset world coordinate system and the image of each point of the Nth frame image Position information in a preset image coordinate system; determining the motion of the object to be tested at the corresponding moment of the image of the Nth frame according to the correspondence between the point image and the physical point, and the position information of each physical point and each point image information.
  • the motion information of the object to be tested is determined, which is compared with the prior art.
  • the method for obtaining a rotational posture by using a sensor such as a gyroscope can effectively determine the amount of translation of the object to be tested, thereby more accurately and quickly sensing the motion state of the object to be tested, and has high real-time performance, which can significantly improve the actual user. Experience.
  • embodiments of the present invention may be provided as a method, or a computer Program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed are a method and an apparatus for determining movement information of a to-be-detected object. In embodiments of the present invention, the Nth frame of image of a to-be-detected object acquired by a photography device is obtained; corresponding relations between mark point phantoms and physical mark points are determined according to mark point phantoms in the Nth frame of image; and movement information of the to-be-detected object at a moment corresponding to the Nth frame of image is determined according to position information of the physical mark points and position information of the mark point phantoms. In the embodiments of the present invention, corresponding relations between mark point phantoms and physical mark points are determined, and movement information of a to-be-detected object is determined according to position information of the mark point phantoms and position information of the physical mark points. Compared with the method in the prior art in which a rotation attitude is obtained using a sensor such as a gyroscope, the embodiments of the present invention can effectively determine the translation of the to-be-detected object, so as to more accurately and quickly sense the movement state of the to-be-detected object, thereby achieving high instantaneity and significantly improving actual experience of a user.

Description

一种确定待测对象的运动信息的方法及装置Method and device for determining motion information of object to be tested
本申请要求在2016年2月22日提交中华人民共和国知识产权局、申请号为201610096765.9,发明名称为“一种确定待测对象的运动信息的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese Patent Application of the People's Republic of China Intellectual Property Office, Application No. 201610096765.9, entitled "A Method and Apparatus for Determining Motion Information of Objects to Be Tested", on February 22, 2016, The entire contents are incorporated herein by reference.
技术领域Technical field
本发明涉及虚拟现实技术领域,尤其涉及一种确定待测对象的运动信息的方法及装置。The present invention relates to the field of virtual reality technologies, and in particular, to a method and apparatus for determining motion information of an object to be tested.
背景技术Background technique
虚拟现实头盔,是指一种通过利用头盔显示器将人的对外界的视觉、听觉封闭,引导用户产生一种身在虚拟环境中的感觉的头盔。随着电子技术的不断发展,虚拟现实头盔已经允许用户通过多种先进的传感手段根据自己在虚拟环境中的视点和位置来控制虚拟画面,具体来说,在用户使用虚拟现实头盔的过程中,通过感知用户头部的运动状态,从而为用户呈现出不同的场景。虚拟现实头盔一个重要的体验就是沉浸感,因此,能否准确快速感知到用户头部的运动状态是影响虚拟现实头盔性能的重要指标。A virtual reality helmet refers to a helmet that guides a user to create a feeling in a virtual environment by using a helmet display to close a person's visual and auditory sense to the outside world. With the continuous development of electronic technology, virtual reality helmets have allowed users to control virtual images according to their viewpoints and locations in the virtual environment through a variety of advanced sensing methods, specifically, in the process of users using virtual reality helmets. By presenting the motion state of the user's head, the user is presented with different scenes. An important experience of the virtual reality helmet is immersion. Therefore, whether the motion state of the user's head can be accurately and quickly perceived is an important indicator that affects the performance of the virtual reality helmet.
目前,由于普通加速计无法准确获取空间平移向量,大部分虚拟现实头盔只能通过陀螺仪等传感器获取旋转姿态,然而,采用这种方式,在用户使用虚拟现实头盔的过程中,缺乏对用户头部平移运动(也就是虚拟现实头盔的平移运动)的感知,导致对虚拟现实头盔的运动状态的感知出现偏差,极大影响了用户的实际体验。At present, because ordinary accelerometers cannot accurately obtain spatial translation vectors, most virtual reality helmets can only obtain rotational attitudes through sensors such as gyroscopes. However, in this way, in the process of users using virtual reality helmets, there is a lack of user heads. The perception of the translational motion (that is, the translational motion of the virtual reality helmet) leads to a deviation in the perception of the motion state of the virtual reality helmet, which greatly affects the actual experience of the user.
综上,目前亟需一种能够准确快速地感知虚拟现实头盔运动状态的方法。In summary, there is a need for a method for accurately and quickly sensing the state of motion of a virtual reality helmet.
发明内容Summary of the invention
本发明实施例提供一种确定待测对象的运动信息的方法及装置,用以实现准确快速地感知虚拟现实头盔运动状态。 Embodiments of the present invention provide a method and apparatus for determining motion information of an object to be tested, so as to achieve accurate and rapid perception of a virtual reality helmet motion state.
本发明实施例提供的一种确定待测对象的运动信息的方法,包括:A method for determining motion information of an object to be tested according to an embodiment of the present invention includes:
获取摄像装置采集到的待测对象的第N帧图像,所述第N帧图像包括所述待测对象第一侧面的各个物理标记点的标记点影像;Obtaining an Nth frame image of the object to be tested collected by the camera device, where the image of the Nth frame includes a point image of each physical marker point on the first side of the object to be tested;
根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系;Determining, according to the point image in the image of the Nth frame, a correspondence between the point image and the physical point;
获取所述待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及所述第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;Acquiring position information of each physical mark point of the first side of the object to be tested in a preset world coordinate system and position information of each point image of the Nth frame image in a preset image coordinate system;
根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息。Determining, according to the correspondence between the mark point image and the physical mark point, and the position information of each of the physical mark points and the respective mark point images, determining, at the time corresponding to the image of the Nth frame, the object to be tested Sports information.
较佳地,所述根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系,包括:Preferably, the determining, according to the point image in the image of the Nth frame, the correspondence between the point image and the physical point, including:
基于包络法确定所述第N帧图像中的参考标记点影像;所述参考标记点影像为所述第N帧图像中的标记点影像中的一个;Determining, by an envelope method, a reference mark point image in the image of the Nth frame; the reference mark point image is one of the mark point images in the image of the Nth frame;
根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号;Determining, according to a positional relationship between the point image in the image of the Nth frame and the image of the reference point image, a number of each point image in the image of the Nth frame;
将与所述标记点影像的编号相同的物理标记点确定为所标记点影像对应的物理标记点,得到所述标记点影像与所述物理标记点的对应关系;所述物理标记点的编号和所述标记点影像的编号是基于相同的编号规则得到的;所述待测对象第一侧面的物理标记点呈凸多边形阵列分布。Determining a physical marker point corresponding to the number of the marker point image as a physical marker point corresponding to the marker point image, and obtaining a correspondence relationship between the marker point image and the physical marker point; The number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
较佳地,根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号,包括:Preferably, determining, according to the positional relationship between the point image and the reference point image in the image of the Nth frame, the number of each point image in the image of the Nth frame, including:
根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定第一层的标记点影像以及所述第一层的标记点影像的排序;所述参考标记点影像为所述第一层的标记点影像;Determining, according to a positional relationship between the mark point image and the reference mark point image in the image of the Nth frame, a mark point image of the first layer and an order of the mark point image of the first layer; the reference mark point image a mark point image of the first layer;
根据所述第N帧图像中的除所述第一层至第M-1层的标记点影像以外的 标记点影像与所述参考标记点影像的位置关系,确定第M层的标记点影像以及所述第M层的标记点影像的排序;M为大于等于2的整数;And other than the mark image of the first layer to the M-1th layer in the image of the Nth frame Determining a positional relationship between the marker point image and the reference marker point image, determining an image of the marker point image of the Mth layer and the marker point image of the Mth layer; M is an integer greater than or equal to 2;
根据所述第一层至第M层的标记点影像的排序,确定所述第一层至第M层的标记点影像的编号。Determining the number of the point image of the first layer to the Mth layer according to the order of the image of the mark points of the first layer to the Mth layer.
较佳地,所述获取摄像装置采集到的待测对象的第N帧图像之后,根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系之前,还包括:Preferably, after acquiring the image of the Nth frame of the object to be tested collected by the camera, determining the correspondence between the point image and the physical point according to the point image in the image of the Nth frame Previously, it also included:
至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的个数以及轮廓内包含的像素点的个数,确定出所述标记点影像。The marker point image is determined based on at least a pixel value of each pixel of the Nth frame image, a number of pixel points on each contour, and a number of pixel points included in the contour.
较佳地,至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的个数以及轮廓内包含的像素点的个数,确定出所述标记点影像,包括:Preferably, the image of the marker point is determined according to at least a pixel value of each pixel of the image of the Nth frame, a number of pixels on each contour, and a number of pixels included in the contour, including:
根据所述第N帧图像的各个像素点的像素值,得到第一备选标记点影像;所述第一备选标记点影像的像素点的像素值大于等于第一阈值;Obtaining, according to the pixel value of each pixel of the image of the Nth frame, a first candidate point image; the pixel value of the pixel of the first candidate point image is greater than or equal to a first threshold;
根据各个所述第一备选标记点影像的轮廓上的像素点的个数,得到第二备选标记点影像;所述第二备选标记点影像的轮廓上的像素点的个数大于等于第二阈值且小于等于第三阈值;Obtaining a second candidate point image according to the number of pixels on the contour of each of the first candidate point images; the number of pixels on the contour of the second candidate point image is greater than or equal to a second threshold and less than or equal to a third threshold;
根据各个所述第二备选标记点影像的轮廓内包含的像素点的个数,得到第三备选标记点影像;所述第三备选标记点影像的轮廓内包含的像素点的个数大于等于第四阈值;Obtaining, according to the number of pixels included in the contour of each of the second candidate point images, a third candidate point image; the number of pixels included in the contour of the third candidate point image Greater than or equal to the fourth threshold;
确定所述第三备选标记点影像的椭圆参数,将椭圆参数符合预设参数范围的第三备选标记点影像确定为所述标记点影像。Determining an ellipse parameter of the third candidate point image, and determining a third candidate point image that matches the ellipse parameter to the preset parameter range as the point image.
较佳地,根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息,包括:Preferably, the object to be tested is determined in the Nth frame according to the correspondence between the point image and the physical point, and the position information of each physical point and the image of each point The motion information of the image corresponding to the moment, including:
根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,利用PnP算法确定所述摄像装置相 对于所述待测对象的的旋转量和平移量;Determining the camera device by using a PnP algorithm according to the correspondence between the point image and the physical point, and the position information of each of the physical point and the image of each point The amount of rotation and the amount of translation for the object to be tested;
根据所述摄像装置相对于所述待测对象的旋转量和平移量,得到所述待测对象在所述第N帧图像对应时刻的运动信息;所述待测对象在所述第N帧图像对应时刻的运动信息为所述待测对象在所述第N帧图像对应时刻相对于所述摄像装置的旋转量和平移量。Obtaining motion information of the object to be tested at a time corresponding to the image of the Nth frame according to a rotation amount and a translation amount of the imaging device with respect to the object to be tested; and the image of the object to be tested is in the image of the Nth frame The motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
较佳地,所述利用PnP算法确定所述摄像装置相对于所述待测对象的的旋转量和平移量之后,确定所述待测对象在所述第N帧图像对应时刻的运动信息之前,还包括:Preferably, after determining the rotation amount and the translation amount of the imaging device relative to the object to be tested by using the PnP algorithm, determining the motion information of the object to be tested at the time corresponding to the image of the Nth frame, Also includes:
采用LM算法对所述摄像装置相对于所述待测对象的的旋转量和平移量进行优化。The amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
较佳地,所述物理标记点为红外点;所述标记点影像为红外点影像;Preferably, the physical mark point is an infrared point; the mark point image is an infrared point image;
所述确定所述待测对象在所述第N帧图像对应时刻的运动信息之后,还包括:After determining the motion information of the object to be tested at the time corresponding to the image of the Nth frame, the method further includes:
确定所述待测对象在所述第N帧图像对应时刻的运动信息符合预设运动量范围的情况下,关闭所述待测对象第一侧面的红外点,开启所述待测对象第二侧面的红外点;所述第二侧面为根据所述待测对象在所述第N帧图像对应时刻的运动信息预测到的;Determining, when the motion information of the object to be tested is in the range of the preset motion amount, the infrared point of the first side of the object to be tested is turned off, and the second side of the object to be tested is opened. An infrared point; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
获取所述摄像装置采集到的第N+1帧图像;Acquiring an image of the (N+1)th frame acquired by the camera device;
判断所述第N+1帧图像中是否包括所述待测对象第二侧面的各个红外点的红外点影像,若是,则根据所述第N+1帧图像确定所述待测对象在所述第N+1帧图像对应时刻的运动信息;若否,则关闭所述待测对象第二侧面的红外点,开启所述待测对象第三侧面的红外点,并获取所述摄像装置采集到的第N+2帧图像;所述第三侧面为根据预设的循环顺序得到的。Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is The N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired. The N+2th frame image; the third side is obtained according to a preset cyclic sequence.
本发明实施例提供一种确定待测对象的运动信息的装置,包括:An embodiment of the present invention provides an apparatus for determining motion information of an object to be tested, including:
第一获取模块,用于获取摄像装置采集到的待测对象的第N帧图像,所述第N帧图像包括所述待测对象第一侧面的各个物理标记点的标记点影像;a first acquiring module, configured to acquire an image of an Nth frame of the object to be tested collected by the camera, where the image of the Nth frame includes a point image of each physical point of the first side of the object to be tested;
确定模块,用于根据所述第N帧图像中的标记点影像,确定所述标记点影 像与所述物理标记点的对应关系;a determining module, configured to determine the mark point image according to the mark point image in the image of the Nth frame Corresponding relationship with the physical marker points;
第二获取模块,用于获取所述待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及所述第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;a second acquiring module, configured to acquire position information of each physical point of the first side of the object to be tested in a preset world coordinate system, and image points of the image of the Nth frame in preset image coordinates Location information in the system;
处理模块,用于根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息。a processing module, configured to determine, according to a correspondence between the mark point image and the physical mark point, and location information of each of the physical mark points and the image of each mark point, the object to be tested is at the Nth The frame image corresponds to the motion information at the time.
较佳地,所述确定模块具体用于:Preferably, the determining module is specifically configured to:
基于包络法确定所述第N帧图像中的参考标记点影像;所述参考标记点影像为所述第N帧图像中的标记点影像中的一个;Determining, by an envelope method, a reference mark point image in the image of the Nth frame; the reference mark point image is one of the mark point images in the image of the Nth frame;
根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号;Determining, according to a positional relationship between the point image in the image of the Nth frame and the image of the reference point image, a number of each point image in the image of the Nth frame;
将与所述标记点影像的编号相同的物理标记点确定为所标记点影像对应的物理标记点,得到所述标记点影像与所述物理标记点的对应关系;所述物理标记点的编号和所述标记点影像的编号是基于相同的编号规则得到的;所述待测对象第一侧面的物理标记点呈凸多边形阵列分布。Determining a physical marker point corresponding to the number of the marker point image as a physical marker point corresponding to the marker point image, and obtaining a correspondence relationship between the marker point image and the physical marker point; The number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
较佳地,所述确定模块具体用于:Preferably, the determining module is specifically configured to:
根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定第一层的标记点影像以及所述第一层的标记点影像的排序;所述参考标记点影像为所述第一层的标记点影像;Determining, according to a positional relationship between the mark point image and the reference mark point image in the image of the Nth frame, a mark point image of the first layer and an order of the mark point image of the first layer; the reference mark point image a mark point image of the first layer;
根据所述第N帧图像中的除所述第一层至第M-1层的标记点影像以外的标记点影像与所述参考标记点影像的位置关系,确定第M层的标记点影像以及所述第M层的标记点影像的排序;M为大于等于2的整数;Determining a mark point image of the Mth layer according to a positional relationship between the mark point image other than the mark point image of the first layer to the M-1th layer and the reference mark point image in the image of the Nth frame Sorting of the image of the mark point of the Mth layer; M is an integer greater than or equal to 2;
根据所述第一层至第M层的标记点影像的排序,确定所述第一层至第M层的标记点影像的编号。Determining the number of the point image of the first layer to the Mth layer according to the order of the image of the mark points of the first layer to the Mth layer.
较佳地,所述确定模块还用于:Preferably, the determining module is further configured to:
至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的 个数以及轮廓内包含的像素点的个数,确定出所述标记点影像。At least a pixel value of each pixel of the image of the Nth frame, a pixel point of each contour The number of pixels and the number of pixels included in the contour determine the image of the marker point.
较佳地,所述确定模块具体用于:Preferably, the determining module is specifically configured to:
根据所述第N帧图像的各个像素点的像素值,得到第一备选标记点影像;所述第一备选标记点影像的像素点的像素值大于等于第一阈值;Obtaining, according to the pixel value of each pixel of the image of the Nth frame, a first candidate point image; the pixel value of the pixel of the first candidate point image is greater than or equal to a first threshold;
根据各个所述第一备选标记点影像的轮廓上的像素点的个数,得到第二备选标记点影像;所述第二备选标记点影像的轮廓上的像素点的个数大于等于第二阈值且小于等于第三阈值;Obtaining a second candidate point image according to the number of pixels on the contour of each of the first candidate point images; the number of pixels on the contour of the second candidate point image is greater than or equal to a second threshold and less than or equal to a third threshold;
根据各个所述第二备选标记点影像的轮廓内包含的像素点的个数,得到第三备选标记点影像;所述第三备选标记点影像的轮廓内包含的像素点的个数大于等于第四阈值;Obtaining, according to the number of pixels included in the contour of each of the second candidate point images, a third candidate point image; the number of pixels included in the contour of the third candidate point image Greater than or equal to the fourth threshold;
确定所述第三备选标记点影像的椭圆参数,将椭圆参数符合预设参数范围的第三备选标记点影像确定为所述标记点影像。Determining an ellipse parameter of the third candidate point image, and determining a third candidate point image that matches the ellipse parameter to the preset parameter range as the point image.
较佳地,所述处理模块具体用于:Preferably, the processing module is specifically configured to:
根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,利用PnP算法确定所述摄像装置相对于所述待测对象的的旋转量和平移量;Determining, by the PnP algorithm, the camera device relative to the object to be tested, according to the correspondence between the point image and the physical point, and the position information of each of the physical point and the image of each point The amount of rotation and the amount of translation;
根据所述摄像装置相对于所述待测对象的旋转量和平移量,得到所述待测对象在所述第N帧图像对应时刻的运动信息;所述待测对象在所述第N帧图像对应时刻的运动信息为所述待测对象在所述第N帧图像对应时刻相对于所述摄像装置的旋转量和平移量。Obtaining motion information of the object to be tested at a time corresponding to the image of the Nth frame according to a rotation amount and a translation amount of the imaging device with respect to the object to be tested; and the image of the object to be tested is in the image of the Nth frame The motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
较佳地,所述处理模块还用于:Preferably, the processing module is further configured to:
采用LM算法对所述摄像装置相对于所述待测对象的的旋转量和平移量进行优化。The amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
较佳地,所述物理标记点为红外点;所述标记点影像为红外点影像;Preferably, the physical mark point is an infrared point; the mark point image is an infrared point image;
所述处理模块还用于:The processing module is further configured to:
确定所述待测对象在所述第N帧图像对应时刻的运动信息符合预设运动量范围的情况下,关闭所述待测对象第一侧面的红外点,开启所述待测对象 第二侧面的红外点;所述第二侧面为根据所述待测对象在所述第N帧图像对应时刻的运动信息预测到的;Determining, in the case that the motion information of the object to be tested is in the range of the preset motion amount, the infrared point of the first side of the object to be tested is turned off, and the object to be tested is turned on. An infrared point of the second side; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
获取所述摄像装置采集到的第N+1帧图像;Acquiring an image of the (N+1)th frame acquired by the camera device;
判断所述第N+1帧图像中是否包括所述待测对象第二侧面的各个红外点的红外点影像,若是,则根据所述第N+1帧图像确定所述待测对象在所述第N+1帧图像对应时刻的运动信息;若否,则关闭所述待测对象第二侧面的红外点,开启所述待测对象第三侧面的红外点,并获取所述摄像装置采集到的第N+2帧图像;所述第三侧面为根据预设的循环顺序得到的。Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is The N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired. The N+2th frame image; the third side is obtained according to a preset cyclic sequence.
本发明的上述实施例中,获取摄像装置采集到的待测对象的第N帧图像,第N帧图像包括待测对象第一侧面的各个物理标记点的标记点影像;根据第N帧图像中的标记点影像,确定标记点影像与物理标记点的对应关系;获取待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;根据标记点影像与物理标记点的对应关系,以及各个物理标记点和各个标记点影像的位置信息,确定待测对象在第N帧图像对应时刻的运动信息。本发明实施例中,通过确定标记点影像与物理标记点的对应关系,并基于标记点影像的位置信息和物理标记点的位置信息,确定出待测对象的运动信息,相对于现有技术中采用陀螺仪等传感器获取旋转姿态的方法,本发明实施例能够有效确定出待测对象的平移量,从而更准确快速地感知待测对象的运动状态,实时性较高,能够显著改善用户的实际体验。In the above embodiment of the present invention, the image of the Nth frame of the object to be tested collected by the camera device is acquired, and the image of the Nth frame includes the image of the point of each physical mark on the first side of the object to be tested; The mark point image determines the correspondence relationship between the mark point image and the physical mark point; acquires the position information of each physical mark point of the first side of the object to be tested in the preset world coordinate system and the image of each mark point of the Nth frame image The position information in the preset image coordinate system; determining the object to be tested at the corresponding moment of the image of the Nth frame according to the correspondence between the point image and the physical point, and the position information of each physical point and each point image Sports information. In the embodiment of the present invention, by determining the correspondence between the point image and the physical point, and based on the position information of the point image and the position information of the physical point, the motion information of the object to be tested is determined, which is compared with the prior art. The method for obtaining a rotational posture by using a sensor such as a gyroscope can effectively determine the amount of translation of the object to be tested, thereby more accurately and quickly sensing the motion state of the object to be tested, and has high real-time performance, which can significantly improve the actual user. Experience.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying for inventive labor.
图1为本发明实施例适用的一种系统架构示意图; 1 is a schematic structural diagram of a system applicable to an embodiment of the present invention;
图2为虚拟现实头盔上各个侧面红外灯的布设示意图;2 is a schematic view showing the arrangement of infrared lamps on each side of the virtual reality helmet;
图3为本发明实施例提供的一种确定待测对象的运动信息的流程示意图;FIG. 3 is a schematic flowchart of determining motion information of an object to be tested according to an embodiment of the present disclosure;
图4为本发明实施例提供的一种对图像进行预处理的流程示意图;4 is a schematic flowchart of preprocessing an image according to an embodiment of the present invention;
图5为本发明实施例提供的确定标记点影像与物理标记点的对应关系的流程示意图;FIG. 5 is a schematic flowchart of determining a correspondence between a mark point image and a physical mark point according to an embodiment of the present invention;
图6为本发明实施例提供的标记点影像编号示意图;FIG. 6 is a schematic diagram of a marker point image number according to an embodiment of the present invention; FIG.
图7为根据待测对象的运动信息进行预测处理的过程示意图;7 is a schematic diagram of a process of performing prediction processing according to motion information of an object to be tested;
图8为本发明实施例提供的一种确定待测对象的运动信息的装置的结构示意图;FIG. 8 is a schematic structural diagram of an apparatus for determining motion information of an object to be tested according to an embodiment of the present disclosure;
图9为本发明实施例提供的一种确定待测对象的运动信息的装置的结构示意图。FIG. 9 is a schematic structural diagram of an apparatus for determining motion information of an object to be tested according to an embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。The present invention will be further described in detail with reference to the accompanying drawings, in which FIG. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例中提供的确定待测对象的运动信息的方法可适用于多种应用场景,图1示例性呈现出本发明实施例适用的一种系统架构示意图。The method for determining the motion information of the object to be tested provided in the embodiment of the present invention is applicable to various application scenarios. FIG. 1 exemplarily shows a system architecture diagram applicable to the embodiment of the present invention.
如图1所示,该系统架构包括服务器101、摄像装置102,待测对象103。其中,服务器101与摄像装置102之间可进行有线或无线通信,即服务器101与摄像装置102之间可通过有线传输或无线传输的方法传输信息,例如,摄像装置102可通过有线传输或无线传输的方法将拍摄到的图像发送给服务器101;服务器101与待测对象103之间也可进行有线或无线通信,例如,服务器101通过有线传输或无线传输的方法向待测对象103发送场景渲染数据。As shown in FIG. 1, the system architecture includes a server 101, an imaging device 102, and an object to be tested 103. The server 101 and the camera 102 can perform wired or wireless communication, that is, the information can be transmitted between the server 101 and the camera 102 by wired transmission or wireless transmission. For example, the camera 102 can be transmitted by wire or wirelessly. The method sends the captured image to the server 101; the server 101 and the object to be tested 103 can also perform wired or wireless communication. For example, the server 101 sends the scene rendering data to the object to be tested 103 by wired transmission or wireless transmission. .
本发明实施例中,服务器101可以为具有数据处理能力的PC主机。 In the embodiment of the present invention, the server 101 may be a PC host with data processing capability.
待测对象103可以为虚拟现实头盔,该虚拟现实头盔包括第一至第六侧面(假定虚拟现实头盔的正常使用情况是戴在用户的头上,基于此,可以确定头盔的第一至第六侧面相对于摄像装置分别为前面、后面、上面、下面、左面,右面)。各个侧面上布设有红外灯(也可称为红外点),其中,各个侧面上红外灯均是按照预先设置的布设规则进行布设的。具体地,为便于后续运算过程,本发明实施例中的布设规则可以为将各个侧面上的红外灯均按照凸多边形阵列的方式进行布设,针对不同的侧面,也可以在基于上述布设规则的情况下,考虑不同的布设,例如,左右两面、上下两面可以进行相同的布设。如图2所示,为虚拟现实头盔上各个侧面红外灯的布设示意图。需要说明的是,图2仅为红外灯布设的一种示例性表示,具体实物可能存在比例上的差异。The object to be tested 103 may be a virtual reality helmet including first to sixth sides (assuming that the normal use condition of the virtual reality helmet is worn on the user's head, based on which the first to sixth helmets may be determined The side faces are front, back, top, bottom, left, and right with respect to the camera. Infrared lights (also called infrared dots) are arranged on each side, wherein the infrared lamps on each side are arranged according to a preset layout rule. Specifically, in order to facilitate the subsequent operation process, the routing rule in the embodiment of the present invention may be that the infrared lamps on each side are arranged in a manner of a convex polygon array, and may be based on the above-mentioned layout rules for different sides. Next, consider different layouts, for example, the left and right sides, the upper and lower sides can be the same layout. As shown in FIG. 2, it is a schematic diagram of the arrangement of infrared lamps on each side of the virtual reality helmet. It should be noted that FIG. 2 is only an exemplary representation of the arrangement of the infrared lamps, and there may be a difference in the proportion of the specific objects.
摄像装置102可以为红外相机,主要用于拍摄虚拟现实头盔上布设的红外灯的状态信息,并将拍摄的图像传送给服务器101,以使服务器通过相关计算确定出虚拟现实头盔的运动信息(旋转矩阵R和平移向量T)。The camera device 102 can be an infrared camera, which is mainly used for capturing state information of the infrared lamp disposed on the virtual reality helmet, and transmits the captured image to the server 101, so that the server determines the motion information of the virtual reality helmet through correlation calculation (rotation) Matrix R and translation vector T).
具体地,本发明实施例中,虚拟现实头盔、红外相机通过USB数据线连接到PC主机,USB2.0和USB3.0均可,优选为USB3.0。虚拟现实头盔还通过HDMI接口连接到PC主机,以便于获取场景渲染数据。Specifically, in the embodiment of the present invention, the virtual reality helmet and the infrared camera are connected to the PC host through a USB data line, and both USB2.0 and USB3.0, preferably USB3.0. The virtual reality helmet is also connected to the PC host through the HDMI interface to facilitate capturing scene rendering data.
基于图1所示的系统架构,图3示出了本发明实施例提供的一种确定待测对象的运动信息的流程示意图,基于服务器的角度,包括:Based on the system architecture shown in FIG. 1 , FIG. 3 is a schematic flowchart of determining motion information of an object to be tested according to an embodiment of the present invention.
步骤301,获取摄像装置采集到的待测对象的第N帧图像,所述第N帧图像包括所述待测对象第一侧面的各个物理标记点的标记点影像;Step 301: Acquire an image of an Nth frame of the object to be tested collected by the camera, where the image of the Nth frame includes a point image of each physical mark on the first side of the object to be tested;
步骤302,根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系;Step 302: Determine, according to the point image in the image of the Nth frame, a correspondence between the point image and the physical point;
步骤303,获取所述待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及所述第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;Step 303: Acquire location information of each physical marker point of the first side of the object to be tested in a preset world coordinate system, and position of each marker image of the Nth frame image in a preset image coordinate system. information;
步骤304,根据所述标记点影像与所述物理标记点的对应关系,以及所述 各个物理标记点和所述各个标记点影像的位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息。 Step 304, according to the correspondence between the mark point image and the physical mark point, and the And determining, by the physical location points and the location information of the respective marker point images, motion information of the object to be tested at a time corresponding to the image of the Nth frame.
本发明实施例中,通过确定标记点影像与物理标记点的对应关系,并基于标记点影像的位置信息和物理标记点的位置信息,确定出待测对象的运动信息,相对于现有技术中采用陀螺仪等传感器获取旋转姿态的方法,本发明实施例能够有效确定出待测对象的平移量,从而更准确快速地感知待测对象的运动状态,实时性较高,能够显著改善用户的实际体验。In the embodiment of the present invention, by determining the correspondence between the point image and the physical point, and based on the position information of the point image and the position information of the physical point, the motion information of the object to be tested is determined, which is compared with the prior art. The method for obtaining a rotational posture by using a sensor such as a gyroscope can effectively determine the amount of translation of the object to be tested, thereby more accurately and quickly sensing the motion state of the object to be tested, and has high real-time performance, which can significantly improve the actual user. Experience.
本发明实施例中的物理标记点可以为红外点,标记点影像为红外点影像。The physical marker point in the embodiment of the present invention may be an infrared point, and the marker point image is an infrared point image.
本发明实施例中,在虚拟现实头盔的运动信息(空间平移量)光学追踪过程中,始终只对头盔上、下、左、右、前、后六个侧面中能够被摄像头完整拍摄的侧面进行处理。因此,下面以通过单个侧面确定虚拟现实头盔的运动信息的过程给予具体说明。In the embodiment of the present invention, in the optical tracking process of the motion information (space shift amount) of the virtual reality helmet, only the side of the six sides of the helmet that can be completely photographed by the camera is performed on the upper, the lower, the left, the right, the front and the back. deal with. Therefore, the following is a detailed description of the process of determining the motion information of the virtual reality helmet by a single side.
本发明实施例中,由于摄像装置在拍摄图像时会存在环境灯以及其它因素的干扰,因此,获取到摄像装置采集到的待测对象的第N帧图像后,应对第N帧图像进行预处理,至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的个数以及轮廓内包含的像素点的个数,排除干扰影像,确定出标记点影像。In the embodiment of the present invention, since the image capturing device may interfere with the ambient light and other factors when capturing the image, after acquiring the image of the Nth frame of the object to be tested collected by the camera device, the image of the Nth frame should be preprocessed. And determining, according to at least the pixel value of each pixel of the image of the Nth frame, the number of pixels on each contour, and the number of pixels included in the contour, the interference image is excluded, and the marker image is determined.
具体地,根据各个影像的像素点的像素值,得到第一备选标记点影像;其中,第一备选标记点影像的像素点的像素值大于等于第一阈值;根据各个第一备选标记点影像的轮廓上的像素点的个数,得到第二备选标记点影像;第二备选标记点影像的轮廓上的像素点的个数大于等于第二阈值且小于等于第三阈值;根据各个第二备选标记点影像的轮廓内包含的像素点的个数,得到第三备选标记点影像;第三备选标记点影像的轮廓内包含的像素点的个数大于等于第四阈值;确定第三备选标记点影像的椭圆参数,将椭圆参数符合预设参数范围的第三备选标记点影像确定为标记点影像。其中,第一阈值、第二阈值、第三阈值、第四阈值以及预设参数范围均可由本领域技术人员根据经验设置。 Specifically, the first candidate point image is obtained according to the pixel value of the pixel of each image; wherein the pixel value of the pixel of the first candidate point image is greater than or equal to the first threshold; according to each first candidate mark Obtaining a second candidate point image by the number of pixels on the contour of the image; the number of pixels on the contour of the second candidate point image is greater than or equal to a second threshold and less than or equal to a third threshold; The number of pixels included in the contour of each second candidate point image obtains a third candidate point image; the number of pixels included in the contour of the third candidate point image is greater than or equal to a fourth threshold Determining an ellipse parameter of the third candidate point image, and determining a third candidate point image that matches the ellipse parameter to the preset parameter range as the point image. The first threshold, the second threshold, the third threshold, the fourth threshold, and the preset parameter range may all be set by experience by those skilled in the art.
图4为本发明实施例提供的一种对图像进行预处理的流程示意图,包括步骤401至步骤408,下面结合图4进行具体说明。FIG. 4 is a schematic flowchart of pre-processing an image according to an embodiment of the present invention, including steps 401 to 408, which are specifically described below in conjunction with FIG. 4.
步骤401,获取第N帧图像;Step 401: Acquire an image of an Nth frame.
步骤402,二值化处理,得到第一备选标记点影像;具体为:确定第N帧图像中的各个像素点的最大像素值max,以a*max作为二值化阈值(第一阈值),遍历各个像素点,若像素点的像素值小于a*max,则将其像素值设置为0,若像素点的像素值大于等于a*max,则将其像素值设置为255。其中,a为权值,a的取值可由本领域技术人员根据经验设置,例如,可以设置为0.9;Step 402: Binarization processing, to obtain a first candidate point image; specifically: determining a maximum pixel value max of each pixel in the image of the Nth frame, using a*max as a binarization threshold (first threshold) Each pixel is traversed. If the pixel value of the pixel is less than a*max, the pixel value is set to 0. If the pixel value of the pixel is greater than or equal to a*max, the pixel value is set to 255. Where a is a weight, the value of a can be set by a person skilled in the art according to experience, for example, can be set to 0.9;
步骤403,获取各个第一备选标记点影像的轮廓上的像素点的个数,其中,轮廓即为像素值从0到255变化、或者从255到0变化的像素点的位置,具体地,在确定各个轮廓过程中可采用求取8邻域相邻像素点(除图像边缘区域外,每个像素点均与8个像素点相临接,确定出轮廓上的第一个像素点后,可遍历与该像素点相邻的8个像素点,从而快速获取到轮廓上的第二个像素点,依次类推)的方法,以便于更快速地确定出轮廓上的像素点的个数;Step 403: Obtain a number of pixel points on a contour of each first candidate point image, where the contour is a position of a pixel point whose pixel value changes from 0 to 255 or changes from 255 to 0. Specifically, In the process of determining each contour, 8 neighborhood pixels can be obtained (except for the edge region of the image, each pixel is adjacent to 8 pixels, and the first pixel on the contour is determined. A method of traversing 8 pixel points adjacent to the pixel to quickly acquire a second pixel on the contour, and so on, so as to more quickly determine the number of pixels on the contour;
步骤404,针对各个第一备选标记点影像,删除轮廓上的像素点的个数小于第二阈值,或者大于第三阈值的影像,得到第二备选标记点影像;Step 404: For each first candidate point image, delete an image whose number of pixels on the contour is smaller than a second threshold or greater than a third threshold, to obtain a second candidate point image;
步骤405,针对各个第二备选标记点影像,删除轮廓内包含的像素点的个数小于第四阈值的影像,得到第三备选标记点影像;Step 405: Delete, for each second candidate point image, an image whose number of pixels included in the contour is less than a fourth threshold, to obtain a third candidate point image;
步骤406,基于预设的图像坐标系(包括x轴和y轴),通过拟合算法拟合第三备选标记点影像的椭圆参数(包括椭圆中心、长短轴、倾斜角等); Step 406, based on a preset image coordinate system (including an x-axis and a y-axis), fitting an ellipse parameter (including an ellipse center, a long and short axis, a tilt angle, and the like) of the third candidate point image by a fitting algorithm;
步骤407,针对各个第三备选标记点影像,删除椭圆参数不符合预设参数范围的影像,将椭圆参数符合预设参数范围的第三备选标记点影像确定为标记点影像。Step 407: For each third candidate point image, delete an image whose ellipse parameter does not meet the preset parameter range, and determine a third candidate point image whose ellipse parameter meets the preset parameter range as the point image.
步骤408,输出求取的标记点影像的椭圆参数,并根据椭圆参数确定出标记点的位置信息。Step 408: Output an ellipse parameter of the obtained point image, and determine position information of the point according to the ellipse parameter.
本发明实施例中通过上述过程对第N帧图像进行预处理,从而快速准确地排除环境中的干扰因素,确定出标记点影像,为后续确定标记点影像与标 记点之间的对应关系奠定了良好基础。In the embodiment of the present invention, the image of the Nth frame is preprocessed by the foregoing process, thereby quickly and accurately eliminating interference factors in the environment, determining the image of the marker point, and determining the image and label of the marker point for subsequent determination. The correspondence between the points has laid a good foundation.
由于虚拟现实头盔每个侧面上的红外灯的布设情况不完全一致,本发明实施例中仅对其中一个侧面(第一侧面,即前面)的处理进行说明,其它侧面同理。在步骤302中,通过以下方式确定第N帧图像中的标记点影像与第一侧面的物理标记点之间的对应关系:基于包络法确定第N帧图像中的参考标记点影像;其中,参考标记点影像为第N帧图像中的标记点影像中的一个;根据第N帧图像中标记点影像与参考标记点影像的位置关系,确定第N帧图像中的标记点影像的编号;将与标记点影像的编号相同的物理标记点确定为所标记点影像对应的物理标记点,得到标记点影像与物理标记点的对应关系;物理标记点的编号和标记点影像的编号是基于相同的编号规则得到的。Since the arrangement of the infrared lamps on each side of the virtual reality helmet is not completely consistent, in the embodiment of the present invention, only one side (the first side, ie, the front side) is processed, and the other sides are similar. In step 302, the correspondence between the point image in the image of the Nth frame and the physical point of the first side is determined by determining an image of the reference point in the image of the Nth frame based on the envelope method; The reference mark point image is one of the mark point images in the Nth frame image; the number of the mark point image in the Nth frame image is determined according to the positional relationship between the mark point image and the reference mark point image in the Nth frame image; The physical marker point with the same number as the marker point image is determined as the physical marker point corresponding to the marker point image, and the correspondence relationship between the marker point image and the physical marker point is obtained; the number of the physical marker point and the number of the marker point image are based on the same Numbering rules are obtained.
进一步地,本发明实施例中,根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号时,是基于包络法一层一层地确定的,从最外层至最内层,具体为:根据第N帧图像中的标记点影像与参考标记点影像的位置关系,确定第一层的标记点影像以及第一层的标记点影像的排序;参考标记点影像为第一层的标记点影像;根据第N帧图像中的除第一层至第M-1层的标记点影像以外的标记点影像与参考标记点影像的位置关系,确定第M层的标记点影像以及第M层的标记点影像的排序;M为大于等于2的整数;根据第一层至第M层的标记点影像的排序,确定第一层至第M层的标记点影像的编号。Further, in the embodiment of the present invention, when determining the number of each point image in the image of the Nth frame according to the positional relationship between the point image in the image of the Nth frame and the image of the reference point image, Based on the envelope method, layer by layer, from the outermost layer to the innermost layer, specifically: determining the marking point of the first layer according to the positional relationship between the marked point image and the reference point image in the image of the Nth frame The image and the sorting of the image of the first layer of the marker point; the reference marker image is the marker image of the first layer; and the marker points other than the marker image of the first layer to the M-1 layer according to the image of the Nth frame The positional relationship between the image and the reference point image determines the order of the image of the mark of the Mth layer and the image of the mark of the Mth layer; M is an integer greater than or equal to 2; according to the image of the mark of the first layer to the Mth layer Sort to determine the number of the marker image of the first layer to the third layer.
其中,M的具体取值可由本领域技术人员根据经验以及侧面上的红外灯的布设来设置,一般情况下,可设置M的取值为3。The specific value of M can be set by the person skilled in the art according to the experience and the arrangement of the infrared light on the side. In general, the value of M can be set to 3.
图5为本发明实施例提供的确定标记点影像与物理标记点的对应关系的流程示意图,包括步骤501至步骤504,下面结合图5进行具体说明。FIG. 5 is a schematic flowchart of determining a correspondence between a point image and a physical point according to an embodiment of the present invention, which includes steps 501 to 504, which are specifically described below with reference to FIG. 5.
步骤501,基于凸包算法,确定参考标记点影像以及第一层(最外层)的标记点影像,并根据第一层的各个标记点影像与参考标记点之间的距离,按照由小到大的顺序排列;其中,确定参考标记点影像的过程具体为:将第N帧图像的标记点影像按照y轴坐标升序排列,若出现同一y轴坐标对应多个 标记点影像,则将该多个标记点影像按照x轴坐标升序排列,将y轴坐标最大且x轴坐标最小的标记点影像(即位于左下角的标记点影像)确定为参考标记点影像;Step 501: Determine, according to the convex hull algorithm, the reference mark point image and the mark image of the first layer (the outermost layer), and according to the distance between each mark point image of the first layer and the reference mark point, according to the small to The order of the reference point images is specifically as follows: the point images of the image of the Nth frame are arranged in ascending order according to the y-axis coordinate, and if the same y-axis coordinate corresponds to multiple Marking the point image, the plurality of point images are arranged in ascending order according to the x-axis coordinate, and the point image with the largest y-axis coordinate and the smallest x-axis coordinate (ie, the point image in the lower left corner) is determined as the reference point image;
步骤502,确定第二层(次外层)的四个标记点影像,根据这四个标记点影像与参考标记点影像之间的距离,按照从小到大的顺序排列; Step 502, determining four image points of the second layer (secondary outer layer), according to the distance between the four point image and the reference point image, arranged in order from small to large;
步骤503,确定第三层(最内层)的三个标记点影像,根据这三个标记点影像与参考标记点影像之间的距离,按照从小到大的顺序排列; Step 503, determining three image points of the third layer (the innermost layer), according to the distance between the three point image and the reference point image, arranged in order from small to large;
步骤504,根据上述得到的第一层至第三层,按照由外到内的顺序依次进行编号,得到第一层编号为1-8,第二层编号为9-12,第三层编号为13-15,如图6所示,为标记点影像编号示意图。 Step 504, according to the first layer to the third layer obtained above, sequentially numbered in order from outer to inner, and the first layer number is 1-8, the second layer number is 9-12, and the third layer number is 13-15, as shown in FIG. 6, is a schematic diagram of the number of points of the marker point.
由于第一侧面物理标记点是基于上述相同的编号规则得到的,因此,若通过上述方式确定出的标记点影像的编号正常时,可将与标记点影像的编号相同的物理标记点确定为对应的物理标记点,得到标记点影像与物理标记点的对应关系。Since the first side physical mark point is obtained based on the same numbering rule as described above, if the number of the mark point image determined by the above method is normal, the physical mark point having the same number as the mark point image can be determined to correspond. Physical point points, the correspondence between the point image and the physical point is obtained.
本发明实施例中基于凸包算法来确定标记点影像与物理标记点的对应关系,从而使得该对应关系的确定更为准确快速,为后续确定待测对象的运动信息奠定了良好的基础。In the embodiment of the present invention, the convex bundle algorithm is used to determine the correspondence between the point image and the physical marker point, so that the determination of the correspondence relationship is more accurate and fast, and lays a good foundation for subsequently determining the motion information of the object to be tested.
步骤304中,基于步骤302中得到的标记点影像与物理标记点的对应关系,以及步骤303中得到的各个物理标记点和各个标记点影像的位置信息,利用PnP算法确定摄像装置相对于待测对象的的旋转量和平移量,并采用LM算法对摄像装置相对于待测对象的的旋转量和平移量进行优化;根据摄像装置相对于待测对象优化后的的旋转量和平移量,得到待测对象在第N帧图像对应时刻的运动信息;待测对象在第N帧图像对应时刻的运动信息为待测对象在第N帧图像对应时刻相对于摄像装置的旋转量和平移量。In step 304, based on the correspondence between the point image and the physical point obtained in step 302, and the position information of each physical point and each point image obtained in step 303, the PnP algorithm is used to determine the camera relative to the test. The amount of rotation and the amount of translation of the object, and the LM algorithm is used to optimize the amount of rotation and the amount of translation of the camera relative to the object to be tested; according to the amount of rotation and the amount of translation of the camera device relative to the object to be measured, The motion information of the object to be tested at the time corresponding to the image of the Nth frame; the motion information of the object to be tested at the time corresponding to the image of the Nth frame is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the corresponding time of the image of the Nth frame.
图7为根据待测对象的运动信息进行预测处理的过程示意图。本发明实施例确定出待测对象在第N帧图像对应时刻相对于摄像装置的旋转量和平移量后,还包括如图7所示的预测处理过程,具体为: FIG. 7 is a schematic diagram of a process of performing prediction processing according to motion information of an object to be tested. The embodiment of the present invention further determines the prediction processing procedure shown in FIG. 7 after the object to be measured is rotated and translated by the camera at the corresponding time of the image of the Nth frame, specifically:
步骤701,利用PnP算法和LM算法确定出待测对象在第N帧图像对应时刻相对于摄像装置的旋转量和平移量;Step 701: Determine, by using a PnP algorithm and an LM algorithm, a rotation amount and a translation amount of the object to be tested relative to the imaging device at a corresponding time of the image of the Nth frame;
步骤702,确定待测对象在第N帧图像对应时刻的运动信息符合预设运动量范围,具体为:旋转量是否在预设旋转量范围内,平移量是否在预设平移量范围内;若是,则执行步骤703;若否,则执行步骤701;其中,预设旋转量范围和预设平移量范围均可由本领域技术人员根据经验或者根据大量实验得到;Step 702: determining that the motion information of the object to be tested at the time corresponding to the image of the Nth frame conforms to the preset motion amount range, specifically: whether the rotation amount is within a preset rotation amount range, and whether the translation amount is within a preset translation amount range; if yes, Then, step 703 is performed; if not, step 701 is performed; wherein the preset rotation amount range and the preset translation amount range can be obtained by a person skilled in the art according to experience or according to a large number of experiments;
步骤703,根据待测对象在第N帧图像对应时刻的运动信息预测出第二侧面,关闭待测对象第一侧面的红外点,开启待测对象第二侧面的红外点;Step 703: predict a second side according to the motion information of the object to be tested at the corresponding time of the image of the Nth frame, close the infrared point of the first side of the object to be tested, and open the infrared point of the second side of the object to be tested;
步骤704,获取摄像装置采集到的第N+1帧图像;Step 704: Acquire an image of an N+1th frame acquired by the camera.
步骤705,判断所述第N+1帧图像中是否包括所述待测对象第二侧面的各个红外点的红外点影像,若是,则执行步骤701,根据所述第N+1帧图像确定所述待测对象在所述第N+1帧图像对应时刻的运动信息;若否,则执行步骤706; Step 705, determining whether the infrared point image of each infrared point of the second side of the object to be tested is included in the image of the N+1th frame, and if yes, executing step 701, determining, according to the image of the (N+1)th frame Determining the motion information of the object to be measured at the time corresponding to the (N+1)th frame image; if not, executing step 706;
步骤706,关闭所述待测对象第二侧面的红外点,开启所述待测对象第三侧面的红外点,并获取所述摄像装置采集到的第N+2帧图像;其中,第三侧面为根据预设的循环顺序得到的。例如,预设的循环顺序可以为前面、左面、右面、上面、下面、后面。 Step 706, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image of the N+2 frame acquired by the camera device is acquired; wherein the third side is It is obtained according to the preset cycle order. For example, the preset cycle order can be front, left, right, top, bottom, and back.
步骤707,判断所述N+2帧图像中是否包括所述待测对象第三侧面的各个红外点的红外点影像,若是,则执行步骤701,根据所述第N+2帧图像确定所述待测对象在所述第N+1帧图像对应时刻的运动信息;若否,则执行步骤706,按照预设的循环顺序,循环开启下一侧面的红外点。Step 707: Determine whether the infrared point image of each infrared point of the third side of the object to be tested is included in the image of the N+2 frame, and if yes, execute step 701, and determine the image according to the image of the N+2 frame. The motion information of the object to be tested at the time corresponding to the (N+1)th frame image; if not, step 706 is executed to cycle the infrared point of the next side according to a preset cycle sequence.
针对上述方法流程,本发明实施例还提供一种确定待测对象的运动信息的装置,该装置的具体内容可以参照上述方法实施。For the above method flow, the embodiment of the present invention further provides an apparatus for determining motion information of an object to be tested, and the specific content of the apparatus may be implemented by referring to the foregoing method.
图8为本发明实施例提供的一种确定待测对象的运动信息的装置的结构示意图。FIG. 8 is a schematic structural diagram of an apparatus for determining motion information of an object to be tested according to an embodiment of the present invention.
第一获取模块801,用于获取摄像装置采集到的待测对象的第N帧图像, 所述第N帧图像包括所述待测对象第一侧面的各个物理标记点的标记点影像;The first obtaining module 801 is configured to acquire an image of the Nth frame of the object to be tested collected by the camera, The image of the Nth frame includes a mark point image of each physical mark point of the first side of the object to be tested;
确定模块802,用于根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系;a determining module 802, configured to determine, according to the point image in the image of the Nth frame, a correspondence between the point image and the physical point;
第二获取模块803,用于获取所述待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及所述第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;a second acquiring module 803, configured to acquire position information of each physical mark point of the first side of the object to be tested in a preset world coordinate system, and image of each point of the Nth frame image in a preset image Position information in the coordinate system;
处理模块804,用于根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息。The processing module 804 is configured to determine, according to the correspondence between the mark point image and the physical mark point, and the position information of each physical mark point and the image of each mark point, the object to be tested is in the first The N frame image corresponds to the motion information of the time.
较佳地,所述确定模块802具体用于:Preferably, the determining module 802 is specifically configured to:
基于包络法确定所述第N帧图像中的参考标记点影像;所述参考标记点影像为所述第N帧图像中的标记点影像中的一个;Determining, by an envelope method, a reference mark point image in the image of the Nth frame; the reference mark point image is one of the mark point images in the image of the Nth frame;
根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号;Determining, according to a positional relationship between the point image in the image of the Nth frame and the image of the reference point image, a number of each point image in the image of the Nth frame;
将与所述标记点影像的编号相同的物理标记点确定为所标记点影像对应的物理标记点,得到所述标记点影像与所述物理标记点的对应关系;所述物理标记点的编号和所述标记点影像的编号是基于相同的编号规则得到的;所述待测对象第一侧面的物理标记点呈凸多边形阵列分布。Determining a physical marker point corresponding to the number of the marker point image as a physical marker point corresponding to the marker point image, and obtaining a correspondence relationship between the marker point image and the physical marker point; The number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
较佳地,所述确定模块802具体用于:Preferably, the determining module 802 is specifically configured to:
根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定第一层的标记点影像以及所述第一层的标记点影像的排序;所述参考标记点影像为所述第一层的标记点影像;Determining, according to a positional relationship between the mark point image and the reference mark point image in the image of the Nth frame, a mark point image of the first layer and an order of the mark point image of the first layer; the reference mark point image a mark point image of the first layer;
根据所述第N帧图像中的除所述第一层至第M-1层的标记点影像以外的标记点影像与所述参考标记点影像的位置关系,确定第M层的标记点影像以及所述第M层的标记点影像的排序;M为大于等于2的整数;Determining a mark point image of the Mth layer according to a positional relationship between the mark point image other than the mark point image of the first layer to the M-1th layer and the reference mark point image in the image of the Nth frame Sorting of the image of the mark point of the Mth layer; M is an integer greater than or equal to 2;
根据所述第一层至第M层的标记点影像的排序,确定所述第一层至第M 层的标记点影像的编号。Determining the first layer to the Mth according to the ordering of the image points of the first layer to the Mth layer The number of the point image of the layer.
较佳地,所述确定模块802还用于:Preferably, the determining module 802 is further configured to:
至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的个数以及轮廓内包含的像素点的个数,确定出所述标记点影像。The marker point image is determined based on at least a pixel value of each pixel of the Nth frame image, a number of pixel points on each contour, and a number of pixel points included in the contour.
较佳地,所述确定模块802具体用于:Preferably, the determining module 802 is specifically configured to:
根据所述第N帧图像的各个像素点的像素值,得到第一备选标记点影像;所述第一备选标记点影像的像素点的像素值大于等于第一阈值;Obtaining, according to the pixel value of each pixel of the image of the Nth frame, a first candidate point image; the pixel value of the pixel of the first candidate point image is greater than or equal to a first threshold;
根据各个所述第一备选标记点影像的轮廓上的像素点的个数,得到第二备选标记点影像;所述第二备选标记点影像的轮廓上的像素点的个数大于等于第二阈值且小于等于第三阈值;Obtaining a second candidate point image according to the number of pixels on the contour of each of the first candidate point images; the number of pixels on the contour of the second candidate point image is greater than or equal to a second threshold and less than or equal to a third threshold;
根据各个所述第二备选标记点影像的轮廓内包含的像素点的个数,得到第三备选标记点影像;所述第三备选标记点影像的轮廓内包含的像素点的个数大于等于第四阈值;Obtaining, according to the number of pixels included in the contour of each of the second candidate point images, a third candidate point image; the number of pixels included in the contour of the third candidate point image Greater than or equal to the fourth threshold;
确定所述第三备选标记点影像的椭圆参数,将椭圆参数符合预设参数范围的第三备选标记点影像确定为所述标记点影像。Determining an ellipse parameter of the third candidate point image, and determining a third candidate point image that matches the ellipse parameter to the preset parameter range as the point image.
较佳地,所述处理模块804具体用于:Preferably, the processing module 804 is specifically configured to:
根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,利用PnP算法确定所述摄像装置相对于所述待测对象的的旋转量和平移量;Determining, by the PnP algorithm, the camera device relative to the object to be tested, according to the correspondence between the point image and the physical point, and the position information of each of the physical point and the image of each point The amount of rotation and the amount of translation;
根据所述摄像装置相对于所述待测对象的旋转量和平移量,得到所述待测对象在所述第N帧图像对应时刻的运动信息;所述待测对象在所述第N帧图像对应时刻的运动信息为所述待测对象在所述第N帧图像对应时刻相对于所述摄像装置的旋转量和平移量。Obtaining motion information of the object to be tested at a time corresponding to the image of the Nth frame according to a rotation amount and a translation amount of the imaging device with respect to the object to be tested; and the image of the object to be tested is in the image of the Nth frame The motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
较佳地,所述处理模块804还用于:Preferably, the processing module 804 is further configured to:
采用LM算法对所述摄像装置相对于所述待测对象的的旋转量和平移量进行优化。The amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
较佳地,所述物理标记点为红外点;所述标记点影像为红外点影像; Preferably, the physical mark point is an infrared point; the mark point image is an infrared point image;
所述处理模块804还用于:The processing module 804 is further configured to:
确定所述待测对象在所述第N帧图像对应时刻的运动信息符合预设运动量范围的情况下,关闭所述待测对象第一侧面的红外点,开启所述待测对象第二侧面的红外点;所述第二侧面为根据所述待测对象在所述第N帧图像对应时刻的运动信息预测到的;Determining, when the motion information of the object to be tested is in the range of the preset motion amount, the infrared point of the first side of the object to be tested is turned off, and the second side of the object to be tested is opened. An infrared point; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
获取所述摄像装置采集到的第N+1帧图像;Acquiring an image of the (N+1)th frame acquired by the camera device;
判断所述第N+1帧图像中是否包括所述待测对象第二侧面的各个红外点的红外点影像,若是,则根据所述第N+1帧图像确定所述待测对象在所述第N+1帧图像对应时刻的运动信息;若否,则关闭所述待测对象第二侧面的红外点,开启所述待测对象第三侧面的红外点,并获取所述摄像装置采集到的第N+2帧图像;所述第三侧面为根据预设的循环顺序得到的。Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is The N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired. The N+2th frame image; the third side is obtained according to a preset cyclic sequence.
从上述内容可以看出:As can be seen from the above:
本发明的实施例中,获取摄像装置采集到的待测对象的第N帧图像,第N帧图像包括待测对象第一侧面的各个物理标记点的标记点影像;根据第N帧图像中的标记点影像,确定标记点影像与物理标记点的对应关系;获取待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;根据标记点影像与物理标记点的对应关系,以及各个物理标记点和各个标记点影像的位置信息,确定待测对象在第N帧图像对应时刻的运动信息。本发明实施例中,通过确定标记点影像与物理标记点的对应关系,并基于标记点影像的位置信息和物理标记点的位置信息,确定出待测对象的运动信息,相对于现有技术中采用陀螺仪等传感器获取旋转姿态的方法,本发明实施例能够有效确定出待测对象的平移量,从而更准确快速地感知待测对象的运动状态,实时性较高,能够显著改善用户的实际体验。In the embodiment of the present invention, the image of the Nth frame of the object to be tested collected by the camera device is acquired, and the image of the Nth frame includes the image of the point of each physical mark on the first side of the object to be tested; Marking the point image to determine the correspondence between the point image and the physical point; obtaining the position information of each physical point of the first side of the object to be tested in a preset world coordinate system and the image of each point of the Nth frame image Position information in a preset image coordinate system; determining the motion of the object to be tested at the corresponding moment of the image of the Nth frame according to the correspondence between the point image and the physical point, and the position information of each physical point and each point image information. In the embodiment of the present invention, by determining the correspondence between the point image and the physical point, and based on the position information of the point image and the position information of the physical point, the motion information of the object to be tested is determined, which is compared with the prior art. The method for obtaining a rotational posture by using a sensor such as a gyroscope can effectively determine the amount of translation of the object to be tested, thereby more accurately and quickly sensing the motion state of the object to be tested, and has high real-time performance, which can significantly improve the actual user. Experience.
基于相同的技术构思,本申请实施例提供另一种确定待测对象的运动信息的装置。本申请实施例提供的确定待测对象的运动信息的装置如图9所示,该确定待测对象的运动信息的装置包括:通信接口901、处理器902、存储器 903和总线系统904;Based on the same technical concept, the embodiment of the present application provides another apparatus for determining motion information of an object to be tested. The device for determining the motion information of the object to be tested provided by the embodiment of the present application is as shown in FIG. 9. The device for determining the motion information of the object to be tested includes: a communication interface 901, a processor 902, and a memory. 903 and bus system 904;
其中,存储器903,用于存放程序。具体地,程序可以包括程序代码,程序代码包括计算机操作指令。存储器903可能为随机存取存储器(random access memory,简称RAM),也可能为非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。图中仅示出了一个存储器,当然,存储器也可以根据需要,设置为多个。存储器903也可以是处理器902中的存储器。The memory 903 is used to store a program. In particular, the program can include program code, the program code including computer operating instructions. The memory 903 may be a random access memory (RAM) or a non-volatile memory such as at least one disk storage. Only one memory is shown in the figure, of course, the memory can also be set to a plurality as needed. Memory 903 can also be a memory in processor 902.
存储器903存储了如下的元素,可执行模块或者数据结构,或者它们的子集,或者它们的扩展集:The memory 903 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:
操作指令:包括各种操作指令,用于实现各种操作。Operation instructions: include various operation instructions for implementing various operations.
操作系统:包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。Operating system: Includes a variety of system programs for implementing various basic services and handling hardware-based tasks.
处理器902控制确定待测对象的运动信息的装置的操作,处理器902还可以称为CPU(Central Processing Unit,中央处理单元)。具体的应用中,确定待测对象的运动信息的装置的各个组件通过总线系统904耦合在一起,其中总线系统904除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统904。为便于表示,图9中仅是示意性画出。The processor 902 controls the operation of the device that determines the motion information of the object to be tested, and the processor 902 may also be referred to as a CPU (Central Processing Unit). In a specific application, the components of the device for determining the motion information of the object to be tested are coupled together by a bus system 904. The bus system 904 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 904 in the figure. For ease of representation, only the schematic drawing is shown in FIG.
上述本申请实施例揭示的方法可以应用于处理器902中,或者由处理器902实现。处理器902可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器902中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器902可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器, 闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器903,处理器902读取存储器903中的信息,结合其硬件执行以下步骤:The method disclosed in the foregoing embodiment of the present application may be applied to the processor 902 or implemented by the processor 902. Processor 902 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 902 or an instruction in a form of software. The processor 902 described above may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or discrete hardware. Component. The methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor. The software module can be located in a random access memory. Flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. are well-known storage media in the field. The storage medium is located in the memory 903, and the processor 902 reads the information in the memory 903 and performs the following steps in conjunction with its hardware:
获取摄像装置采集到的待测对象的第N帧图像,所述第N帧图像包括所述待测对象第一侧面的各个物理标记点的标记点影像;根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系;获取所述待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及所述第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息。Obtaining an Nth frame image of the object to be tested collected by the camera device, where the Nth frame image includes a mark point image of each physical mark point of the first side of the object to be tested; according to the mark in the image of the Nth frame a point image, determining a correspondence between the point image and the physical point; acquiring position information of each physical point of the first side of the object to be tested in a preset world coordinate system, and the Nth frame Position information of each point image of the image in a preset image coordinate system; according to the correspondence between the point image and the physical point, and the position of each physical point and the image of each point And determining information about the motion of the object to be tested at the time corresponding to the image of the Nth frame.
较佳地,所述处理器902具体用于:Preferably, the processor 902 is specifically configured to:
基于包络法确定所述第N帧图像中的参考标记点影像;所述参考标记点影像为所述第N帧图像中的标记点影像中的一个;Determining, by an envelope method, a reference mark point image in the image of the Nth frame; the reference mark point image is one of the mark point images in the image of the Nth frame;
根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号;Determining, according to a positional relationship between the point image in the image of the Nth frame and the image of the reference point image, a number of each point image in the image of the Nth frame;
将与所述标记点影像的编号相同的物理标记点确定为所标记点影像对应的物理标记点,得到所述标记点影像与所述物理标记点的对应关系;所述物理标记点的编号和所述标记点影像的编号是基于相同的编号规则得到的;所述待测对象第一侧面的物理标记点呈凸多边形阵列分布。Determining a physical marker point corresponding to the number of the marker point image as a physical marker point corresponding to the marker point image, and obtaining a correspondence relationship between the marker point image and the physical marker point; The number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
较佳地,所述处理器902具体用于:Preferably, the processor 902 is specifically configured to:
根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定第一层的标记点影像以及所述第一层的标记点影像的排序;所述参考标记点影像为所述第一层的标记点影像;Determining, according to a positional relationship between the mark point image and the reference mark point image in the image of the Nth frame, a mark point image of the first layer and an order of the mark point image of the first layer; the reference mark point image a mark point image of the first layer;
根据所述第N帧图像中的除所述第一层至第M-1层的标记点影像以外的标记点影像与所述参考标记点影像的位置关系,确定第M层的标记点影像以及所述第M层的标记点影像的排序;M为大于等于2的整数; Determining a mark point image of the Mth layer according to a positional relationship between the mark point image other than the mark point image of the first layer to the M-1th layer and the reference mark point image in the image of the Nth frame Sorting of the image of the mark point of the Mth layer; M is an integer greater than or equal to 2;
根据所述第一层至第M层的标记点影像的排序,确定所述第一层至第M层的标记点影像的编号。Determining the number of the point image of the first layer to the Mth layer according to the order of the image of the mark points of the first layer to the Mth layer.
较佳地,所述处理器902还用于:Preferably, the processor 902 is further configured to:
至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的个数以及轮廓内包含的像素点的个数,确定出所述标记点影像。The marker point image is determined based on at least a pixel value of each pixel of the Nth frame image, a number of pixel points on each contour, and a number of pixel points included in the contour.
较佳地,所述处理器902具体用于:Preferably, the processor 902 is specifically configured to:
根据所述第N帧图像的各个像素点的像素值,得到第一备选标记点影像;所述第一备选标记点影像的像素点的像素值大于等于第一阈值;Obtaining, according to the pixel value of each pixel of the image of the Nth frame, a first candidate point image; the pixel value of the pixel of the first candidate point image is greater than or equal to a first threshold;
根据各个所述第一备选标记点影像的轮廓上的像素点的个数,得到第二备选标记点影像;所述第二备选标记点影像的轮廓上的像素点的个数大于等于第二阈值且小于等于第三阈值;Obtaining a second candidate point image according to the number of pixels on the contour of each of the first candidate point images; the number of pixels on the contour of the second candidate point image is greater than or equal to a second threshold and less than or equal to a third threshold;
根据各个所述第二备选标记点影像的轮廓内包含的像素点的个数,得到第三备选标记点影像;所述第三备选标记点影像的轮廓内包含的像素点的个数大于等于第四阈值;Obtaining, according to the number of pixels included in the contour of each of the second candidate point images, a third candidate point image; the number of pixels included in the contour of the third candidate point image Greater than or equal to the fourth threshold;
确定所述第三备选标记点影像的椭圆参数,将椭圆参数符合预设参数范围的第三备选标记点影像确定为所述标记点影像。Determining an ellipse parameter of the third candidate point image, and determining a third candidate point image that matches the ellipse parameter to the preset parameter range as the point image.
较佳地,所述处理器902具体用于:Preferably, the processor 902 is specifically configured to:
根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,利用PnP算法确定所述摄像装置相对于所述待测对象的的旋转量和平移量;Determining, by the PnP algorithm, the camera device relative to the object to be tested, according to the correspondence between the point image and the physical point, and the position information of each of the physical point and the image of each point The amount of rotation and the amount of translation;
根据所述摄像装置相对于所述待测对象的旋转量和平移量,得到所述待测对象在所述第N帧图像对应时刻的运动信息;所述待测对象在所述第N帧图像对应时刻的运动信息为所述待测对象在所述第N帧图像对应时刻相对于所述摄像装置的旋转量和平移量。Obtaining motion information of the object to be tested at a time corresponding to the image of the Nth frame according to a rotation amount and a translation amount of the imaging device with respect to the object to be tested; and the image of the object to be tested is in the image of the Nth frame The motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
较佳地,所述处理器902还用于:Preferably, the processor 902 is further configured to:
采用LM算法对所述摄像装置相对于所述待测对象的的旋转量和平移量进行优化。 The amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
较佳地,所述物理标记点为红外点;所述标记点影像为红外点影像;Preferably, the physical mark point is an infrared point; the mark point image is an infrared point image;
所述处理器902还用于:The processor 902 is further configured to:
确定所述待测对象在所述第N帧图像对应时刻的运动信息符合预设运动量范围的情况下,关闭所述待测对象第一侧面的红外点,开启所述待测对象第二侧面的红外点;所述第二侧面为根据所述待测对象在所述第N帧图像对应时刻的运动信息预测到的;Determining, when the motion information of the object to be tested is in the range of the preset motion amount, the infrared point of the first side of the object to be tested is turned off, and the second side of the object to be tested is opened. An infrared point; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
获取所述摄像装置采集到的第N+1帧图像;Acquiring an image of the (N+1)th frame acquired by the camera device;
判断所述第N+1帧图像中是否包括所述待测对象第二侧面的各个红外点的红外点影像,若是,则根据所述第N+1帧图像确定所述待测对象在所述第N+1帧图像对应时刻的运动信息;若否,则关闭所述待测对象第二侧面的红外点,开启所述待测对象第三侧面的红外点,并获取所述摄像装置采集到的第N+2帧图像;所述第三侧面为根据预设的循环顺序得到的。Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is The N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired. The N+2th frame image; the third side is obtained according to a preset cyclic sequence.
从上述内容可以看出:As can be seen from the above:
本发明的实施例中,获取摄像装置采集到的待测对象的第N帧图像,第N帧图像包括待测对象第一侧面的各个物理标记点的标记点影像;根据第N帧图像中的标记点影像,确定标记点影像与物理标记点的对应关系;获取待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;根据标记点影像与物理标记点的对应关系,以及各个物理标记点和各个标记点影像的位置信息,确定待测对象在第N帧图像对应时刻的运动信息。本发明实施例中,通过确定标记点影像与物理标记点的对应关系,并基于标记点影像的位置信息和物理标记点的位置信息,确定出待测对象的运动信息,相对于现有技术中采用陀螺仪等传感器获取旋转姿态的方法,本发明实施例能够有效确定出待测对象的平移量,从而更准确快速地感知待测对象的运动状态,实时性较高,能够显著改善用户的实际体验。In the embodiment of the present invention, the image of the Nth frame of the object to be tested collected by the camera device is acquired, and the image of the Nth frame includes the image of the point of each physical mark on the first side of the object to be tested; Marking the point image to determine the correspondence between the point image and the physical point; obtaining the position information of each physical point of the first side of the object to be tested in a preset world coordinate system and the image of each point of the Nth frame image Position information in a preset image coordinate system; determining the motion of the object to be tested at the corresponding moment of the image of the Nth frame according to the correspondence between the point image and the physical point, and the position information of each physical point and each point image information. In the embodiment of the present invention, by determining the correspondence between the point image and the physical point, and based on the position information of the point image and the position information of the physical point, the motion information of the object to be tested is determined, which is compared with the prior art. The method for obtaining a rotational posture by using a sensor such as a gyroscope can effectively determine the amount of translation of the object to be tested, thereby more accurately and quickly sensing the motion state of the object to be tested, and has high real-time performance, which can significantly improve the actual user. Experience.
本领域内的技术人员应明白,本发明的实施例可提供为方法、或计算机 程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention may be provided as a method, or a computer Program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the invention

Claims (16)

  1. 一种确定待测对象的运动信息的方法,其特征在于,包括:A method for determining motion information of an object to be tested, characterized in that it comprises:
    获取摄像装置采集到的待测对象的第N帧图像,所述第N帧图像包括所述待测对象第一侧面的各个物理标记点的标记点影像;Obtaining an Nth frame image of the object to be tested collected by the camera device, where the image of the Nth frame includes a point image of each physical marker point on the first side of the object to be tested;
    根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系;Determining, according to the point image in the image of the Nth frame, a correspondence between the point image and the physical point;
    获取所述待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及所述第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;Acquiring position information of each physical mark point of the first side of the object to be tested in a preset world coordinate system and position information of each point image of the Nth frame image in a preset image coordinate system;
    根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息。Determining, according to the correspondence between the mark point image and the physical mark point, and the position information of each of the physical mark points and the respective mark point images, determining, at the time corresponding to the image of the Nth frame, the object to be tested Sports information.
  2. 如权利要求1所述的方法,其特征在于,所述根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系,包括:The method according to claim 1, wherein the determining the correspondence between the point image and the physical point according to the point image in the image of the Nth frame comprises:
    基于包络法确定所述第N帧图像中的参考标记点影像;所述参考标记点影像为所述第N帧图像中的标记点影像中的一个;Determining, by an envelope method, a reference mark point image in the image of the Nth frame; the reference mark point image is one of the mark point images in the image of the Nth frame;
    根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号;Determining, according to a positional relationship between the point image in the image of the Nth frame and the image of the reference point image, a number of each point image in the image of the Nth frame;
    将与所述标记点影像的编号相同的物理标记点确定为所标记点影像对应的物理标记点,得到所述标记点影像与所述物理标记点的对应关系;所述物理标记点的编号和所述标记点影像的编号是基于相同的编号规则得到的;所述待测对象第一侧面的物理标记点呈凸多边形阵列分布。Determining a physical marker point corresponding to the number of the marker point image as a physical marker point corresponding to the marker point image, and obtaining a correspondence relationship between the marker point image and the physical marker point; The number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
  3. 如权利要求2所述的方法,其特征在于,根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号,包括:The method according to claim 2, wherein determining the image of each of the points in the image of the Nth frame based on the positional relationship between the image of the point in the image of the Nth frame and the image of the reference point image Number, including:
    根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系, 确定第一层的标记点影像以及所述第一层的标记点影像的排序;所述参考标记点影像为所述第一层的标记点影像;According to the positional relationship between the point image in the image of the Nth frame and the image of the reference point point, Determining a point image of the first layer and an order of the image of the point of the first layer; the reference point image is a point image of the first layer;
    根据所述第N帧图像中的除所述第一层至第M-1层的标记点影像以外的标记点影像与所述参考标记点影像的位置关系,确定第M层的标记点影像以及所述第M层的标记点影像的排序;M为大于等于2的整数;Determining a mark point image of the Mth layer according to a positional relationship between the mark point image other than the mark point image of the first layer to the M-1th layer and the reference mark point image in the image of the Nth frame Sorting of the image of the mark point of the Mth layer; M is an integer greater than or equal to 2;
    根据所述第一层至第M层的标记点影像的排序,确定所述第一层至第M层的标记点影像的编号。Determining the number of the point image of the first layer to the Mth layer according to the order of the image of the mark points of the first layer to the Mth layer.
  4. 如权利要求1所述的方法,其特征在于,所述获取摄像装置采集到的待测对象的第N帧图像之后,根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系之前,还包括:The method according to claim 1, wherein after obtaining the image of the Nth frame of the object to be tested acquired by the camera device, determining the image of the marker point based on the image of the marker point in the image of the Nth frame Before the correspondence with the physical mark points, the method further includes:
    至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的个数以及轮廓内包含的像素点的个数,确定出所述标记点影像。The marker point image is determined based on at least a pixel value of each pixel of the Nth frame image, a number of pixel points on each contour, and a number of pixel points included in the contour.
  5. 如权利要求4所述的方法,其特征在于,至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的个数以及轮廓内包含的像素点的个数,确定出所述标记点影像,包括:The method according to claim 4, wherein at least the pixel value of each pixel of the Nth frame image, the number of pixel points on each contour, and the number of pixel points included in the contour are determined. Out of the marker image, including:
    根据所述第N帧图像的各个像素点的像素值,得到第一备选标记点影像;所述第一备选标记点影像的像素点的像素值大于等于第一阈值;Obtaining, according to the pixel value of each pixel of the image of the Nth frame, a first candidate point image; the pixel value of the pixel of the first candidate point image is greater than or equal to a first threshold;
    根据各个所述第一备选标记点影像的轮廓上的像素点的个数,得到第二备选标记点影像;所述第二备选标记点影像的轮廓上的像素点的个数大于等于第二阈值且小于等于第三阈值;Obtaining a second candidate point image according to the number of pixels on the contour of each of the first candidate point images; the number of pixels on the contour of the second candidate point image is greater than or equal to a second threshold and less than or equal to a third threshold;
    根据各个所述第二备选标记点影像的轮廓内包含的像素点的个数,得到第三备选标记点影像;所述第三备选标记点影像的轮廓内包含的像素点的个数大于等于第四阈值;Obtaining, according to the number of pixels included in the contour of each of the second candidate point images, a third candidate point image; the number of pixels included in the contour of the third candidate point image Greater than or equal to the fourth threshold;
    确定所述第三备选标记点影像的椭圆参数,将椭圆参数符合预设参数范围的第三备选标记点影像确定为所述标记点影像。Determining an ellipse parameter of the third candidate point image, and determining a third candidate point image that matches the ellipse parameter to the preset parameter range as the point image.
  6. 如权利要求1所述的方法,其特征在于,根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的 位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息,包括:The method according to claim 1, wherein: according to the correspondence between the point image and the physical point, and the respective physical point and the image of each point Position information, determining motion information of the object to be tested at a time corresponding to the image of the Nth frame, including:
    根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,利用PnP算法确定所述摄像装置相对于所述待测对象的的旋转量和平移量;Determining, by the PnP algorithm, the camera device relative to the object to be tested, according to the correspondence between the point image and the physical point, and the position information of each of the physical point and the image of each point The amount of rotation and the amount of translation;
    根据所述摄像装置相对于所述待测对象的旋转量和平移量,得到所述待测对象在所述第N帧图像对应时刻的运动信息;所述待测对象在所述第N帧图像对应时刻的运动信息为所述待测对象在所述第N帧图像对应时刻相对于所述摄像装置的旋转量和平移量。Obtaining motion information of the object to be tested at a time corresponding to the image of the Nth frame according to a rotation amount and a translation amount of the imaging device with respect to the object to be tested; and the image of the object to be tested is in the image of the Nth frame The motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
  7. 如权利要求6所述的方法,其特征在于,所述利用PnP算法确定所述摄像装置相对于所述待测对象的的旋转量和平移量之后,确定所述待测对象在所述第N帧图像对应时刻的运动信息之前,还包括:The method according to claim 6, wherein after determining the amount of rotation and the amount of translation of the camera device relative to the object to be tested by using a PnP algorithm, determining that the object to be tested is at the Nth Before the frame image corresponds to the motion information of the moment, it also includes:
    采用LM算法对所述摄像装置相对于所述待测对象的的旋转量和平移量进行优化。The amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
  8. 如权利要求1所述的方法,其特征在于,所述物理标记点为红外点;所述标记点影像为红外点影像;The method according to claim 1, wherein the physical marker point is an infrared point; and the marker point image is an infrared point image;
    所述确定所述待测对象在所述第N帧图像对应时刻的运动信息之后,还包括:After determining the motion information of the object to be tested at the time corresponding to the image of the Nth frame, the method further includes:
    确定所述待测对象在所述第N帧图像对应时刻的运动信息符合预设运动量范围的情况下,关闭所述待测对象第一侧面的红外点,开启所述待测对象第二侧面的红外点;所述第二侧面为根据所述待测对象在所述第N帧图像对应时刻的运动信息预测到的;Determining, when the motion information of the object to be tested is in the range of the preset motion amount, the infrared point of the first side of the object to be tested is turned off, and the second side of the object to be tested is opened. An infrared point; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
    获取所述摄像装置采集到的第N+1帧图像;Acquiring an image of the (N+1)th frame acquired by the camera device;
    判断所述第N+1帧图像中是否包括所述待测对象第二侧面的各个红外点的红外点影像,若是,则根据所述第N+1帧图像确定所述待测对象在所述第N+1帧图像对应时刻的运动信息;若否,则关闭所述待测对象第二侧面的红外点,开启所述待测对象第三侧面的红外点,并获取所述摄像装置采集到的第N+2帧图像;所述第三侧面为根据预设的循环顺序得到的。 Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is The N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired. The N+2th frame image; the third side is obtained according to a preset cyclic sequence.
  9. 一种确定待测对象的运动信息的装置,其特征在于,包括:An apparatus for determining motion information of an object to be tested, comprising:
    第一获取模块,用于获取摄像装置采集到的待测对象的第N帧图像,所述第N帧图像包括所述待测对象第一侧面的各个物理标记点的标记点影像;a first acquiring module, configured to acquire an image of an Nth frame of the object to be tested collected by the camera, where the image of the Nth frame includes a point image of each physical point of the first side of the object to be tested;
    确定模块,用于根据所述第N帧图像中的标记点影像,确定所述标记点影像与所述物理标记点的对应关系;a determining module, configured to determine, according to the point image in the image of the Nth frame, a correspondence between the point image and the physical point;
    第二获取模块,用于获取所述待测对象第一侧面的各个物理标记点在预设的世界坐标系中的位置信息以及所述第N帧图像的各个标记点影像在预设的图像坐标系中的位置信息;a second acquiring module, configured to acquire position information of each physical point of the first side of the object to be tested in a preset world coordinate system, and image points of the image of the Nth frame in preset image coordinates Location information in the system;
    处理模块,用于根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,确定所述待测对象在所述第N帧图像对应时刻的运动信息。a processing module, configured to determine, according to a correspondence between the mark point image and the physical mark point, and location information of each of the physical mark points and the image of each mark point, the object to be tested is at the Nth The frame image corresponds to the motion information at the time.
  10. 如权利要求9所述的装置,其特征在于,所述确定模块具体用于:The device according to claim 9, wherein the determining module is specifically configured to:
    基于包络法确定所述第N帧图像中的参考标记点影像;所述参考标记点影像为所述第N帧图像中的标记点影像中的一个;Determining, by an envelope method, a reference mark point image in the image of the Nth frame; the reference mark point image is one of the mark point images in the image of the Nth frame;
    根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定所述第N帧图像中的各个标记点影像的编号;Determining, according to a positional relationship between the point image in the image of the Nth frame and the image of the reference point image, a number of each point image in the image of the Nth frame;
    将与所述标记点影像的编号相同的物理标记点确定为所标记点影像对应的物理标记点,得到所述标记点影像与所述物理标记点的对应关系;所述物理标记点的编号和所述标记点影像的编号是基于相同的编号规则得到的;所述待测对象第一侧面的物理标记点呈凸多边形阵列分布。Determining a physical marker point corresponding to the number of the marker point image as a physical marker point corresponding to the marker point image, and obtaining a correspondence relationship between the marker point image and the physical marker point; The number of the mark point image is obtained based on the same numbering rule; the physical mark points of the first side of the object to be tested are distributed in a convex polygon array.
  11. 如权利要求10所述的装置,其特征在于,所述确定模块具体用于:The device according to claim 10, wherein the determining module is specifically configured to:
    根据所述第N帧图像中的标记点影像与所述参考标记点影像的位置关系,确定第一层的标记点影像以及所述第一层的标记点影像的排序;所述参考标记点影像为所述第一层的标记点影像;Determining, according to a positional relationship between the mark point image and the reference mark point image in the image of the Nth frame, a mark point image of the first layer and an order of the mark point image of the first layer; the reference mark point image a mark point image of the first layer;
    根据所述第N帧图像中的除所述第一层至第M-1层的标记点影像以外的标记点影像与所述参考标记点影像的位置关系,确定第M层的标记点影像以及所述第M层的标记点影像的排序;M为大于等于2的整数; Determining a mark point image of the Mth layer according to a positional relationship between the mark point image other than the mark point image of the first layer to the M-1th layer and the reference mark point image in the image of the Nth frame Sorting of the image of the mark point of the Mth layer; M is an integer greater than or equal to 2;
    根据所述第一层至第M层的标记点影像的排序,确定所述第一层至第M层的标记点影像的编号。Determining the number of the point image of the first layer to the Mth layer according to the order of the image of the mark points of the first layer to the Mth layer.
  12. 如权利要求9所述的装置,其特征在于,所述确定模块还用于:The apparatus of claim 9, wherein the determining module is further configured to:
    至少根据所述第N帧图像的各个像素点的像素值、各个轮廓上的像素点的个数以及轮廓内包含的像素点的个数,确定出所述标记点影像。The marker point image is determined based on at least a pixel value of each pixel of the Nth frame image, a number of pixel points on each contour, and a number of pixel points included in the contour.
  13. 如权利要求12所述的装置,其特征在于,所述确定模块具体用于:The device according to claim 12, wherein the determining module is specifically configured to:
    根据所述第N帧图像的各个像素点的像素值,得到第一备选标记点影像;所述第一备选标记点影像的像素点的像素值大于等于第一阈值;Obtaining, according to the pixel value of each pixel of the image of the Nth frame, a first candidate point image; the pixel value of the pixel of the first candidate point image is greater than or equal to a first threshold;
    根据各个所述第一备选标记点影像的轮廓上的像素点的个数,得到第二备选标记点影像;所述第二备选标记点影像的轮廓上的像素点的个数大于等于第二阈值且小于等于第三阈值;Obtaining a second candidate point image according to the number of pixels on the contour of each of the first candidate point images; the number of pixels on the contour of the second candidate point image is greater than or equal to a second threshold and less than or equal to a third threshold;
    根据各个所述第二备选标记点影像的轮廓内包含的像素点的个数,得到第三备选标记点影像;所述第三备选标记点影像的轮廓内包含的像素点的个数大于等于第四阈值;Obtaining, according to the number of pixels included in the contour of each of the second candidate point images, a third candidate point image; the number of pixels included in the contour of the third candidate point image Greater than or equal to the fourth threshold;
    确定所述第三备选标记点影像的椭圆参数,将椭圆参数符合预设参数范围的第三备选标记点影像确定为所述标记点影像。Determining an ellipse parameter of the third candidate point image, and determining a third candidate point image that matches the ellipse parameter to the preset parameter range as the point image.
  14. 如权利要求9所述的装置,其特征在于,所述处理模块具体用于:The device according to claim 9, wherein the processing module is specifically configured to:
    根据所述标记点影像与所述物理标记点的对应关系,以及所述各个物理标记点和所述各个标记点影像的位置信息,利用PnP算法确定所述摄像装置相对于所述待测对象的的旋转量和平移量;Determining, by the PnP algorithm, the camera device relative to the object to be tested, according to the correspondence between the point image and the physical point, and the position information of each of the physical point and the image of each point The amount of rotation and the amount of translation;
    根据所述摄像装置相对于所述待测对象的旋转量和平移量,得到所述待测对象在所述第N帧图像对应时刻的运动信息;所述待测对象在所述第N帧图像对应时刻的运动信息为所述待测对象在所述第N帧图像对应时刻相对于所述摄像装置的旋转量和平移量。Obtaining motion information of the object to be tested at a time corresponding to the image of the Nth frame according to a rotation amount and a translation amount of the imaging device with respect to the object to be tested; and the image of the object to be tested is in the image of the Nth frame The motion information corresponding to the time is the amount of rotation and the amount of translation of the object to be tested relative to the camera at the time corresponding to the image of the Nth frame.
  15. 如权利要求14所述的装置,其特征在于,所述处理模块还用于:The device of claim 14, wherein the processing module is further configured to:
    采用LM算法对所述摄像装置相对于所述待测对象的的旋转量和平移量进行优化。 The amount of rotation and the amount of translation of the camera device relative to the object to be tested are optimized using an LM algorithm.
  16. 如权利要求9所述的装置,其特征在于,所述物理标记点为红外点;所述标记点影像为红外点影像;The device according to claim 9, wherein the physical mark point is an infrared point; and the mark point image is an infrared point image;
    所述处理模块还用于:The processing module is further configured to:
    确定所述待测对象在所述第N帧图像对应时刻的运动信息符合预设运动量范围的情况下,关闭所述待测对象第一侧面的红外点,开启所述待测对象第二侧面的红外点;所述第二侧面为根据所述待测对象在所述第N帧图像对应时刻的运动信息预测到的;Determining, when the motion information of the object to be tested is in the range of the preset motion amount, the infrared point of the first side of the object to be tested is turned off, and the second side of the object to be tested is opened. An infrared point; the second side is predicted according to motion information of the object to be tested at a time corresponding to the image of the Nth frame;
    获取所述摄像装置采集到的第N+1帧图像;Acquiring an image of the (N+1)th frame acquired by the camera device;
    判断所述第N+1帧图像中是否包括所述待测对象第二侧面的各个红外点的红外点影像,若是,则根据所述第N+1帧图像确定所述待测对象在所述第N+1帧图像对应时刻的运动信息;若否,则关闭所述待测对象第二侧面的红外点,开启所述待测对象第三侧面的红外点,并获取所述摄像装置采集到的第N+2帧图像;所述第三侧面为根据预设的循环顺序得到的。 Determining, by the N+1 frame image, an infrared point image of each infrared point of the second side of the object to be tested, and if yes, determining, according to the (N+1)th frame image, the object to be tested is The N+1 frame image corresponds to the motion information of the time; if not, the infrared point of the second side of the object to be tested is turned off, the infrared point of the third side of the object to be tested is turned on, and the image capturing device is acquired. The N+2th frame image; the third side is obtained according to a preset cyclic sequence.
PCT/CN2016/096379 2016-02-22 2016-08-23 Method and apparatus for determining movement information of to-be-detected object WO2017143745A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610096765.9A CN105631901A (en) 2016-02-22 2016-02-22 Method and device for determining movement information of to-be-detected object
CN201610096765.9 2016-02-22

Publications (1)

Publication Number Publication Date
WO2017143745A1 true WO2017143745A1 (en) 2017-08-31

Family

ID=56046788

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/096379 WO2017143745A1 (en) 2016-02-22 2016-08-23 Method and apparatus for determining movement information of to-be-detected object

Country Status (2)

Country Link
CN (1) CN105631901A (en)
WO (1) WO2017143745A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190304130A1 (en) * 2018-03-30 2019-10-03 Beijing Boe Optoelectronics Technology Co., Ltd. Spatial positioning method, spatial positioning device, spatial positioning system and computer readable storage medium
CN110378922A (en) * 2019-06-10 2019-10-25 五邑大学 Smoothed image generation method and device based on auto-thresholding algorithm
CN113111687A (en) * 2020-01-13 2021-07-13 阿里巴巴集团控股有限公司 Data processing method and system and electronic equipment

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631901A (en) * 2016-02-22 2016-06-01 上海乐相科技有限公司 Method and device for determining movement information of to-be-detected object
CN107528993B (en) * 2016-06-22 2019-09-20 北京蚁视科技有限公司 For playing the display methods of the virtual player of sport video in virtual reality
CN106028001B (en) * 2016-07-20 2019-01-04 上海乐相科技有限公司 A kind of optical positioning method and device
CN106780609B (en) * 2016-11-28 2019-06-11 中国电子科技集团公司第三研究所 Vision positioning method and vision positioning device
CN107293182A (en) * 2017-07-19 2017-10-24 深圳国泰安教育技术股份有限公司 A kind of vehicle teaching method, system and terminal device based on VR
CN108769668B (en) * 2018-05-31 2019-08-20 歌尔股份有限公司 Method for determining position and device of the pixel in VR display screen in camera imaging
CN111207747B (en) * 2018-11-21 2021-09-28 中国科学院沈阳自动化研究所 Spatial positioning method based on HoloLens glasses
CN113989368A (en) * 2021-10-13 2022-01-28 中山大学 High-precision positioning method and system for object surface

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103315739A (en) * 2013-05-22 2013-09-25 华东师范大学 Magnetic resonance imaging method and system for eliminating motion artifact based on dynamic tracking technology
CN104298345A (en) * 2014-07-28 2015-01-21 浙江工业大学 Control method for man-machine interaction system
CN104463108A (en) * 2014-11-21 2015-03-25 山东大学 Monocular real-time target recognition and pose measurement method
CN105631901A (en) * 2016-02-22 2016-06-01 上海乐相科技有限公司 Method and device for determining movement information of to-be-detected object

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2171688A2 (en) * 2007-07-10 2010-04-07 Koninklijke Philips Electronics N.V. Object motion capturing system and method
CN101894377B (en) * 2010-06-07 2012-09-05 中国科学院计算技术研究所 Tracking method of three-dimensional mark point sequence and system thereof
CN103198492A (en) * 2013-03-28 2013-07-10 沈阳航空航天大学 Human motion capture method
CN103488291B (en) * 2013-09-09 2017-05-24 北京诺亦腾科技有限公司 Immersion virtual reality system based on motion capture
CN104616292B (en) * 2015-01-19 2017-07-11 南开大学 Monocular vision measuring method based on global homography matrix

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103315739A (en) * 2013-05-22 2013-09-25 华东师范大学 Magnetic resonance imaging method and system for eliminating motion artifact based on dynamic tracking technology
CN104298345A (en) * 2014-07-28 2015-01-21 浙江工业大学 Control method for man-machine interaction system
CN104463108A (en) * 2014-11-21 2015-03-25 山东大学 Monocular real-time target recognition and pose measurement method
CN105631901A (en) * 2016-02-22 2016-06-01 上海乐相科技有限公司 Method and device for determining movement information of to-be-detected object

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190304130A1 (en) * 2018-03-30 2019-10-03 Beijing Boe Optoelectronics Technology Co., Ltd. Spatial positioning method, spatial positioning device, spatial positioning system and computer readable storage medium
US10872436B2 (en) * 2018-03-30 2020-12-22 Beijing Boe Optoelectronics Technology Co., Ltd. Spatial positioning method, spatial positioning device, spatial positioning system and computer readable storage medium
CN110378922A (en) * 2019-06-10 2019-10-25 五邑大学 Smoothed image generation method and device based on auto-thresholding algorithm
CN110378922B (en) * 2019-06-10 2022-11-08 五邑大学 Smooth image generation method and device based on adaptive threshold segmentation algorithm
CN113111687A (en) * 2020-01-13 2021-07-13 阿里巴巴集团控股有限公司 Data processing method and system and electronic equipment

Also Published As

Publication number Publication date
CN105631901A (en) 2016-06-01

Similar Documents

Publication Publication Date Title
WO2017143745A1 (en) Method and apparatus for determining movement information of to-be-detected object
US9519968B2 (en) Calibrating visual sensors using homography operators
EP3284011B1 (en) Two-dimensional infrared depth sensing
JP6126437B2 (en) Image processing apparatus and image processing method
US20210342578A1 (en) Polarization Imaging for Facial Recognition Enhancement System and Method
US9129435B2 (en) Method for creating 3-D models by stitching multiple partial 3-D models
CN113874870A (en) Image-based localization
US9679384B2 (en) Method of detecting and describing features from an intensity image
JP5785664B2 (en) Human head detection in depth images
CN109564432B (en) Method of communicating/controlling a mobile device through gestures and related system
US9858680B2 (en) Image processing device and imaging apparatus
US10776657B2 (en) Template creation apparatus, object recognition processing apparatus, template creation method, and program
US11170246B2 (en) Recognition processing device, recognition processing method, and program
WO2022174594A1 (en) Multi-camera-based bare hand tracking and display method and system, and apparatus
US11282180B1 (en) Object detection with position, pose, and shape estimation
CN113474816A (en) Elastic dynamic projection mapping system and method
KR101652594B1 (en) Apparatus and method for providingaugmented reality contentents
JP6817742B2 (en) Information processing device and its control method
JP2022541100A (en) Joint environment reconstruction and camera calibration
WO2019150431A1 (en) Information processing device
JP2009216480A (en) Three-dimensional position and attitude measuring method and system
CN106803284A (en) Build the method and device of the 3-D view of face
US9811740B2 (en) Computer-readable medium storing therein image processing program, image processing device, and image processing method
CN114845055A (en) Method and device for determining shooting parameters of image acquisition equipment and electronic equipment
KR20210091033A (en) Electronic device for estimating object information and generating virtual object and method for operating the same

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16891193

Country of ref document: EP

Kind code of ref document: A1

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/12/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16891193

Country of ref document: EP

Kind code of ref document: A1