CN114529606A - Pose detection method and device, electronic equipment and storage medium - Google Patents

Pose detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114529606A
CN114529606A CN202210147653.7A CN202210147653A CN114529606A CN 114529606 A CN114529606 A CN 114529606A CN 202210147653 A CN202210147653 A CN 202210147653A CN 114529606 A CN114529606 A CN 114529606A
Authority
CN
China
Prior art keywords
point cloud
image
target object
frame
preset
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210147653.7A
Other languages
Chinese (zh)
Inventor
王坤
林纯泽
王权
钱晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Datianmian White Sugar Technology Co ltd
Original Assignee
Beijing Datianmian White Sugar Technology Co ltd
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 Beijing Datianmian White Sugar Technology Co ltd filed Critical Beijing Datianmian White Sugar Technology Co ltd
Priority to CN202210147653.7A priority Critical patent/CN114529606A/en
Publication of CN114529606A publication Critical patent/CN114529606A/en
Priority to PCT/CN2022/134852 priority patent/WO2023155532A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/75Determining position or orientation of objects or cameras using feature-based methods involving models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure relates to a pose detection method and apparatus, an electronic device, and a storage medium, the method including: the method comprises the steps of obtaining at least one frame of first image to be processed, wherein the first image comprises a two-dimensional image of the back face of a target object, collected by image collection equipment, and determining pose information of the target object in the first image according to the at least one frame of first image and a preset three-dimensional point cloud of the front face of the target object. The embodiment of the disclosure can not only accurately realize the pose of a single frame image shot by a back camera, but also accurately realize the pose of a multi-frame image shot by a back camera array device, effectively solve the omnibearing pose detection of the target object, and realize the accurate pose detection no matter what angle the angle between the face orientation of the target object and the shooting direction shows.

Description

