Face orientation determination method and device, face image reconstruction method and device
By performing principal component analysis on brain region images to determine direction vectors and distances, the problems of background interference and inaccurate orientation in 3D face reconstruction from DICOM images were solved, achieving accurate segmentation and reconstruction of the face region and improving the stability and accuracy of registration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
- Filing Date
- 2022-06-30
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies for 3D facial reconstruction based on DICOM images suffer from problems such as large background interference, unstable registration, and inaccurate orientation information, especially when the head is tilted, resulting in inaccurate facial region segmentation.
By performing principal component analysis on images of brain regions, first and second directional vectors are determined. The distances from these vectors to voxels in the vertical plane are used to determine the anterior and posterior, superior and inferior parts of the brain, thereby determining the orientation of the face. Combining the inherent relationship between the brain and the face, accurate segmentation and reconstruction of the face region are achieved.
It improves the accuracy of face image reconstruction and the stability of registration, and is applicable to medical images under different devices and scanning resolutions, with high accuracy and robustness.
Smart Images

Figure CN117372322B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and in particular to a method and apparatus for determining the orientation of a face, a method and apparatus for reconstructing a face image, an electronic device, and a storage medium. Background Technology
[0002] In stereotactic neurosurgical robots, it is necessary to spatially align preoperative medical image data with the patient during surgery; this process is called spatial registration. Facial feature-based rapid spatial registration schemes, thanks to the rich structural information of the face and the ability of existing 3D (3D) cameras to rapidly reconstruct the face, can achieve fast and high-precision spatial registration.
[0003] In the spatial registration scheme based on 3D facial reconstruction, the core steps affecting accuracy and stability include three steps: First, a 3D camera reconstructs the face to obtain a face image; second, the face is reconstructed based on DICOM (Digital Imaging and Communications in Medicine) images to obtain a face image; third, the face image reconstructed by the camera and the face image reconstructed by DICOM are registered, and the spatial transformation matrix is calculated.
[0004] In existing technologies for 3D facial reconstruction based on DICOM images, the entire skin surface of the human body can be reconstructed. However, the reconstructed result includes all areas of the human skin surface within the scanning field of view of the medical device, while the face area is only a small part of it. This leads to a large amount of background interference in the subsequent facial structured light registration, resulting in unstable point cloud registration.
[0005] In existing technologies for 3D facial reconstruction based on DICOM images, the patient's orientation information from the DICOM data's tags can be combined to determine the head's orientation, thus distinguishing the front and back of the head and retaining the front portion as the reconstructed face. However, the patient's orientation information in the tags only roughly reflects the person's orientation; when the patient's head is tilted, this orientation information is highly inaccurate. Furthermore, the tags are input by the doctor into the scanning device, and incorrect tag information may occur, causing the registration process to fail. Additionally, this tag-based segmentation method can only divide the human body into front and back halves, and cannot precisely segment and reconstruct the facial region. When the medical device's scanning range extends below the neck, significant background interference remains. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to overcome the above-mentioned defects in the existing technology of three-dimensional face reconstruction based on DICOM images, and to provide a method and apparatus for determining face orientation, a method and apparatus for reconstructing face images, an electronic device and a storage medium.
[0007] The present invention solves the above-mentioned technical problems through the following technical solution:
[0008] A first aspect of the present invention provides a method for determining the orientation of a human face, comprising the following steps:
[0009] Principal component analysis is performed on the brain region image based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain from top to bottom or from bottom to top.
[0010] For an image of the brain region, the anterior and posterior portions of the brain region are determined based on the distances from voxels located on either side of a first plane to the first plane; and the upper and lower portions of the brain region are determined based on the distances from voxels located on either side of a second plane to the second plane; wherein the first plane is a plane perpendicular to the first direction vector and passing through the first position, and the second plane is a plane perpendicular to the second direction vector and passing through the first position.
[0011] The face orientation is determined based on at least one of the anterior and posterior brain regions, at least one of the upper and lower brain regions, and the first location.
[0012] A second aspect of the present invention provides a method for determining the orientation of a human face, comprising the following steps:
[0013] Principal component analysis is performed on the brain region image based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top.
[0014] For the image of the brain region, a first coordinate axis is determined based on the distance from the first position and the voxels located on both sides of the first plane to the first plane; and a second coordinate axis is determined based on the distance from the first position and the voxels located on both sides of the second plane to the second plane; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, the second plane is a plane perpendicular to the second direction vector and passing through the first position, and the first coordinate axis and the second coordinate axis intersect at the first position;
[0015] The orientation of the face is determined based on the first coordinate axis and the second coordinate axis.
[0016] A third aspect of the present invention provides a method for determining the orientation of a human face, comprising the following steps:
[0017] Principal component analysis is performed on the brain region image based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top.
[0018] For the image of the brain region, the distances from voxels located on both sides of the first plane to the first plane and the distances from voxels located on both sides of the second plane to the second plane are determined; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, and the second plane is a plane perpendicular to the second direction vector and passing through the first position;
[0019] The face orientation is determined based on the first position, the distances from the voxels on both sides of the first plane to the first plane, and the distances from the voxels on both sides of the second plane to the second plane.
[0020] A fourth aspect of the present invention provides a method for reconstructing a human face image, comprising the following steps:
[0021] The face orientation is determined using the face orientation determination method described in the first, second, or third aspect;
[0022] The medical image to be processed is subjected to head segmentation processing to obtain an image of the head region; wherein, the image of the brain region is obtained based on the medical image to be processed;
[0023] A face image is reconstructed based on the image of the head region and the face orientation.
[0024] A fifth aspect of the present invention provides a device for determining the orientation of a human face, comprising:
[0025] The direction vector determination module is used to perform principal component analysis on the image of the brain region based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top.
[0026] The brain orientation determination module, for an image of the brain region, determines the anterior and posterior portions of the brain region based on the distances from voxels located on either side of a first plane to the first plane; and determines the upper and lower portions of the brain region based on the distances from voxels located on either side of a second plane to the second plane; wherein the first plane is a plane perpendicular to the first direction vector and passing through the first position, and the second plane is a plane perpendicular to the second direction vector and passing through the first position;
[0027] A face orientation determination module is used to determine the face orientation based on at least one of the anterior and posterior parts of the brain region, at least one of the upper and lower parts of the brain region, and the first position.
[0028] A sixth aspect of the present invention provides a device for determining the orientation of a human face, comprising:
[0029] The direction vector determination module is used to perform principal component analysis on the image of the brain region based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top.
[0030] A coordinate axis determination module is used to determine a first coordinate axis for an image of the brain region based on the distances from the first position and voxels located on both sides of the first plane to the first plane; and to determine a second coordinate axis based on the distances from the first position and voxels located on both sides of the second plane to the second plane; wherein the first plane is a plane perpendicular to the first direction vector and passing through the first position, the second plane is a plane perpendicular to the second direction vector and passing through the first position, and the first coordinate axis and the second coordinate axis intersect at the first position;
[0031] A face orientation determination module is used to determine the face orientation based on the first coordinate axis and the second coordinate axis.
[0032] A seventh aspect of the present invention provides a device for determining the orientation of a human face, comprising:
[0033] The direction vector determination module is used to perform principal component analysis on the image of the brain region based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top.
[0034] A distance determination module is used to determine, for an image of the brain region, the distances from voxels located on both sides of a first plane to the first plane and the distances from voxels located on both sides of a second plane to the second plane; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, and the second plane is a plane perpendicular to the second direction vector and passing through the first position.
[0035] The face orientation determination module is used to determine the face orientation based on the first position, the distances from the voxels located on both sides of the first plane to the first plane, and the distances from the voxels located on both sides of the second plane to the second plane.
[0036] An eighth aspect of the present invention provides an apparatus for reconstructing a human face image, comprising:
[0037] A face orientation determination module is used to determine the face orientation using the face orientation determination method described in the first, second, or third aspect;
[0038] The head segmentation processing module is used to perform head segmentation processing on the medical image to be processed to obtain an image of the head region; wherein, the image of the brain region is obtained based on the medical image to be processed;
[0039] A face image reconstruction module is used to reconstruct a face image based on the image of the head region and the face orientation.
[0040] A ninth aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for determining face orientation as described in the first, second, or third aspect, or a method for reconstructing a face image as described in the fourth aspect.
[0041] The tenth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for determining face orientation as described in the first, second, or third aspect, or a method for reconstructing a face image as described in the fourth aspect.
[0042] Based on common knowledge in the field, the above optional conditions can be combined arbitrarily to obtain various preferred embodiments of the present invention.
[0043] The positive and progressive effects of this invention are as follows: First, it utilizes the unique characteristics of the human brain structure to determine the anterior, posterior, superior, and inferior parts of the brain region based on the image of the brain region. Then, it utilizes the inherent relationship between the face orientation and the brain orientation to determine the face orientation. In other words, it uses the inherent characteristics of the human head structure to determine the face orientation without relying on other auxiliary information such as the label information of DICOM data. It not only has high accuracy but also strong robustness and generalization. It can be applied to medical images obtained by scanning different areas of the human body, including the face, at different scanning resolutions using different devices.
[0044] Furthermore, by using images of the determined face orientation and head region, an accurate face image can be reconstructed. Applying this image to a facial structured light registration scheme can effectively improve the accuracy and stability of the registration. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating a method for determining the orientation of a person's face, as provided in Embodiment 1 of the present invention.
[0046] Figure 2 This is a schematic diagram of a principal component direction vector provided in Embodiment 1 of the present invention.
[0047] Figure 3 This is a schematic diagram of an image of a brain region provided in Embodiment 1 of the present invention.
[0048] Figure 4 This is a schematic diagram of a brain coordinate system provided in Embodiment 1 of the present invention.
[0049] Figure 5 This is a flowchart illustrating a brain segmentation method provided in Embodiment 1 of the present invention.
[0050] Figure 6 This is a structural block diagram of a face orientation determination device provided in Embodiment 1 of the present invention.
[0051] Figure 7 This is a flowchart illustrating a method for determining the orientation of a person's face, as provided in Embodiment 2 of the present invention.
[0052] Figure 8This is a structural block diagram of a face orientation determination device provided in Embodiment 2 of the present invention.
[0053] Figure 9 This is a flowchart illustrating a method for determining the orientation of a person's face, as provided in Embodiment 3 of the present invention.
[0054] Figure 10 This is a structural block diagram of a face orientation determination device provided in Embodiment 3 of the present invention.
[0055] Figure 11 This is a flowchart illustrating a face image reconstruction method provided in Embodiment 4 of the present invention.
[0056] Figure 12 This is a flowchart illustrating step S43 provided in Embodiment 4 of the present invention.
[0057] Figure 13 This is a schematic diagram of a method for determining the image of a human face contour region provided in Embodiment 4 of the present invention.
[0058] Figure 14 This is a structural block diagram of a face image reconstruction device provided in Embodiment 4 of the present invention.
[0059] Figure 15 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. Detailed Implementation
[0060] The present invention will be further illustrated by way of embodiments below, but the present invention is not limited to the scope of the embodiments described herein.
[0061] Example 1
[0062] Figure 1 This is a flowchart illustrating a method for determining face orientation provided in this embodiment. This method can be executed by a face orientation determining device, which can be implemented through software and / or hardware. The face orientation determining device can be part or all of an electronic device. In this embodiment, the electronic device can be a personal computer (PC), such as a desktop computer, all-in-one computer, laptop computer, tablet computer, etc., or it can be a mobile phone, wearable device, PDA, or other terminal device. The face orientation determining method provided in this embodiment will be described below using an electronic device as the executing entity.
[0063] like Figure 1 As shown, the method for determining the orientation of a person's face provided in this embodiment may include the following steps S11 to S13:
[0064] Step S11: Perform principal component analysis on the image of the brain region based on the first location to determine the first direction vector and the second direction vector.
[0065] The first location is used to characterize the central location of the brain region. In a specific implementation, a three-dimensional Cartesian coordinate system can be established within the three-dimensional space of the brain region image. The coordinate system includes an x-axis, a y-axis, and a z-axis. The average values of the x, y, and z coordinates of all voxels in the brain region image are calculated, and these three average values are used as the x, y, and z coordinates of the first location, respectively. In some examples, the first location may also be referred to as the geometric center of the brain region.
[0066] In practice, brain region images can be obtained by performing brain segmentation processing on the medical images to be processed. The medical images to be processed, also known as DICOM images, can be CT (Computed Tomography) images or MRI (Magnetic Resonance Imaging) images, etc. Specifically, they can be obtained by scanning the patient's head (including the face) using equipment such as CT scanners or MRI machines, or downloaded from a server.
[0067] Principal Component Analysis (PCA) is a technique designed to compress the size of the original data matrix and reduce the dimension of the eigenvectors so that they reflect the main features of the data. In step S11, a first direction vector and a second direction vector are determined based on the results of PCA processing of the brain region image. The first direction vector indicates the direction of the brain region from front to back or from back to front, and the second direction vector indicates the direction of the brain region from top to bottom or from bottom to top.
[0068] The human brain typically exhibits the following characteristics: the brain regions have the largest dimensions in the anteroposterior direction, followed by the vertical direction, and the smallest dimensions in the lateral direction. Furthermore, there is asymmetry between the anteroposterior and vertical directions. In one optional implementation of step S11, determining the first and second direction vectors based on the above principles may specifically include the following steps S111 and S112:
[0069] Step S111: Using the first position as the origin, perform principal component analysis on the image of the brain region to obtain three orthogonal principal component direction vectors and the eigenvalues corresponding to each principal component direction vector.
[0070] In practice, voxels belonging to the brain region in the image of the brain region can be converted into point clouds, and principal component analysis can be performed on the point clouds.
[0071] In step S111, principal component analysis is performed on the image of the brain region using the first location as the origin, resulting in the following: Figure 2 The diagram shows three orthogonal principal component direction vectors P1, P2, and P3 emanating from the origin, along with eigenvalues Value1 (corresponding to principal component direction vector P1), Value2 (corresponding to principal component direction vector P2), and Value3 (corresponding to principal component direction vector P3). These three principal component direction vectors reflect different directions of the brain, and the three corresponding eigenvalues reflect the size of the brain in different directions.
[0072] Step S112: Determine the principal component direction vector corresponding to the largest eigenvalue as the first direction vector, and determine the principal component direction vector corresponding to the second largest eigenvalue as the second direction vector.
[0073] Specifically, the three eigenvalues Value1, Value2, and Value3 are sorted, and the first and second direction vectors are determined from the principal component direction vectors P1, P2, and P3 based on the sorting results.
[0074] The largest eigenvalue represents the largest size in its corresponding direction, the second largest eigenvalue represents the second largest size in its corresponding direction, and the smallest eigenvalue represents the smallest size in its corresponding direction. Since the brain's size is largest in the anterior-posterior direction, second largest in the vertical direction, and smallest in the left-right direction, the principal component direction vector corresponding to the largest eigenvalue is determined as the first direction vector indicating the brain region's direction from front to back or from back to front. The principal component direction vector corresponding to the second largest eigenvalue is determined as the second direction vector indicating the brain region's direction from top to bottom or from bottom to top. Finally, the principal component direction vector corresponding to the smallest eigenvalue is determined as the third direction vector indicating the brain region's direction from left to right or from right to left.
[0075] Step S12: For the image of the brain region, determine the anterior part and posterior part of the brain region based on the distances from the voxels located on both sides of the first plane to the first plane; and determine the upper part and lower part of the brain region based on the distances from the voxels located on both sides of the second plane to the second plane.
[0076] Wherein, the first plane is a plane that is perpendicular to the first direction vector and passes through the first position, and the second plane is a plane that is perpendicular to the second direction vector and passes through the first position.
[0077] In specific implementation, for any voxel located on either side of the first plane, the distance from that voxel to the first plane refers to the perpendicular distance from that voxel to the first plane, that is, the distance between the point on the first direction vector projected by that voxel and the first position. For any voxel located on either side of the second plane, the distance from that voxel to the second plane refers to the perpendicular distance from that voxel to the second plane, that is, the distance between the point on the second direction vector projected by that voxel and the first position.
[0078] Figure 3 A schematic diagram used to illustrate an image of a brain region. From Figure 3 As can be seen, the distance span D1 from the voxels in the anterior part of the brain region to the first plane L1 is greater than the distance span D2 from the voxels in the posterior part of the brain region to the first plane L1, and the distance span D3 from the voxels in the upper part of the brain region to the second plane L2 is greater than the distance span D4 from the voxels in the lower part of the brain region to the second plane L2. In the specific implementation of step S12, the above features can be used to determine the anterior, posterior, upper, and lower parts of the brain region.
[0079] In one optional embodiment of step S12, if the average distance from the voxel on the first side of the first plane to the first plane is greater than the average distance from the voxel on the second side of the first plane to the first plane, then the first side of the first plane is determined to be the anterior part of the brain region, and the second side of the first plane is determined to be the posterior part of the brain region.
[0080] In this embodiment, the anterior and posterior parts of the brain region are determined by utilizing the characteristic that the average distance from voxels in the anterior part of the brain region to the first plane is greater than the average distance from voxels in the posterior part of the brain region to the first plane.
[0081] In another optional embodiment of step S12, if the maximum distance from a voxel located on the first side of the first plane to the first plane is greater than the maximum distance from a voxel located on the second side of the first plane to the first plane, then the first side of the first plane is determined to be the anterior part of the brain region, and the second side of the first plane is determined to be the posterior part of the brain region.
[0082] In this embodiment, the anterior and posterior parts of the brain region are determined by utilizing the characteristic that the maximum distance from the voxels of the anterior part of the brain region to the first plane is greater than the maximum distance from the voxels of the posterior part of the brain region to the first plane.
[0083] In one optional embodiment of step S12, if the average distance from the voxel on the first side of the second plane to the second plane is greater than the average distance from the voxel on the second side of the second plane to the second plane, then the first side of the second plane is determined to be the upper part of the brain region and the second side of the second plane is determined to be the lower part of the brain region.
[0084] In this embodiment, the upper and lower parts of the brain region are determined by utilizing the characteristic that the average distance from voxels in the upper part of the brain region to the second plane is greater than the average distance from voxels in the lower part of the brain region to the second plane.
[0085] In another optional embodiment of step S12, if the maximum distance from the voxel on the first side of the second plane to the second plane is greater than the maximum distance from the voxel on the second side of the second plane to the second plane, then the first side of the second plane is determined to be the upper part of the brain region and the second side of the second plane is determined to be the lower part of the brain region.
[0086] In this embodiment, the upper and lower parts of the brain region are determined by utilizing the feature that the maximum distance from the voxels in the upper part of the brain region to the second plane is greater than the maximum distance from the voxels in the lower part of the brain region to the second plane.
[0087] Step S13: Determine the face orientation based on at least one of the anterior and posterior brain regions, at least one of the upper and lower brain regions, and the first position.
[0088] Because there is a fixed relationship between facial orientation and brain orientation, facial orientation can be determined based on the anterior and / or posterior parts of the brain region, or the upper and / or lower parts of the brain region. In a specific implementation, step S13 may include the following steps S131 to S133:
[0089] Step S131: Using the first position as the origin of the coordinate system, determine the first coordinate axis based on at least one of the anterior part of the brain region and the posterior part of the brain region, and determine the second coordinate axis based on at least one of the upper part of the brain region and the lower part of the brain region.
[0090] Specifically, the first coordinate axis can be the direction from the posterior to the anterior part of the brain region, or the direction from the anterior to the posterior part of the brain region, or the direction from the first position to the anterior part of the brain region, or the direction from the first position to the posterior part of the brain region. The second coordinate axis can be the direction from the lower to the upper part of the brain region, or the direction from the upper to the lower part of the brain region, or the direction from the first position to the upper part of the brain region, or the direction from the first position to the lower part of the brain region.
[0091] Step S132: Determine the face orientation vector based on the first vector on the first coordinate axis and the second vector on the second coordinate axis. The direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis.
[0092] In this embodiment, a brain coordinate system is established based on a first location, the anterior and / or posterior parts of the brain region, and the upper and / or lower parts of the brain region, and the face orientation vector is determined using the brain coordinate system. In such cases... Figure 4 In the example shown, the brain coordinate system is established as follows: the first position O is the origin, the direction from the back of the brain region to the front of the brain region is the y-axis, i.e., the first coordinate axis, and the direction from the lower part of the brain region to the upper part of the brain region is the z-axis, i.e., the second coordinate axis.
[0093] Specifically, the face orientation vector V can be determined according to the following formula. face :
[0094] V face =α*V y +β*V z
[0095] Among them, V y V is the first vector on the y-axis, i.e., the first coordinate axis. z Let V be the second vector on the z-axis, i.e., the second coordinate axis, where α is the first coefficient and β is the second coefficient. It should be noted that the vector V on the first coordinate axis... y and the vector V on the second coordinate axis z It can be a unit vector, meaning the vector's magnitude is 1. The first coefficient α and the second coefficient β can be set based on the inherent relationship between the face's orientation and the brain's direction. Generally, the absolute value of the first coefficient α is greater than the absolute value of the second coefficient β, and their ratio is between 1 and 5, preferably 2.
[0096] Assume that the direction from the posterior to the anterior part of the brain region is the first coordinate axis, i.e., the y-axis, and the direction from the lower to the upper part of the brain region is the second coordinate axis, i.e., the z-axis. In... Figure 4 In the example shown, V y V is a vector along the y-axis. z Let V be a vector along the z-axis, with the first coefficient α being positive and the second coefficient β being negative. In another example, V y V is a vector in the opposite direction of the y-axis. z Let V be a vector in the opposite direction of the z-axis, with the first coefficient α being negative and the second coefficient β being positive. In another example, V y V is a vector along the y-axis. zLet V be a vector in the opposite direction of the z-axis, with both the first coefficient α and the second coefficient β being positive. In another example, V y V is a vector in the opposite direction of the y-axis. z Let be a vector along the z-axis, with both the first coefficient α and the second coefficient β being negative.
[0097] Step S133: Determine the direction of the face orientation vector as the face orientation.
[0098] In this embodiment, the anterior, posterior, superior, and inferior parts of the brain region are first determined based on the image of the brain region using the unique features of the human brain structure. Then, the face orientation is determined using the inherent relationship between the face orientation and the brain orientation. In other words, the face orientation is determined by using the inherent features of the human head structure. This method does not rely on other auxiliary information such as the label information of DICOM data. It not only has high accuracy but also strong robustness and generalization, and can be applied to medical images obtained by scanning different devices.
[0099] In practice, a deep learning network can be used to perform brain segmentation on the medical image to be processed in order to obtain images of brain regions. Specifically, the deep learning network is trained using sample data and gold standard data for brain segmentation, and the trained deep learning network is used to perform brain segmentation on the medical image to be processed, thereby obtaining images of the predicted brain regions.
[0100] In specific implementations, images of brain regions can also be obtained based on the following characteristics of the human brain structure: the human brain is completely enclosed within the skull, and the skull is the only nearly completely enclosed bony cavity in the human body, or at least the upper body. It should be noted that because there are some smaller openings within the skull, such as the foramen ovale, through which blood vessels and nerves pass, the skull is a nearly completely enclosed bony cavity, not a completely enclosed one. This embodiment provides a brain segmentation method for obtaining images of brain regions, such as... Figure 5 As shown, the process includes the following steps S10a to S10e:
[0101] Step S10a: Perform bone tissue segmentation processing on the acquired medical image to be processed to obtain an image of the bone tissue region.
[0102] In practical implementation, to improve image processing efficiency, the acquired medical image to be processed can be downsampled before bone tissue segmentation. Threshold segmentation can be used for bone tissue segmentation of the medical image. Specifically, pixels with gray values greater than a first preset threshold are identified as belonging to bone tissue regions, while pixels with gray values less than or equal to the first preset threshold are identified as non-bone tissue regions. The first preset threshold can be set according to actual conditions, for example, it can be set to 400 HU.
[0103] Step S10b: Perform morphological processing on the image of the bone tissue region to obtain a first image.
[0104] Specifically, a closing operation can be performed on the image of the bone tissue region—that is, dilation followed by erosion—to fill the tiny fractures and pores within the bone tissue, making the skull a completely sealed bone chamber. In a specific example, a spherical morphological structure operator with a radius of 3 mm is used to perform the closing operation on the image of the bone tissue region.
[0105] Step S10c: Perform hole-filling processing on the first image to obtain the second image. After bone tissue segmentation, some holes will inevitably exist in the first image. By performing hole-filling processing, all closed cavities can be filled.
[0106] Step S10d: Obtain an image of the bone cavity region based on the second image and the first image. In a specific implementation, the difference between the second image and the first image can be calculated to extract all closed bone cavities, thereby obtaining an image of the bone cavity region.
[0107] Step S10e: The largest connected region in the image of the bone chamber region is determined as the image of the brain region. Specifically, taking advantage of the characteristic that the skull surrounds the brain and that the skull is a nearly completely closed bone chamber, the largest connected region in the image of the bone chamber region is determined as the image of the brain region.
[0108] The brain segmentation method provided in this embodiment relies on the unique characteristics of the brain. Images of brain regions can be obtained through simple morphological processing. The processing is relatively fast and the results are relatively stable.
[0109] like Figure 6 As shown, this embodiment also provides a face orientation determination device 60, including a direction vector determination module 61, a brain direction determination module 62, and a face orientation determination module 63.
[0110] The direction vector determination module 61 is used to perform principal component analysis on the image of the brain region based on a first position to determine a first direction vector and a second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. The brain orientation determination module 62 is used to determine the anterior and posterior portions of the brain region based on the distances from voxels located on either side of a first plane to the first plane; and to determine the upper and lower portions of the brain region based on the distances from voxels located on either side of a second plane to the second plane; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, the second plane is a plane perpendicular to the second direction vector and passing through the first position, and the first position is the intersection of the first and second direction vectors. The face orientation determination module 63 is used to determine the face orientation based on at least one of the anterior and posterior portions of the brain region, at least one of the upper and lower portions of the brain region, and the first position.
[0111] In one optional implementation, the direction vector determination module is specifically used to perform principal component analysis on the image of the brain region with the first position as the origin, to obtain three orthogonal principal component direction vectors and the eigenvalues corresponding to each principal component direction vector; the principal component direction vector corresponding to the largest eigenvalue is determined as the first direction vector, and the principal component direction vector corresponding to the second largest eigenvalue is determined as the second direction vector.
[0112] In one optional implementation, the brain orientation determination module is specifically used to determine that the first side of the first plane is the anterior part of the brain region and the second side of the first plane is the posterior part of the brain region when the average distance from a voxel located on the first side of the first plane to the first plane is greater than the average distance from a voxel located on the second side of the first plane to the first plane.
[0113] In one optional implementation, the brain orientation determination module is specifically used to determine that the first side of the second plane is the upper part of the brain region and the second side of the second plane is the lower part of the brain region when the average distance from the voxel located on the first side of the second plane to the second plane is greater than the average distance from the voxel located on the second side of the second plane to the second plane.
[0114] In one optional embodiment, the face orientation determination module includes a coordinate axis determination unit, a vector determination unit, and an orientation determination unit. The coordinate axis determination unit is used to determine a first coordinate axis based on at least one of the anterior and posterior portions of the brain region, and a second coordinate axis based on at least one of the upper and lower portions of the brain region, with the first position as the origin. The vector determination unit is used to determine a face orientation vector based on a first vector on the first coordinate axis and a second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis. The orientation determination unit is used to determine the direction of the face orientation vector as the face orientation.
[0115] In one optional embodiment, the face orientation determination device further includes a bone tissue segmentation unit, a morphological processing unit, a hole-filling unit, a bone cavity extraction unit, and a brain region determination unit. The bone tissue segmentation unit performs bone tissue segmentation processing on the acquired medical image to obtain an image of the bone tissue region. The morphological processing unit performs morphological processing on the image of the bone tissue region to obtain a first image. The hole-filling unit performs hole-filling processing on the first image to obtain a second image. The bone cavity extraction unit obtains an image of the bone cavity region based on the second image and the first image. The brain region determination unit extracts the largest connected component in the image of the bone cavity region to obtain an image of the brain region.
[0116] It should be noted that the face orientation determination device in this embodiment can be a separate chip, chip module or electronic device, or it can be a chip or chip module integrated into an electronic device.
[0117] Regarding the various modules / units included in the face orientation determination device described in this embodiment, they may be software modules / units, hardware modules / units, or a combination of both.
[0118] Example 2
[0119] Figure 7This is a flowchart illustrating a method for determining face orientation provided in this embodiment. This method can be executed by a face orientation determining device, which can be implemented through software and / or hardware. The face orientation determining device can be part or all of an electronic device. In this embodiment, the electronic device can be a personal computer, such as a desktop computer, all-in-one computer, laptop computer, tablet computer, etc., or it can be a mobile phone, wearable device, PDA, or other terminal device. The face orientation determining method provided in this embodiment will be described below using an electronic device as the executing entity.
[0120] like Figure 7 As shown, the method for determining the orientation of a person's face provided in this embodiment may include the following steps S21 to S23:
[0121] Step S21: Perform principal component analysis on the image of the brain region based on the first location to determine the first direction vector and the second direction vector.
[0122] The first location is used to characterize the central location of the brain region. In a specific implementation, a three-dimensional Cartesian coordinate system can be established within the three-dimensional space of the brain region image. The coordinate system includes an x-axis, a y-axis, and a z-axis. The average values of the x, y, and z coordinates of all voxels in the brain region image are calculated, and these three average values are used as the x, y, and z coordinates of the first location, respectively. In some examples, the first location may also be referred to as the geometric center of the brain region.
[0123] In practice, brain region images can be obtained by performing brain segmentation processing on the medical images to be processed. The medical images to be processed, also known as DICOM images, can be CT or MRI images, etc. These can be obtained by scanning the patient's head (including the face) using equipment such as CT scanners or MRI scanners, or by downloading them from a server.
[0124] Principal component analysis (PCA), also known as principal component analysis, aims to compress the size of the original data matrix and reduce the dimension of the eigenvectors so that they reflect the main features of the data. In step S11, a first direction vector and a second direction vector are determined based on the PCA processing results of the brain region image. The first direction vector indicates the direction of the brain region from front to back or from back to front, and the second direction vector indicates the direction of the brain region from top to bottom or from bottom to top.
[0125] The human brain typically exhibits the following characteristics: the brain regions have the largest dimensions in the anteroposterior direction, followed by the vertical direction, and the smallest dimensions in the lateral direction. Furthermore, there is asymmetry between the anteroposterior and vertical directions. In one optional implementation of step S21, determining the first and second direction vectors based on the above principles may specifically include the following steps S211 and S212:
[0126] Step S211: Using the first position as the origin, perform principal component analysis on the image of the brain region to obtain three orthogonal principal component direction vectors and the eigenvalues corresponding to each principal component direction vector.
[0127] In practice, voxels belonging to the brain region in the image of the brain region can be converted into point clouds, and principal component analysis can be performed on the point clouds.
[0128] In step S211, principal component analysis is performed on the image of the brain region using the first location as the origin, resulting in the following: Figure 2 The diagram shows three orthogonal principal component direction vectors P1, P2, and P3 emanating from the origin, along with eigenvalues Value1 (corresponding to principal component direction vector P1), Value2 (corresponding to principal component direction vector P2), and Value3 (corresponding to principal component direction vector P3). These three principal component direction vectors reflect different directions of the brain, and the three corresponding eigenvalues reflect the size of the brain in different directions.
[0129] Step S212: Determine the principal component direction vector corresponding to the largest eigenvalue as the first direction vector, and determine the principal component direction vector corresponding to the second largest eigenvalue as the second direction vector.
[0130] Specifically, the three eigenvalues Value1, Value2, and Value3 are sorted, and the first and second direction vectors are determined from the principal component direction vectors P1, P2, and P3 based on the sorting results.
[0131] The largest eigenvalue represents the largest size in its corresponding direction, the second largest eigenvalue represents the second largest size in its corresponding direction, and the smallest eigenvalue represents the smallest size in its corresponding direction. Since the brain's size is largest in the anterior-posterior direction, second largest in the vertical direction, and smallest in the left-right direction, the principal component direction vector corresponding to the largest eigenvalue is determined as the first direction vector indicating the brain region's direction from front to back or from back to front. The principal component direction vector corresponding to the second largest eigenvalue is determined as the second direction vector indicating the brain region's direction from top to bottom or from bottom to top. Finally, the principal component direction vector corresponding to the smallest eigenvalue is determined as the third direction vector indicating the brain region's direction from left to right or from right to left.
[0132] Step S22: For the image of the brain region, determine a first coordinate axis based on the distance from the voxels located on both sides of the first plane to the first plane at the first position; and determine a second coordinate axis based on the distance from the voxels located on both sides of the second plane at the first position to the second plane.
[0133] Wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, the second plane is a plane perpendicular to the second direction vector and passing through the first position, and the first coordinate axis and the second coordinate axis intersect at the first position.
[0134] In specific implementation, for any voxel located on either side of the first plane, the distance from that voxel to the first plane refers to the perpendicular distance from that voxel to the first plane, that is, the distance between the point on the first direction vector projected by that voxel and the first position. For any voxel located on either side of the second plane, the distance from that voxel to the second plane refers to the perpendicular distance from that voxel to the second plane, that is, the distance between the point on the second direction vector projected by that voxel and the first position.
[0135] In one optional embodiment of step S22, a first coordinate axis is determined with the first position as the origin, based on the relationship between the average distance from the voxels located on the first side of the first plane to the first plane and the average distance from the voxels located on the second side of the first plane to the first plane. In a specific example, if the average distance from the voxels located on the first side of the first plane to the first plane is greater than the average distance from the voxels located on the second side of the first plane to the first plane, then the first coordinate axis is defined as the direction from the first side of the first plane to the second side of the first plane, with the first position as the origin.
[0136] In another optional embodiment of step S22, a first coordinate axis is determined with the first position as the origin, based on the relationship between the maximum distance from the voxel located on the first side of the first plane to the first plane and the maximum distance from the voxel located on the second side of the first plane to the first plane. In a specific example, if the maximum distance from the voxel located on the first side of the first plane to the first plane is greater than the maximum distance from the voxel located on the second side of the first plane to the first plane, then the first coordinate axis is defined as the direction from the second side of the first plane to the first side of the first plane, with the first position as the origin.
[0137] In one optional embodiment of step S22, a second coordinate axis is determined with the first position as the origin, based on the relationship between the average distance from the voxels located on the first side of the second plane to the second plane and the average distance from the voxels located on the second side of the second plane to the second plane. In a specific example, if the average distance from the voxels located on the first side of the second plane to the second plane is greater than the average distance from the voxels located on the second side of the second plane to the second plane, then the first position is used as the origin, and the direction from the first side of the second plane to the second side of the second plane is used as the second coordinate axis.
[0138] In another optional embodiment of step S22, the second coordinate axis is determined with the first position as the origin based on the relationship between the maximum distance from the voxel on the first side of the second plane to the second plane and the maximum distance from the voxel on the second side of the second plane to the second plane.
[0139] In a specific example, if the maximum distance from a voxel located on the first side of the second plane to the second plane is greater than the maximum distance from a voxel located on the second side of the second plane to the second plane, then the first position is taken as the origin of the coordinate system, and the direction from the first side of the second plane to the second side of the second plane is taken as the second coordinate axis.
[0140] Step S23: Determine the face orientation based on the first coordinate axis and the second coordinate axis.
[0141] In one optional implementation of step S23, the steps S231 and S232 are included:
[0142] Step S231: Determine the face orientation vector based on the first vector on the first coordinate axis and the second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis.
[0143] In practice, the first and second vectors can be unit vectors, meaning both have a magnitude of 1. Specifically, the face orientation vector can be obtained by summing the products of the first vector and the first coefficient, and the second vector and the second coefficient. Generally, the absolute value of the first coefficient is greater than the absolute value of the second coefficient, and their ratio is between 1 and 5, preferably 2.
[0144] Step S232: Determine the direction of the face orientation vector as the face orientation.
[0145] The method provided in this embodiment does not rely on other auxiliary information, such as the label information of DICOM data, in the process of determining the orientation of the face. It not only has high accuracy, but also strong robustness and generalization. It can be applied to medical images obtained by scanning different areas of the human body, including the face, at different scanning resolutions using different devices.
[0146] In practice, a deep learning network can be used to perform brain segmentation on the medical image to be processed in order to obtain images of brain regions. Specifically, the deep learning network is trained using sample data and gold standard data for brain segmentation, and the trained deep learning network is used to perform brain segmentation on the medical image to be processed, thereby obtaining images of the predicted brain regions.
[0147] In specific implementations, images of brain regions can also be obtained based on the following characteristics of the human brain structure: the human brain is completely enclosed within the skull, and the skull is the only nearly completely enclosed bony cavity in the human body, or at least the upper body. It should be noted that because there are some smaller openings within the skull, such as the foramen ovale, through which blood vessels and nerves pass, the skull is a nearly completely enclosed bony cavity, not a completely enclosed one. This embodiment provides a brain segmentation method for obtaining images of brain regions, including the following steps S20a to S20e:
[0148] Step S20a: Perform bone tissue segmentation processing on the acquired medical image to be processed to obtain an image of the bone tissue region.
[0149] In practical implementation, to improve image processing efficiency, the acquired medical image to be processed can be downsampled before bone tissue segmentation. Threshold segmentation can be used for bone tissue segmentation of the medical image. Specifically, pixels with gray values greater than a first preset threshold are identified as belonging to bone tissue regions, while pixels with gray values less than or equal to the first preset threshold are identified as non-bone tissue regions. The first preset threshold can be set according to actual conditions, for example, it can be set to 400 HU.
[0150] Step S20b: Perform morphological processing on the image of the bone tissue region to obtain a first image.
[0151] Specifically, a closing operation can be performed on the image of the bone tissue region—that is, dilation followed by erosion—to fill the tiny fractures and pores within the bone tissue, making the skull a completely sealed bone chamber. In a specific example, a spherical morphological structure operator with a radius of 3 mm is used to perform the closing operation on the image of the bone tissue region.
[0152] Step S20c: Perform hole-filling processing on the first image to obtain the second image. After bone tissue segmentation, some holes will inevitably exist in the first image. By performing hole-filling processing, all closed cavities can be filled.
[0153] Step S20d: Obtain an image of the bone cavity region based on the second image and the first image. In a specific implementation, the difference between the second image and the first image can be calculated to extract all closed bone cavities, thereby obtaining an image of the bone cavity region.
[0154] Step S20e: The largest connected region in the image of the bone cavity region is determined as the image of the brain region. Specifically, taking advantage of the characteristic that the skull surrounds the brain and that the skull is a nearly completely closed bone cavity, the largest connected region in the image of the bone cavity region is determined as the image of the brain region.
[0155] The brain segmentation method provided in this embodiment relies on the unique characteristics of the brain. Images of brain regions can be obtained through simple morphological processing. The processing is relatively fast and the results are relatively stable.
[0156] like Figure 8 As shown, this embodiment also provides a face orientation determination device 70, including a direction vector determination module 71, a coordinate axis determination module 72, and a face orientation determination module 73.
[0157] The direction vector determination module 71 is used to perform principal component analysis on the image of the brain region based on a first position to determine a first direction vector and a second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. The coordinate axis determination module 72 is used to determine a first coordinate axis for the image of the brain region based on the first position and the distances from voxels located on both sides of the first plane to the first plane; and to determine a second coordinate axis based on the first position and the distances from voxels located on both sides of the second plane to the second plane; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, the second plane is a plane perpendicular to the second direction vector and passing through the first position, and the first coordinate axis and the second coordinate axis intersect at the first position. The face orientation determination module 73 is used to determine the face orientation based on the first coordinate axis and the second coordinate axis.
[0158] In one optional implementation, the direction vector determination module is specifically used to perform principal component analysis on the image of the brain region with the first position as the origin, to obtain three orthogonal principal component direction vectors and the eigenvalues corresponding to each principal component direction vector; the principal component direction vector corresponding to the largest eigenvalue is determined as the first direction vector, and the principal component direction vector corresponding to the second largest eigenvalue is determined as the second direction vector.
[0159] In one optional implementation, the coordinate axis determination module is specifically used to determine the first coordinate axis with the first position as the origin based on the relationship between the average distance from the voxel located on the first side of the first plane to the first plane and the average distance from the voxel located on the second side of the first plane to the first plane.
[0160] In one optional implementation, the coordinate axis determination module is specifically used to determine the second coordinate axis with the first position as the origin based on the relationship between the average distance from the voxel on the first side of the second plane to the second plane and the average distance from the voxel on the second side of the second plane to the second plane.
[0161] In one optional embodiment, the face orientation determination module includes a vector determination unit and an orientation determination unit. The vector determination unit is used to determine a face orientation vector based on a first vector on the first coordinate axis and a second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis. The orientation determination unit is used to determine the direction of the face orientation vector as the face orientation.
[0162] In one optional embodiment, the face orientation determination device further includes a bone tissue segmentation unit, a morphological processing unit, a hole-filling unit, a bone cavity extraction unit, and a brain region determination unit. The bone tissue segmentation unit performs bone tissue segmentation processing on the acquired medical image to obtain an image of the bone tissue region. The morphological processing unit performs morphological processing on the image of the bone tissue region to obtain a first image. The hole-filling unit performs hole-filling processing on the first image to obtain a second image. The bone cavity extraction unit obtains an image of the bone cavity region based on the second image and the first image. The brain region determination unit extracts the largest connected component in the image of the bone cavity region to obtain an image of the brain region.
[0163] Example 3
[0164] Figure 9 This is a flowchart illustrating a method for determining face orientation provided in this embodiment. This method can be executed by a face orientation determining device, which can be implemented through software and / or hardware. The face orientation determining device can be part or all of an electronic device. In this embodiment, the electronic device can be a personal computer, such as a desktop computer, all-in-one computer, laptop computer, tablet computer, etc., or it can be a mobile phone, wearable device, PDA, or other terminal device. The face orientation determining method provided in this embodiment will be described below using an electronic device as the executing entity.
[0165] like Figure 9 As shown, the method for determining the orientation of a person's face provided in this embodiment may include the following steps S31 to S33:
[0166] Step S31: Perform principal component analysis on the image of the brain region based on the first location to determine the first direction vector and the second direction vector.
[0167] The first location is used to characterize the central location of the brain region. In a specific implementation, a three-dimensional Cartesian coordinate system can be established within the three-dimensional space of the brain region image. The coordinate system includes an x-axis, a y-axis, and a z-axis. The average values of the x, y, and z coordinates of all voxels in the brain region image are calculated, and these three average values are used as the x, y, and z coordinates of the first location, respectively. In some examples, the first location may also be referred to as the geometric center of the brain region.
[0168] In practice, brain region images can be obtained by performing brain segmentation processing on the medical images to be processed. The medical images to be processed, also known as DICOM images, can be CT or MRI images, etc. These can be obtained by scanning the patient's head (including the face) using equipment such as CT scanners or MRI scanners, or by downloading them from a server.
[0169] Principal component analysis (PCA), also known as principal component analysis, aims to compress the size of the original data matrix and reduce the dimension of the eigenvectors so that they reflect the main features of the data. In step S11, a first direction vector and a second direction vector are determined based on the PCA processing results of the brain region image. The first direction vector indicates the direction of the brain region from front to back or from back to front, and the second direction vector indicates the direction of the brain region from top to bottom or from bottom to top.
[0170] The human brain typically exhibits the following characteristics: the brain regions have the largest dimensions in the anteroposterior direction, followed by the vertical direction, and the smallest dimensions in the lateral direction. Furthermore, there is asymmetry between the anteroposterior and vertical directions. In one optional implementation of step S31, determining the first and second direction vectors based on the above principles may specifically include the following steps S311 and S312:
[0171] Step S311: Using the first position as the origin, perform principal component analysis on the image of the brain region to obtain three orthogonal principal component direction vectors and the eigenvalues corresponding to each principal component direction vector.
[0172] In practice, voxels belonging to the brain region in the image of the brain region can be converted into point clouds, and principal component analysis can be performed on the point clouds.
[0173] In step S311, principal component analysis is performed on the image of the brain region using the first location as the origin, resulting in the following: Figure 2 The diagram shows three orthogonal principal component direction vectors P1, P2, and P3 emanating from the origin, along with eigenvalues Value1 (corresponding to principal component direction vector P1), Value2 (corresponding to principal component direction vector P2), and Value3 (corresponding to principal component direction vector P3). These three principal component direction vectors reflect different directions of the brain, and the three corresponding eigenvalues reflect the size of the brain in different directions.
[0174] Step S312: Determine the principal component direction vector corresponding to the largest eigenvalue as the first direction vector, and determine the principal component direction vector corresponding to the second largest eigenvalue as the second direction vector.
[0175] Specifically, the three eigenvalues Value1, Value2, and Value3 are sorted, and the first and second direction vectors are determined from the principal component direction vectors P1, P2, and P3 based on the sorting results.
[0176] The largest eigenvalue represents the largest size in its corresponding direction, the second largest eigenvalue represents the second largest size in its corresponding direction, and the smallest eigenvalue represents the smallest size in its corresponding direction. Since the brain's size is largest in the anterior-posterior direction, second largest in the vertical direction, and smallest in the left-right direction, the principal component direction vector corresponding to the largest eigenvalue is determined as the first direction vector indicating the brain region's direction from front to back or from back to front. The principal component direction vector corresponding to the second largest eigenvalue is determined as the second direction vector indicating the brain region's direction from top to bottom or from bottom to top. Finally, the principal component direction vector corresponding to the smallest eigenvalue is determined as the third direction vector indicating the brain region's direction from left to right or from right to left.
[0177] Step S32: For the image of the brain region, determine the distances from the voxels located on both sides of the first plane to the first plane and the distances from the voxels located on both sides of the second plane to the second plane.
[0178] Wherein, the first plane is a plane that is perpendicular to the first direction vector and passes through the first position, and the second plane is a plane that is perpendicular to the second direction vector and passes through the first position.
[0179] In specific implementation, for any voxel located on either side of the first plane, the distance from that voxel to the first plane refers to the perpendicular distance from that voxel to the first plane, that is, the distance between the point on the first direction vector projected by that voxel and the first position. For any voxel located on either side of the second plane, the distance from that voxel to the second plane refers to the perpendicular distance from that voxel to the second plane, that is, the distance between the point on the second direction vector projected by that voxel and the first position.
[0180] Step S33: Determine the face orientation based on the first position, the distances from the voxels on both sides of the first plane to the first plane, and the distances from the voxels on both sides of the second plane to the second plane.
[0181] In specific implementation, step S33 above may include the following steps S331 to S332:
[0182] Step S331: Determine a first coordinate axis based on the first position and the distances from the voxels located on both sides of the first plane to the first plane; and determine a second coordinate axis based on the first position and the distances from the voxels located on both sides of the second plane to the second plane; wherein the first coordinate axis and the second coordinate axis intersect at the first position.
[0183] In one optional embodiment of step S331, a first coordinate axis is determined with the first position as the origin, based on the relationship between the average distance from the voxels located on the first side of the first plane to the first plane and the average distance from the voxels located on the second side of the first plane to the first plane. In a specific example, if the average distance from the voxels located on the first side of the first plane to the first plane is greater than the average distance from the voxels located on the second side of the first plane to the first plane, then the first coordinate axis is defined as the direction from the first side of the first plane to the second side of the first plane, with the first position as the origin.
[0184] In another optional embodiment of step S331, a first coordinate axis is determined with the first position as the origin, based on the relationship between the maximum distance from the voxel located on the first side of the first plane to the first plane and the maximum distance from the voxel located on the second side of the first plane to the first plane. In a specific example, if the maximum distance from the voxel located on the first side of the first plane to the first plane is greater than the maximum distance from the voxel located on the second side of the first plane to the first plane, then the first coordinate axis is defined as the direction from the second side of the first plane to the first side of the first plane, with the first position as the origin.
[0185] In one optional embodiment of step S331, a second coordinate axis is determined with the first position as the origin, based on the relationship between the average distance from the voxels located on the first side of the second plane to the second plane and the average distance from the voxels located on the second side of the second plane to the second plane. In a specific example, if the average distance from the voxels located on the first side of the second plane to the second plane is greater than the average distance from the voxels located on the second side of the second plane to the second plane, then the first position is used as the origin, and the direction from the first side of the second plane to the second side of the second plane is used as the second coordinate axis.
[0186] In another optional embodiment of step S331, the second coordinate axis is determined with the first position as the origin, based on the relationship between the maximum distance from the voxel on the first side of the second plane to the second plane and the maximum distance from the voxel on the second side of the second plane to the second plane. In a specific example, if the maximum distance from the voxel on the first side of the second plane to the second plane is greater than the maximum distance from the voxel on the second side of the second plane to the second plane, then the first position is used as the origin, and the direction from the first side of the second plane to the second side of the second plane is used as the second coordinate axis.
[0187] Step S332: Determine the face orientation based on the first coordinate axis and the second coordinate axis.
[0188] In one optional implementation of step S332, the steps S332a and S332b are included:
[0189] Step S332a: Determine the face orientation vector based on the first vector on the first coordinate axis and the second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis.
[0190] In practice, the first and second vectors can be unit vectors, meaning both have a magnitude of 1. Specifically, the face orientation vector can be obtained by summing the products of the first vector and the first coefficient, and the second vector and the second coefficient. Generally, the absolute value of the first coefficient is greater than the absolute value of the second coefficient, and their ratio is between 1 and 5, preferably 2.
[0191] Step S332b: Determine the direction of the face orientation vector as the face orientation.
[0192] The method provided in this embodiment does not rely on other auxiliary information, such as the label information of DICOM data, in the process of determining the orientation of the face. It not only has high accuracy, but also strong robustness and generalization. It can be applied to medical images obtained by scanning different areas of the human body, including the face, at different scanning resolutions using different devices.
[0193] In practice, a deep learning network can be used to perform brain segmentation on the medical image to be processed in order to obtain images of brain regions. Specifically, the deep learning network is trained using sample data and gold standard data for brain segmentation, and the trained deep learning network is used to perform brain segmentation on the medical image to be processed, thereby obtaining images of the predicted brain regions.
[0194] In specific implementations, images of brain regions can also be obtained based on the following characteristics of the human brain structure: the human brain is completely enclosed within the skull, and the skull is the only nearly completely enclosed bony cavity in the human body, or at least the upper body. It should be noted that because there are some smaller openings within the skull, such as the foramen ovale, through which blood vessels and nerves pass, the skull is a nearly completely enclosed bony cavity, not a completely enclosed one. This embodiment provides a brain segmentation method for obtaining images of brain regions, including the following steps S30a to S30e:
[0195] Step S30a: Perform bone tissue segmentation processing on the acquired medical image to be processed to obtain an image of the bone tissue region.
[0196] In practical implementation, to improve image processing efficiency, the acquired medical image to be processed can be downsampled before bone tissue segmentation. Threshold segmentation can be used for bone tissue segmentation of the medical image. Specifically, pixels with gray values greater than a first preset threshold are identified as belonging to bone tissue regions, while pixels with gray values less than or equal to the first preset threshold are identified as non-bone tissue regions. The first preset threshold can be set according to actual conditions, for example, it can be set to 400 HU.
[0197] Step S30b: Perform morphological processing on the image of the bone tissue region to obtain a first image.
[0198] Specifically, a closing operation can be performed on the image of the bone tissue region—that is, dilation followed by erosion—to fill the tiny fractures and pores within the bone tissue, making the skull a completely sealed bone chamber. In a specific example, a spherical morphological structure operator with a radius of 3 mm is used to perform the closing operation on the image of the bone tissue region.
[0199] Step S30c: Perform hole-filling processing on the first image to obtain the second image. After bone tissue segmentation, some holes will inevitably exist in the first image. By performing hole-filling processing, all closed cavities can be filled.
[0200] Step S30d: Obtain an image of the bone cavity region based on the second image and the first image. In a specific implementation, the difference between the second image and the first image can be calculated to extract all closed bone cavities, thereby obtaining an image of the bone cavity region.
[0201] Step S30e: The largest connected region in the image of the bone cavity region is determined as the image of the brain region. Specifically, taking advantage of the characteristic that the skull surrounds the brain and that the skull is a nearly completely closed bone cavity, the largest connected region in the image of the bone cavity region is determined as the image of the brain region.
[0202] The brain segmentation method provided in this embodiment relies on the unique characteristics of the brain. Images of brain regions can be obtained through simple morphological processing. The processing is relatively fast and the results are relatively stable.
[0203] like Figure 10 As shown, this embodiment also provides a face orientation determination device 80, including a direction vector determination module 81, a distance determination module 82, and a face orientation determination module 83.
[0204] The direction vector determination module 81 is used to perform principal component analysis on the image of the brain region based on a first position to determine a first direction vector and a second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. The distance determination module 82 is used to determine, for the image of the brain region, the distances from voxels located on both sides of a first plane to the first plane and the distances from voxels located on both sides of a second plane to the second plane; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, and the second plane is a plane perpendicular to the second direction vector and passing through the first position. The face orientation determination module 83 is used to determine the face orientation based on the first position, the distances from voxels located on both sides of the first plane to the first plane, and the distances from voxels located on both sides of the second plane to the second plane.
[0205] In one optional implementation, the direction vector determination module is specifically used to perform principal component analysis on the image of the brain region with the first position as the origin, to obtain three orthogonal principal component direction vectors and the eigenvalues corresponding to each principal component direction vector; and to determine the principal component direction vector corresponding to the largest eigenvalue as the first direction vector, and to determine the principal component direction vector corresponding to the second largest eigenvalue as the second direction vector.
[0206] In one optional embodiment, the face orientation determination device further includes a bone tissue segmentation unit, a morphological processing unit, a hole-filling unit, a bone cavity extraction unit, and a brain region determination unit. The bone tissue segmentation unit performs bone tissue segmentation processing on the acquired medical image to obtain an image of the bone tissue region. The morphological processing unit performs morphological processing on the image of the bone tissue region to obtain a first image. The hole-filling unit performs hole-filling processing on the first image to obtain a second image. The bone cavity extraction unit obtains an image of the bone cavity region based on the second image and the first image. The brain region determination unit extracts the largest connected component in the image of the bone cavity region to obtain an image of the brain region.
[0207] Example 4
[0208] Figure 11 This is a flowchart illustrating a face image reconstruction method provided in this embodiment. The face image reconstruction method can be executed by a face image reconstruction device, which can be implemented through software and / or hardware. The face image reconstruction device can be part or all of an electronic device. In this embodiment, the electronic device can be a personal computer, such as a desktop computer, all-in-one computer, laptop computer, tablet computer, etc., or it can be a mobile phone, wearable device, PDA, or other terminal device. The face image reconstruction method provided in this embodiment is described below using an electronic device as the execution subject.
[0209] like Figure 11 As shown, the face image reconstruction method provided in this embodiment may include the following steps S41 to S43:
[0210] Step S41: Determine the face orientation using a face orientation determination method. Specifically, the face orientation can be determined using the face orientation determination method provided in Embodiment 1, Embodiment 2, or Embodiment 3.
[0211] Step S42: Perform head segmentation processing on the medical image to be processed to obtain an image of the head region. The image of the brain region is obtained based on the medical image to be processed.
[0212] In specific implementation, the medical image to be processed is the same as the medical image to be processed in Example 1, Example 2 or Example 3.
[0213] Step S43: Reconstruct the face image based on the image of the head region and the face orientation.
[0214] In this embodiment, the face orientation determination method provided in Embodiment 1, Embodiment 2 or Embodiment 3 can obtain an accurate face orientation, and has strong robustness and generalization. The determined face orientation and the image of the head region can be used to reconstruct an accurate face image. The overall reconstruction process is simple and efficient. Applying it to the facial structured light registration and registration scheme can effectively improve the accuracy and stability of the registration.
[0215] In one optional implementation, step S42 above includes the following steps S421 to S422:
[0216] Step S421: Perform human body segmentation processing on the medical image to be processed to obtain an image of the human body region.
[0217] In practice, a threshold segmentation method can be used to segment the human body in the medical image. Specifically, pixels with grayscale values greater than a second preset threshold are identified as belonging to the human body region, while pixels with grayscale values less than or equal to the second preset threshold are identified as non-human body regions. The second preset threshold can be set according to the actual situation, for example, it can be set to -300HU. Afterwards, morphological operations, connected component analysis, and hole filling are performed to obtain an image of the complete human body region.
[0218] In practice, other methods can also be used to obtain images of human body regions, such as segmentation methods based on neural networks and segmentation methods based on clustering.
[0219] Step S422: Using the first position as the center, filter the image of the human body region according to the equivalent radius of the brain region to obtain the image of the head region.
[0220] Specifically, the volume of a brain region can be determined based on an image of the brain region, and the radius of a sphere with the same volume as the brain region can be used as the equivalent radius R of the brain region. brain Because the brain is located in a specific position within the head, and there is a certain proportion between the size of the brain and the size of the head, in practical implementation, the first position used to characterize the central location of the brain region can be used as the center, with K1*R... brain To set a radius, the image of the human body region is filtered, retaining pixels within the set radius to obtain the image of the head region. Here, K1 is greater than 1, and its specific value can be set according to the actual situation, typically between 2 and 3.
[0221] In one alternative implementation, such as Figure 12 As shown, step S43 above includes the following steps S431 to S433:
[0222] Step S431: Perform head contour extraction processing on the image of the head region to obtain an image of the head contour region. In specific implementations, binary image contour extraction algorithms, morphological operations, gradient solving, and other methods can be used to obtain the image of the head contour region, which includes the outer contour of the entire head region.
[0223] Step S432: Perform face contour extraction processing on the image of the head contour region according to the face orientation to obtain the image of the face contour region.
[0224] In one optional implementation, step S432 specifically includes the following steps S432a to S432b:
[0225] Step S432a: Starting from the second position, determine the target point along the direction of the face; wherein, the second position is used to characterize the center position of the head region.
[0226] Specifically, a three-dimensional Cartesian coordinate system can be established within the three-dimensional space of the brain region image. This coordinate system includes an x-axis, a y-axis, and a z-axis. The average values of the x, y, and z coordinates of all voxels in the head region image are calculated, and these three average values are used as the x, y, and z coordinates of the second location, respectively. In some examples, the second location can also be referred to as the geometric center of the head.
[0227] In practice, the second position can be used as the starting point, and the direction of the face can be determined according to the equivalent radius R of the brain region. brain Determine the target point. In a specific example, the distance between the second position and the target point is K2*R. brain The value of K2 can be set according to the actual situation. K2 can be approximately equal to one-quarter of K1, and is generally taken as a value between 0.5 and 1.
[0228] Step S432b: Extract the region located on the third plane facing the side of the face in the image of the head contour region to obtain the image of the face contour region; wherein, the third plane is a plane that is perpendicular to the face orientation and passes through the target point.
[0229] In such Figure 13 In the example shown, with the second position O head Starting from the face facing V, face Determine the target point P cut , will be with the face facing V face Perpendicular to and passing through target point P cut The plane is defined as the third plane, such as Figure 13 L, the point cloud cutting surface cut As shown. The image of the head contour region is located at the point cloud cutting plane L.cut Facing towards the face V face The area on one side is the image of the facial contour area.
[0230] Step S433: Reconstruct the face image based on the image of the face contour region.
[0231] To make the reconstructed face image more complete, in a specific implementation, the image of the face contour region can be dilated to obtain a face edge image S that includes the face edges. faceedge Using the Marching Cube algorithm to extract face edge data from image S faceedge Within a defined region, isosurface reconstruction is performed on the CT values to obtain a face image. The reconstruction threshold can be set to the CT values of the face surface. Furthermore, post-processing can be applied to the reconstructed face image, such as finding the maximum connected component, to obtain the final face image.
[0232] In this embodiment, the image of the head contour region is first determined based on the image of the head region, then the image of the face contour region is determined based on the image of the head contour region and the face orientation, and finally the face image is reconstructed based on the image of the face contour region, thus enabling automatic reconstruction of the face image.
[0233] like Figure 14 As shown, this embodiment also provides a face image reconstruction device 90, including a face orientation determination module 91, a head segmentation processing module 92, and a face image reconstruction module 93. The face orientation determination module 91 is used to determine the face orientation using the face orientation determination method described in Embodiments 1, 2, or 3. The head segmentation processing module 92 is used to perform head segmentation processing on the medical image to be processed to obtain an image of the head region; wherein, the image of the brain region is obtained based on the medical image to be processed. The face image reconstruction module 93 is used to reconstruct a face image based on the image of the head region and the face orientation.
[0234] In one optional implementation, the head segmentation processing module is specifically used to perform human body segmentation processing on the medical image to be processed to obtain an image of the human body region; and to perform filtering processing on the image of the human body region based on the equivalent radius of the brain region, with the first position as the center, to obtain an image of the head region.
[0235] In one optional implementation, the face image reconstruction module includes a head contour extraction unit, a face contour extraction unit, and a face image reconstruction unit. The head contour extraction unit performs head contour extraction processing on the image of the head region to obtain an image of the head contour region. The face contour extraction unit performs face contour extraction processing on the image of the head contour region according to the face orientation to obtain an image of the face contour region. The face image reconstruction unit reconstructs a face image based on the image of the face contour region.
[0236] In one optional embodiment, the face contour extraction unit includes a target point determination subunit and a face contour extraction subunit. The target point determination subunit is used to determine a target point starting from a second position and along the face orientation; wherein the second position is used to characterize the center position of the head region. The face contour extraction subunit is used to extract the region located on the side of a third plane facing the face orientation from the image of the head contour region, obtaining an image of the face contour region; wherein the third plane is a plane perpendicular to the face orientation and passing through the target point.
[0237] In one alternative implementation, the target point determination subunit is specifically used to determine a target point based on the equivalent radius of the brain region, starting from the second position and along the direction of the face.
[0238] It should be noted that the face image reconstruction device in this embodiment can be a separate chip, chip module or electronic device, or it can be a chip or chip module integrated into an electronic device.
[0239] The various modules / units included in the face image reconstruction apparatus described in this embodiment may be software modules / units, hardware modules / units, or may be partially software modules / units and partially hardware modules / units.
[0240] Example 5
[0241] Figure 15 This is a schematic diagram of the structure of an electronic device provided in this embodiment. The electronic device includes at least one processor and a memory communicatively connected to the at least one processor. The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the face orientation determination method of Embodiment 1, Embodiment 2, or Embodiment 3, or the face image reconstruction method of Embodiment 4. The electronic device provided in this embodiment can be a personal computer, such as a desktop computer, all-in-one computer, laptop computer, tablet computer, etc., and can also be a mobile phone, wearable device, PDA, or other terminal device. Figure 15The electronic device 3 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0242] The components of the electronic device 3 may include, but are not limited to: at least one processor 4, at least one memory 5, and a bus 6 connecting different system components (including memory 5 and processor 4).
[0243] Bus 6 includes a data bus, an address bus, and a control bus.
[0244] The memory 5 may include volatile memory, such as random access memory (RAM) 51 and / or cache memory 52, and may further include read-only memory (ROM) 53.
[0245] The memory 5 may also include a program / utility 55 having a set (at least one) of program modules 54, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0246] The processor 4 executes various functional applications and data processing by running computer programs stored in the memory 5, such as the method for determining the face orientation in Embodiment 1, Embodiment 2 or Embodiment 3 above, or the method for reconstructing a face image in Embodiment 4.
[0247] Electronic device 3 can also communicate with one or more external devices 7 (e.g., keyboard, pointing device, etc.). This communication can be performed through input / output (I / O) interface 8. Furthermore, electronic device 3 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 9. Figure 12 As shown, network adapter 9 communicates with other modules of electronic device 3 via bus 6. It should be understood that, although... Figure 12 Not shown, it can be combined with electronic device 3 to use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0248] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0249] Example 6
[0250] This embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for determining the face orientation of Embodiment 1, Embodiment 2, or Embodiment 3, or the method for reconstructing a face image of Embodiment 4.
[0251] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.
[0252] In a possible implementation, the present invention can also be implemented as a program product comprising program code, which, when the program product is run on an electronic device, is used to cause the electronic device to execute the method for determining the face orientation of Embodiment 1, Embodiment 2 or Embodiment 3 or the method for reconstructing the face image of Embodiment 4.
[0253] The program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on an electronic device, partially on an electronic device, as a standalone software package, partially on an electronic device and partially on a remote device, or entirely on a remote device.
[0254] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but all such changes and modifications fall within the scope of protection of the present invention.
Claims
1. A method for determining the orientation of a human face, characterized in that, Includes the following steps: Principal component analysis is performed on the brain region image based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. For an image of the brain region, the anterior and posterior portions of the brain region are determined based on the distances from voxels located on either side of a first plane to the first plane; and the upper and lower portions of the brain region are determined based on the distances from voxels located on either side of a second plane to the second plane; wherein the first plane is a plane perpendicular to the first direction vector and passing through the first position, and the second plane is a plane perpendicular to the second direction vector and passing through the first position. Determining the face orientation based on at least one of the anterior and posterior brain regions, at least one of the upper and lower brain regions, and the first location specifically includes: using the first location as the origin of a coordinate system, determining a first coordinate axis based on at least one of the anterior and posterior brain regions, and determining a second coordinate axis based on at least one of the upper and lower brain regions; determining a face orientation vector based on a first vector on the first coordinate axis and a second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis; and determining the direction of the face orientation vector as the face orientation.
2. The method for determining the orientation of a person's face as described in claim 1, characterized in that, The step of performing principal component analysis on the brain region image based on the first location to determine the first direction vector and the second direction vector specifically includes: Principal component analysis was performed on the brain region image using the first position as the origin to obtain three orthogonal principal component direction vectors and the eigenvalues corresponding to each principal component direction vector. The principal component direction vector corresponding to the largest eigenvalue is determined as the first direction vector, and the principal component direction vector corresponding to the second largest eigenvalue is determined as the second direction vector.
3. The method for determining the orientation of a person's face as described in claim 1, characterized in that, The step of determining the anterior and posterior portions of the brain region based on the distances from voxels located on either side of the first plane to the first plane specifically includes: If the average distance from a voxel on the first side of the first plane to the first plane is greater than the average distance from a voxel on the second side of the first plane to the first plane, then the first side of the first plane is determined to be the anterior part of the brain region, and the second side of the first plane is determined to be the posterior part of the brain region.
4. The method for determining the orientation of a person's face as described in claim 1, characterized in that, The step of determining the upper and lower parts of the brain region based on the distances from the voxels located on either side of the second plane to the second plane specifically includes: If the average distance from the voxel on the first side of the second plane to the second plane is greater than the average distance from the voxel on the second side of the second plane to the second plane, then the first side of the second plane is determined to be the upper part of the brain region, and the second side of the second plane is determined to be the lower part of the brain region.
5. The method for determining the orientation of a person's face as described in any one of claims 1-4, characterized in that, The method for determining the orientation of the face also includes: The acquired medical images to be processed are segmented into bone tissue to obtain images of the bone tissue regions. Morphological processing is performed on the image of the bone tissue region to obtain a first image; The first image is filled with holes to obtain the second image; An image of the bone chamber region is obtained based on the second image and the first image; The image of the brain region is obtained by extracting the largest connected region from the image of the bone cavity region.
6. A method for determining the orientation of a human face, characterized in that, Includes the following steps: Principal component analysis is performed on the brain region image based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. For the image of the brain region, a first coordinate axis is determined based on the distance from the first position and the voxels located on both sides of the first plane to the first plane; and a second coordinate axis is determined based on the distance from the first position and the voxels located on both sides of the second plane to the second plane; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, the second plane is a plane perpendicular to the second direction vector and passing through the first position, and the first coordinate axis and the second coordinate axis intersect at the first position; Determining the face orientation based on the first coordinate axis and the second coordinate axis specifically includes: determining a face orientation vector based on a first vector on the first coordinate axis and a second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis; and determining the direction of the face orientation vector as the face orientation.
7. The method for determining the orientation of a face as described in claim 6, characterized in that, The step of performing principal component analysis on the brain region image based on the first location to determine the first direction vector and the second direction vector specifically includes: Principal component analysis was performed on the brain region image using the first position as the origin to obtain three orthogonal principal component direction vectors and the eigenvalues corresponding to each principal component direction vector. The principal component direction vector corresponding to the largest eigenvalue is determined as the first direction vector, and the principal component direction vector corresponding to the second largest eigenvalue is determined as the second direction vector.
8. The method for determining the orientation of a face as described in claim 6, characterized in that, The step of determining the first coordinate axis based on the distances from the voxels located on both sides of the first plane to the first position specifically includes: Based on the relationship between the average distance from the voxel on the first side of the first plane to the first plane and the average distance from the voxel on the second side of the first plane to the first plane, the first coordinate axis is determined with the first position as the origin.
9. The method for determining the orientation of a face as described in claim 6, characterized in that, The step of determining the second coordinate axis based on the distances from the voxels located on both sides of the first position to the second plane specifically includes: The second coordinate axis is determined with the first position as the origin based on the relationship between the average distance from the voxel on the first side of the second plane to the second plane and the average distance from the voxel on the second side of the second plane to the second plane.
10. The method for determining the orientation of a face as described in any one of claims 6-9, characterized in that, The method for determining the orientation of the face also includes: The acquired medical images to be processed are segmented into bone tissue to obtain images of the bone tissue regions. Morphological processing is performed on the image of the bone tissue region to obtain a first image; The first image is filled with holes to obtain the second image; An image of the bone chamber region is obtained based on the second image and the first image; The image of the brain region is obtained by extracting the largest connected region from the image of the bone cavity region.
11. A method for determining the orientation of a human face, characterized in that, Includes the following steps: Principal component analysis is performed on the brain region image based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. For the image of the brain region, the distances from voxels located on both sides of the first plane to the first plane and the distances from voxels located on both sides of the second plane to the second plane are determined; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, and the second plane is a plane perpendicular to the second direction vector and passing through the first position; Based on the first position, the distances from the voxels on both sides of the first plane to the first plane, and the distances from the voxels on both sides of the second plane to the second plane, the face orientation is determined, specifically including: determining a first coordinate axis based on the first position and the distances from the voxels on both sides of the first plane to the first plane; and determining a second coordinate axis based on the first position and the distances from the voxels on both sides of the second plane to the second plane; wherein the first coordinate axis and the second coordinate axis intersect at the first position; determining a face orientation vector based on a first vector on the first coordinate axis and a second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis; and determining the direction of the face orientation vector as the face orientation.
12. A method for reconstructing a human face image, characterized in that, Includes the following steps: The face orientation is determined using the face orientation determination method according to any one of claims 1-11; The head segmentation process is performed on the medical image to be processed to obtain an image of the head region; wherein, the image of the brain region is obtained based on the medical image to be processed; A face image is reconstructed based on the image of the head region and the face orientation.
13. The method for reconstructing a face image as described in claim 12, characterized in that, The step of performing head segmentation processing on the medical image to be processed to obtain an image of the head region specifically includes: The medical image to be processed is subjected to human body segmentation processing to obtain an image of the human body region; Centered on the first location, the image of the human body region is filtered according to the equivalent radius of the brain region to obtain the image of the head region.
14. The method for reconstructing a face image as described in claim 12, characterized in that, The step of reconstructing the face image based on the image of the head region and the face orientation specifically includes: The image of the head region is subjected to head contour extraction processing to obtain an image of the head contour region; Based on the face orientation, the image of the head contour region is processed to extract the face contour, thereby obtaining an image of the face contour region. Reconstruct the face image based on the image of the face contour region.
15. The method for reconstructing a face image as described in claim 14, characterized in that, The step of extracting the face contour from the image of the head contour region based on the face orientation to obtain an image of the face contour region specifically includes: Starting from the second position, a target point is determined along the direction of the face; wherein, the second position is used to characterize the center position of the head region; Extract the region located on the third plane facing the face orientation side from the image of the head contour region to obtain the image of the face contour region; wherein, the third plane is a plane perpendicular to the face orientation and passing through the target point.
16. The method for reconstructing a face image as described in claim 15, characterized in that, The step of determining the target point starting from the second position and along the direction of the face specifically includes: Starting from the second position, the target point is determined along the direction of the face based on the equivalent radius of the brain region.
17. A device for determining the orientation of a person's face, characterized in that, include: The direction vector determination module is used to perform principal component analysis on the image of the brain region based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. A brain orientation determination module is used to determine the anterior and posterior portions of a brain region based on the distances from voxels located on either side of a first plane to the first plane, and to determine the upper and lower portions of a brain region based on the distances from voxels located on either side of a second plane to the second plane, wherein the first plane is a plane perpendicular to the first direction vector and passing through the first position, the second plane is a plane perpendicular to the second direction vector and passing through the first position, and the first position is the intersection of the first direction vector and the second direction vector; A face orientation determination module is used to determine the face orientation based on at least one of the anterior and posterior parts of the brain region, at least one of the upper and lower parts of the brain region, and the first position. The face orientation determination module includes: A coordinate axis determination unit is used to determine a first coordinate axis with the first position as the origin of the coordinate system and based on at least one of the anterior part of the brain region and the posterior part of the brain region, and to determine a second coordinate axis based on at least one of the upper part of the brain region and the lower part of the brain region. A vector determination unit is used to determine a face orientation vector based on a first vector on the first coordinate axis and a second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis; An orientation determination unit is used to determine the direction of the face orientation vector as the face orientation.
18. A device for determining the orientation of a person's face, characterized in that, include: The direction vector determination module is used to perform principal component analysis on the image of the brain region based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. A coordinate axis determination module is used to determine a first coordinate axis for an image of the brain region based on the distances from the first position and voxels located on both sides of the first plane to the first plane; and to determine a second coordinate axis based on the distances from the first position and voxels located on both sides of the second plane to the second plane; wherein the first plane is a plane perpendicular to the first direction vector and passing through the first position, the second plane is a plane perpendicular to the second direction vector and passing through the first position, and the first coordinate axis and the second coordinate axis intersect at the first position; A face orientation determination module is used to determine the face orientation based on the first coordinate axis and the second coordinate axis; The face orientation determination module includes: A vector determination unit is used to determine a face orientation vector based on a first vector on the first coordinate axis and a second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis; An orientation determination unit is used to determine the direction of the face orientation vector as the face orientation.
19. A device for determining the orientation of a person's face, characterized in that, include: The direction vector determination module is used to perform principal component analysis on the image of the brain region based on the first position to determine the first direction vector and the second direction vector; wherein, the first position is used to characterize the center position of the brain region, the first direction vector is used to indicate the direction of the brain region from front to back or from back to front, and the second direction vector is used to indicate the direction of the brain region from top to bottom or from bottom to top. A distance determination module is used to determine, for an image of the brain region, the distances from voxels located on both sides of a first plane to the first plane and the distances from voxels located on both sides of a second plane to the second plane; wherein, the first plane is a plane perpendicular to the first direction vector and passing through the first position, and the second plane is a plane perpendicular to the second direction vector and passing through the first position. A face orientation determination module is used to determine the face orientation based on the first position, the distances from voxels located on both sides of the first plane to the first plane, and the distances from voxels located on both sides of the second plane to the second plane. Specifically, it is used to determine a first coordinate axis based on the first position and the distances from voxels located on both sides of the first plane to the first plane; and to determine a second coordinate axis based on the first position and the distances from voxels located on both sides of the second plane to the second plane; wherein the first coordinate axis and the second coordinate axis intersect at the first position; a face orientation vector is determined based on a first vector on the first coordinate axis and a second vector on the second coordinate axis; wherein the direction of the first vector is the same as the positive direction of the first coordinate axis, and the direction of the second vector is the same as the positive direction of the second coordinate axis; and the direction of the face orientation vector is determined as the face orientation.
20. A facial image reconstruction apparatus, characterized in that, include: A face orientation determination module is used to determine the face orientation using the face orientation determination method according to any one of claims 1-11; The head segmentation processing module is used to perform head segmentation processing on the medical image to be processed to obtain an image of the head region; wherein, the image of the brain region is obtained based on the medical image to be processed; A face image reconstruction module is used to reconstruct a face image based on the image of the head region and the face orientation.
21. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for determining the face orientation as described in any one of claims 1-11 or the method for reconstructing a face image as described in any one of claims 12-16.
22. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for determining the face orientation as described in any one of claims 1-11 or the method for reconstructing a face image as described in any one of claims 12-16.