Bone extraction methods and related products

By extracting and adjusting the grayscale value in CT images, the problem of low accuracy of bone images is solved, and the accuracy of bone extraction and surgical success rate in puncture surgery are improved.

CN118365662BActive Publication Date: 2024-12-31SHENZHEN WEIDE PRECISION MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410789629.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-12-31
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

The existing skeletal images based on CT images are not very accurate in puncture surgery, resulting in incorrect puncture path planning and affecting the success rate of surgery.

Method used

By obtaining the CT image of the target object, extract the pixel connection domain with the grayscale value within the preset range, adjust the grayscale value of the non-target pixels to make it within the preset range, thereby extracting the target bone image and excluding the non-target object to improve the accuracy of bone extraction.

Benefits of technology

It improves the accuracy of bone extraction, ensures the accuracy of puncture paths, reduces the risk of puncture failure, and increases the success rate of puncture surgery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365662B_ABST
    Figure CN118365662B_ABST
Patent Text Reader

Abstract

The present application discloses a bone extraction method and related products. The method comprises: obtaining a reference CT image of a target object; extracting an image region of the target object from the reference CT image to obtain a target object image; extracting an image region whose grayscale value is within a preset range from the reference CT image to obtain a first reference image; determining the intersection of the target object image and the first reference image to obtain a second reference image; connecting pixels whose grayscale value is within a preset range in the second reference image to obtain a third reference image; extracting the maximum connected domain whose grayscale value is greater than or equal to a first threshold from the third reference image to obtain a target bone image. The target bone image extracted by the bone extraction device through the above steps does not contain images of non-target objects, but also contains images of any bone of the target object in the reference CT image, so the accuracy of bone extraction of the target object is improved and interference from non-target objects is eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a bone extraction method and related products. Background Art

[0002] With the advancement of computer technology, medical technology has also ushered in a great breakthrough. At present, the puncture path planning is usually based on the bone image reconstructed from the 3D CT image during the puncture operation. However, in the current technology, the accuracy of the bone image reconstructed from the 3D CT image is not high. The low-accuracy bone image cannot correctly guide the operator to plan the puncture path. Therefore, how to improve the accuracy of the extracted bone image is a very important issue. Summary of the invention

[0003] The present application provides a bone extraction method and related products, wherein the related products include a bone extraction device, an electronic device, a computer-readable storage medium and a computer program product.

[0004] In a first aspect, a bone extraction method is provided, the method comprising:

[0005] Acquire a reference CT image of the target object, wherein the reference CT image is obtained by performing a CT scan on the target object, and the reference CT image includes bones of the target object;

[0006] Extracting the image region of the target object from the reference CT image to obtain a target object image;

[0007] Extracting an image region whose grayscale value is within a preset range from the reference CT image to obtain a first reference image, wherein the preset range is a range of grayscale values ​​of bone pixels, and the bone pixels are pixels of the bone;

[0008] Determine the intersection of the target object image and the first reference image to obtain a second reference image;

[0009] Connecting pixels in the second reference image whose grayscale values ​​are within the preset range to obtain a third reference image;

[0010] A maximum connected domain with a gray value greater than or equal to a first threshold is extracted from the third reference image to obtain a target bone image.

[0011] In combination with any embodiment of the present application, the step of connecting pixels in the second reference image whose grayscale values ​​are within the preset range to obtain the third reference image includes:

[0012] Determine pixels in the second reference image whose grayscale values ​​are within the preset range as target pixels;

[0013] Determine pixels within a preset expansion distance of the target pixel whose grayscale values ​​are not within the preset range as reference pixels;

[0014] The grayscale value of the reference pixel is adjusted to be within the preset range to obtain the third reference image.

[0015] In combination with any embodiment of the present application, the step of extracting the image region of the target object from the reference CT image to obtain the target object image includes:

[0016] A maximum connected domain having a gray value greater than or equal to a second threshold is extracted from the reference CT image to obtain the target object image.

[0017] In combination with any embodiment of the present application, the method further includes:

[0018] The intersection of the target bone image and the second reference image is determined to obtain a target CT image.

[0019] In combination with any embodiment of the present application, the skeleton includes a first skeleton and a second skeleton; the second reference image includes an image of the first skeleton and an image of the second skeleton; the image of the first skeleton and the image of the second skeleton do not intersect; the preset expansion distance is greater than the minimum distance between the first skeleton and the second skeleton.

[0020] In combination with any embodiment of the present application, the reference CT image includes a bed board; the area of ​​the image region of the bed board in the reference CT image is smaller than the area of ​​the image region of the target object; and the image of the bed board in the reference CT image has pixels whose grayscale values ​​are within the preset range.

[0021] In a second aspect, a bone extraction device is provided, the bone extraction device comprising:

[0022] an acquisition unit, configured to acquire a reference CT image of a target object, wherein the reference CT image is obtained by performing a CT scan on the target object, and the reference CT image includes a skeleton of the target object;

[0023] An image processing unit, configured to extract an image region of the target object from the reference CT image to obtain an image of the target object;

[0024] The image processing unit is further used to extract an image area whose grayscale value is within a preset range from the reference CT image to obtain a first reference image, wherein the preset range is the range of grayscale values ​​of bone pixels, and the bone pixels are pixels of the bone;

[0025] An image intersection unit, used to determine the intersection of the target object image and the first reference image to obtain a second reference image;