Pose detection method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a pose detection method and apparatus, an electronic device, and a storage medium.
Background
The image-based target three-dimensional reconstruction has become a very popular research direction, and is widely applied in the directions of target detection and identification, target driving, augmented reality and the like, and correspondingly, a relatively mature logic scheme is formed by solving the relative Pose (Pose) between the three-dimensional model and the two-dimensional image of the target object.
However, in the process of three-dimensional reconstruction of the target object, since there is no definite semantic part on the back surface of the target object when the target object faces away from the lens, for example, when the area of the back of the head faces the lens, there is no definite semantic part on the back of the head, for example, the canthus, the corner of the mouth, the tip of the nose, and so on, a great difficulty is encountered in detecting the pose of the three-dimensional model of the target object (the three-dimensional model of the head) with respect to the two-dimensional image of the back surface (for example, the back of the head image).
Disclosure of Invention
The disclosure provides a pose detection technical scheme.
According to an aspect of the present disclosure, there is provided a pose detection method including: acquiring at least one frame of first image to be processed, wherein the first image comprises a two-dimensional image of the back of a target object acquired by image acquisition equipment; and determining pose information of the target object in the first image according to the at least one frame of first image and a preset point cloud, wherein the preset point cloud is a three-dimensional point cloud on the front surface of the target object.
In a possible implementation manner, the preset point cloud includes N preset key points, where N is an integer greater than 1, and in a case that the image acquisition device is a single camera, the at least one frame of first image includes a single frame of first image captured by the single camera; determining pose information of a target object in the first image according to the at least one frame of first image and a preset point cloud, wherein the determining comprises the following steps: generating annotation information containing N first key points in a target object area of the single-frame first image; projecting the preset point cloud to the single-frame first image, and determining N first projection points corresponding to N first key points; and fitting the N first projection points and the N preset key points to obtain the pose information of the target object in the single-frame first image.
In a possible implementation, in a case where the image capture device is a camera array, the at least one frame of the first image includes: the method comprises the following steps that a plurality of frames of first images and a plurality of frames of second images are obtained, wherein the second images are two-dimensional images of the front side of a target object; determining pose information of a target object in the first image according to the at least one frame of first image and a preset point cloud, wherein the determining comprises the following steps: performing three-dimensional reconstruction on the plurality of frames of second images to obtain the preset point cloud, and performing three-dimensional reconstruction on the plurality of frames of first images to obtain a first point cloud; and determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the relative relation between the preset point cloud and the first point cloud.
In a possible implementation manner, in a case that the image capturing device is a camera array, before the acquiring of the at least one frame of the first image to be processed, the method includes: calibrating internal parameters and external parameters of the camera array according to the checkerboard images acquired by the camera array, wherein the internal parameters comprise focal length and/or pixel size, and the external parameters comprise camera position and/or camera rotation angle; the three-dimensional reconstruction of the plurality of frames of second images to obtain the preset point cloud comprises the following steps: performing three-dimensional reconstruction on the multiple frames of second images according to the internal parameters and the external parameters to obtain the preset point cloud; and performing three-dimensional reconstruction on the multi-frame first image to obtain a first point cloud, including: and performing three-dimensional reconstruction on the multi-frame first image according to the internal parameters and the external parameters to obtain the first point cloud.
In a possible implementation manner, the determining, according to the relative relationship between the preset point cloud and the first point cloud, the pose information of the target object in each frame of the first image in the multiple frames of the first images includes: determining pose transformation information between the preset point cloud and the first point cloud according to internal parameters and external parameters of a camera array, and determining pose transformation information between the preset point cloud and each frame of first image; and determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the pose transformation information between the preset point cloud and each frame of first image.
In one possible implementation, the relative relationship between the preset point cloud and the first point cloud includes pose transformation information between the preset point cloud and the first point cloud, and the method further includes: performing point cloud registration processing on the preset point cloud, and determining grid data corresponding to the preset point cloud and pose transformation information between the grid data and the preset point cloud; the determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the relative relationship between the preset point cloud and the first point cloud comprises the following steps: determining pose transformation information between the grid data and the first point cloud according to pose transformation information between the grid data and the preset point cloud and pose transformation information between the preset point cloud and the first point cloud; determining pose transformation information between the grid data and each frame of first image according to internal parameters and external parameters of a camera array and pose transformation information between the grid data and the first point cloud; and determining the pose information of the target object in each frame of first image in the plurality of frames of first images according to the pose transformation information between the grid data and each frame of first image.
In a possible implementation manner, after the performing three-dimensional reconstruction on the multiple frames of second images to obtain the preset point cloud and performing three-dimensional reconstruction on the multiple frames of first images to obtain the first point cloud, the method further includes: and aligning the preset point cloud and the first point cloud, and determining the relative relationship between the preset point cloud and the first point cloud.
In a possible implementation manner, the aligning the preset point cloud and the first point cloud, and determining a relative relationship between the preset point cloud and the first point cloud includes: generating marking information containing N preset key points in the face area of the preset point cloud; generating labeling information containing K second key points in the face area of the first point cloud, wherein K is an integer not greater than N; and aligning the N key points of the preset point cloud and the K second key points of the first point cloud, and determining the relative relationship between the preset point cloud and the first point cloud.
In one possible implementation, the target object includes a body part of a human body; under the condition that the body part of the human body comprises the human face, the preset key points comprise key points of human face organs; and under the condition that the body part of the human body comprises limbs, the preset key points comprise limb key points.
According to an aspect of the present disclosure, there is provided a pose detection apparatus including: the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring at least one frame of first image to be processed, and the first image comprises a two-dimensional image of the back of a target object acquired by image acquisition equipment; and the determining module is used for determining the pose information of the target object in the first image according to the at least one frame of first image and a preset point cloud, wherein the preset point cloud is a three-dimensional point cloud on the front surface of the target object.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
In the embodiment of the disclosure, at least one frame of first image to be processed can be acquired, the first image comprises a two-dimensional image of the back of a target object acquired by an image acquisition device, and pose information of the target object in the first image is determined according to the at least one frame of first image and a preset three-dimensional point cloud of the front of the target object.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flowchart of a pose detection method according to an embodiment of the present disclosure.
Fig. 2 shows a schematic diagram of preset keypoints and first keypoints, according to an embodiment of the disclosure.
Fig. 3 shows a schematic diagram of a projection effect according to an embodiment of the disclosure.
Fig. 4 shows a schematic diagram of a calibration plate according to an embodiment of the present disclosure.
Fig. 5 shows a schematic diagram of a preset point cloud obtaining manner according to an embodiment of the present disclosure.
Fig. 6 shows a schematic diagram of a first point cloud acquisition manner according to an embodiment of the present disclosure.
Fig. 7 shows a schematic diagram of mesh data and first point cloud alignment according to an embodiment of the present disclosure.
Fig. 8 illustrates a schematic diagram of a projection effect according to an embodiment of the present disclosure.
Fig. 9 shows a block diagram of a pose detection apparatus according to an embodiment of the present disclosure.
Fig. 10 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure.
Fig. 11 shows a block diagram of an electronic device 1900 according to an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
The pose detection of the target object can be widely applied to various scenes, wherein the target object can comprise a body part of a human body and the like, and the front side of the target object is provided with an object with a definite semantic part (such as an eye corner, a mouth corner, a nose tip and the like) and the back side of the target object is lack of the definite semantic part. It should be understood that the target object of the embodiment of the present disclosure is not limited to a body part of a human body (for example, a human head, a limb, etc.), and any object having a definite semantic part on the front side and lacking a definite semantic part on the back side may be used as the target object. For convenience of description, the following disclosure embodiments all use the target object as an example for description, and the case where the target object is another object may be flexibly extended according to the following disclosure embodiments, which is not limited by the present disclosure.
Taking pose detection of a human head as an example, for a scene of a human face/human head 360-degree reconstruction task, in order to improve the accuracy of the human face/human head 360-degree reconstruction, pose detection needs to be performed on a human head image at any angle within a 360-degree range, and poses of the human face/human head relative to front and back pictures are determined, so as to provide training data required by the 360-degree reconstruction task. Or, in some scenes in which the orientation of the head is taken as an important judgment basis, the pose of the head in the image of the head also needs to be detected, for example, in a detection scene of safe driving, if the vehicle-mounted camera is arranged behind the driving seat, whether the driver is looking ahead from the left or not needs to be judged based on the acquired image of the back of the head of the driver. Or in an application scene in which Augmented Reality (AR) interaction is performed based on a face pose, pose detection needs to be performed on a shot face image, for example, for a scene in which a face sticker special effect is applied, when a user wants to add an ornament special effect such as a hairpin, a head at any angle needs to be accurately positioned, and the situation that the sticker special effect is lost when the head faces away from a shooting lens is reduced. The application scene for performing augmented reality AR interaction based on the face pose can include virtual makeup processing, face-to-animal face conversion special effects and the like besides the face pasting special effects, and is not disclosed or limited.
The pose detection is carried out on the target object in the image to be processed, the orientation or the posture of the target object relative to a certain reference datum can be estimated, the reference datum can be a preset three-dimensional model of the target object, and in actual use, the reference datum of the pose of the target object can be selected based on actual requirements.
However, in the related art, the pose detection of the target object in the image to be processed is mainly focused on the pose detection in which the front surface of the target object faces the camera and is rotated within 90 degrees to the left and right, that is, the angle of the face orientation of the target object to the shooting direction (the direction between the face and the image capturing apparatus) is between 0 to 90 degrees and 270 to 360 degrees. For example, when performing pose detection on a target object in an image to be processed, images at angles between the face orientation of the target object and the shooting direction of 0-90 degrees and between 270-360 degrees may be first screened out, since the image of the screened out target object has definite semantic parts (such as an eye corner, a mouth corner, a nose tip and the like), key points may be respectively extracted from the image of the screened out target object, a three-dimensional model of the target object is obtained based on key point fitting, and then the pose of the target object in the image relative to the three-dimensional model may be determined by using the three-dimensional model as a reference.
The three-dimensional model may be a standardized model, such as a three-dimensional dense point cloud, and the standardized model may have a topological structure, that is, the connection relationship between each point in the model is determined, and each point in the model is bound to each part of the target object.
According to the pose detection method, the key points of the target object in the image need to be extracted, and the three-dimensional model of the target object is fitted based on the key points, so that the pose of the target object in the image relative to the three-dimensional model can be determined.
If the angle between the face orientation of the target object and the shooting direction is between 0 and 90 degrees and 270 and 360 degrees, the target object with a small rotation angle (such as a front face image) is shot, the target object in the image has definite semantic parts (such as an eye corner, a mouth corner, a nose tip and the like) and more key points, and the three-dimensional model can be accurately fitted and the pose of the target object relative to the three-dimensional model can be estimated.
However, if the angle between the face orientation of the target object and the shooting direction is between 90 degrees and 270 degrees, a target object (e.g., a posterior head scoop image) with a large rotation angle is shot, the target object region in the image only includes few clear semantic parts (e.g., an eye corner, a mouth corner, a nose tip, etc.), even some target object images do not include clear semantic parts at all, the number of extractable key points is few or none, in this case, the three-dimensional model cannot be accurately fitted, and the obtained pose detection result of the target object relative to the three-dimensional model has a large error. Therefore, the related art cannot effectively solve the accurate pose detection of the target object at any shooting angle, and particularly cannot effectively solve the accurate pose detection of the target object at the shooting angle on the back side of the target object.
It should be understood that 0-90 degrees, 90-270 degrees, 270-360 degrees are merely used as a reference range, and embodiments of the present disclosure are not limited to the numerical ranges given above.
In view of this, the present disclosure provides a pose detection technical solution, which is capable of acquiring at least one frame of first image to be processed, where the first image includes a two-dimensional image of a back side of a target object acquired by an image acquisition device, and determining pose information of the target object in the first image according to the at least one frame of first image and a preset three-dimensional point cloud of a front side of the target object.
Fig. 1 shows a flowchart of a pose detection method according to an embodiment of the present disclosure, which may be performed by an electronic device such as a terminal device or a server, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or the like, and the method may be implemented by a processor calling a computer-readable instruction stored in a memory. Alternatively, the method may be performed by a server.
The pose detection method according to the embodiment of the present disclosure is described below taking an electronic device as an execution subject.
As shown in fig. 1, the pose detection method includes:
in step S1, acquiring at least one frame of first image to be processed, where the first image includes a two-dimensional image of the back of the target object acquired by an image acquisition device;
in one possible implementation, the target object may include an object having a front face (e.g., including a face) with a definite semantic location (e.g., including an eye corner, a mouth corner, a nose tip, etc.) and a back face (e.g., including a back brain scoop) lacking a definite semantic location. It should be understood that the target object of the embodiment of the present disclosure is not limited to the head, and any object having a front side with a definite semantic part and a back side lacking the definite semantic part may be used as the target object. The following disclosure embodiments are described by taking the target object as the human head as an example, and the situation that the target object is another object can be flexibly expanded according to the following disclosure embodiments, which is not limited by the disclosure.
In a possible implementation manner, the first image to be processed may be an image including the target object acquired in advance, or an image acquired when the target object is photographed by using the image acquisition apparatus. For example, in a scenario that the electronic device is a terminal device such as a mobile phone or a computer, the first image including the target object may be captured by an image capturing device connected to the terminal device, or the first image including the target object may be selected from an album of the terminal device, or the first image including the target object may be received from another application installed in the terminal device.
In one possible implementation, the image capturing device may be a single camera or a camera array composed of multiple cameras at different spatial positions.
Based on different image acquisition devices, one or more frames of first images can be acquired by one shooting. If the image acquisition equipment is a single camera, under the condition that the relative position and angle between the single camera and the target object are not changed, a frame of first image to be processed can be acquired, and the first image is a two-dimensional image corresponding to the target object at the shooting angle.
Alternatively, if the image capturing device is a camera array, for example, for a camera array composed of M (M is an integer greater than 1) cameras at different spatial positions, in the case that the relative positions and angles of the camera array and the target object are unchanged, M frames of first images to be processed may be acquired, where each frame of first image respectively corresponds to a two-dimensional image of the target object at the shooting angle of the respective camera.
The image capturing device in the embodiment of the present disclosure may be a camera, and may also be a device with a photographing function, such as a camera, a video camera, a scanner, a mobile phone, and a tablet computer, which is not limited in the present disclosure.
In one possible implementation, the image capturing device may capture images of the target object at various angles by adjusting the angle or position of the image capturing device. For example, in the case where the target object is directly facing the image capturing apparatus, that is, the angle between the face orientation of the target object and the shooting direction is between 0 to 90 degrees, and 270 to 360 degrees, at least one frame of the first image to be processed with respect to the front of the target object may be captured; alternatively, in the case where the target object faces away from the image capturing apparatus, that is, the angle between the face orientation of the target object and the shooting direction is between 90 degrees and 270 degrees, at least one frame of the first image to be processed with respect to the back of the target object may be captured.
It should be understood that, compared with the related art in which accurate pose detection is performed only on the front image of the target object, the pose detection method according to the embodiment of the present disclosure may be applied to not only the front image of the target object but also the back image of the target object to perform pose detection on the two-dimensional image of the back of the target object. In this case, the embodiments of the present disclosure focus on a method for performing pose detection on a target object in at least one acquired frame of a first image to be processed in a case where the first image is a two-dimensional image of a back surface of the target object.
In step S2, pose information of the target object in the first image is determined according to the at least one frame of the first image and the preset point cloud.
The preset point cloud is a three-dimensional point cloud on the front surface of the target object, and the pose information comprises at least one of the following information: scaling information, rotation information, and translation information. The zoom information may represent a zoom-in or zoom-out ratio between the target object and the three-dimensional point cloud in the first image, the rotation information may represent a rotation angle between the target object and the three-dimensional point cloud in the first image, and the translation information may represent a direction and a distance of movement between the target object and the three-dimensional point cloud in the first image.
It should be understood that, since the target object in the first image is two-dimensional data and the three-dimensional point cloud is three-dimensional data, in order to determine the zoom information, rotation information, and/or translation information of the target object in the first image, the zoom information, rotation information, and/or translation information between the target object in the first image and the two-dimensional projection of the three-dimensional point cloud may be calculated, and the present disclosure is not limited to the specific manner of determining the zoom information, rotation information, and/or translation information between specific two-dimensional data and three-dimensional data.
After the pose information of the target object in the first image is determined, the determined pose information of the target object can be applied to interactive scenes such as movies, games and virtual social contact based on augmented reality AR, the pose information of the target object is beneficial to judging the relative position of the target object and virtual information (such as a virtual scene, a virtual object and the like) in reality, and the combination or interaction between the target object and the virtual information is realized. For another example, in an AR reloading application, the display angle and position of the virtual clothes can be adjusted using the pose information of the target object, improving the reloading effect. In AR special effect generation applications, for example, pose information for a target object facilitates the combination of virtual special effects and target objects, such as virtual makeup processing, face-to-animal face special effects, face-to-face paster special effects, and the like. The present disclosure does not limit the application scenario of the pose information of the target object.
In one possible implementation, the preset point cloud is a three-dimensional point cloud describing the front of the target object, for example, a three-dimensional point cloud including the front of the target object constructed under the World Coordinate System (World Coordinate System), and the preset point cloud can be used as a reference for evaluating the pose of the target object.
The method comprises the steps of reading pre-stored preset point clouds from an internal memory of the electronic equipment, performing three-dimensional reconstruction on a two-dimensional image of the front side of multiple frames of a target object to obtain the preset point clouds of the target object, and mapping the target object to obtain the preset point clouds.
In one possible implementation, the corresponding relationship between the image coordinate point of the target object in the at least one frame of the first image and the three-dimensional point cloud (preset point cloud) on the front surface of the target object may be analyzed, and the pose information of the target object in the at least one frame of the first image may be determined, where the pose information may include at least one of scaling information, rotation information, and translation information of the target object in the first image with respect to the preset point cloud.
Since the target object in the first image is in a two-dimensional space and the preset point cloud is in a three-dimensional space, in order to facilitate analysis of the corresponding relationship between the image coordinate point of the target object in the first image and the preset point cloud, the three-dimensional preset point cloud can be projected to the two-dimensional image space in a projection mode, the corresponding relationship between the first image and the projected preset point cloud is analyzed, and further the pose information of the target object in at least one frame of the first image is determined; or, three-dimensional reconstruction may be performed on the at least one frame of first image according to the at least one frame of first image, so as to reconstruct a three-dimensional point cloud (i.e., a first point cloud) of the target object, and then a corresponding relationship between the reconstructed first point cloud and a preset point cloud is analyzed, thereby determining pose information of the target object in the at least one frame of first image.
In order to improve the pose evaluation efficiency, a plurality of preset key points can be marked at positions where the preset point cloud has definite semantic meanings, and key points with the same point sequence as the preset key points are marked on at least one frame of first image or on the first point cloud reconstructed based on the at least one frame of first image. Then, corresponding relations between key points of the preset point cloud and key points on the first point cloud on the at least one first image or reconstructed based on the at least one first image can be analyzed, and therefore pose information of the target object in the at least one first image is determined.
For example, for a single-frame first image acquired by a back-to-single camera, fitting a first projection point of a preset key point of a preset point cloud and a first key point of the single-frame first image by analyzing a corresponding relationship between the preset key point and the first key point of the single-frame first image to obtain pose information of a target object in the single-frame first image, where the pose information includes at least one of the following information: scaling information, rotation information, and translation information. The zoom information may represent an enlargement or reduction ratio between the projection of the target object and the preset point cloud in the single frame of the first image, the rotation information may represent a rotation angle between the projection of the target object and the preset point cloud in the single frame of the first image, and the translation information may represent a direction and a distance of movement between the projection of the target object and the preset point cloud in the single frame of the first image.
Or, for a plurality of frames of first images acquired by the back-to-camera array, a first point cloud corresponding to the back target object can be constructed through a three-dimensional point cloud reconstruction technology, a second key point can be marked on the first point cloud, a preset key point can be aligned with the second key point, namely the preset point cloud is aligned with the first point cloud, so as to obtain pose transformation information between the preset point cloud and the first point cloud, and then the pose information of the target object in the plurality of frames of first images can be determined according to the pose transformation information. The pose information includes at least one of: scaling information, rotation information, and translation information. The zoom information may represent a zoom-in or zoom-out ratio between the target object and the projection of the preset point cloud in each frame of the first image, the rotation information may represent a rotation angle between the target object and the projection of the preset point cloud in each frame of the first image, and the translation information may represent a direction and a distance of movement between the target object and the projection of the preset point cloud in each frame of the first image.
Through the steps S1-S2, for some target object back images which cannot accurately provide clear semantic parts, a three-dimensional model (preset point cloud) of a target object in the image relative to the target object can be accurately determined, the pose of a single-frame image shot by a back camera can be accurately realized, the pose of a multi-frame image shot by a back camera array device can be accurately realized, the omnibearing pose detection of the target object is effectively solved, and the accurate pose detection can be realized no matter what angle the angle between the face orientation of the target object and the shooting direction appears.
The pose detection method according to the embodiment of the present disclosure is exemplarily described below with respect to a scene of a single frame of back human head image captured by a back-facing camera (non-camera array) and a scene of multiple frames of back human head images captured by a multi-camera array, respectively, by taking a human head as a target object.
In a possible implementation manner, in step S1, in the case that the image capture device is a single camera, at least one frame of first image to be processed may be acquired, where the at least one frame of first image includes a single frame of first image captured by the single camera.
The single-frame first image may be a two-dimensional image captured when a human head faces away from a single camera In a natural (In The Wild) scene, and may be an image In which The human face faces at any angle between 90 degrees and 270 degrees with respect to The capturing direction. It should be understood that 90-270 degrees is used as a reference range only and embodiments of the present disclosure are not limited to the numerical ranges given above.
The natural scene, i.e. a real scene in the real world (e.g. work, study, life), may include a single frame of first image captured in an environment such as a park, an office, a school, a mall, for example, and the background of the single frame of first image captured in the natural scene may be various.
Acquiring a single frame of first image shot by a single camera in step S1, determining pose information of a human head in the first image according to a first key point of the single frame of first image and a preset key point of a preset point cloud in step S2, and step S2 may include:
in step SA1, generating annotation information including N first keypoints in a target object region of a single-frame first image, where the annotation information may include location information of the first keypoints;
in step SA2, projecting the preset point cloud to the single-frame first image, and determining N first projection points corresponding to the N first keypoints;
in step SA3, fitting the N first projection points and the N preset key points to obtain pose information of the target object in the single-frame first image. Exemplarily, fig. 2 shows a schematic diagram of preset keypoints and first keypoints according to an embodiment of the present disclosure. As shown in fig. 2, the three-dimensional model of the head in the left image is a preset point cloud (i.e. a three-dimensional point cloud of the front of the head), which includes N preset key points, for example, in the case that the number of the preset key points is 10 (N ═ 10), the preset key points include key points of a human face organ, and the key points include: left/right lateral eye corner points, left/right medial eye corner points, nose tip points, left/right mouth corner points, chin center points, left/right ear root points, wherein the sequence of numerical designations in the left diagram of fig. 2 represents the point sequence of preset key points.
It should be understood that, the above-mentioned is only an example of a human head, the target object may include a body part of a human body, and in the case that the body part of the human body includes a human face, the preset key points include key points of a human face organ; under the condition that the body part of the human body comprises limbs, the preset key points comprise limb key points, and the preset key points are not particularly limited by the disclosure.
As shown in fig. 2, the right-side image of the back of the head is the single-frame first image captured by the single camera in step S1, and in step SA1, annotation information including N first keypoints may be generated in the head region of the single-frame first image according to the N preset keypoints, for example, the N first keypoints may be annotated in the head region of the single-frame first image according to the received user operation information, and annotation information including the N first keypoints may be generated; the method also can be used for inputting the single-frame first image into the neural network model by utilizing a preset neural network model to generate the labeling information containing the N first key points, wherein the preset neural network model is the neural network model capable of labeling the first key points based on the human head region of the single-frame first image after the neural network is trained (learned) by a large number of samples. The method for generating the annotation information is not limited in the present disclosure.
The labeling positions of the N first key points on the back of the head (back of the head) can correspond to the labeling positions of the N preset key points, and the labeling positions and the N preset key points have the same point sequence. For example, in the case that the number of the first key points is 10 (N ═ 10), the first key points may correspond to left/right outer corner points of the eyes, left/right inner corner points of the eyes, nose tip points, left/right mouth corner points, chin center points, left/right ear root points, respectively, and the numerical sign order in the right diagram of fig. 2 represents the point order of the first key points.
It should be understood that since the ear part can also be seen from the image of the back of the human head, in order to estimate the size of the face and improve the accuracy of pose detection, the first key point to be labeled and the preset key point may be selected and at least included as the left/right root of the ear. The larger the value of the number N of the first key points and the preset key points is, the larger the calculated amount of the pose detection method of the embodiment of the disclosure is, and the more accurate the corresponding pose detection is. The specific value of the number N of labels of the first keypoint and the position of the label are not limited in the present disclosure.
After the N first key points marked in the single-frame first image and the N preset key points of the preset point cloud are determined, in steps SA2 to SA3, the three-dimensional preset point cloud shown in the left diagram of fig. 2 is projected to the two-dimensional single-frame first image shown in the right diagram of fig. 2, so that the first projection points of the N preset key points on the preset point cloud are fitted with the N first key points in the single-frame first image, and the pose information of the target object corresponding to the single-frame first image is obtained.
For example, assume that P3d represents N preset keypoints in a preset point cloud, namely: (x)1,y1,z1)~(xN,yN,zN) P2d represents N first keypoints in a single-frame first image, namely: (x)1′,y1′)~(xN′,yN′)。
N preset key points (x) based on three-dimensional space1,y1,z1)~(xN,yN,zN) And first keypoints (x) of N two-dimensional planes1′,y1′)~(xN′,yN') may construct an equation based on the projection, such that the preset points areThe first projection points of N preset keypoints P3d on the cloud are fitted to N first keypoints P2d in the single-frame first image, that is:
P2d=Project(scale*rotation*P3d+translation) (1)
in formula (1), the product represents a projection function, and may be used to perform dimension reduction processing on a target object, and may project the target object in a three-dimensional space to a two-dimensional plane, where the specific projection manner may include orthogonal projection, perspective projection, and the like, and the disclosure does not limit the type of the projection manner.
In formula (1), in order to fit the first projection point of the N preset key points P3d on the preset point cloud to the N first key points P2d in the single frame first image, that is, to make the N preset key points P3d coincide with or approach infinitely to the N first key points P2d after projection, in the projection process, pose transformation, such as scaling transformation scale, rotation transformation rotation and translation transformation, may be performed on the N key points P3d of the preset point cloud, and a value of the transformation that makes the equation in formula (1) true is taken as pose information of the target object in the single frame first image, and the pose information may include the scaling information scale, rotation information rotation and translation information transformation obtained by solving formula (1).
For example, the scaling transformation scale may be a parameter greater than 0, the rotation transformation rotation may be a3 × 3 matrix, and the translation transformation may be a2 × 1 matrix. In specific implementations, the matrix parameters related to the rotational transformation and the translational change are not limited to the above exemplary descriptions.
The method comprises the steps that a preset point cloud is projected to a single-frame first image, and N first projection points corresponding to N first key points are determined; the N first projection points and the N preset key points can be fitted based on a fitting processing method such as a least square method, and the pose information of the target object in the single-frame first image is obtained.
For example, a preset point cloud may be projected to the single frame of the first image, and N first keypoints p3d are determined: (x)1,y1,z1)~(xN,yN,zN) To what is providedThe corresponding N first projection points are as follows: project (scale rotation P3d + translation), namely: (px)1,py1)~(pxN,pyN);
In order to improve the calculation efficiency, the formula (1) can be solved by using a linear optimization method, such as a least square method (least square method), so as to obtain pose information of the target object in the first image of the single frame, that is:
Figure BDA0003509571520000101
in the formula (2), (x)i′,yi') represents the first keypoint, (px)i,pyi) Representing the first projection point, and determining the scaling information scale, the rotation information rotation and the translation information translation which enable the value of the formula (2) to be minimum as the pose information of the target object in the single-frame first image.
By the mode, assuming that the target object is a human head as an example, for a single posterior-cranial spoon image, labeling information containing N first key points can be generated at the posterior-cranial spoon, so that the N first key points and N first projection points of a front face model (preset point cloud) have the same point sequence, and then the pose information of the single-frame first image is solved directly according to the fitting processing (for example, by using a least square method) of the paired N groups of points, so that the pose information of the single-frame first image can be obtained more simply and efficiently.
Therefore, through steps SA 1-SA 3, the pose information of the target object in the single-frame first image can be accurately obtained for the single-frame first image shot by the back-facing camera.
It should be understood that the methods of steps SA 1-SA 3 may also be applied to the frontal image of the target object, for example, for the frontal image of the face, the pose information of the frontal image of the face may be obtained, wherein the first keypoint may be manually labeled in an interactive manner, or feature point detection (for example, including based on a deep learning method, etc.) may be performed on the frontal image of the face to obtain the first keypoint.
Fig. 3 is a schematic diagram illustrating a projection effect according to an embodiment of the present disclosure, and fig. 3 illustrates the projection effect of a single-frame first image at two different shooting angles with a human head as a target object. As shown in fig. 3, 10 points of a triangle represent 10 first keypoints labeled in the single-frame first image, and 10 points of a circle represent three-dimensional preset keypoints (e.g., 10 points in the left image of fig. 2) projected onto the first projection point of the single-frame first image. As can be seen from fig. 3, the first key point labeled in the single-frame first image and the first projection point may coincide or approach each other, which illustrates that the pose detection method according to the embodiment of the present disclosure can accurately solve the pose information about the hindbrain image.
The above introduces the pose detection for the scene of the single frame back face human head image shot by the single camera, and the following explains the pose detection method of the embodiment of the present disclosure for the scene of the multi-frame back face human head image shot by the camera array in the experimental scene.
The experimental scene is a scene arranged manually, and may include a laboratory arranged manually, so that the background of the image taken in the scene is set manually, for example, the background is pure white.
In one possible implementation, in step S1, in the case that the image capture device is a camera array, at least one frame of first image to be processed may be acquired, and the at least one frame of first image may include: the image processing method comprises a plurality of frames of first images and a plurality of frames of second images, wherein the second images are two-dimensional images of the front side of a target object.
Having determined the multi-frame first image and the multi-frame second image in step S1, the pose information of the target object of each frame of the first image may be determined according to the multi-frame first image and the preset point cloud three-dimensionally reconstructed by the multi-frame second image in step S2, and step S2 may include:
in step SB2, three-dimensionally reconstructing the second images of the plurality of frames to obtain the preset point cloud, and three-dimensionally reconstructing the first images of the plurality of frames to obtain the first point cloud;
in step SB3, the pose information of the target object in each frame of the first image in the plurality of frames of the first image is determined according to the relative relationship between the preset point cloud and the first point cloud.
For example, a Camera array (Camera Arrays) may utilize multiple cameras of different spatial locations to capture images of different perspectives. When the distance between each Camera is relatively large, the whole Camera array can be regarded as a multi-Center-of-Projection Camera (multi-Center-of-Projection Camera), and multi-view information of the target object can be obtained.
For example, assuming that the camera array includes M cameras, and one shooting of the target object can acquire M frames of images from different perspectives, the present disclosure does not limit the number M of cameras included in the camera array.
It should be understood that in step S1, multiple frames of the first image and multiple frames of the second image may be captured by using the same camera array, or multiple frames of the first image and multiple frames of the second image may be captured by using different camera arrays, and the number of frames of the acquired first image may be the same as or different from the number of frames of the acquired second image, and the number of frames of the first image and the number of frames of the second image are not limited by the present disclosure. For purposes of the following description, an array of M (e.g., 30) cameras may be used to capture M first images and M second images.
In a possible implementation, in the case that the image capturing device is a camera array, before the M frames of the first image and the M frames of the second image are acquired by the camera array (i.e., before step S1), in step SB1, internal parameters and external parameters of the camera array may be calibrated according to a checkerboard image captured by the camera array, where the internal parameters include a focal length and/or a pixel size, and the external parameters include a camera position and/or a camera rotation angle.
The checkerboard image represents an image having a checkerboard pattern, that is, an image formed by alternating squares of two colors (for example, black and white). For example, a checkerboard image may be composed of 2 rows by 3 columns of tiles, 1 st row, 3 rd column and 2 nd row, 2 nd column being black tiles, 1 st row, 2 nd column, 2 nd row, 1 st column and 2 nd row, 3 rd column being white tiles, the disclosure does not limit the number of rows, columns, colors, and side lengths of each tile of the checkerboard.
The camera array is calibrated, and the correlation between the three-dimensional geometric position of a certain point on the surface of the target object in the three-dimensional space and the corresponding point in the image can be determined, namely the mapping from the world coordinate to the pixel coordinate. For calibration of the camera array, calibration parameters may be simultaneously solved for M cameras included in the camera array, and a calibration parameter trans _ camera of the camera array is obtained.
The calibration parameter trans _ camera may include an internal parameter and an external parameter, where the external parameter is used to determine a correlation between a geometric position of a point on a surface of a target object in a real world three-dimensional space and a corresponding point in a camera coordinate, that is, mapping from the world coordinate to the camera coordinate, and may include a camera position, a camera rotation angle, and the like; the intrinsic parameters are used to determine how a point on the surface of the target object under the coordinates of the camera continues to pass through the lens of the camera and becomes a pixel point in the image through pinhole imaging and electronic conversion, that is, mapping of the coordinates of the camera to the coordinates of the image, and may include parameters related to the characteristics of the camera itself, such as focal length, pixel size, and the like.
The calibration method for calibrating the camera array may include: the present disclosure is not limited to the conventional camera calibration method, the active vision camera calibration method, the camera self-calibration method, the zero-distortion camera calibration method, and the like.
In order to calibrate the camera array with high precision more conveniently, the embodiment of the disclosure may use, for example, a single-plane checkerboard camera calibration method, which may reduce or overcome the disadvantages of high-precision calibration objects required by the conventional camera calibration method, may implement calibration of the camera by using only one printed checkerboard, and may improve precision and be more convenient to operate compared to a camera self-calibration method.
The single-plane checkerboard camera calibration method can perform camera calibration based on a single-plane checkerboard, the checkerboard used for calibration is one plane in a three-dimensional scene (world coordinates), a two-dimensional image (image coordinates) shot by the single-plane checkerboard camera calibration method is the other plane, and a calibration parameter trans _ camera of the camera can be solved according to coordinates of corresponding points of the two planes.
For example, assume that the camera array is composed of cameras 1 to M, and the calibration parameters corresponding to the cameras 1 to M are trans _ camera [1 ]]~trans_camera[M]For any camera i (i ═ 1 to M) in the camera array, its calibration parameter trans _ camera [ i ═ M]May include intrinsic parameters consisting of matrix A, and may be composed of matrix [ R T ]]The external parameters of the structure assume homogeneous coordinates under a three-dimensional world coordinate system
Figure BDA0003509571520000131
Homogeneous coordinates in a two-dimensional image coordinate system
Figure BDA0003509571520000132
The homography of the checkerboard plane to the image plane for calibration can be expressed as:
Figure BDA0003509571520000133
wherein the content of the first and second substances,
Figure BDA0003509571520000134
in formula (3), s represents a scale factor from a world coordinate system to an image coordinate system, and in the matrix represented by the internal parameter a, α and β represent physical dimensions of each pixel in the image coordinate system in the x-axis direction and the y-axis direction, c represents a distortion parameter of the image physical coordinates, and u represents a distortion parameter of the image physical coordinates0And v0Representing the origin of the image; outside parameter [ R T]Where R represents a rotational transformation of the world coordinate system to the camera coordinate system and T represents a translational transformation of the world coordinate system to the camera coordinate system.
According to formula (3), the internal and external parameters of the camera can be solved by taking multiple calibration plate images from different angles. Fig. 4 is a schematic diagram of a calibration board according to an embodiment of the present disclosure, and as shown in fig. 4, a calibration parameter trans _ camera of a camera may be obtained by using a checkerboard calculation using a single-plane checkerboard camera calibration method, where the calibration board may be a 12 × 9 checkerboard, and the size of each checkerboard may be a square with a side length of 10 mm. It should be understood that the checkerboard calibration board shown in FIG. 4 is an example only, and the present disclosure is not limited to the number of rows, columns, and size of each checkerboard.
Therefore, through the calibration of the camera array in step SB1, calibration parameters (inner parameters + outer parameters) of the camera array can be obtained, which can be used to determine the relationship between the image coordinate system and the world coordinate system of each camera in the camera array.
After the camera array is calibrated in step SB1, image acquisition may be performed on the target object using the camera array in step S1. Assuming that the camera array includes M cameras disposed at different angles, M first images may be acquired with the front of the target object (e.g., a human face) facing away from the camera array, and M second images may be acquired with the front of the target object (e.g., a human face) facing toward the camera array. It should be understood that the M-frame first image and the M-frame second image are only used as examples here, and the number of frames of the first image may be different from that of the second image, which is not limited by the present disclosure.
In step SB2, three-dimensional reconstruction may be performed on the M frames of second images to obtain a preset point cloud, and three-dimensional reconstruction may be performed on the M frames of first images to obtain a first point cloud. The preset point cloud is a three-dimensional point cloud on the front side of the target object and can be used as a reference datum for pose detection, and the first point cloud is a three-dimensional point cloud on the back side of the target object.
It should be appreciated that a method for three-dimensional reconstruction of a target object for a plurality of image sets acquired by a camera array may include: the embodiments of the present disclosure do not limit a specific three-dimensional reconstruction method based on a conventional method such as a binocular vision reconstruction method, a Model such as a three-dimensional deformation Model (3D deformable Model) reconstruction method, a convolutional neural network-based reconstruction method, a three-dimensional modeling software-based reconstruction method, and the like.
In one possible implementation, step SB2 may include: and according to the internal parameters and the external parameters, three-dimensional reconstruction is carried out on the multi-frame second images to obtain the preset point cloud, and according to the internal parameters and the external parameters, three-dimensional reconstruction is carried out on the multi-frame first images to obtain the first point cloud.
For example, a preset three-dimensional reconstruction network may be used to input the internal parameters, the external parameters, and the M frames of second images into the three-dimensional reconstruction network to generate a preset point cloud, and to input the internal parameters, the external parameters, and the M frames of first images into the three-dimensional reconstruction network to generate a preset point cloud.
The preset three-dimensional reconstruction network is also a trained neural network, and after a large number of samples are trained (learned), the three-dimensional reconstruction network can generate three-dimensional point clouds based on input internal parameters, external parameters and multi-frame images.
Or inputting the internal parameters, the external parameters and the M frames of second images into three-dimensional modeling software to obtain the preset point cloud, and inputting the internal parameters, the external parameters and the M frames of first images into the three-dimensional modeling software to obtain the first point cloud. The three-dimensional modeling software can be realized by the related technology, and the three-dimensional modeling software is not limited by the disclosure.
Fig. 5 illustrates a schematic diagram of a preset point cloud obtaining method according to an embodiment of the present disclosure, and as shown in fig. 5, the calibration parameters (internal parameters + external parameters) of the camera array obtained in step SB1 and the M-frame (for example, M ═ 30) second image obtained in step SB1 may be input into three-dimensional modeling software, so as to obtain a human head front three-dimensional dense point cloud, i.e., a preset point cloud whole _ scan, shown on the right side of fig. 5.
Correspondingly, fig. 6 shows a schematic diagram of a first point cloud obtaining manner according to an embodiment of the present disclosure. As shown in fig. 6, the calibration parameters (inner parameters + outer parameters) of the camera array obtained in step SB1 and the M-frame (for example, M ═ 30) first image obtained in step SB1 may be input into the three-dimensional modeling software, so as to obtain the back three-dimensional dense point cloud shown on the right side of fig. 6, i.e., the first point cloud part _ scan.
The reconstructed first point cloud part _ scan is easy to be incomplete because the 30 frames of first images on the left side of fig. 6 are human head images on the back and the side, and interference of hair is added.
In step SB2, a preset point cloud whole _ scan and a first point cloud part _ scan are obtained, and in step SB3, the pose information of the target object in each frame of the first image is determined according to the relative relationship between the preset point cloud whole _ scan and the first point cloud part _ scan.
Illustratively, the relative relationship between the preset point cloud and the first point cloud includes pose transformation information between the preset point cloud and the first point cloud.
For example, the preset point cloud whole _ scan and the first point cloud part _ scan may be aligned to determine a relative relationship between the preset point cloud and the first point cloud.
For example, the initial pose of the preset point cloud whole _ scan may be determined according to the labeled preset keypoints, and the initial pose of the first point cloud part _ scan may be determined according to the second keypoints.
The preset point cloud whole _ scan and the first point cloud part _ scan can be aligned based on the initial pose of the preset point cloud whole _ scan and the initial pose of the first point cloud part _ scan, for example, the pose of the first point cloud part _ scan can be changed (for example, at least one of rotation, scaling and translation) under the condition that the initial pose of the preset point cloud whole _ scan is not changed, so that the preset point cloud whole _ scan and the first point cloud part _ scan are aligned; or, under the condition that the initial pose of the first point cloud part _ scan is kept unchanged, changing the pose of the preset point cloud whole _ scan to align the pose of the preset point cloud whole _ scan with the initial pose of the first point cloud part _ scan; or the initial pose of the preset point cloud wall _ scan and the initial pose of the first point cloud part _ scan can be changed simultaneously so as to align the two. The present disclosure is not so limited.
The preset point cloud whole _ scan and the first point cloud part _ scan may be aligned, and pose transformation information trans _ scan of the preset point cloud whole _ scan and the first point cloud part _ scan may be determined by using an Iterative Closest Points (ICP) method.
For example, assume that the pose transformation information trans _ scan (including at least one of the scaling transformation information scale _2, the rotation transformation information rotation _2, and the translation transformation information transformation _ 2) of the preset point cloud whole _ scan can be expressed as: trans _ scan _2 rotation _2 w hole _ scan + translation _ 2.
And recording the pose transformation information trans _ scan of the preset point cloud whole _ scan and the first point cloud part _ scan under the condition that the difference value between the pose transformation information trans _ scan of the preset point cloud whole _ scan and the first point cloud part _ scan is minimum (the pose transformation information trans _ scan of the preset point cloud whole _ scan infinitely approaches the first point cloud part _ scan, namely the preset point cloud whole _ scan is aligned with the first point cloud part _ scan, as shown in a diagram at the middle position of fig. 7).
In such a way, the relative relation between the preset point cloud and the first point cloud can be acquired accurately.
After the relative relationship between the preset point cloud whole _ scan and the first point cloud part _ scan is determined, in step SB3, the pose information of the target object in each frame of the first image may be determined according to the relative relationship between the preset point cloud whole _ scan and the first point cloud part _ scan.
In one possible implementation, step SB3 may include:
in step SB 31', pose transformation information between the preset point cloud and the first point cloud is determined according to the internal and external parameters of the camera array, and pose transformation information between the preset point cloud and each frame of the first image is determined;
in step SB 32', the pose information of the target object in each frame of the first images in the plurality of frames of the first images is determined according to the pose transformation information between the preset point cloud and each frame of the first images.
For example, in step SB 31', the pose transformation information of the preset point cloud whole _ scan with respect to the M-frame first image may be determined according to the calibration parameters trans _ camera of the camera array acquired in step SB1, including the internal and external parameters of the camera array, and the pose transformation information trans _ scan of the preset point cloud whole _ scan and the first point cloud part _ scan.
In step SB 32', the preset point clouds whole _ scan may be respectively projected to the first images according to the pose transformation information of the preset point clouds whole _ scan with respect to the M frames of first images, and the pose information of the target object corresponding to each frame of first image is determined, where the pose information may include at least one of scaling information, rotation information, and translation information.
By the method, the pose information of the target object in each frame of first image in the multiple frames of first images can be determined, and the method is simple and convenient.
However, in the above process, the preset point cloud whole _ scan is a disordered point sequence (without a regular topology), and has noise, and the pose information of the target object in each frame of the first image in the multiple frames of the first images is directly determined according to the preset point cloud whole _ scan, so that the accuracy of pose detection is easily reduced.
In order to further improve the accuracy of pose detection, the preset point clouds whole _ scan may be unified into mesh data (mesh data) having a regular topology, so as to improve the accuracy of pose detection. The following describes determining pose information of a target object in each of first images of a plurality of frames based on mesh data (mesh data).
In a possible implementation manner, point cloud registration processing is performed on the preset point cloud, and grid data corresponding to the preset point cloud and pose transformation information between the grid data and the preset point cloud are determined.
The point cloud registration method may be based on a point cloud registration method, such as a non-rigid iterative Closest Points (nodes), and is used to unify a preset point cloud whole _ scan (as shown in the right diagram of fig. 5) without a regular topology into a mesh data mesh (as shown in the left diagram of fig. 2) with a regular topology. For example, non-rigid registration may be performed on mesh data mesh in an initial state and a preset point cloud whole _ scan, a mapping between the mesh data mesh in the initial state and the preset point cloud whole _ scan is found, the mesh data mesh in the initial state is deformed to fit the preset point cloud whole _ scan, and meanwhile, a topology structure of the mesh data mesh itself is maintained.
After the mesh data mesh is obtained, the pose transformation information trans _ mesh of the preset point cloud whole _ scan and the mesh data mesh can be solved.
For example, assume that the pose transformation information trans _ mesh of the mesh data mesh (e.g., including the scaling transformation information scale _1, the rotation transformation information rotation _1, and the translation transformation information transformation _1) can be expressed as: trans _ mesh _1 rotation _1 mesh + translation _ 1.
And recording the pose transformation information trans _ mesh of the grid data mesh and the preset point cloud whole _ scan under the condition that the difference value between the pose transformation information trans _ mesh of the network data mesh and the preset point cloud whole _ scan is minimum (the pose transformation information trans _ mesh of the network data mesh is infinitely close to the preset point cloud whole _ scan, namely the preset point cloud whole _ scan is aligned with the grid data mesh, as shown in the left picture of fig. 7).
In the process of determining the pose transformation information of the grid data and the preset point cloud, the relative relationship between the preset point cloud and the first point cloud can be synchronously acquired, and the relative relationship comprises the pose transformation information between the preset point cloud and the first point cloud. The determination of the relative relationship between the specific predetermined point cloud and the first point cloud can be referred to above, and will not be described in detail here.
After acquiring the pose transformation information of the mesh data and the preset point cloud and the relative relationship between the preset point cloud and the first point cloud, the pose information of the target object in each frame of the first image may be determined in step SB 3.
In one possible implementation, step SB3 may include:
in step SB31, obtaining pose transformation information between the mesh data and the first point cloud according to pose transformation information between the mesh data and the preset point cloud and pose transformation information between the preset point cloud and the first point cloud;
in step SB32, determining pose transformation information between the mesh data and each frame of the first image from the internal and external parameters of the camera array, the pose transformation information between the mesh data and the first point cloud;
in step SB33, the pose information of the target object in each of the first images in the plurality of frames of first images is determined based on the pose transform information between the mesh data and the first image in each of the frames of first images.
For example, fig. 7 shows a schematic diagram of mesh data and first point cloud alignment, according to an embodiment of the present disclosure. Steps SB31 to SB33 introduce a method of aligning grid data and the first point cloud, specifically as follows:
in step SB31, obtaining pose transformation information trans _ part from the mesh data mesh to the first point cloud part _ scan according to the pose transformation information trans _ mesh from the mesh data mesh and the preset point cloud whole _ scan and the pose transformation information trans _ scan from the preset point cloud whole _ scan and the first point cloud part _ scan in the step SB 31;
for example, the pose transformation information trans _ part of the mesh data mesh and the first point cloud part _ scan is: scale _2 _ rotation _2 (scale _1 _ rotation _1 _ mesh + translation _1) + translation _ 2) can align the mesh data mesh with the first point cloud part _ scan, as shown in the right diagram of fig. 7.
In step SB32, the pose transformation information trans _ end of the mesh data mesh with respect to the M-frame first image may be determined according to the calibration parameters trans _ camera of the camera array acquired in step SB1, including the internal and external parameters of the camera array, and the pose transformation information trans _ part of the mesh data mesh and the first point cloud part _ scan;
in step SB33, mesh data mesh may be projected onto each of the first images, respectively, based on the pose transformation information trans _ end of the mesh data mesh with respect to the M frames of first images, respectively, to determine pose information of the target object corresponding to each frame of first images, which may include scaling information, rotation information, and translation information. Fig. 8 illustrates a schematic diagram of a projection effect according to an embodiment of the present disclosure. As shown in fig. 8, the mesh data mesh can be rendered to each frame of the image of the back of the head, and the pose information of the image of the back of the head can be accurately obtained according to the embodiment of the disclosure.
It should be understood that, in the above process, since a large number of points are included in both the preset point cloud wall _ scan and the first point cloud part _ scan, the two point clouds are directly analyzed, and a large amount of computation is required, which consumes a large amount of computing resources. In order to improve the calculation efficiency, key points can be respectively marked on the preset point cloud _ scan and the first point cloud part _ scan, the alignment of the point clouds can be realized according to the alignment mode of the key points, and the pose information of the target object in each frame of the first image is further determined based on the key points.
In a possible implementation manner, the aligning the preset point cloud and the first point cloud, and determining the relative relationship between the preset point cloud and the first point cloud may include: generating marking information containing N preset key points in the face area of the preset point cloud; generating labeling information containing K second key points in the face area of the first point cloud, wherein K is an integer not greater than N; and aligning the N key points of the preset point cloud and the K second key points of the first point cloud, and determining the relative relationship between the preset point cloud and the first point cloud.
For example, as shown in the three-dimensional dense point cloud (i.e. the preset point cloud _ scan) on the right side of fig. 5, N preset key points may be labeled in the face region, and fig. 5 shows that the number of the preset key points is 10, which may respectively correspond to the left/right outer corner of the eye, the left/right inner corner of the eye, the nose tip, the left/right mouth corner, the chin center, and the left/right ear root.
As shown in fig. 6, K second key points may be marked in the face region as a three-dimensional dense point cloud of the right human head (i.e., the first point cloud part _ scan), fig. 6 shows a case of presetting the key points, since the first point cloud part _ scan reconstructed in fig. 6 is a cloud of the first point cloud part _ scan, a part of the face region is missing, the key points of the missing region may be ignored (e.g., 4 key points of the right outer eye corner point, the right inner eye corner point, the right mouth corner point, and the right ear root point may be ignored), and 6 (K ═ 6) second key points are marked in the non-missing region, which may respectively correspond to the left eye outer eye corner point, the left eye inner eye corner point, the nose tip point, the left mouth, the chin center point, and the left ear root point.
The method for generating the annotation information includes the steps of obtaining N preset key points and/or K second key points in a face region, and performing annotation through received user annotation operation, or performing feature point detection (for example, including a deep learning-based method) on the face to obtain annotation points.
It should be understood that fig. 5 and fig. 6 are only schematic diagrams, and the labeling information of the second keypoints can be generated at the positions corresponding to the preset keypoints, and the keypoints at the corresponding positions have the same point sequence.
After the labeling information of the key points is generated, the preset key points corresponding to the K second keys are selected from the N preset key points of the preset point cloud, and then the alignment processing is performed according to the selected K preset key points and the K second key points, so as to determine the relative relationship between the preset point cloud and the first point cloud. The specific alignment process can refer to the above alignment manner, and is not described in detail here.
By the method, the computing efficiency can be improved, and the computing resources can be saved.
Through steps SB 1-SB 3, the pose information of the target object in each frame of the first image can be accurately determined according to the scene of the multi-frame back face head image shot by the multi-camera array in the laboratory environment.
Therefore, according to the embodiment of the disclosure, for some target object back images which cannot accurately provide clear semantic parts, a three-dimensional model (preset point cloud) of a target object in an image relative to the target object can be accurately determined, and not only can the pose of a single-frame image shot by a back camera be accurately realized (steps SA 1-SA 3), but also the pose of a multi-frame image shot by a camera array device can be accurately realized (steps SB 1-SB 3), so that the problem of omnibearing pose detection of the target object can be effectively solved, and the pose detection can be accurately realized no matter what angle the angle between the face orientation of the target object and the shooting direction is presented.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.
In addition, the present disclosure also provides a pose detection apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the pose detection methods provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the methods section are omitted for brevity.
Fig. 9 shows a block diagram of a pose detection apparatus according to an embodiment of the present disclosure, the apparatus including, as shown in fig. 9:
the acquiring module 91 is configured to acquire at least one frame of first image to be processed, where the first image includes a two-dimensional image of the back of a target object acquired by an image acquisition device;
the determining module 92 is configured to determine pose information of the target object in the first image according to the at least one frame of the first image and a preset point cloud, where the preset point cloud is a three-dimensional point cloud on the front surface of the target object.
In a possible implementation manner, the preset point cloud includes N preset key points, where N is an integer greater than 1, and in a case that the image acquisition device is a single camera, the at least one frame of first image includes a single frame of first image captured by the single camera; the determination module 92 is configured to: generating annotation information containing N first key points in a target object area of the single-frame first image; projecting the preset point cloud to the single-frame first image, and determining N first projection points corresponding to N first key points; and fitting the N first projection points and the N preset key points to obtain the pose information of the target object in the single-frame first image.
In a possible implementation, in a case where the image capture device is a camera array, the at least one frame of the first image includes: the method comprises the following steps that a plurality of frames of first images and a plurality of frames of second images are obtained, wherein the second images are two-dimensional images of the front side of a target object; the determination module 92 is configured to: performing three-dimensional reconstruction on the plurality of frames of second images to obtain the preset point cloud, and performing three-dimensional reconstruction on the plurality of frames of first images to obtain a first point cloud; and determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the relative relation between the preset point cloud and the first point cloud.
In a possible implementation manner, the obtaining module 91 is configured to, in a case that the image acquisition device is a camera array, calibrate an internal parameter and an external parameter of the camera array according to a checkerboard image acquired by the camera array before the acquiring of the at least one frame of first image to be processed, where the internal parameter includes a focal length and/or a pixel size, and the external parameter includes a camera position and/or a camera rotation angle; the determination module 92 is configured to: performing three-dimensional reconstruction on the multiple frames of second images according to the internal parameters and the external parameters to obtain the preset point cloud; and performing three-dimensional reconstruction on the multi-frame first image according to the internal parameters and the external parameters to obtain the first point cloud.
In a possible implementation manner, the determining, according to the relative relationship between the preset point cloud and the first point cloud, the pose information of the target object in each frame of the first image in the multiple frames of the first images includes: determining pose transformation information between the preset point cloud and the first point cloud according to internal parameters and external parameters of a camera array, and determining pose transformation information between the preset point cloud and each frame of first image; and determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the pose transformation information between the preset point cloud and each frame of first image.
In a possible implementation manner, the relative relationship between the preset point cloud and the first point cloud includes pose transformation information between the preset point cloud and the first point cloud, and the determining module 92 is further configured to: performing point cloud registration processing on the preset point cloud, and determining grid data corresponding to the preset point cloud and pose transformation information between the grid data and the preset point cloud; the determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the relative relationship between the preset point cloud and the first point cloud comprises the following steps: determining pose transformation information between the grid data and the first point cloud according to pose transformation information between the grid data and the preset point cloud and pose transformation information between the preset point cloud and the first point cloud; determining pose transformation information between the grid data and each frame of first image according to internal parameters and external parameters of a camera array and pose transformation information between the grid data and the first point cloud; and determining the pose information of the target object in each frame of first image in the plurality of frames of first images according to the pose transformation information between the grid data and each frame of first image.
In one possible implementation, the determining module 92 is further configured to: after the multi-frame second image is subjected to three-dimensional reconstruction to obtain the preset point cloud and the multi-frame first image is subjected to three-dimensional reconstruction to obtain the first point cloud, the preset point cloud and the first point cloud are aligned, and the relative relation between the preset point cloud and the first point cloud is determined.
In a possible implementation manner, the aligning the preset point cloud and the first point cloud, and determining a relative relationship between the preset point cloud and the first point cloud includes: generating marking information containing N preset key points in the face area of the preset point cloud; generating labeling information containing K second key points in the face area of the first point cloud, wherein K is an integer not greater than N; and aligning the N key points of the preset point cloud and the K second key points of the first point cloud, and determining the relative relationship between the preset point cloud and the first point cloud.
In one possible implementation, the target object includes a body part of a human body; under the condition that the body part of the human body comprises the human face, the preset key points comprise key points of human face organs; and under the condition that the body part of the human body comprises limbs, the preset key points comprise limb key points.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a volatile or non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
The disclosed embodiments also provide a computer program product comprising computer readable code or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, the processor in the electronic device performs the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 10 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 10, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as a wireless network (Wi-Fi), a second generation mobile communication technology (2G), a third generation mobile communication technology (3G), a fourth generation mobile communication technology (4G), a long term evolution of universal mobile communication technology (LTE), a fifth generation mobile communication technology (5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
The disclosure relates to the field of augmented reality, and aims to detect or identify relevant features, states and attributes of a target object by means of various visual correlation algorithms by acquiring image information of the target object in a real environment, so as to obtain an AR effect combining virtual and reality matched with specific applications. For example, the target object may relate to a face, a limb, a gesture, an action, etc. associated with a human body, or a marker, a marker associated with an object, or a sand table, a display area, a display item, etc. associated with a venue or a place. The vision-related algorithms may involve visual localization, SLAM, three-dimensional reconstruction, image registration, background segmentation, key point extraction and tracking of objects, pose or depth detection of objects, and the like. The specific application can not only relate to interactive scenes such as navigation, explanation, reconstruction, virtual effect superposition display and the like related to real scenes or articles, but also relate to special effect treatment related to people, such as interactive scenes such as makeup beautification, limb beautification, special effect display, virtual model display and the like. The detection or identification processing of the relevant characteristics, states and attributes of the target object can be realized through the convolutional neural network. The convolutional neural network is a network model obtained by performing model training based on a deep learning framework.
Fig. 11 shows a block diagram of an electronic device 1900 according to an embodiment of the disclosure. For example, electronic device 1900 may be provided as a server. Referring to fig. 11, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the methods described above.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system, such as the Microsoft Server operating system (Windows Server), stored in the memory 1932TM) Apple Inc. of the present application based on the graphic user interface operating System (Mac OS X)TM) Multi-user, multi-process computer operating system (Unix)TM) Free and open native code Unix-like operating System (Linux)TM) Open native code Unix-like operating System (FreeBSD)TM) Or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the disclosure are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (12)

