Foresight path feature extraction method and device, electronic equipment and storage medium
By rotating and projecting the three-dimensional image of the forward-looking path into two dimensions, and combining it with a spatial rectangular coordinate system, the skeleton control points are recovered and fitted, thus achieving high-precision extraction of the structural features of the forward-looking path and solving the problem of low computational accuracy in existing methods.
Patent Information
- Application Number
- CN202410973968.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-19
AI Technical Summary
Existing methods for viewing the structural features of the forward-looking path map three-dimensional images onto a two-dimensional plane, resulting in low calculation accuracy and a tendency to misjudge eye health.
By acquiring brain images, constructing a spatial rectangular coordinate system, rotating and projecting the three-dimensional image of the forward vision path onto a two-dimensional plane, extracting two-dimensional skeleton points, recovering and fitting control points, obtaining the three-dimensional skeleton image of the forward vision path, and performing feature extraction.
It improves the accuracy of calculating the structural features of the forward-looking path, avoids the errors of directly using two-dimensional images for feature extraction, and enhances the accuracy of eye health status assessment.
Smart Images

Figure CN118968082A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of feature extraction technology, and in particular to a method and device for extracting forward-view road features, an electronic device, and a storage medium. Background Art
[0002] The anterior visual pathway refers to the optic nerve, optic chiasm and optic tract in the visual pathway. Changes in the structural characteristics of the anterior visual pathway are related to the health of the eye. However, the common method for viewing the structural characteristics of the anterior visual pathway is to map the three-dimensional image of the anterior visual pathway to a two-dimensional plane, and then extract the structural characteristics of the anterior visual pathway in the two-dimensional plane. This method easily leads to low calculation accuracy of the structural characteristics of the anterior visual pathway and easily misjudges the health of the eye. Therefore, how to improve the accuracy of calculating the structural characteristics of the anterior visual pathway has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a method and device for extracting forward-view road features, an electronic device, and a storage medium, aiming to improve the accuracy of calculating forward-view road structural features.
[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a method for extracting forward-looking road features, the method comprising:
[0005] Acquire a brain image, perform image segmentation on the brain image to obtain a three-dimensional image of the frontal path, and construct a spatial rectangular coordinate system, wherein the spatial rectangular coordinate system includes a first axis, a second axis, and a third axis, and the first axis, the second axis, and the third axis are perpendicular to each other;
[0006] Based on the two-dimensional projection plane formed by the first axis and the second axis, the three-dimensional image of the front vision path is rotated to obtain a rotated image of the front vision path;
[0007] Based on the two-dimensional projection plane, two-dimensionally project the forward vision path rotation image to obtain a forward vision path two-dimensional image;
[0008] Performing skeleton extraction on the two-dimensional image of the forward vision path to obtain two-dimensional skeleton points of the forward vision path;
[0009] Determining skeleton control points in the forward vision path rotation image based on the forward vision path two-dimensional skeleton points and the third axis;
[0010] Restoring the coordinates of the skeleton control points to obtain the forward vision path control points;
[0011] Based on the spatial rectangular coordinate system, the control points of the forward vision path are fitted to obtain a three-dimensional skeleton image of the forward vision path;
[0012] Based on the spatial rectangular coordinate system, feature extraction is performed on the three-dimensional skeleton image of the front view path to obtain feature data of the three-dimensional image of the front view path.
[0013] In some embodiments, rotating the three-dimensional image of the forward vision path based on the two-dimensional projection plane formed by the first axis and the second axis to obtain a rotated image of the forward vision path includes:
[0014] Constructing a reference plane of the three-dimensional image of the forward-view road to obtain a reference plane of the forward-view road;
[0015] Calculating the normal vector of the front sight road reference plane to obtain the reference plane normal vector;
[0016] Determine a forward vision path rotation matrix of the forward vision path three-dimensional image based on the reference normal vector and the two-dimensional projection surface;
[0017] Calculating the inverse matrix of the forward vision path rotation matrix to obtain the forward vision path rotation inverse matrix;
[0018] Based on the forward vision path rotation inverse matrix, the forward vision path three-dimensional image is rotated to obtain the forward vision path rotated image.
[0019] In some embodiments, the three-dimensional image of the forward view road includes a plurality of voxel points, and the step of constructing a reference plane of the three-dimensional image of the forward view road to obtain the reference plane of the forward view road includes:
[0020] Calculate the number of non-zero voxels within a preset target range centered at each of the voxel points;
[0021] Based on the number of non-zero voxels, three target voxel points are screened out from the plurality of voxels, wherein the number of non-zero voxels within the target range of the target voxel point is the least;
[0022] The front view road reference plane is constructed based on the three target voxel points.
[0023] In some embodiments, determining the skeleton control points in the forward vision path rotation image based on the forward vision path two-dimensional skeleton points and the third axis includes:
[0024] Based on the two-dimensional skeleton point of the forward sight path and the third axis, finding the three-dimensional skeleton axis of the forward sight path from the rotated image of the forward sight path, wherein the three-dimensional skeleton axis of the forward sight path is used to characterize the axis that forms the two-dimensional skeleton point of the forward sight path when projected onto the two-dimensional projection plane in the rotated image of the forward sight path;
[0025] The midpoint of the three-dimensional skeleton axis of the forward viewing path is used as the skeleton control point.
[0026] In some embodiments, fitting the forward vision path control points based on the spatial rectangular coordinate system to obtain a forward vision path three-dimensional skeleton image includes:
[0027] Based on the spatial rectangular coordinate system, coordinate marking is performed on the control points of the forward sight path to obtain the coordinates of the control points;
[0028] Based on the coordinates of the control points, curve fitting is performed on the forward vision path control points to obtain the three-dimensional skeleton image of the forward vision path.
[0029] In some embodiments, the control point coordinates include a first value, a second value, and a third value, and the curve fitting of the front sight control points based on the control point coordinates to obtain the front sight three-dimensional skeleton image includes:
[0030] Based on the first value, performing Bezier curve fitting on the forward vision path control point to obtain a first fitting curve, wherein the first fitting curve is used to represent a fitting curve of the forward vision path control point in the first axis direction;
[0031] Based on the second value, performing Bezier curve fitting on the forward vision path control point to obtain a second fitting curve, wherein the second fitting curve is used to characterize a fitting curve of the forward vision path control point in the second axis direction;
[0032] Based on the third value, performing Bezier curve fitting on the forward vision path control point to obtain a third fitting curve, wherein the third fitting curve is used to characterize a fitting curve of the forward vision path control point in the direction of a third axis;
[0033] The first fitting curve, the second fitting curve and the third fitting curve are combined to obtain the front view three-dimensional skeleton image.
[0034] In some embodiments, the forward-viewing road three-dimensional skeleton image includes a plurality of skeleton voxel points, and the feature extraction of the forward-viewing road three-dimensional skeleton image based on the spatial rectangular coordinate system to obtain feature data of the forward-viewing road three-dimensional image includes:
[0035] Based on the spatial rectangular coordinate system, generating the three-dimensional spatial coordinates of each of the skeleton voxel points;
[0036] Based on the three-dimensional space coordinates, calculating the transverse diameter of the three-dimensional skeleton image of the front vision path to obtain the transverse diameter of the front vision path;
[0037] Based on the three-dimensional space coordinates, calculating the visual path length of the three-dimensional skeleton image of the front visual path to obtain the front visual path length;
[0038] The forward sight path transverse diameter and the forward sight path length are combined to obtain the characteristic data.
[0039] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a forward-view road feature extraction device, the device comprising:
[0040] A front visual path cutting module is used to obtain a brain image, perform image cutting on the brain image, obtain a front visual path three-dimensional image, and construct a spatial rectangular coordinate system, wherein the spatial rectangular coordinate system includes a first axis, a second axis, and a third axis, and the first axis, the second axis, and the third axis are perpendicular to each other;
[0041] A forward vision path rotation module, configured to rotate the forward vision path three-dimensional image based on a two-dimensional projection plane formed by the first axis and the second axis to obtain a forward vision path rotated image;
[0042] A forward vision path projection module, configured to perform two-dimensional projection on the forward vision path rotation image based on the two-dimensional projection plane to obtain a two-dimensional image of the forward vision path;
[0043] A two-dimensional skeletonization module for the forward vision path is used to extract the skeleton of the two-dimensional image of the forward vision path to obtain two-dimensional skeleton points of the forward vision path;
[0044] A skeleton control point search module, used to determine the skeleton control points in the forward vision path rotation image based on the forward vision path two-dimensional skeleton points and the third axis;
[0045] A control point recovery module, used to restore the coordinates of the skeleton control points to obtain the forward vision path control points;
[0046] A three-dimensional skeleton image fitting module, used for fitting the control points of the forward sight path based on the spatial rectangular coordinate system to obtain a three-dimensional skeleton image of the forward sight path;
[0047] The forward vision path feature extraction module is used to extract features of the forward vision path three-dimensional skeleton image based on the spatial rectangular coordinate system to obtain feature data of the forward vision path three-dimensional image.
[0048] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0049] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0050] The frontal visual path feature extraction method and device, electronic device and storage medium proposed in the present application rotate the three-dimensional frontal visual path image obtained by cutting from the brain image to obtain a rotated frontal visual path image, and then project the rotated frontal visual path image onto a two-dimensional projection plane formed by a first axis and a second axis, thereby improving the convenience of projecting the three-dimensional frontal visual path image onto a two-dimensional plane, thereby improving the efficiency of frontal visual path feature extraction. Furthermore, based on the two-dimensional frontal visual path skeleton points in the two-dimensional frontal visual path image and the third axis of the constructed spatial rectangular coordinate system, the corresponding skeleton control points in the rotated frontal visual path image are searched, the skeleton control points are rotated and restored to obtain the positions of the frontal visual path control points in the three-dimensional frontal visual path image, and then the frontal visual path control points are fitted to obtain the three-dimensional frontal visual path skeleton image, thereby realizing the skeleton extraction of the three-dimensional frontal visual path image, avoiding the direct use of the two-dimensional frontal visual path image to extract the frontal visual path structural features, thereby improving the accuracy of calculating the frontal visual path structural features. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a flow chart of a method for extracting forward-looking road features provided in an embodiment of the present application;
[0052] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.
[0053] Figure 3 yes Figure 2 Flow chart of step S201 in FIG.
[0054] Figure 4 yes Figure 1 Flow chart of step S105 in FIG.
[0055] Figure 5 yes Figure 4 Flow chart of step S107 in FIG.
[0056] Figure 6 yes Figure 5 Flow chart of step S502 in FIG.
[0057] Figure 7 yes Figure 1 Flow chart of step S108 in FIG.
[0058] Figure 8 is a schematic diagram of the structure of a forward-viewing road feature extraction device provided in an embodiment of the present application;
[0059] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0063] First, some nouns involved in this application are analyzed:
[0064] Visual pathway: The visual pathway, also known as the visual pathway, is an important pathway connecting the retina and the visual center of the brain. It consists of two parts: the anterior visual pathway and the posterior visual pathway. Among them, the anterior visual pathway is mainly composed of the retina, optic nerve, optic chiasm and optic tract. The retina is a photosensitive structure that converts light signals into nerve signals after receiving light, and then the signals are transmitted to the brain through the optic nerve. The optic nerve is a nerve that transmits light signals from the eye to the brain. Some of the optical fibers will cross at the optic chiasm and then enter different areas of the brain to form visual images. The integrity of the anterior visual pathway is crucial for normal visual function. The posterior visual pathway mainly includes the lateral geniculate body, optic radiation and visual cortex. At the lateral geniculate body, the visual signal crosses with other sensory signals and is then transmitted to the visual cortex through the optic radiation, where it is further processed and interpreted, ultimately forming visual perception and cognition.
[0065] Anterior visual pathway: The anterior visual pathway is an important pathway connecting the retina and the visual center, and plays a key role in transmitting visual signals. It is composed of the optic nerve, optic chiasm and optic tract, and is an important link in the formation of vision. In addition, the lateral geniculate body, optic radiation and visual cortex are classified as the posterior visual pathway. The integrity of the anterior visual pathway is crucial to maintaining normal vision, because many eye and brain diseases, such as glaucoma, multiple sclerosis and orbital tumors, may lead to changes in the structure of the anterior visual pathway.
[0066] The anterior visual pathway refers to the optic nerve, optic chiasm and optic tract in the visual pathway. Changes in the structural characteristics of the anterior visual pathway are related to the health of the eye. However, the common method for viewing the structural characteristics of the anterior visual pathway is to map the three-dimensional image of the anterior visual pathway to a two-dimensional plane, and then extract the structural characteristics of the anterior visual pathway in the two-dimensional plane. This method easily leads to low calculation accuracy of the structural characteristics of the anterior visual pathway and easily misjudges the health of the eye. Therefore, how to improve the accuracy of calculating the structural characteristics of the anterior visual pathway has become a technical problem that needs to be solved urgently.
[0067] Based on this, the embodiments of the present application provide a method and device for extracting forward-view road features, an electronic device, and a storage medium, aiming to improve the accuracy of calculating forward-view road structural features.
[0068] The forward-view road feature extraction method and device, electronic device, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the forward-view road feature extraction method in the embodiments of the present application is described.
[0069] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0070] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0071] The forward sight path feature extraction method provided in the embodiment of the present application relates to the field of microwave engineering technology. The forward sight path feature extraction method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the forward sight path feature extraction method, etc., but is not limited to the above forms.
[0072] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0073] Figure 1 is an optional flow chart of the forward visual path feature extraction method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S108.
[0074] Step S101, acquiring a brain image, performing image segmentation on the brain image to obtain a three-dimensional image of the frontal path, and constructing a spatial rectangular coordinate system, wherein the spatial rectangular coordinate system includes a first axis, a second axis, and a third axis, and the first axis, the second axis, and the third axis are perpendicular to each other;
[0075] Step S102, rotating the three-dimensional image of the forward vision path based on the two-dimensional projection plane formed by the first axis and the second axis to obtain a rotated image of the forward vision path;
[0076] Step S103, performing two-dimensional projection on the forward sight path rotation image based on the two-dimensional projection plane to obtain a two-dimensional image of the forward sight path;
[0077] Step S104, performing skeleton extraction on the two-dimensional image of the forward view path to obtain two-dimensional skeleton points of the forward view path;
[0078] Step S105, determining the skeleton control points in the forward vision path rotation image based on the forward vision path two-dimensional skeleton points and the third axis;
[0079] Step S106, restoring the coordinates of the skeleton control points to obtain the forward view control points;
[0080] Step S107, fitting the control points of the forward vision path based on the spatial rectangular coordinate system to obtain a three-dimensional skeleton image of the forward vision path;
[0081] Step S108, based on the spatial rectangular coordinate system, feature extraction is performed on the three-dimensional skeleton image of the front view path to obtain feature data of the three-dimensional image of the front view path.
[0082] In the steps S101 to S108 shown in the embodiment of the present application, a three-dimensional image of the frontal visual path is obtained by performing image segmentation on the acquired brain image, and a spatial rectangular coordinate system including a first axis, a second axis and a third axis is arbitrarily constructed in the space where the three-dimensional image of the frontal visual path is located. Furthermore, the plane formed by the first axis and the second axis is used as a two-dimensional projection surface, and based on the two-dimensional projection surface, the three-dimensional image of the frontal visual path is rotated so that the rotated image of the frontal visual path after the three-dimensional image of the frontal visual path can be simply and conveniently projected onto the two-dimensional projection surface to obtain the two-dimensional image of the frontal visual path, and then the frontal visual path is extracted. The skeleton of the two-dimensional image is obtained to obtain the two-dimensional skeleton points of the front sight path in the two-dimensional image of the front sight path. Secondly, along the third axis of the spatial rectangular coordinate system, the skeleton control points corresponding to the two-dimensional skeleton points of the front sight path are determined from the forward sight path rotated image, and then the skeleton control points are restored to the three-dimensional image of the front sight path to obtain the front sight path control points. Finally, according to the positions of the front sight path control points in the spatial rectangular coordinate system, they are fitted to obtain the three-dimensional skeleton image of the front sight path. Then, according to the positions of the forward sight path control points in the spatial rectangular coordinate system, the features of the three-dimensional skeleton image of the front sight path are extracted to obtain the feature data of the three-dimensional image of the front sight path. Therefore, the present application rotates the three-dimensional image of the frontal path obtained by cutting from the brain image to obtain a rotated image of the frontal path, and then projects the rotated image of the frontal path into a two-dimensional projection plane formed by the first axis and the second axis. This can improve the convenience of projecting the three-dimensional image of the frontal path onto a two-dimensional plane, thereby improving the efficiency of frontal path feature extraction. Furthermore, based on the two-dimensional skeleton points of the frontal path in the two-dimensional image of the frontal path and the third axis of the constructed spatial rectangular coordinate system, the corresponding skeleton control points in the rotated image of the frontal path are searched, the skeleton control points are rotated and restored to obtain the positions of the frontal path control points in the three-dimensional image of the frontal path, and then the frontal path control points are fitted to obtain the three-dimensional skeleton image of the frontal path, thereby realizing the skeleton extraction of the three-dimensional image of the frontal path, avoiding directly using the two-dimensional image of the frontal path to extract the structural features of the frontal path, thereby improving the accuracy of calculating the structural features of the frontal path.
[0083] In an application scenario, taking the calculation of the visual path length of the foresight path as an example, the prior art usually uses a two-dimensional image of the foresight path projected onto a two-dimensional plane to calculate the visual path length, and does not fully consider the structure of the foresight path in three-dimensional space. Therefore, the visual path length calculated using the two-dimensional image of the foresight path is not accurate enough. The present application can project the rotated image of the foresight path after the three-dimensional image of the foresight path is rotated onto a pre-constructed two-dimensional plane to obtain the two-dimensional plane of the foresight path, and then skeletonize the two-dimensional plane of the foresight path to obtain the skeleton points of the foresight path in the two-dimensional plane, and then search for the skeleton control points in the rotated image of the foresight path based on the skeleton points. Furthermore, after determining the skeleton control points, the skeleton control points are reversely rotated to obtain the positions of the skeleton control points in the three-dimensional image of the foresight path, i.e., the three-dimensional control points of the foresight path, and then the three-dimensional foresight path and the control points in the three-dimensional image of the foresight path are fitted to obtain the three-dimensional skeleton image of the foresight path, thereby providing a three-dimensional skeleton image of the foresight path for the calculation of the visual path length of the foresight path, thereby improving the accuracy of the calculation of the visual path length in the foresight path.
[0084] In step S101 of some embodiments, the brain image may be a complete brain MRI scan image. By performing an MRI scan on the user's brain, the user's brain image can be obtained, and then the obtained brain image is cut or feature extracted by using a three-dimensional U-shaped network to obtain a three-dimensional image of the user's frontal vision path. After obtaining the three-dimensional image of the frontal vision path, a spatial rectangular coordinate system including a first axis, a second axis, and a third axis is constructed in the space where the three-dimensional image of the frontal vision path is located, so as to facilitate the coordinate construction of the three-dimensional image of the frontal vision path and reduce the difficulty of extracting the features of the frontal vision path.
[0085] In step S102 of some embodiments, the two-dimensional projection plane refers to a plane that is in the same plane as the first axis and the second axis in the control rectangular coordinate system. The reference plane of the three-dimensional image of the front view path is determined by a pre-set rule, and then the rotation angle of the three-dimensional image of the front view path is determined according to the reference plane, and the three-dimensional image of the front view path is rotated according to the rotation angle to obtain a rotated image of the front view path.
[0086] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S205:
[0087] Step S201, constructing a reference plane of the three-dimensional image of the front view road to obtain the reference plane of the front view road;
[0088] Step S202, calculating the normal vector of the front view road reference plane to obtain the reference plane normal vector;
[0089] Step S203, determining a forward vision path rotation matrix of the forward vision path three-dimensional image based on the reference normal vector;
[0090] Step S204, calculating the inverse matrix of the forward view path rotation matrix to obtain the forward view path rotation inverse matrix;
[0091] Step S205 , performing image rotation on the front vision path three-dimensional image based on the front vision path rotation inverse matrix to obtain a front vision path rotated image.
[0092] In step S201 of some embodiments, the reference plane refers to a plane formed by at least three points in the three-dimensional image of the front view road. The front view road reference plane is obtained by clarifying at least three points in the three-dimensional image of the front view road and then constructing a reference plane of the three-dimensional image of the front view road based on the at least three points clarified in the three-dimensional image of the front view road.
[0093] Specifically, see Figure 3 In some embodiments, step S201 may include but is not limited to steps S301 to S303:
[0094] Step S301, calculating the number of non-zero voxels within a preset target range centered at each voxel point;
[0095] Step S302, based on the number of non-zero voxels, three target voxel points are screened out from the multiple voxels, wherein the target voxel point has the least number of non-zero voxels within the target range;
[0096] Step S303: construct a front view road reference plane based on the three target voxel points.
[0097] In step S301 of some embodiments, the voxel point is a point existing in the three-dimensional image. The preset target range may be a cube range with a side length of N×N×N centered on any voxel point in the three-dimensional image. For example, the preset range may be a cube range with a side length of 3×3×3 centered on any voxel point in the three-dimensional image of the front sight path. The number of non-zero voxels refers to the number of voxel points that contain the front sight path in the three-dimensional space where the three-dimensional image of the front sight path is located. The number of non-zero voxels is obtained by calculating the number of non-zero voxel points in the target range centered on each voxel point in the three-dimensional image of the front sight path.
[0098] In step S302 of some embodiments, when the number of non-zero voxels within the target range of each voxel point in the forward-viewing path three-dimensional image is obtained, three voxel points with the smallest number of non-zero voxels are selected from all voxel points as target voxel points.
[0099] It should be noted that, according to the three-dimensional structural characteristics of the forward vision path, the three target voxel points in this application should be three points among the four endpoints of the forward vision path.
[0100] In step S303 of some embodiments, based on the principle that three points can determine a plane, the reference plane of the forward sight path is determined according to the three target voxel points to obtain the reference plane of the forward sight path.
[0101] In steps S301 to S303 shown in this embodiment, by calculating the number of non-zero voxels within the target range in the three-dimensional image of the forward sight road, three voxel points are selected from multiple voxel points to construct a forward sight road reference plane, and a reference plane is selected for the two-dimensional projection of the three-dimensional image of the forward sight road. This can improve the efficiency of the two-dimensional projection of the three-dimensional image of the forward sight road, thereby improving the efficiency of the forward sight road feature extraction.
[0102] In steps S202 to S204 of some embodiments, the normal vector of the front sight road reference plane can be calculated by the normal vector calculation formula to obtain the reference plane normal vector, and then any straight line perpendicular to the reference plane normal vector is selected as the rotation axis of the front sight road three-dimensional image, and the front sight road rotation matrix of the front sight road three-dimensional image is determined based on the angle between the rotation axis and the two-dimensional projection plane formed by the first axis and the second axis in the spatial rectangular coordinate system, and then the inverse matrix of the forward sight road rotation matrix is calculated to obtain the forward sight road rotation inverse matrix.
[0103] In step S205 of some embodiments, the obtained forward vision path rotation inverse matrix is used as a difference matrix, and the forward vision path three-dimensional image is rotated using a spatial difference method to obtain a forward vision path rotated image.
[0104] In steps S201 to S205 shown in the present embodiment, a front sight reference plane of the front sight three-dimensional image is constructed, and then the reference plane normal vector of the front sight reference plane is calculated, and the front sight rotation matrix of the front sight three-dimensional image is determined according to the reference normal vector and the two-dimensional projection plane, thereby obtaining a front sight rotation inverse matrix that can be used to rotate the front sight three-dimensional image using a spatial difference method. Finally, the obtained front sight rotation inverse matrix is used as a difference matrix, and the three-dimensional image is rotated using a spatial difference method to obtain a front sight rotated image. This allows the front sight rotated image obtained by rotating the three-dimensional image to be more convenient for two-dimensional projection, thereby reducing the complexity and difficulty of front sight feature extraction and improving the efficiency of front sight feature extraction.
[0105] In step S103 of some embodiments, the third coordinate of each voxel point in the forward-viewing path rotation image is converted to 0, thereby realizing the two-dimensional projection of the forward-viewing path rotation image onto the two-dimensional projection plane, and obtaining the forward-viewing path two-dimensional image. For example, there are voxel points 1 (1, 2, 3) and voxel points (2, 3, 4) in the forward-viewing path rotation image. Based on the two-dimensional projection of voxel points 1 and voxel points 2 on the two-dimensional projection plane formed by the first axis and the second axis, the projection point coordinates of voxel point 1 can be obtained as (1, 2), and the projection point coordinates of voxel point 2 can be obtained as (2, 3).
[0106] In step S104 of some embodiments, the skeleton of the front view two-dimensional image may be extracted by methods such as refinement iterative algorithm, distance field conversion and medial axis change, so as to obtain the front view two-dimensional skeleton points of the front view two-dimensional image.
[0107] In step S105 of some embodiments, after obtaining the two-dimensional skeleton points of the front view path of the two-dimensional image of the front view path, the skeleton control points in the rotated image of the front view path are queried along the third axis in the spatial rectangular coordinate system.
[0108] See also Figure 4 In some embodiments, step S105 may include but is not limited to steps S401 to S402:
[0109] Step S401, based on the two-dimensional skeleton points of the front sight path and the third axis, finding the three-dimensional skeleton axis of the front sight path from the rotated image of the front sight path, wherein the three-dimensional skeleton axis of the front sight path is used to characterize the axis that forms the two-dimensional skeleton points of the front sight path when projected onto the two-dimensional projection plane in the rotated image of the front sight path;
[0110] Step S402: taking the midpoint of the 3D skeleton axis of the front view path as a skeleton control point.
[0111] In step S401 of some embodiments. This application uses vertical projection when projecting the forward sight path rotation matrix into the two-dimensional projection plane formed by the first axis and the second axis. Therefore, it is only necessary to determine the two-dimensional skeleton point of the forward sight path in the two-dimensional image of the forward sight path, and then it is possible to find the intersection line segment of the third axis straight line where the two-dimensional skeleton point of the forward sight path is located and the forward sight path rotation image along the third axis, that is, the three-dimensional skeleton axis of the forward sight path that forms the two-dimensional skeleton point of the forward sight path when the forward sight path rotation image is projected onto the two-dimensional projection plane.
[0112] In step S402 of some embodiments, the midpoint of the three-dimensional skeleton axis of the forward viewing path is calculated according to the length of the three-dimensional skeleton axis of the forward viewing path, and the midpoint is used as the skeleton control point of the forward viewing path rotation matrix.
[0113] In steps S401 to S402 shown in this embodiment, by finding the three-dimensional skeleton axis of the front sight path along the third axis, and then using the midpoint of the three-dimensional skeleton axis of the front sight path as the skeleton control point, the position of the two-dimensional skeleton point of the front sight path in the rotated image of the front sight path can be obtained, thereby realizing the construction of the two-dimensional skeleton of the front sight path into three dimensions.
[0114] In step S106 of some embodiments, the forward sight path rotated image is a forward sight path three-dimensional image obtained by rotating the forward sight path three-dimensional image based on the forward sight path rotation inverse matrix. Therefore, the forward sight path rotation inverse matrix can be used to calculate the coordinates of the skeleton control points in the forward sight path rotated image in the forward sight path three-dimensional image, thereby obtaining the forward sight path control points.
[0115] In step S107 of some embodiments, after obtaining the forward view path control points in the forward view path three-dimensional image, the forward view path control points are annotated according to the constructed spatial rectangular coordinate system to obtain the spatial coordinates of the forward view path control points, and then curve fitting is performed on the forward view path control points according to the spatial coordinates of the forward view path control points to obtain the forward view path three-dimensional skeleton image.
[0116] See also Figure 5 In some embodiments, step S107 may include but is not limited to steps S501 to S502:
[0117] Step S501, based on a spatial rectangular coordinate system, coordinate marking is performed on the control points of the forward sight path to obtain the coordinates of the control points;
[0118] Step S502: Based on the coordinates of the control points, curve fitting is performed on the front view control points to obtain a three-dimensional skeleton image of the front view.
[0119] In step S501 of some embodiments, coordinates are assigned to the forward vision path control points based on a spatial rectangular coordinate system to obtain the spatial coordinates of each forward vision path control point, ie, the control point coordinates.
[0120] In step S502 of some embodiments, after obtaining the control point coordinates of each forward sight path control point, curve fitting is performed on the forward sight path control point in the three directions represented by the control point coordinates to obtain three fitting curves, and then the three fitting curves are merged to obtain a three-dimensional skeleton image of the forward sight path.
[0121] See also Figure 6 In some embodiments, step S502 may include but is not limited to steps S601 to S604:
[0122] Step S601, performing Bezier curve fitting on the forward vision path control point based on the first value to obtain a first fitting curve, wherein the first fitting curve is used to represent a fitting curve of the forward vision path control point in the first axis direction;
[0123] Step S602: performing Bezier curve fitting on the forward vision path control point based on the second value to obtain a second fitting curve, wherein the second fitting curve is used to represent a fitting curve of the forward vision path control point in the second axis direction;
[0124] Step S603, performing Bezier curve fitting on the forward vision path control point based on the third value to obtain a third fitting curve, wherein the third fitting curve is used to represent a fitting curve of the forward vision path control point in the direction of the third axis;
[0125] Step S604 , combining the first fitting curve, the second fitting curve and the third fitting curve to obtain a front view three-dimensional skeleton image.
[0126] In steps S601 to S603 of some embodiments, by performing Bezier curve fitting on the first value in the coordinates of each control point, a first fitting curve in the first axis direction of all forward sight path control points can be obtained. Similarly, Bezier curve fitting is performed on the second value in the coordinates of each control point to obtain a second fitting curve, and Bezier curve fitting is performed on the third value in the coordinates of each control point to obtain a third fitting curve.
[0127] It is important to know that before performing curve fitting on the forward sight path control points, the forward sight path control points need to be numbered and marked to obtain the control point index of the forward sight path control points. Furthermore, in order to facilitate Bezier curve fitting on the forward sight path control points, the forward sight path control points can be numbered and marked starting from 0. For example, according to the positions of the four forward sight path control points in the forward sight path three-dimensional image, the four forward sight path control points are numbered and marked to obtain the control point index of the starting forward sight path control point as 0, the control point index of the second forward sight path control point as 1, the control point index of the third forward sight path control point as 2, and the control point index of the last forward sight path control point as 3.
[0128] Specifically, the expressions of the first fitting curve, the second fitting curve and the third fitting curve are as follows:
[0129]
[0130] in, represents the first fitting curve, represents the second fitting curve, represents the third fitting curve, i represents the control point index of the forward visual path control point, n represents the number of forward visual path control points, t represents the parameter value, and x i The first value of the control point coordinates of the foresight control point with control point index i, y i The second value representing the control point coordinates of the foresight control point with control point index i, z i The third value representing the control point coordinates of the foresight control point with control point index i.
[0131] It should be noted that the parameter value t in the first fitting curve, the second fitting curve and the third fitting curve has a value range of [0, 1].
[0132] In step S604 of some embodiments, by merging the first fitting curve, the second fitting curve and the third fitting curve, a skeleton curve in the forward-viewing road three-dimensional image, ie, the forward-viewing road three-dimensional skeleton image, can be obtained.
[0133] It should be noted that by dividing the front visual path control points into the left optic nerve area, the right optic nerve area, the optic chiasm area, the left optic tract area and the right optic tract area, and then using the four endpoints of the front visual path control points as fixed anchor points of the left optic nerve area, the right optic nerve area, the left optic tract area and the right optic tract area for curve fitting, and using the two endpoints in the optic chiasm area as fixed anchor points of the optic chiasm area for curve fitting, the three-dimensional skeleton image of the front visual path can be more closely aligned with the actual front visual path skeleton structure.
[0134] In steps S601 to S604 shown in the present embodiment, Bezier curve fitting is performed on the first value, the second value and the third value in the coordinates of each control point respectively to obtain the first fitting curve, the second fitting curve and the third fitting curve, and then the first fitting curve, the second fitting curve and the third fitting curve are merged to obtain a three-dimensional skeleton image of the front sight road, thereby realizing the construction of the three-dimensional skeleton of the front sight road, making the structural features of the front sight road clearer and more in line with the skeleton structure of the front sight road in reality, thereby improving the effectiveness of the extracted forward sight road features and the accuracy of calculating the structural features of the forward sight road.
[0135] In steps S501 to S502 shown in the present embodiment, the coordinates of the forward sight path control points are marked based on the constructed spatial rectangular coordinate system to obtain the control point coordinates of each forward sight path control point, and then curve fitting is performed on the forward sight path control points in the forward sight path three-dimensional image according to the control point coordinates, so that a forward sight path three-dimensional skeleton image that fits the actual situation can be obtained, thereby improving the accuracy of calculating the structural features of the forward sight path.
[0136] In step S108 of some embodiments, after obtaining the three-dimensional skeleton image of the forward view path, the three-dimensional coordinates of each skeleton voxel point in the three-dimensional skeleton image of the forward view path can be generated according to the constructed spatial rectangular coordinate system, and then based on the three-dimensional coordinates of each point, the three-dimensional skeleton image of the forward view path can be feature extracted to obtain feature data of the three-dimensional image of the forward view path, wherein the skeleton voxel point represents the voxel point in the three-dimensional skeleton image of the forward view path.
[0137] It should be noted that the characteristic data of the three-dimensional image of the forward vision path includes the transverse diameter of the forward vision path and the visual path length of the forward vision path.
[0138] See also Figure 7 In some embodiments, step S108 includes but is not limited to steps S701 to S704:
[0139] Step S701, generating the three-dimensional space coordinates of each skeleton voxel point based on a spatial rectangular coordinate system;
[0140] Step S702, calculating the transverse diameter of the three-dimensional skeleton image of the front view path based on the three-dimensional space coordinates to obtain the transverse diameter of the front view path;
[0141] Step S703, calculating the visual path length of the three-dimensional skeleton image of the front visual path based on the three-dimensional space coordinates to obtain the front visual path length;
[0142] Step S704, combining the front sight path transverse diameter and the front sight path length to obtain feature data.
[0143] In step S701 of some embodiments, coordinates are assigned to skeleton voxel points in the three-dimensional skeleton image of the front view path according to the constructed spatial rectangular coordinate system, so that the three-dimensional coordinates of the skeleton voxel points, that is, the three-dimensional space coordinates, can be obtained.
[0144] In step S702 and step S703 of some embodiments, the transverse diameter refers to the length of the cross section of the front visual path. The visual path length refers to the length of the visual segment selected in the front visual path. According to the three-dimensional spatial coordinates of each skeleton voxel point, the transverse diameter of the three-dimensional skeleton image of the front visual path and the visual path length can be calculated, thereby obtaining the transverse diameter and the length of the front visual path.
[0145] It should be noted that in order to calculate the forward vision path transverse diameter of the cross section selected in the forward vision path three-dimensional skeleton image and the visual path length of the selected visual segment, it is necessary to number and mark the skeleton voxel points to obtain the voxel index of the skeleton voxel points. Because the skeleton voxel points are three-dimensional space points, the skeleton voxel points can be numbered and marked in the horizontal plane according to the structural characteristics of the three-dimensional space and the constructed three-dimensional space rectangular coordinate system to obtain the voxel horizontal index, and the skeleton voxel points can be numbered and marked in the vertical plane to obtain the voxel vertical index. The voxel horizontal index and the voxel vertical index together constitute the voxel index. In the figure, the horizontal plane refers to the plane formed by the first axis and the second axis, and the vertical plane refers to the plane formed by the first axis and the third axis. For example, the voxel index of skeleton voxel point 1 with three-dimensional spatial coordinates (1,1,2) is (1,2), and 1 in the voxel index is the voxel vertical index of skeleton voxel point 1, and 2 in the voxel index is the voxel horizontal index of skeleton voxel point 1. Then, the voxel index of skeleton voxel point 2 with three-dimensional spatial coordinates (2,1,3) can be (1,3), and the voxel index of skeleton voxel point 3 with three-dimensional spatial coordinates (2,2,2) can be (2,2).
[0146] Specifically, the following formula can be used to calculate the transverse diameter and length of the forward sight path:
[0147]
[0148] Where r represents the transverse diameter of the frontal path, l represents the length of the frontal path, n represents the number of skeleton voxel points of the cross section of the frontal path in the three-dimensional skeleton image of the frontal path, i represents the voxel vertical index of the skeleton voxel point, j represents the voxel horizontal index of the skeleton voxel point, and t i,jrepresents the three-dimensional spatial coordinates of the skeleton voxel point with voxel vertical index i and voxel horizontal index j, p j represents the control point coordinates of the forward vision control points of the cross section intercepted by the forward vision path in the forward vision path three-dimensional skeleton image, m represents the number of forward vision control points of the selected visual segment of the forward vision path in the forward vision path three-dimensional skeleton image, and p i,j Represents the control point coordinates of the front view control point with voxel horizontal index j on the cross section with voxel vertical index i.
[0149] In step S704 of some embodiments, feature data of a three-dimensional image of the forward vision path can be obtained by combining the transverse diameter of the forward vision path and the length of the forward vision path.
[0150] In steps S701 to S704 shown in this embodiment, by extracting features from the three-dimensional skeleton image of the front sight path, the accuracy of the extracted front sight path features can be improved compared to directly extracting features from the two-dimensional skeleton image of the front sight path.
[0151] The present application rotates the three-dimensional image of the frontal path obtained by cutting from the brain image to obtain a rotated image of the frontal path, and then projects the rotated image of the frontal path into a two-dimensional projection plane formed by a first axis and a second axis. This can improve the convenience of projecting the three-dimensional image of the frontal path onto a two-dimensional plane, thereby improving the efficiency of extracting features from the frontal path. Furthermore, based on the two-dimensional skeleton points of the frontal path in the two-dimensional image of the frontal path and the third axis of the constructed spatial rectangular coordinate system, the corresponding skeleton control points in the rotated image of the frontal path are searched, the skeleton control points are rotated and restored to obtain the positions of the frontal path control points in the three-dimensional image of the frontal path, and then the frontal path control points are fitted to obtain the three-dimensional skeleton image of the frontal path, thereby realizing the skeleton extraction of the three-dimensional image of the frontal path, avoiding directly using the two-dimensional image of the frontal path to extract the structural features of the frontal path, thereby improving the accuracy of calculating the structural features of the frontal path.
[0152] See also Figure 8 The embodiment of the present application further provides a forward-viewing road feature extraction device, which can implement the forward-viewing road feature extraction method described above, and the device includes:
[0153] The front visual path cutting module 801 is used to obtain a brain image, perform image cutting on the brain image, obtain a front visual path three-dimensional image, and construct a spatial rectangular coordinate system, wherein the spatial rectangular coordinate system includes a first axis, a second axis, and a third axis, and the first axis, the second axis, and the third axis are perpendicular to each other;
[0154] A front sight path rotation module 802 is used to rotate the three-dimensional image of the front sight path based on the two-dimensional projection plane formed by the first axis and the second axis to obtain a rotated image of the front sight path;
[0155] A forward vision path projection module 803 is used to perform two-dimensional projection on the forward vision path rotation image based on a two-dimensional projection plane to obtain a two-dimensional image of the forward vision path;
[0156] A forward vision path two-dimensional skeletonization module 804 is used to extract the skeleton of the forward vision path two-dimensional image to obtain the forward vision path two-dimensional skeleton points;
[0157] A skeleton control point search module 805 is used to determine the skeleton control points in the forward vision path rotation image based on the forward vision path two-dimensional skeleton points and the third axis;
[0158] A control point recovery module 806 is used to recover the coordinates of the skeleton control points to obtain the forward vision path control points;
[0159] A three-dimensional skeleton image fitting module 807 is used to fit the control points of the front sight path based on a spatial rectangular coordinate system to obtain a three-dimensional skeleton image of the front sight path;
[0160] The forward-viewing path feature extraction module 808 is used to extract features of the forward-viewing path three-dimensional skeleton image based on a spatial rectangular coordinate system to obtain feature data of the forward-viewing path three-dimensional image.
[0161] The specific implementation of the forward-view road feature extraction device is basically the same as the specific implementation example of the forward-view road feature extraction method described above, and will not be repeated here.
[0162] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned forward visual road feature extraction method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0163] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0164] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0165] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the forward visual path feature extraction method of the embodiment of this application;
[0166] Input / output interface 903, used to implement information input and output;
[0167] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
[0168] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0169] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0170] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned forward visual path feature extraction method is implemented.
[0171] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0172] The embodiments of the present application provide a method for extracting features of a front vision path, a device for extracting features of a front vision path, an electronic device, and a storage medium. The method rotates a three-dimensional image of a front vision path obtained by cutting a brain image to obtain a rotated image of the front vision path, and then projects the rotated image of the front vision path onto a two-dimensional projection plane formed by a first axis and a second axis. This can improve the convenience of projecting the three-dimensional image of the front vision path onto a two-dimensional plane, thereby improving the efficiency of extracting features of the front vision path. Furthermore, based on the two-dimensional skeleton points of the front vision path in the two-dimensional image of the front vision path and the third axis of the constructed spatial rectangular coordinate system, the corresponding skeleton control points in the rotated image of the front vision path are searched, the skeleton control points are rotated and restored to obtain the positions of the front vision path control points in the three-dimensional image of the front vision path, and then the front vision path control points are fitted to obtain the three-dimensional skeleton image of the front vision path, thereby realizing the skeleton extraction of the three-dimensional image of the front vision path, avoiding the direct use of the two-dimensional image of the front vision path to extract the structural features of the front vision path, thereby improving the accuracy of calculating the structural features of the front vision path.
[0173] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0174] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0175] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0176] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0177] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0178] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0179] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0180] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0181] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0182] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0183] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for extracting forward-view road features. It is characterized in that The method comprises: Acquire a brain image, perform image segmentation on the brain image to obtain a three-dimensional image of the frontal path, and construct a spatial rectangular coordinate system, wherein the spatial rectangular coordinate system includes a first axis, a second axis, and a third axis, and the first axis, the second axis, and the third axis are perpendicular to each other; Based on the two-dimensional projection plane formed by the first axis and the second axis, the three-dimensional image of the front vision path is rotated to obtain a rotated image of the front vision path; Based on the two-dimensional projection plane, two-dimensionally project the forward vision path rotation image to obtain a forward vision path two-dimensional image; Performing skeleton extraction on the two-dimensional image of the forward vision path to obtain two-dimensional skeleton points of the forward vision path; Determining skeleton control points in the forward vision path rotation image based on the forward vision path two-dimensional skeleton points and the third axis; Restoring the coordinates of the skeleton control points to obtain the forward vision path control points; Based on the spatial rectangular coordinate system, fitting the control points of the forward vision path to obtain a three-dimensional skeleton image of the forward vision path; Based on the spatial rectangular coordinate system, feature extraction is performed on the three-dimensional skeleton image of the front view path to obtain feature data of the three-dimensional image of the front view path.
2. The method according to claim 1, It is characterized in that The method of rotating the three-dimensional image of the forward vision path based on the two-dimensional projection plane formed by the first axis and the second axis to obtain a rotated image of the forward vision path includes: Constructing a reference plane of the three-dimensional image of the forward-view road to obtain a reference plane of the forward-view road; Calculating the normal vector of the front sight road reference plane to obtain the reference plane normal vector; Determine a forward vision path rotation matrix of the forward vision path three-dimensional image based on the reference normal vector and the two-dimensional projection surface; Calculating the inverse matrix of the forward vision path rotation matrix to obtain the forward vision path rotation inverse matrix; Based on the forward vision path rotation inverse matrix, the forward vision path three-dimensional image is rotated to obtain the forward vision path rotated image.
3. The method according to claim 2, It is characterized in that The forward-viewing road three-dimensional image includes a plurality of voxel points, and the construction of a reference plane of the forward-viewing road three-dimensional image to obtain the forward-viewing road reference plane includes: Calculate the number of non-zero voxels within a preset target range centered at each of the voxel points; Based on the number of non-zero voxels, three target voxel points are screened out from the plurality of voxels, wherein the number of non-zero voxels within the target range of the target voxel point is the least; The front view road reference plane is constructed based on the three target voxel points.
4. The method according to claim 1, It is characterized in that The determining of the skeleton control points in the forward vision path rotation image based on the forward vision path two-dimensional skeleton points and the third axis includes: Based on the two-dimensional skeleton point of the forward sight path and the third axis, finding the three-dimensional skeleton axis of the forward sight path from the rotated image of the forward sight path, wherein the three-dimensional skeleton axis of the forward sight path is used to characterize the axis that forms the two-dimensional skeleton point of the forward sight path when projected onto the two-dimensional projection plane in the rotated image of the forward sight path; The midpoint of the three-dimensional skeleton axis of the forward viewing path is used as the skeleton control point.
5. The method according to claim 1, It is characterized in that The step of fitting the control points of the forward-viewing path based on the spatial rectangular coordinate system to obtain a three-dimensional skeleton image of the forward-viewing path includes: Based on the spatial rectangular coordinate system, coordinate marking is performed on the control points of the forward sight path to obtain the coordinates of the control points; Based on the coordinates of the control points, curve fitting is performed on the forward vision path control points to obtain the three-dimensional skeleton image of the forward vision path.
6. The method according to claim 5, It is characterized in that The control point coordinates include a first value, a second value, and a third value. Based on the control point coordinates, curve fitting is performed on the front view control points to obtain the front view three-dimensional skeleton image, including: Based on the first value, performing Bezier curve fitting on the forward vision path control point to obtain a first fitting curve, wherein the first fitting curve is used to represent a fitting curve of the forward vision path control point in the first axis direction; Based on the second value, performing Bezier curve fitting on the forward vision path control point to obtain a second fitting curve, wherein the second fitting curve is used to characterize a fitting curve of the forward vision path control point in the second axis direction; Based on the third value, performing Bezier curve fitting on the forward vision path control point to obtain a third fitting curve, wherein the third fitting curve is used to characterize a fitting curve of the forward vision path control point in the direction of a third axis; The first fitting curve, the second fitting curve and the third fitting curve are combined to obtain the front view three-dimensional skeleton image.
7. The method according to any one of claim 1, It is characterized in that The forward-viewing road three-dimensional skeleton image includes a plurality of skeleton voxel points, and the feature extraction of the forward-viewing road three-dimensional skeleton image based on the spatial rectangular coordinate system to obtain feature data of the forward-viewing road three-dimensional image includes: Based on the spatial rectangular coordinate system, generating the three-dimensional spatial coordinates of each of the skeleton voxel points; Based on the three-dimensional space coordinates, calculating the transverse diameter of the three-dimensional skeleton image of the front vision path to obtain the transverse diameter of the front vision path; Based on the three-dimensional space coordinates, calculating the visual path length of the three-dimensional skeleton image of the front visual path to obtain the front visual path length; The forward sight path transverse diameter and the forward sight path length are combined to obtain the characteristic data.
8. A forward-view road feature extraction device, It is characterized in that The device comprises: A front visual path cutting module is used to obtain a brain image, perform image cutting on the brain image to obtain a front visual path three-dimensional image, and construct a spatial rectangular coordinate system, wherein the spatial rectangular coordinate system includes a first axis, a second axis, and a third axis, and the first axis, the second axis, and the third axis are perpendicular to each other; A forward vision path rotation module, configured to rotate the forward vision path three-dimensional image based on a two-dimensional projection plane formed by the first axis and the second axis to obtain a forward vision path rotated image; A forward vision path projection module, configured to perform two-dimensional projection on the forward vision path rotation image based on the two-dimensional projection plane to obtain a two-dimensional image of the forward vision path; A two-dimensional skeletonization module for the forward vision path is used to extract the skeleton of the two-dimensional image of the forward vision path to obtain two-dimensional skeleton points of the forward vision path; A skeleton control point search module, used to determine the skeleton control points in the forward vision path rotation image based on the forward vision path two-dimensional skeleton points and the third axis; A control point recovery module, used to restore the coordinates of the skeleton control points to obtain the forward vision path control points; A three-dimensional skeleton image fitting module, used for fitting the control points of the forward sight path based on the spatial rectangular coordinate system to obtain a three-dimensional skeleton image of the forward sight path; The forward vision path feature extraction module is used to extract features of the forward vision path three-dimensional skeleton image based on the spatial rectangular coordinate system to obtain feature data of the forward vision path three-dimensional image.
9. An electronic device, It is characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the forward visual road feature extraction method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the forward visual road feature extraction method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Brain image correction method, computer equipment and readable storage medium
CN111105362A
Visual map construction, positioning and navigation method and system, and computer storage medium
CN115526997A
Three-dimensional scanning reconstruction method and system based on mark point triangular feature clustering
CN116912427A
Tunnel image splicing method and device based on point cloud mapping, equipment and storage medium
CN118229524A
Bridge swivel monitoring method and system based on three-dimensional orthogonal cursor
CN118258377A