[0026] The image processing unit is further used to connect the pixels in the second reference image whose grayscale values ​​are within the preset range to obtain a third reference image;

[0027] The image processing unit is further used to extract the maximum connected domain whose grayscale value is greater than or equal to the first threshold from the third reference image to obtain a target bone image.

[0028] In conjunction with any embodiment of the present application, the image processing unit is specifically used to:

[0029] Determine pixels in the second reference image whose grayscale values ​​are within the preset range as target pixels;

[0030] Determine pixels within a preset expansion distance of the target pixel whose grayscale values ​​are not within the preset range as reference pixels;

[0031] The grayscale value of the reference pixel is adjusted to be within the preset range to obtain the third reference image.

[0032] In conjunction with any embodiment of the present application, the image processing unit is specifically used to:

[0033] A maximum connected domain having a gray value greater than or equal to a second threshold is extracted from the reference CT image to obtain the target object image.

[0034] In combination with any embodiment of the present application, the image intersection unit is specifically used to:

[0035] The intersection of the target bone image and the second reference image is determined to obtain a target CT image.

[0036] In combination with any embodiment of the present application, the skeleton includes a first skeleton and a second skeleton; the second reference image includes an image of the first skeleton and an image of the second skeleton; the image of the first skeleton and the image of the second skeleton do not intersect; the preset expansion distance is greater than the minimum distance between the first skeleton and the second skeleton.

[0037] In combination with any embodiment of the present application, the reference CT image includes a bed board; the area of ​​the image region of the bed board in the reference CT image is smaller than the area of ​​the image region of the target object; and the image of the bed board in the reference CT image has pixels whose grayscale values ​​are within the preset range.

[0038] According to a third aspect, an electronic device is provided, comprising: a processor and a memory, wherein the memory is used to store computer program code, wherein the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes the first aspect and any one of its embodiments.

[0039] In a fourth aspect, another electronic device is provided, comprising: a processor, a sending device, an input device, an output device and a memory, wherein the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the first aspect and any one of its embodiments.

[0040] In a fifth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the first aspect and any one of its embodiments.

[0041] In a sixth aspect, a computer program product is provided, wherein the computer program product comprises a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is enabled to execute the above-mentioned first aspect and any embodiment thereof.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.

[0043] In the present application, the bone extraction device obtains a reference CT image of the target object, extracts the image area of ​​the target object from the reference CT image, obtains the target object image, then extracts the image area within a preset range from the reference CT image, obtains the first reference image, and determines the second reference image according to the intersection of the first reference image and the target object image. Then, the pixels whose grayscale values ​​in the second reference image are within the preset range are connected to obtain a third reference image, and the maximum connected domain whose grayscale value in the reference image is greater than or equal to the first threshold is extracted to obtain the target bone image. The target bone image extracted by the bone extraction device through the above steps does not contain the image of the non-target object, and also contains the image of any bone of the target object in the reference CT image, so the accuracy of the extraction of the target object's bone is improved, and the interference of the non-target object is eliminated. The target bone image can be used to better plan the puncture path in the puncture operation, avoid the failure of puncture caused by the presence of bones in the puncture path, and improve the success rate of subsequent puncture operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0045] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0046] Figure 1 A schematic diagram of a bone extraction method provided in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of a reference CT image provided in an embodiment of the present application;

[0048] Figure 3 An image schematic diagram of a reference CT image after binarization provided in an embodiment of the present application;

[0049] Figure 4 An image schematic diagram of a target object image provided in an embodiment of the present application;

[0050] Figure 5 A schematic diagram of an image after pixels are extracted according to a preset range provided in an embodiment of the present application;

[0051] Figure 6 A three-dimensional schematic diagram after extracting pixels according to a preset range provided in an embodiment of the present application;

[0052] Figure 7 A schematic diagram of a second reference image provided in an embodiment of the present application;

[0053] Figure 8 A three-dimensional schematic diagram of a second reference image provided in an embodiment of the present application;

[0054] Fig. 9 A schematic diagram of gaps between bones in a second reference image provided in an embodiment of the present application;

[0055] Fig.10 A schematic diagram of gaps between bones in another second reference image provided in an embodiment of the present application;

[0056] Fig.11 A schematic diagram of a third reference image provided in an embodiment of the present application;

[0057] Fig.12 A schematic diagram of another third reference image provided in an embodiment of the present application;

[0058] Fig.13A schematic diagram of an image after the maximum connected domain is extracted from a second reference image provided in an embodiment of the present application;

[0059] Fig.14 A schematic diagram of an image after the maximum connected domain is extracted from a third reference image provided in an embodiment of the present application;

[0060] Fig.15 A schematic diagram of a target CT image provided in an embodiment of the present application;

[0061] Fig.16 A schematic diagram of CT image segmentation and reconstruction of kidney tissue, skin, and bones provided in an embodiment of the present application;

[0062] Fig.17 A schematic diagram of the structure of a bone extraction device provided in an embodiment of the present application;

[0063] Fig.18 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0065] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0066] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0067] The execution subject of the embodiment of the present application is a bone extraction device, wherein the bone extraction device can be any electronic device that can execute the technical solution disclosed in the method embodiment of the present application. Optionally, the bone extraction device can be one of the following: a computer, a server.