1. A pose detection method characterized by comprising:
acquiring at least one frame of first image to be processed, wherein the first image comprises a two-dimensional image of the back of a target object acquired by image acquisition equipment;
and determining pose information of the target object in the first image according to the at least one frame of first image and a preset point cloud, wherein the preset point cloud is a three-dimensional point cloud on the front surface of the target object.
2. The method according to claim 1, wherein the preset point cloud comprises N preset key points, N being an integer greater than 1, and in case the image acquisition device is a single camera, the at least one frame of first image comprises a single frame of first image taken by the single camera;
determining pose information of a target object in the first image according to the at least one frame of first image and a preset point cloud, wherein the determining comprises the following steps:
generating annotation information containing N first key points in a target object area of the single-frame first image;
projecting the preset point cloud to the single-frame first image, and determining N first projection points corresponding to N first key points;
and fitting the N first projection points and the N preset key points to obtain the pose information of the target object in the single-frame first image.
3. The method of claim 1, wherein the at least one frame of the first image comprises, in the case where the image capture device is a camera array: the method comprises the following steps that a plurality of frames of first images and a plurality of frames of second images are obtained, wherein the second images are two-dimensional images of the front side of a target object;
determining pose information of a target object in the first image according to the at least one frame of first image and a preset point cloud, wherein the determining comprises the following steps:
performing three-dimensional reconstruction on the plurality of frames of second images to obtain the preset point cloud, and performing three-dimensional reconstruction on the plurality of frames of first images to obtain a first point cloud;
and determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the relative relation between the preset point cloud and the first point cloud.
4. The method according to claim 3, wherein, in the case that the image acquisition device is a camera array, before said acquiring at least one frame of the first image to be processed, comprising:
calibrating internal parameters and external parameters of the camera array according to the checkerboard images acquired by the camera array, wherein the internal parameters comprise focal length and/or pixel size, and the external parameters comprise camera position and/or camera rotation angle;
the three-dimensional reconstruction of the plurality of frames of second images to obtain the preset point cloud comprises the following steps: performing three-dimensional reconstruction on the multiple frames of second images according to the internal parameters and the external parameters to obtain the preset point cloud; and the number of the first and second groups,
the three-dimensional reconstruction of the plurality of frames of first images to obtain a first point cloud comprises: and performing three-dimensional reconstruction on the multi-frame first image according to the internal parameters and the external parameters to obtain the first point cloud.
5. The method of claim 3 or 4, wherein the relative relationship of the preset point cloud and the first point cloud comprises pose transformation information between the preset point cloud and the first point cloud,
the determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the relative relationship between the preset point cloud and the first point cloud comprises the following steps:
determining pose transformation information between the preset point cloud and the first point cloud according to internal parameters and external parameters of a camera array, and determining pose transformation information between the preset point cloud and each frame of first image;
and determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the pose transformation information between the preset point cloud and each frame of first image.
6. The method of claim 3 or 4, wherein the relative relationship of the preset point cloud and the first point cloud comprises pose transformation information between the preset point cloud and the first point cloud,
the method further comprises the following steps:
performing point cloud registration processing on the preset point cloud, and determining grid data corresponding to the preset point cloud and pose transformation information between the grid data and the preset point cloud;
the determining the pose information of the target object in each frame of first image in the multiple frames of first images according to the relative relationship between the preset point cloud and the first point cloud comprises the following steps: determining pose transformation information between the grid data and the first point cloud according to pose transformation information between the grid data and the preset point cloud and pose transformation information between the preset point cloud and the first point cloud;
determining pose transformation information between the grid data and each frame of first image according to internal parameters and external parameters of a camera array and pose transformation information between the grid data and the first point cloud;
and determining the pose information of the target object in each frame of first image in the plurality of frames of first images according to the pose transformation information between the grid data and each frame of first image.
7. The method according to claim 3 or 4, wherein after the three-dimensional reconstruction of the plurality of frames of second images to obtain the preset point cloud and the three-dimensional reconstruction of the plurality of frames of first images to obtain the first point cloud, the method further comprises:
and aligning the preset point cloud and the first point cloud, and determining the relative relationship between the preset point cloud and the first point cloud.
8. The method of claim 7, wherein the aligning the preset point cloud with the first point cloud and determining the relative relationship between the preset point cloud and the first point cloud comprises:
generating marking information containing N preset key points in the face area of the preset point cloud;
generating labeling information containing K second key points in the face area of the first point cloud, wherein K is an integer not greater than N;
and aligning the N key points of the preset point cloud and the K second key points of the first point cloud, and determining the relative relationship between the preset point cloud and the first point cloud.
9. The method of claim 2 or 8, the target object comprising a body part of a human body;
under the condition that the body part of the human body comprises the human face, the preset key points comprise key points of human face organs;
and under the condition that the body part of the human body comprises limbs, the preset key points comprise limb key points.
10. A pose detection apparatus characterized by comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring at least one frame of first image to be processed, and the first image comprises a two-dimensional image of the back of a target object acquired by image acquisition equipment;
and the determining module is used for determining the pose information of the target object in the first image according to the at least one frame of first image and a preset point cloud, wherein the preset point cloud is a three-dimensional point cloud on the front surface of the target object.
11. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1 to 9.
12. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 9.
CN202210147653.7A 2022-02-17 2022-02-17 Pose detection method and device, electronic equipment and storage medium Pending CN114529606A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210147653.7A CN114529606A (en) 2022-02-17 2022-02-17 Pose detection method and device, electronic equipment and storage medium
PCT/CN2022/134852 WO2023155532A1 (en) 2022-02-17 2022-11-29 Pose detection method, apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210147653.7A CN114529606A (en) 2022-02-17 2022-02-17 Pose detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114529606A true CN114529606A (en) 2022-05-24

