Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to FIG. 1, a flow chart of a three-dimensional image fusion method based on computed tomography according to the present application is shown.
As shown in fig. 1, in step S101, at least one CT slice image in two dimensions is acquired, and a three-dimensional geometry reconstruction is performed from the at least one CT slice image;
in step S102, the three-dimensional geometric structure is rotated by different angles based on the X-axis, the Y-axis or the Z-axis, and the three-dimensional geometric structure under the current viewing angle is projected, so that a projection image is formed;
In step S103, identifying a certain target object in the projection images with different angles according to an image identification method, and labeling the certain target object based on a labeling frame;
In step S104, determining whether a difference index between a labeling frame in the projection image of the front projection angle and a labeling frame in the projection image of a certain angle is smaller than a preset threshold based on a matching algorithm;
In step S105, if the difference index between the source labeling frame in the projection image at the orthographic projection angle and the target labeling frame in the projection image at a certain angle is smaller than the preset threshold, the labeling frame in the projection image at a certain angle and the labeling frame in the projection image at the orthographic projection angle are fused, so as to obtain the three-dimensional labeling frame of the certain target object.
According to the method, two-dimensional CT slice images are read, three-dimensional point data are generated, the three-dimensional point data rotate around an X axis, a Y axis or a Z axis for different angles, a screenshot under the current visual angle is generated, a projection image file is generated, AI is adopted to identify the projection image, the coordinates, types and confidence of marking frames of contraband are marked automatically, finally, each marking frame in the projection image with different angles is matched, the multi-angle marking frame of each contraband is obtained, then the three-dimensional marking frames of the contraband are obtained through fusion, intelligent identification and automatic marking of the three-dimensional contraband are achieved, the workload of security personnel is greatly reduced, and security inspection efficiency is greatly improved.
In a specific embodiment, the matching algorithm is a single rotation axis projection matching algorithm, specifically:
The dashed box in fig. 1 is the source box, the black box is the target box, and one of the three black boxes that best matches the dashed box is found.
Coordinates (313 221 502 283) of the source annotation box, minimum min=313, maximum max=502.
The coordinates of the three black target labeling frames are
Box1 coordinates= (338 290 577 356) min1=338, max1=577
Box2 coordinates = (315 190 502 253) min2=315, max2=502
Box3 coordinates = (354 241 604 304) min3=354, max3=604
Because of the rotation up and down, the abscissa of the article will remain unchanged. Defining a difference index V:
V=(minSrc-minDst)2+(maxSrc-maxDst)2,
wherein V is a difference index between a labeling frame in the projection image at a forward projection angle and a labeling frame in the projection image at a certain angle, minSrc is a minimum abscissa of a source labeling frame, minDst is a minimum abscissa of a target labeling frame, maxSrc is a maximum abscissa of a source labeling frame, and maxDst is a maximum abscissa of a target labeling frame.
Obtaining
V1=(313-338)^2+(502-577)^2=6250
V2=(313-315)^2+(502-502)^2=4
V3=(313-354)^2+(502-604)^2=12085
V2 is seen to be the smallest, so the box (315 190 502 253) in fig. 1 is the best match to the dashed box (313 221 502 283) in fig. 1.
If the minimum V is still greater than a threshold (500 for this routine), then no box is considered to match the dashed box in FIG. 1.
And sequentially searching for the labeling frames which can be matched with the dotted line frames in fig. 1 in projection views of other angles, and obtaining a labeling frame list of all angles of a certain contraband:
3 0 313 221 502 283
3 20 313 188 502 252
3 40 313 177 503 242
3 60 315 190 502 253
3 80 315 225 500 288
3 100 317 276 497 339
3 120 315 339 503 402
3 140 313 404 503 469
3 160 316 466 502 529
the first field is a rotation axis, 1 represents an x-axis, the second field is a rotation angle, and the last four fields are four coordinates of a two-dimensional label frame.
It can be seen that the abscissas of all the matched frames are approximately equal.
In another embodiment, the matching algorithm is a multi-axis projection matching algorithm, specifically:
Matching of projection views between different rotation axes requires multiple matching with projection views of four angles x90, y0, z90 as an intermediary.
The x90 can be obtained by exchanging the abscissa of the labeling frame of z 0.
For example, if the source labeling frame is z60 (338 290 577 356) and the target labeling frame is x30, then the matching box1 (338 423 576 482) of the source labeling frame is first found in z0, then the matching box2 (423 338 481 575) of box1 is found in x90 after the abscissa is exchanged, and finally the matching box3 (422 242 482 401) of box2 is found in x30, that is, the matching is sequentially carried out according to the sequence of z60- > z0- > x90- > x 30.
The box (422 242 482 401) in the final x30 projection is the box that best matches the box (338 290 577 356) in the z60 projection.
A matching list of all angles of this contraband is obtained in turn as follows:
1 0 422 252 483 313
1 30 422 242 482 401
1 60 422 273 481 501
1 90 423 338 481 575
3 0 338 423 576 482
3 30 339 356 579 417
3 60 338 290 577 356
3 90 343 252 584 313
fusion begins after matching. A two-dimensional label box matching list of certain contraband is taken as an example, and the detailed process of the fusion algorithm is introduced.
1 0 422 252 483 313
1 30 422 242 482 401
1 60 422 273 481 501
1 90 423 338 481 575
3 0 338 423 576 482
3 30 339 356 579 417
3 60 338 290 577 356
3 90 343 252 584 313
Labeling frame in x 0 degree projection diagram
First treating a first angle 10 422 252 483 313
The box marked (422 252 483 313) in the x 0 degree projection is the black box in fig. 4.
Cutting is performed in three dimensions as shown in fig. 5.
The box (422 242 482 401) in the x 30 degree projection is the black box in fig. 6.
The second cut is made in three dimensions as shown in fig. 7.
And after all the matched angles are completely cut, calculating the coordinate ranges of all the cutting points to obtain a three-dimensional coordinate frame 160 356 16 228 428 76.
Referring to fig. 8, a block diagram of a three-dimensional image fusion apparatus based on computed tomography according to the present application is shown.
As shown in fig. 8, the three-dimensional image fusion apparatus 200 includes a reconstruction module 210, a projection module 220, an identification module 230, a judgment module 240, and a fusion module 250.
The reconstruction module 210 is configured to acquire at least one two-dimensional CT slice image and reconstruct a three-dimensional geometric structure according to the at least one CT slice image, the projection module 220 is configured to rotate the three-dimensional geometric structure by different angles based on an X axis, a Y axis or a Z axis and project the three-dimensional geometric structure under the current view angle to form a projection image, the identification module 230 is configured to identify a certain target object in the projection image by different angles according to an image identification method and label the certain target object based on a labeling frame, the judgment module 240 is configured to judge whether a difference index between a labeling frame in the projection image of an orthographic projection angle and a labeling frame in the projection image of a certain angle is smaller than a preset threshold value or not based on a matching algorithm, and the fusion module 250 is configured to fuse a source labeling frame in the projection image of a certain angle and a target labeling frame in the projection image of a certain angle to the three-dimensional labeling frame of a certain angle if the difference index between the source labeling frame in the projection image of an orthographic projection image of a certain angle is smaller than the preset threshold value.
It should be understood that the modules depicted in fig. 8 correspond to the various steps in the method described with reference to fig. 1. Thus, the operations and features described above for the method and the corresponding technical effects are equally applicable to the modules in fig. 8, and are not described here again.
In other embodiments, embodiments of the present invention further provide a computer-readable storage medium storing computer-executable instructions for performing the computer tomography-based three-dimensional image fusion method in any of the above-described method embodiments;
As one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions configured to:
Acquiring at least one two-dimensional CT slice image, and reconstructing a three-dimensional geometric structure according to the at least one CT slice image;
rotating the three-dimensional geometric structure by different angles based on an X axis, a Y axis or a Z axis, and projecting the three-dimensional geometric structure under the current view angle to form a projection image;
Identifying a certain target object in the projection images of different angles according to an image identification method, and marking the certain target object based on a marking frame;
Judging whether a difference index of a marking frame in the projection image of the front projection angle and a marking frame in the projection image of a certain angle is smaller than a preset threshold value or not based on a matching algorithm;
if the difference index between the source annotation frame in the projection image at the orthographic projection angle and the target annotation frame in the projection image at a certain angle is smaller than a preset threshold, fusing the annotation frame in the projection image at a certain angle with the annotation frame in the projection image at the orthographic projection angle, so that the three-dimensional annotation frame of the certain target object is obtained.
The computer-readable storage medium may include a storage program area that may store an operating system, an application program required for at least one function, and a storage data area that may store data created according to the use of the three-dimensional image fusion apparatus based on computer tomography, and the like. In addition, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer readable storage medium optionally includes a memory remotely located with respect to the processor, the remote memory being connectable to the computer tomography-based three-dimensional image fusion apparatus via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 9, the device includes a processor 310 and a memory 320. The electronic device may further comprise input means 330 and output means 340. The processor 310, memory 320, input device 330, and output device 340 may be connected by a bus or other means, for example in fig. 9. Memory 320 is the computer-readable storage medium described above. The processor 310 executes various functional applications of the server and data processing, i.e., implements the three-dimensional image fusion method based on computer tomography of the above-described method embodiments, by running nonvolatile software programs, instructions, and modules stored in the memory 320. The input device 330 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of the computer tomography-based three-dimensional image fusion device. The output device 340 may include a display device such as a display screen.
The electronic equipment can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present invention.
As an embodiment, the electronic device is applied to a three-dimensional image fusion device based on computer tomography and used for a client, and comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
Acquiring at least one two-dimensional CT slice image, and reconstructing a three-dimensional geometric structure according to the at least one CT slice image;
rotating the three-dimensional geometric structure by different angles based on an X axis, a Y axis or a Z axis, and projecting the three-dimensional geometric structure under the current view angle to form a projection image;
Identifying a certain target object in the projection images of different angles according to an image identification method, and marking the certain target object based on a marking frame;
Judging whether a difference index of a marking frame in the projection image of the front projection angle and a marking frame in the projection image of a certain angle is smaller than a preset threshold value or not based on a matching algorithm;
if the difference index between the source annotation frame in the projection image at the orthographic projection angle and the target annotation frame in the projection image at a certain angle is smaller than a preset threshold, fusing the annotation frame in the projection image at a certain angle with the annotation frame in the projection image at the orthographic projection angle, so that the three-dimensional annotation frame of the certain target object is obtained.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the various embodiments or methods of some parts of the embodiments.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present invention.