[0068] It should be understood that the method embodiment of the present application can also be implemented by a processor executing a computer program code. The following describes the embodiment of the present application in conjunction with the drawings in the embodiment of the present application. Figure 1 , Figure 1 A flowchart of a bone extraction method provided in an embodiment of the present application.

[0069] 101. Obtain a reference CT image of the target object.

[0070] In the embodiment of the present application, the reference CT image is an image obtained by performing a CT scan on the target object, and the reference CT image includes the target object, wherein the image area of ​​the target object includes the skeleton of the target object.

[0071] In the embodiment of the present application, the reference object lies on a bed board for CT scanning, so that the reference CT image includes non-target objects. For example, Figure 2 It is a schematic diagram of a reference CT image under this implementation mode, which includes a target object and a non-target object. The non-target object is a bed board, and the image area of ​​the target object includes the bones of the target object.

[0072] 102. Extract the image region of the target object from the reference CT image to obtain a target object image.

[0073] In the embodiment of the present application, when the reference CT image includes a target object and a non-target object, an image region of the target object is extracted from the reference CT image to obtain a target object image, and the target object image does not include an image of the non-target object.

[0074] In a possible implementation, a threshold is used to segment the image of the target object and the image of the non-target object to obtain the target object image.

[0075] In another possible implementation, edge detection is used to identify the boundary of the image region of the target object, thereby segmenting the image of the target object to obtain the target object image.

[0076] In another possible implementation, the reference CT image is binarized, and the number of pixels in the image region of the target object in the binarized reference CT image is greater than the number of pixels in the image region of the non-target object, so the maximum connected domain is extracted from the binarized reference CT image to obtain the target object image. For example, Figure 3is an image schematic diagram of a reference CT image after binarization, including a binarized image of a target object and a binarized image of a non-target object, wherein the non-target object is a bed board, and thus the binarized image of the non-target object is a binarized image of the bed board. For another example, Figure 4 It is an image schematic diagram of a target object image. The target object image is obtained by binarizing a reference CT image and extracting the maximum connected domain in the binarized reference CT image. The target object image includes a binarized image of the target object in the reference CT image.

[0077] 103. Extract an image region whose grayscale value is within a preset range from the reference CT image to obtain a first reference image.

[0078] In the embodiment of the present application, the first reference image is obtained from an image region composed of pixels whose grayscale values ​​in the reference CT image are within a preset range. The preset range is the range of grayscale values ​​of bone pixels, and the bone pixels are pixels of bones in the reference CT image.

[0079] In a possible implementation, the preset range is a range of bone grayscale values ​​obtained through data statistics.

[0080] In another possible implementation, the preset range is to identify bone pixels in the reference CT image through a deep learning model, and use the neighborhood of the grayscale value of any bone pixel as the preset range.

[0081] In yet another possible implementation, the range of bones in the reference CT image is set, and the minimum grayscale value and the maximum grayscale value in the selected range are used as the minimum value and the maximum value of the preset range.

[0082] In the embodiment of the present application, the grayscale values ​​of the bone pixels in the reference CT image are all within a preset range, and therefore, the first reference image includes an image of the bones of the target object.

[0083] In a possible implementation, when the reference CT image includes a target object and a non-target object, there are pixels in the non-target object whose grayscale values ​​are within a preset range. Therefore, the first reference image includes not only bones but also non-target objects. Optionally, the non-target object includes a bed board. For example, Figure 5 It is a schematic diagram of an image after pixels are extracted according to a preset range, and the image includes an image of the skeleton of the target object and an image composed of pixels in the bed board whose grayscale values ​​are within a preset range.

[0084] In another possible implementation, when the reference CT image includes a target object and a non-target object, not only are there pixels whose grayscale values ​​are within a preset range in the non-target object, but there are also pixels whose grayscale values ​​are within a preset range in the non-skeletal tissue of the target object. Therefore, the first reference image includes not only bones and non-target objects, but also non-skeletal tissue of the target object. Optionally, more than one reference CT image is acquired when the target object is subjected to a CT scan. Based on more than one reference CT images, image areas whose grayscale values ​​are within a preset range are extracted from any one of the reference CT images to obtain more than one two-dimensional image. By merging more than one two-dimensional images in the time sequence of the CT scans, a three-dimensional first reference image can be obtained. For example, Figure 6 It is a three-dimensional schematic diagram after extracting pixels according to a preset range, including an image of the target object's bones, an image composed of pixels in the bed board whose grayscale values ​​are within the preset range, and an image composed of pixels in the target object's non-skeletal tissue whose grayscale values ​​are within the preset range.

[0085] 104. Determine the intersection of the target object image and the first reference image to obtain a second reference image.

[0086] In the embodiment of the present application, the target object image is an image that includes the target object and does not include non-target objects, and the first reference image is an image area that includes pixels whose grayscale values ​​in the target object are within a preset range, and an image area that includes pixels whose grayscale values ​​in the non-target object are within a preset range. The second reference image is obtained by determining the intersection of pixels at the same position of the target object image and the first reference image. The second reference image includes an image area that includes pixels whose grayscale values ​​in the target object are within a preset range. Optionally, the non-target object includes a bed board. For example, Figure 7 is a schematic diagram of an image of a second reference image. Figure 7 The image only contains the bones of the target object, and does not contain the image composed of pixels in the bed board whose grayscale values ​​are within a preset range.