Family

ID=81622069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210147653.7A Pending CN114529606A (en) 2022-02-17 2022-02-17 Pose detection method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114529606A (en)
WO (1) WO2023155532A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115661493A (en) * 2022-12-28 2023-01-31 航天云机(北京)科技有限公司 Object pose determination method and device, equipment and storage medium
WO2023155532A1 (en) * 2022-02-17 2023-08-24 上海商汤智能科技有限公司 Pose detection method, apparatus, electronic device, and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117351306B (en) * 2023-12-04 2024-03-22 齐鲁空天信息研究院 Training method, determining method and device for three-dimensional point cloud projection pose solver

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015215299A (en) * 2014-05-13 2015-12-03 株式会社デンソー Object position estimation device
CN112132107A (en) * 2020-10-09 2020-12-25 腾讯科技(深圳)有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113902851A (en) * 2021-10-18 2022-01-07 深圳追一科技有限公司 Face three-dimensional reconstruction method and device, electronic equipment and storage medium
CN113902853A (en) * 2021-10-18 2022-01-07 深圳追一科技有限公司 Face three-dimensional reconstruction method and device, electronic equipment and storage medium
CN113902852A (en) * 2021-10-18 2022-01-07 深圳追一科技有限公司 Face three-dimensional reconstruction method and device, electronic equipment and storage medium
CN113689503B (en) * 2021-10-25 2022-02-25 北京市商汤科技开发有限公司 Target object posture detection method, device, equipment and storage medium
CN114529606A (en) * 2022-02-17 2022-05-24 北京大甜绵白糖科技有限公司 Pose detection method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023155532A1 (en) * 2022-02-17 2023-08-24 上海商汤智能科技有限公司 Pose detection method, apparatus, electronic device, and storage medium
CN115661493A (en) * 2022-12-28 2023-01-31 航天云机(北京)科技有限公司 Object pose determination method and device, equipment and storage medium