[0087] In one possible implementation, when the reference CT image includes a target object and a non-target object, not only are there pixels with grayscale values ​​within a preset range in the non-target object, but there are also pixels with grayscale values ​​within a preset range in the non-skeletal tissue of the target object. Therefore, the first reference image includes not only bones and non-target objects, but also non-skeletal tissue of the target object. Optionally, both the first reference image and the target object image are three-dimensional images, and the second reference image determined based on the intersection of the first reference image and the target object image is also a three-dimensional image. For example, Figure 8 is a three-dimensional schematic diagram of a second reference image. Figure 8An image that contains only the bones of the target object and an image composed of pixels in the non-skeletal tissue of the target object whose grayscale values ​​are within a preset range.

[0088] 105. Connect pixels in the second reference image whose grayscale values ​​are within the preset range to obtain a third reference image.

[0089] In the embodiment of the present application, the second reference image includes an image of the skeleton of the target object and an image composed of pixels whose grayscale values ​​in the non-skeletal tissue of the target object are within a preset range. The skeleton of the target object includes a first skeleton and a second skeleton. The image of the first skeleton and the image of the second skeleton do not intersect. In order to prevent the first skeleton and the second skeleton from being identified as two connected domains due to the non-intersection of the images during the process of extracting the maximum connected domain in step 106, it is necessary to connect the pixels between the first skeleton and the second skeleton. For example, Fig. 9 It is a schematic diagram of gaps between bones in a second reference image, including a spine and two ribs, wherein there is a gap between any rib and the spine. Fig.10 is another schematic diagram of gaps between bones in a second reference image, including a spine and two ribs, wherein there is a gap between any rib and the spine.

[0090] In one possible implementation, a first skeleton and a second skeleton in a second reference image are identified through a deep learning model, and pixels between the first skeleton and the second skeleton are filled to connect pixels between images of the first skeleton and the second skeleton.

[0091] In another possible implementation, by selecting an area in the second reference image, which includes images of the first bone and the second bone, the grayscale values ​​of pixels in the area whose grayscale values ​​are not within a preset range are adjusted to values ​​within the preset range, so as to achieve the purpose of connecting the pixels between the images of the first bone and the second bone.

[0092] In one possible implementation, pixels in the second reference image whose grayscale values ​​are within a preset range are identified as target pixels, and the grayscale values ​​of pixels within a preset expansion distance of the target pixel whose grayscale values ​​are not within the preset range are adjusted to values ​​within the preset range, so as to achieve the purpose of connecting the pixels between the first bone and the second bone. Fig.11 is a schematic diagram of a third reference image, Fig.11 The gap between the mid-spine and any rib is filled. Fig.12 is another image schematic diagram of a third reference image. Fig.12 The space between the mid-spine and any ribs is filled.

[0093] 106. Extract a maximum connected domain whose grayscale value is greater than or equal to a first threshold from the third reference image to obtain a target bone image.

[0094] In the embodiment of the present application, a connected domain refers to a connected area formed by a set of pixels in an image that have an adjacent relationship. For example, there is a matrix m1= , and matrix m1 is the gray value matrix of image A. Pixels with gray values ​​greater than 0 in matrix m1 have image information, and pixels with gray values ​​equal to 0 have no image information. There are connected domains z1 and z2 in image A. The gray value matrix of connected domain z1 is , the gray value matrix of the connected domain z2 is The area of ​​the connected domain z1 is 2×2=4, and the area of ​​the connected domain z2 is 1×2=2. Therefore, the gray value matrix of the largest connected domain in image A is .

[0095] In the embodiment of the present application, the pixels in the third reference image whose grayscale values ​​are greater than or equal to the first threshold are the foreground of the image, and the pixels whose grayscale values ​​are less than the first threshold are the background of the image. The area of ​​the connected domain of the background is usually larger than the area of ​​the connected domain of the foreground. Therefore, when selecting the maximum connected domain, in order to avoid using the background as the maximum connected domain and thus losing the image of the skeleton of the target object, it is only necessary to determine the size of the connected domain of the pixels whose grayscale values ​​are greater than or equal to the first threshold.

[0096] In one possible implementation, the second reference image includes the first skeleton and the second skeleton, and the image of the first skeleton and the image of the second skeleton have no intersection. Without passing step 105, that is, without connecting the pixels between the images of the first skeleton and the second skeleton, directly extracting the maximum connected domain with a grayscale value greater than or equal to the first threshold value will cause the loss of images with smaller areas in the first skeleton and the second skeleton, thereby causing the target skeleton image to include the image of the first skeleton or the image of the second skeleton. Optionally, the second reference image contains two or more skeletons, and the images of any two skeletons have no intersection. For example, Fig.13It is a schematic diagram of an image after the maximum connected domain is extracted from a second reference image. The second reference image includes an image composed of pixels whose grayscale values ​​are within a preset range in the spine, ribs, and non-skeletal tissue of the target object, and the images of the spine and ribs have no intersection. A connected domain is determined from the second reference image, that is, an area composed of pixels whose grayscale values ​​are greater than or equal to a first threshold and whose adjacent pixels have grayscale values ​​greater than or equal to the above-mentioned first threshold is determined, and more than two control areas are obtained. The control area includes an area of ​​the spine, an area of ​​the ribs, and an area composed of pixels whose grayscale values ​​are within a preset range in the non-skeletal tissue of the target object, wherein the area of ​​the spine is the largest area in the control area. After extracting the maximum connected domain, the image only contains the spine.

[0097] In the embodiment of the present application, when the second reference image includes the first skeleton and the second skeleton, the second reference image is passed through step 105 to obtain a third reference image, that is, the gap between the images of the first skeleton and the second skeleton is filled, and then the maximum connected domain with a gray value greater than or equal to the first threshold is extracted, so that the image obtained after extraction includes the images of the first skeleton and the second skeleton, and no bones are lost. Optionally, the third reference image contains two or more skeletons, and any skeleton is in the same connected domain. For example, Fig.14 It is a schematic diagram of an image after the maximum connected domain is extracted from a third reference image. The third reference image includes an image composed of pixels whose grayscale values ​​are within a preset range in the spine, ribs, and non-skeletal tissues of the target object, and the images of the spine and ribs have intersections. A connected domain is determined from the third reference image, that is, an area composed of pixels whose grayscale values ​​are greater than or equal to a first threshold and whose adjacent pixels have grayscale values ​​greater than or equal to the first threshold is determined, and two or more reference areas are obtained. The reference area includes the area of ​​the spine and ribs, and the area composed of pixels whose grayscale values ​​are within a preset range in the non-skeletal tissues of the target object, wherein the area of ​​the spine and ribs is the largest area in the reference area. After extracting the maximum connected domain, the image only contains images of the area composed of the spine and ribs.

[0098] In the embodiment of the present application, the bone extraction device obtains a reference CT image of the target object, extracts the image area of ​​the target object from the reference CT image, obtains the target object image, and then extracts the image area within a preset range from the reference CT image to obtain a first reference image, and determines the second reference image according to the intersection of the first reference image and the target object image. Then, the pixels whose grayscale values ​​in the second reference image are within the preset range are connected to obtain a third reference image, and the maximum connected domain whose grayscale value in the reference image is greater than or equal to the first threshold is extracted to obtain the target bone image. The target bone image extracted by the bone extraction device through the above steps does not contain the image of the non-target object, and also contains the image of any bone of the target object in the reference CT image, thereby improving the accuracy of the extraction of the target object's bones and eliminating the interference of non-target objects. The target bone image can be used to better plan the puncture path in the puncture operation, avoid the puncture failure caused by the presence of bones in the puncture path, and improve the success rate of subsequent puncture operations.

[0099] As an optional implementation, the bone extraction device performs the following steps during the execution of step 105:

[0100] 201. Determine pixels in the second reference image whose grayscale values ​​are within the preset range as target pixels.

[0101] In the embodiment of the present application, the target pixel is a foreground pixel in the second reference image. The preset range is the range of grayscale values ​​of the skeleton pixels. When the grayscale value of the pixel is within the preset range, it means that the pixel is a pixel with image information, so the pixel is used as the target pixel.

[0102] In a possible implementation, in the process of acquiring the second reference image, the intersection image of the target object image and the first reference image is binarized, the grayscale value of the pixel with the intersection is set to the first preset value, the grayscale value of the pixel without the intersection is set to the second preset value, the first preset value is within the preset range, and the second preset value is not within the preset range, so as to obtain the binarized second reference image. By acquiring the binarized second reference image, the pixels whose grayscale values ​​are within the preset range in the second reference image can be determined more quickly. It is only necessary to determine whether the grayscale value is the first preset value to determine the pixels whose grayscale values ​​are within the preset range in the second reference image, thereby speeding up the determination of the target pixel. For example, when the second reference image contains pixel x1, pixel x2, and pixel x3, and the grayscale values ​​of pixel x1 and pixel x3 are the first preset value, and the grayscale value of pixel x2 is the second preset value. When determining the pixels whose grayscale values ​​are within the preset range in the second reference image, the pixels x1 and pixel x3 whose grayscale values ​​are the first preset value can be directly used as the target pixels.

[0103] 202. Determine pixels within the preset expansion distance of the target pixel whose grayscale values ​​are not within the preset range as reference pixels.

[0104] In an embodiment of the present application, when a first skeleton and a second skeleton exist in the second reference image and there is no intersection between the image of the first skeleton and the image of the second skeleton, the reference pixels include pixels that can connect the images of the first skeleton and the second skeleton.

[0105] In an embodiment of the present application, when there are the first skeleton and the second skeleton in the second reference image, and there is no intersection between the image of the first skeleton and the image of the second skeleton, the preset expansion distance is the distance that enables the skeleton pixels in the second reference image to be connected. The preset expansion distance is usually greater than the minimum distance between the skeletons. For example, when there are the first skeleton and the second skeleton in the second reference image, the distance y1 between the first skeleton and the second skeleton in the second reference image is determined, and the preset expansion distance is greater than y1, so that the determined reference pixels include pixels that enable the images of the first skeleton and the second skeleton to be connected. For another example, when there are the first skeleton, the second skeleton and the third skeleton in the second reference image, the distance y1 between the first skeleton and the second skeleton in the second reference image is determined, the distance y2 between the first skeleton and the third skeleton in the second reference image is determined, and the distance y3 between the second skeleton and the third skeleton in the second reference image is determined. When y1 is greater than y2 and greater than y3, the preset expansion distance should be greater than y2, so that the determined reference pixels can include pixels that enable the images of the second skeleton and the third skeleton to be connected, and pixels that enable the images of the first skeleton and the third skeleton to be connected.