Also Published As

Publication number Publication date
WO2023155532A1 (en) 2023-08-24

Similar Documents

Publication Publication Date Title
CN114529606A (en) Pose detection method and device, electronic equipment and storage medium
US10915998B2 (en) Image processing method and device
US9576364B1 (en) Relative positioning of a mobile computing device in a network
CN107431765B (en) Information processing apparatus, information processing method, and computer program
CN109934931B (en) Method and device for collecting image and establishing target object recognition model
CN109584362B (en) Three-dimensional model construction method and device, electronic equipment and storage medium
WO2022037285A1 (en) Camera extrinsic calibration method and apparatus
US9137461B2 (en) Real-time camera view through drawn region for image capture
US9921054B2 (en) Shooting method for three dimensional modeling and electronic device supporting the same
CN114445562A (en) Three-dimensional reconstruction method and device, electronic device and storage medium
WO2023051356A1 (en) Virtual object display method and apparatus, and electronic device and storage medium
WO2023273499A1 (en) Depth measurement method and apparatus, electronic device, and storage medium
WO2023273498A1 (en) Depth detection method and apparatus, electronic device, and storage medium
CN112184787A (en) Image registration method and device, electronic equipment and storage medium
US20220270352A1 (en) Methods, apparatuses, devices, storage media and program products for determining performance parameters
US9860441B1 (en) Tile-based digital image correspondence
CN111860388A (en) Image processing method and device, electronic equipment and storage medium
CN114140536A (en) Pose data processing method and device, electronic equipment and storage medium
CN114581525A (en) Attitude determination method and apparatus, electronic device, and storage medium
CN112508959B (en) Video object segmentation method and device, electronic equipment and storage medium
CN113822798A (en) Method and device for training generation countermeasure network, electronic equipment and storage medium
CN112767541A (en) Three-dimensional reconstruction method and device, electronic equipment and storage medium
WO2022151687A1 (en) Group photo image generation method and apparatus, device, storage medium, computer program, and product
JP7293362B2 (en) Imaging method, device, electronic equipment and storage medium
CN114241127A (en) Panoramic image generation method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40068045

Country of ref document: HK