[0106] In an implementation method of obtaining a preset expansion distance, a distance that enables the skeleton pixels in the second reference image to be connected is obtained through data statistics.

[0107] In another implementation method of obtaining the preset expansion distance, a deep learning model is used to determine areas in the second reference image where bone gaps exist, and the number of pixels that can fill the bone gaps is identified, and the preset expansion distance is determined based on the number of pixels.

[0108] 203. Adjust the grayscale value of the reference pixel to make it within the preset range, and obtain the third reference image.

[0109] In an embodiment of the present application, when a first skeleton and a second skeleton exist in a second reference image and there is no intersection between the image of the first skeleton and the image of the second skeleton, the images of the first skeleton and the second skeleton form a connected domain by adjusting the grayscale value of the reference pixel to a preset range.

[0110] In the embodiment of the present application, the image of the first bone and the image of the second bone are formed into an image region by adjusting the gray value. For example, there is a matrix m2= , and matrix m2 is the gray value matrix of the second reference image. In matrix m2, pixels with gray values ​​equal to 5 are bone pixels, and pixels with gray values ​​equal to 6 are non-bone tissue pixels. When the preset expansion distance is 1 pixel, the gray value of the reference pixel is adjusted to 4 to obtain a third reference image. The gray value matrix m3 of the third reference image is , the third reference image contains connected domains z3 and z4. The gray value matrix of connected domain z3 is , the gray value matrix of the connected domain z4 is , the area of ​​the connected domain z3 is 2×4=8, and the area of ​​the connected domain z4 is 2×2=4, so the largest connected domain in image A is z3.

[0111] In the embodiment of the present application, the bone extraction device determines the target pixel whose grayscale value is within the preset range in the second reference image, and determines the reference pixel whose grayscale value is not within the preset range within the preset expansion distance of the target pixel, and adjusts the grayscale value of the reference pixel to a value within the preset range to obtain a third reference pixel. The bone extraction device quickly connects the pixels of the non-intersecting bones in the second reference image by adjusting the grayscale value, so that the non-intersecting bones form a connected domain, so that the target bone image obtained by the subsequent maximum connected domain extraction includes any bone in the second reference image, avoiding bone loss.

[0112] As an optional implementation, the bone extraction device performs the following steps during the process of executing step 102:

[0113] 301. Extract the maximum connected domain whose grayscale value is greater than or equal to a second threshold from the reference CT image to obtain the target object image.

[0114] In the embodiment of the present application, the pixels with gray values ​​greater than or equal to the second threshold in the reference CT image are the foreground in the image, and the pixels with gray values ​​less than the second threshold are the background in the image, and the second threshold may be different from the first threshold. The area of ​​the connected domain of the background is usually larger than the area of ​​the connected domain of the foreground. Therefore, when selecting the maximum connected domain, in order to avoid using the background as the maximum connected domain and thus losing the image of the target object's bones, it is only necessary to determine the size of the connected domain of pixels with gray values ​​greater than or equal to the second threshold.

[0115] In the embodiment of the present application, when the reference CT image includes the target object and the non-target object, the area of ​​the image region of the target object is larger than the area of ​​the image region of the non-target object, that is, the area of ​​the connected domain of the target object is larger than the area of ​​the connected domain of the non-target object, so the target object image can be obtained by extracting the maximum connected domain whose gray value is greater than or equal to the second threshold in the reference CT image. The target object image includes the image of the target object but does not include the image of the non-target object.

[0116] In a possible implementation, the reference CT image is binarized, an image region of a target object and an image region of a non-target object are identified in the binarized reference CT image, and a region with the largest area of ​​the two image regions is extracted as the image region of the target object.

[0117] In an embodiment of the present application, the bone extraction device extracts the image of the target object in the reference CT image by means of the maximum connected domain to obtain the image of the target object. By judging the area of ​​the connected domain and extracting the maximum connected domain, the image of the target object can be quickly obtained, thereby accelerating the operation speed of the bone extraction device.

[0118] As an optional implementation, the bone extraction device further performs the following steps:

[0119] 401. Determine the intersection of the target bone image and the second reference image to obtain a target CT image.

[0120] In the embodiment of the present application, the target bone image contains the bones of the target object, but because before obtaining the target bone image, the bone extraction device connects multiple bones that do not have an intersection in the second reference image through step 105 to form a connected domain, the target bone image not only contains the bones of the target object, but also contains non-bone pixels generated by pixel connectivity. Therefore, in order to restore the image of the bones of the target object, the intersection of the elements at the same position in the second reference image and the target bone image is taken to obtain the target CT image. For example, there is a matrix m4= , and matrix m4 is the gray value matrix of the target bone image. There exists a matrix m2= , and matrix m2 is the gray value matrix of the second reference image. Pixels with gray values ​​equal to 5 are bone pixels, and pixels with gray values ​​equal to 6 are non-bone tissue pixels. Pixels with gray values ​​equal to 4 are reference pixels with adjusted gray values. By taking the intersection of the target bone image and the second reference image, that is, taking the intersection of matrix m4 and matrix m2, we get matrix m5= , as the target CT image, there are only bone pixels with grayscale values ​​equal to 5 in the target CT image.

[0121] In one possible implementation, Fig.15It is a schematic diagram of a target CT image, wherein the target CT image includes a restored image of the skeleton of the target object, such as the spine and ribs. There is a gap between the ribs and the spine.

[0122] In the embodiment of the present application, after obtaining the target bone image, the bone extraction device obtains the target CT image through the intersection of the target bone image and the second reference image. The bone extraction device restores the image of the target object's bones in the target bone image through the above steps, removes the non-bone pixels generated by pixel connectivity, and obtains a more accurate target CT image. The target CT image can be used to better plan the puncture path in the puncture operation, avoid the puncture failure caused by the presence of bones in the puncture path, and improve the success rate of subsequent puncture operations.

[0123] In one possible implementation, Fig.16 The present invention is a schematic diagram of CT image segmentation and reconstruction of kidney tissue, skin and bone. Obtain a target CT image of the bone by a bone extraction device, and obtain a three-dimensional image of the kidney tissue and skin by CT image segmentation and reconstruction; merge the target CT image, the three-dimensional image of the kidney tissue and the three-dimensional image of the skin to obtain a three-dimensional image of the target object; determine the puncture target point in the kidney tissue of the target object according to the reference CT image; obtain an ultrasound image of the target object by ultrasound; align the ultrasound image with the three-dimensional image of the target object, and rotate and translate the three-dimensional image of the target object to the display coordinate system; determine the needle insertion point on the skin of the target object by an ultrasound probe; the needle insertion point and the puncture target point form a puncture path; determine in the three-dimensional image of the target object that there is no bone of the target object on the puncture path, and reduce the possibility that the puncture needle passes through the bone of the target object after piercing the target object from the skin; use a robotic arm to perform navigation positioning and perform surgical puncture. The above steps are usually applied to the puncture device, and the puncture device and the bone extraction device may not be the same device.

[0124] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0125] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.

[0126] See also Fig.17 , Fig.17 This is a schematic diagram of the structure of a bone extraction device provided in an embodiment of the present application. The bone extraction device 1 includes: an acquisition unit 11, an image processing unit 12, and an image intersection unit 13. Among them:

[0127] An acquisition unit 11 is used to acquire a reference CT image of the target object, wherein the reference CT image is obtained by performing a CT scan on the target object, and the reference CT image includes a skeleton of the target object;

[0128] An image processing unit 12 is used to extract an image region of the target object from the reference CT image to obtain a target object image;

[0129] The image processing unit 12 is further used to extract an image area whose grayscale value is within a preset range from the reference CT image to obtain a first reference image, wherein the preset range is the range of grayscale values ​​of bone pixels, and the bone pixels are pixels of the bone;

[0130] An image intersection unit 13, used to determine the intersection of the target object image and the first reference image to obtain a second reference image;

[0131] The image processing unit 12 is further used to connect the pixels in the second reference image whose grayscale values ​​are within the preset range to obtain a third reference image;

[0132] The image processing unit 12 is further configured to extract a maximum connected domain whose grayscale value is greater than or equal to a first threshold from the third reference image to obtain a target bone image.

[0133] In conjunction with any embodiment of the present application, the image processing unit 12 is specifically used for:

[0134] Determine pixels in the second reference image whose grayscale values ​​are within the preset range as target pixels;

[0135] Determine pixels within the preset expansion distance of the target pixel whose grayscale values ​​are not within the preset range as reference pixels;

[0136] The grayscale value of the reference pixel is adjusted to be within the preset range to obtain the third reference image.

[0137] In conjunction with any embodiment of the present application, the image processing unit 12 is specifically used for:

[0138] The maximum connected domain with a gray value greater than or equal to the second threshold is extracted from the reference CT image to obtain the target object image.

[0139] In combination with any embodiment of the present application, the image intersection unit 13 is specifically used for:

[0140] The intersection of the target bone image and the second reference image is determined to obtain a target CT image.

[0141] In combination with any embodiment of the present application, the above-mentioned skeleton includes a first skeleton and a second skeleton; the above-mentioned second reference image includes an image of the above-mentioned first skeleton and an image of the above-mentioned second skeleton; the image of the above-mentioned first skeleton and the image of the above-mentioned second skeleton do not intersect; the above-mentioned preset expansion distance is greater than the minimum distance between the above-mentioned first skeleton and the second skeleton.

[0142] In combination with any embodiment of the present application, the reference CT image includes a bed board; the area of ​​the image region of the bed board in the reference CT image is smaller than the area of ​​the image region of the target object; and the image of the bed board in the reference CT image has pixels whose grayscale values ​​are within the preset range.

[0143] In the embodiment of the present application, the bone extraction device obtains a reference CT image of the target object, extracts the image area of ​​the target object from the reference CT image, obtains the target object image, and then extracts the image area within a preset range from the reference CT image to obtain a first reference image, and determines the second reference image according to the intersection of the first reference image and the target object image. Then, the pixels whose grayscale values ​​in the second reference image are within the preset range are connected to obtain a third reference image, and the maximum connected domain whose grayscale value in the reference image is greater than or equal to the first threshold is extracted to obtain the target bone image. The target bone image extracted by the bone extraction device through the above steps does not contain the image of the non-target object, and also contains the image of any bone of the target object in the reference CT image, thereby improving the accuracy of the extraction of the target object's bones and eliminating the interference of non-target objects. The target bone image can be used to better plan the puncture path in the puncture operation, avoid the puncture failure caused by the presence of bones in the puncture path, and improve the success rate of subsequent puncture operations.

[0144] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0145] Fig.18 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device 2 includes a processor 21 and a memory 22. Optionally, the electronic device 2 also includes an input device 23 and an output device 24. The processor 21, the memory 22, the input device 23 and the output device 24 are coupled via a connector, and the connector includes various interfaces, transmission lines or buses, etc., which are not limited in the embodiments of the present application. It should be understood that in each embodiment of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, it can be connected through various interfaces, transmission lines, buses, etc.

[0146] The processor 21 may include one or more processors, for example, one or more central processing units (CPUs). When the processor is a CPU, the CPU may be a single-core CPU or a multi-core CPU. Optionally, the processor 21 may be a processor group consisting of multiple CPUs, and the multiple processors are coupled to each other through one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present application.

[0147] The memory 22 can be used to store computer program instructions and various computer program codes including the program code for executing the program code of the present application. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or portable read only memory (CD-ROM), which is used for related instructions and data.

[0148] The input device 23 is used to input data and / or signals, and the output device 24 is used to output data and / or signals. The input device 23 and the output device 24 can be independent devices or an integrated device.

[0149] It can be understood that in the embodiment of the present application, the memory 22 can be used not only to store relevant instructions, but also to store relevant data. For example, the memory 22 can be used to store a reference CT image obtained through the input device 23, or the memory 22 can also be used to store a target bone image obtained through the processor 21, etc. The embodiment of the present application does not limit the specific data stored in the memory.

[0150] Understandably, Fig.18 Only a simplified design of an electronic device is shown. In practical applications, the electronic device may also include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all electronic devices that can implement the embodiments of the present application are within the protection scope of the present application.

[0151] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0152] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of the various embodiments of the present application have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, refer to the records of other embodiments.

[0153] In the several embodiments provided in the present application, it should be understood that the disclosed systems, 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 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. Another point is that 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.

[0154] The units described 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.

[0155] 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.

[0156] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0157] A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

Claims

1. A bone extraction method, characterized in that: The method comprises: Acquire a reference CT image of the target object; the reference CT image is obtained by performing a CT scan on the target object; the reference CT image includes bones of the target object; Extracting the image region of the target object from the reference CT image to obtain the target object image, wherein extracting the image region of the target object from the reference CT image to obtain the target object image comprises: removing non-target objects in the reference CT image to obtain the target object image; Extracting an image area whose grayscale value is within a preset range from the reference CT image to obtain a first reference image; the preset range is the range of grayscale values ​​of bone pixels, and the bone pixels are pixels of the bones; Determine the intersection of the target object image and the first reference image to obtain a second reference image; Connecting pixels in the second reference image whose grayscale values ​​are within the preset range to obtain a third reference image; A maximum connected domain with a gray value greater than or equal to a first threshold is extracted from the third reference image to obtain a target bone image.

2. The method according to claim 1, characterized in that The step of connecting pixels in the second reference image whose grayscale values ​​are within the preset range to obtain a third reference image includes: Determine pixels in the second reference image whose grayscale values ​​are within the preset range as target pixels; Determine pixels within a preset expansion distance of the target pixel whose grayscale values ​​are not within the preset range as reference pixels; The grayscale value of the reference pixel is adjusted to be within the preset range to obtain the third reference image.

3. The method according to claim 1, characterized in that The step of extracting the image region of the target object from the reference CT image to obtain the target object image comprises: A maximum connected domain having a gray value greater than or equal to a second threshold is extracted from the reference CT image to obtain the target object image.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The intersection of the target bone image and the second reference image is determined to obtain a target CT image.

5. The method according to claim 2, characterized in that: The skeleton includes a first skeleton and a second skeleton; the second reference image includes an image of the first skeleton and an image of the second skeleton; the image of the first skeleton and the image of the second skeleton do not intersect; the preset expansion distance is greater than the minimum distance between the first skeleton and the second skeleton.

6. The method according to claim 1 or 3, characterized in that: The reference CT image includes a bed board; the image region of the bed board in the reference CT image is smaller than the image region of the target object; and the image of the bed board in the reference CT image has pixels whose grayscale values ​​are within the preset range.

7. A bone extraction device, characterized in that: The bone extraction device comprises: an acquisition unit, configured to acquire a reference CT image of a target object, wherein the reference CT image is obtained by performing a CT scan on the target object, and the reference CT image includes a skeleton of the target object; An image processing unit, configured to extract an image region of the target object from the reference CT image to obtain a target object image, wherein the step of extracting the image region of the target object from the reference CT image to obtain the target object image comprises: removing non-target objects in the reference CT image to obtain the target object image; The image processing unit is further used to extract an image area whose grayscale value is within a preset range from the reference CT image to obtain a first reference image, wherein the preset range is the range of grayscale values ​​of bone pixels, and the bone pixels are pixels of the bone; An image intersection unit, used to determine the intersection of the target object image and the first reference image to obtain a second reference image; The image processing unit is further used to connect the pixels in the second reference image whose grayscale values ​​are within the preset range to obtain a third reference image; The image processing unit is further used to extract the maximum connected domain whose grayscale value is greater than or equal to the first threshold from the third reference image to obtain a target bone image.

8. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store computer program code, wherein the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is enabled to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises a computer program; when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.