Security CT three-dimensional image fast projection method and system
Patent Information
- Application Number
- CN202311530773.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-11-16
AI Technical Summary
[0003]本发明提供一种安检CT三维图像快速投影方法及系统,用于解决无法提升投影速度的技术问题
[0030] The security inspection CT three-dimensional image rapid projection method and system of this application slices the three-dimensional image matrix along the rotation axis, inverts the colors of several slice images to obtain several target slice images, projects all rotated slice images along the direction perpendicular to the rotation axis to obtain several projection lines, merges several projection lines, and normalizes the merged projection image to obtain a projection image of size W*Z. The W*Z projection image is then inverted again to obtain the final target projection image. This effectively reduces the projection time and solves the problem of not being able to improve the projection speed.
Smart Images

Figure CN117422786B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image projection technology, and in particular relates to a method and system for rapid projection of three-dimensional images from security inspection CT scans. Background Technology
[0002] Currently, security systems in airports, subways, and other locations widely use CT (computed tomography) technology to scan pedestrians' bags and check for contraband. CT images are three-dimensional pixel matrices, which need to be projected to generate two-dimensional images for display on computer screens for staff to view. Due to the huge flow of people in airports and subways, there is a high demand for rapid generation of CT images. Existing 3D image processing platforms such as VTK encapsulate the projection operation, which cannot further improve the projection speed. Summary of the Invention
[0003] This invention provides a method and system for rapid projection of 3D images from security inspection CT scans, which solves the technical problem of being unable to improve projection speed.
[0004] In a first aspect, the present invention provides a method for rapid projection of three-dimensional images from security inspection CT scans, comprising:
[0005] A three-dimensional image matrix of the object to be tested is obtained, and the three-dimensional image matrix is sliced along the rotation axis to obtain several slice images;
[0006] Several slice images are inverted to obtain several target slice images, wherein the inversion process is to set the background grayscale of the several slice images to 0;
[0007] All target slice images are rotated based on a preset rotation coordinate transformation rule, the expression of which is:
[0008] i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2
[0009] j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2,
[0010] W = w * |cosθ| + h * |sinθ|
[0011] H = w*|sinθ| + h*|cosθ|
[0012] In the formula, i is the original x-coordinate of the target slice image before rotation, y is the target y-coordinate of the target slice image after rotation, H is the height of the target slice image after rotation, θ is the rotation angle, x is the target x-coordinate of the target slice image after rotation, W is the width of the target slice image after rotation, w is the width of the target slice image before rotation, j is the original y-coordinate of the target slice image, and h is the height of the target slice image before rotation.
[0013] Projecting all rotated slice images along a direction perpendicular to the rotation axis yields several projection lines. Each gray value on each projection line is obtained by accumulating the gray values of H pixels, with a gray value range of 0 to 255*H.
[0014] The projection lines are merged and the resulting projection image is normalized to obtain a projection image of size W*Z, where W is the length of each projection line and Z is the total number of projection lines.
[0015] The W*Z projection image is inverted again to obtain the final target projection image.
[0016] Secondly, the present invention provides a rapid projection system for three-dimensional images in security inspection CT scans, comprising:
[0017] The slicing module is configured to acquire a three-dimensional image matrix of the object to be tested, and to slice the three-dimensional image matrix along the rotation axis to obtain several slice images.
[0018] The first color inversion processing module is configured to perform color inversion processing on several slice images to obtain several target slice images, wherein the color inversion processing is to set the background grayscale of the several slice images to 0;
[0019] The rotation module is configured to rotate all target slice images based on a preset rotation coordinate transformation rule, the expression of which is:
[0020] i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2
[0021] j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2,
[0022] W = w * |cosθ| + h * |sinθ|
[0023] H = w*|sinθ| + h*|cosθ|
[0024] In the formula, i is the original x-coordinate of the target slice image before rotation, y is the target y-coordinate of the target slice image after rotation, H is the height of the target slice image after rotation, θ is the rotation angle, x is the target x-coordinate of the target slice image after rotation, W is the width of the target slice image after rotation, w is the width of the target slice image before rotation, j is the original y-coordinate of the target slice image, and h is the height of the target slice image before rotation.
[0025] The projection module is configured to project all rotated slice images along a direction perpendicular to the rotation axis to obtain several projection lines. Each gray value on each projection line is obtained by accumulating the gray values of H pixels, with a gray value range of 0 to 255*H.
[0026] The merging module is configured to merge the plurality of projection lines and normalize the merged projection image to obtain a projection image of size W*Z, where W is the length of each projection line and Z is the total number of projection lines.
[0027] The second color inversion processing module is configured to perform color inversion processing on the projection image with a size of W*Z to obtain the final target projection image.
[0028] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the rapid projection method for three-dimensional images of security inspection CT according to any embodiment of the present invention.
[0029] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the steps of the security inspection CT three-dimensional image rapid projection method according to any embodiment of the present invention.
[0030] The security inspection CT three-dimensional image rapid projection method and system of this application slices the three-dimensional image matrix along the rotation axis, inverts the colors of several slice images to obtain several target slice images, projects all rotated slice images along the direction perpendicular to the rotation axis to obtain several projection lines, merges several projection lines, and normalizes the merged projection image to obtain a projection image of size W*Z. The W*Z projection image is then inverted again to obtain the final target projection image. This effectively reduces the projection time and solves the problem of not being able to improve the projection speed. Attached Figure Description
[0031] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 A flowchart of a method for rapid projection of 3D images from a security inspection CT scan, provided in an embodiment of the present invention;
[0033] Figure 2 This is a schematic diagram of a slice image provided for a specific embodiment of the present invention;
[0034] Figure 3 A schematic diagram illustrating the principle of slice image rotation in a specific embodiment of the present invention;
[0035] Figure 4 A schematic diagram of the projection of a rotated sliced image according to a specific embodiment of the present invention;
[0036] Figure 5 This is a structural block diagram of a rapid projection system for three-dimensional images in a security inspection CT scan, provided in one embodiment of the present invention.
[0037] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Please see Figure 1 The flowchart of a method for rapid projection of 3D images from a security inspection CT scanner, as described in this application, is shown.
[0040] like Figure 1 As shown, the rapid projection method for 3D images from security inspection CT scans specifically includes the following steps:
[0041] Step S101: Obtain the three-dimensional image matrix of the object to be tested, and slice the three-dimensional image matrix along the rotation axis to obtain several slice images.
[0042] In this step, the three dimensions of the 3D image matrix are X, Y, and Z. X is the width of the 3D image, with a size of w; Y is the height of the 3D image, with a size of h; and Z is the depth of the 3D image, with a size of k.
[0043] It should be noted that the axis of rotation is the X-axis, Y-axis, or Z-axis in the coordinate system of the object under test.
[0044] Step S102: Perform color inversion processing on several slice images to obtain several target slice images, wherein the color inversion processing is to set the background grayscale of several slice images to 0.
[0045] Step S103: Rotate all target slice images based on preset rotation coordinate transformation rules.
[0046] The expression for the rotation coordinate transformation rule is:
[0047] i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2
[0048] j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2,
[0049] W = w * |cosθ| + h * |sinθ|
[0050] H = w*|sinθ| + h*|cosθ|
[0051] In the formula, i is the original x-coordinate of the target slice image before rotation, y is the target y-coordinate of the target slice image after rotation, H is the height of the target slice image after rotation, θ is the rotation angle, x is the target x-coordinate of the target slice image after rotation, W is the width of the target slice image after rotation, w is the width of the target slice image before rotation, j is the original y-coordinate of the target slice image, and h is the height of the target slice image before rotation.
[0052] Step S104: Project all the rotated slice images along a direction perpendicular to the rotation axis to obtain several projection lines. Each gray value on each projection line is obtained by accumulating the gray values of H pixels, with a gray value range of 0 to 255*H.
[0053] Step S105: Merge the several projection lines and normalize the merged projection image to obtain a projection image of size W*Z, where W is the length of each projection line and Z is the total number of projection lines.
[0054] In this step, the merged projection image is normalized. The normalization expression is: Grey_new = Grey_old / max_grey * 255, where Grey_new is the new gray value, Grey_old is the old gray value, and max_grey is the maximum gray value.
[0055] It should be noted that after normalizing the merged projection map to obtain a target projection map of size W*Z, the target projection map of size W*Z is placed into a blank map of preset size 1024*1024.
[0056] Step S106: Perform color inversion processing on the projection image with size W*Z again to obtain the final target projection image.
[0057] Specifically, the background grayscale of the W*Z projection image is set to 255 to obtain the final target projection image.
[0058] In summary, the method of this application slices the 3D image matrix along the rotation axis, inverts the colors of several sliced images to obtain several target sliced images, projects all rotated sliced images along a direction perpendicular to the rotation axis to obtain several projection lines, merges several projection lines, and normalizes the merged projection image to obtain a projection image of size W*Z. The W*Z projection image is then inverted again to obtain the final target projection image. This effectively reduces projection time and solves the problem of not being able to improve projection speed.
[0059] In one specific embodiment, taking a three-dimensional image matrix as an example, the steps for generating a projection image after rotating it 15 degrees clockwise around the Z-axis are described in detail.
[0060] Step 1: Generate slices;
[0061] The 3D image matrix is divided into k slices according to the Z value.
[0062] Because the pixel grayscale values of each slice will be accumulated later, the background grayscale should be set to 0. However, the background in the original slice is white (grayscale value 255), so the original slice needs to be inverted to obtain the following result: Figure 2 The image shown is a slice with a black background.
[0063] Step 2: Rotate the sliced image;
[0064] Rotate k slice images according to the rotation coordinate transformation rules, such as... Figure 3As shown, the solid box represents the original image with width w and height h, and i and j are the x and y coordinates of point P in the original image. The dashed box represents the rotated image with width W and height H, and x and y are the coordinates of point P in the rotated image. The conversion formula between the original coordinates (i, j) and the rotated coordinates (x, y) can be calculated as follows:
[0065] i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2,
[0066] j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2,
[0067] Among them, W=w*|cosθ|+h*|sinθ|, H=w*|sinθ|+h*|cosθ|.
[0068] Step 3, Vertical Projection
[0069] Then, the gray values of H points in the vertical direction are summed to obtain k projection lines of length W, such as... Figure 4 As shown.
[0070] It should be noted that this step involves a large number of pixel loop operations, and using GPU acceleration can significantly reduce the computation time. In this example, generating a 2D projection image from a 512*512*570 3D matrix takes approximately 80 milliseconds.
[0071] Step 4: Composite projection image
[0072] Each projection line has a length of W, and there are k lines in total. After merging, they form a W*k projection image. Since each gray value on the projection line is obtained by accumulating the gray values of H pixels, with a gray value range of 0 to 255*H, normalization processing is required.
[0073] It should be noted that because the colors were inverted in step 1, they need to be inverted again at the end to restore the white background.
[0074] Step 5: Standardize the size of the projection diagram
[0075] The projection image has a width of W and a height of k. The size of the projection image varies depending on the angle. To standardize the size of the projection images, the projection image generated in step 4 needs to be centered within a 1024*1024 blank image.
[0076] At this point, the projection image obtained by rotating a 3D CT image of a bag 15 degrees around the Z-axis is generated.
[0077] Please see Figure 5 The diagram shows a structural block diagram of a security inspection CT three-dimensional image rapid projection system according to this application.
[0078] like Figure 5 As shown, the security inspection CT three-dimensional image rapid projection system 200 includes a slicing processing module 210, a first color inversion processing module 220, a rotation module 230, a projection module 240, a merging module 250, and a second color inversion processing module 260.
[0079] The slicing module 210 is configured to acquire a three-dimensional image matrix of the object to be tested, and to slice the three-dimensional image matrix along the rotation axis to obtain several slice images.
[0080] The first color inversion processing module 220 is configured to perform color inversion processing on several slice images to obtain several target slice images, wherein the color inversion processing is to set the background grayscale of the several slice images to 0.
[0081] The rotation module 230 is configured to rotate all target slice images based on a preset rotation coordinate transformation rule, the expression of which is:
[0082] i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2
[0083] j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2,
[0084] W = w * |cosθ| + h * |sinθ|
[0085] H = w*|sinθ| + h*|cosθ|
[0086] In the formula, i is the original x-coordinate of the target slice image before rotation, y is the target y-coordinate of the target slice image after rotation, H is the height of the target slice image after rotation, θ is the rotation angle, x is the target x-coordinate of the target slice image after rotation, W is the width of the target slice image after rotation, w is the width of the target slice image before rotation, j is the original y-coordinate of the target slice image, and h is the height of the target slice image before rotation.
[0087] The projection module 240 is configured to project all the rotated slice images along a direction perpendicular to the rotation axis to obtain a number of projection lines. Each gray value on each projection line is obtained by accumulating the gray values of H pixels, and the gray value range is 0 to 255*H.
[0088] The merging module 250 is configured to merge the plurality of projection lines and normalize the merged projection image to obtain a projection image of size W*Z, where W is the length of each projection line and Z is the total number of projection lines.
[0089] The second color inversion processing module 260 is configured to perform color inversion processing on the projection image with size W*Z again to obtain the final target projection image.
[0090] It should be understood that Figure 5 The modules and references described in the document Figure 1 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 5 The various modules in the document will not be described in detail here.
[0091] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the rapid projection method of 3D images for security inspection CT in any of the above method embodiments.
[0092] In one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, which are configured as follows:
[0093] A three-dimensional image matrix of the object to be tested is obtained, and the three-dimensional image matrix is sliced along the rotation axis to obtain several slice images;
[0094] Several slice images are inverted to obtain several target slice images, wherein the inversion process is to set the background grayscale of the several slice images to 0;
[0095] All target slice images are rotated based on a preset rotation coordinate transformation rule, the expression of which is:
[0096] i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2
[0097] j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2,
[0098] W = w * |cosθ| + h * |sinθ|
[0099] H = w*|sinθ| + h*|cosθ|
[0100] In the formula, i is the original x-coordinate of the target slice image before rotation, y is the target y-coordinate of the target slice image after rotation, H is the height of the target slice image after rotation, θ is the rotation angle, x is the target x-coordinate of the target slice image after rotation, W is the width of the target slice image after rotation, w is the width of the target slice image before rotation, j is the original y-coordinate of the target slice image, and h is the height of the target slice image before rotation.
[0101] Projecting all rotated slice images along a direction perpendicular to the rotation axis yields several projection lines. Each gray value on each projection line is obtained by accumulating the gray values of H pixels, with a gray value range of 0 to 255*H.
[0102] The projection lines are merged and the resulting projection image is normalized to obtain a projection image of size W*Z, where W is the length of each projection line and Z is the total number of projection lines.
[0103] The W*Z projection image is inverted again to obtain the final target projection image.
[0104] Computer-readable storage media may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required for at least one function; the data storage area may store data created based on the use of the security CT 3D image rapid projection system, etc. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely disposed relative to a processor, which can be connected to the security CT 3D image rapid projection system via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0105] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 3 As shown, the device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3 Taking a bus connection as an example, the memory 320 is the computer-readable storage medium described above. The processor 310 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 320, thereby implementing the rapid projection method for 3D images of security CT scans described in the above embodiment. The input device 330 can receive input digital or character information and generate key signal inputs related to user settings and function control of the rapid projection system for 3D images of security CT scans. The output device 340 may include a display screen or other display device.
[0106] The aforementioned electronic device can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.
[0107] In one implementation, the above-described electronic device is applied to a security inspection CT three-dimensional image rapid projection system for a client, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0108] A three-dimensional image matrix of the object to be tested is obtained, and the three-dimensional image matrix is sliced along the rotation axis to obtain several slice images;
[0109] Several slice images are inverted to obtain several target slice images, wherein the inversion process is to set the background grayscale of the several slice images to 0;
[0110] All target slice images are rotated based on a preset rotation coordinate transformation rule, the expression of which is:
[0111] i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2
[0112] j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2,
[0113] W = w * |cosθ| + h * |sinθ|
[0114] H = w*|sinθ| + h*|cosθ|
[0115] In the formula, i is the original x-coordinate of the target slice image before rotation, y is the target y-coordinate of the target slice image after rotation, H is the height of the target slice image after rotation, θ is the rotation angle, x is the target x-coordinate of the target slice image after rotation, W is the width of the target slice image after rotation, w is the width of the target slice image before rotation, j is the original y-coordinate of the target slice image, and h is the height of the target slice image before rotation.
[0116] Projecting all rotated slice images along a direction perpendicular to the rotation axis yields several projection lines. Each gray value on each projection line is obtained by accumulating the gray values of H pixels, with a gray value range of 0 to 255*H.
[0117] The projection lines are merged and the resulting projection image is normalized to obtain a projection image of size W*Z, where W is the length of each projection line and Z is the total number of projection lines.
[0118] The W*Z projection image is inverted again to obtain the final target projection image.
[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for rapid projection of three-dimensional images from security inspection CT scans, characterized in that, include: A three-dimensional image matrix of the object to be tested is obtained, and the three-dimensional image matrix is sliced along the rotation axis to obtain several slice images; Several slice images are inverted to obtain several target slice images, wherein the inversion process is to set the background grayscale of the several slice images to 0; All target slice images are rotated based on a preset rotation coordinate transformation rule, the expression of which is: i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2 j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2, W = w * |cosθ| + h * |sinθ| H = w|sinθ| + h*|cosθ| In the formula, i is the original x-coordinate of the target slice image before rotation, y is the target y-coordinate of the target slice image after rotation, H is the height of the target slice image after rotation, θ is the rotation angle, x is the target x-coordinate of the target slice image after rotation, W is the width of the target slice image after rotation, w is the width of the target slice image before rotation, j is the original y-coordinate of the target slice image, and h is the height of the target slice image before rotation. Projecting all rotated slice images along a direction perpendicular to the rotation axis yields several projection lines. Each gray value on each projection line is obtained by accumulating the gray values of H pixels, with a gray value range of 0 to 255*H. The projection lines are merged and the resulting projection image is normalized to obtain a projection image of size W*Z, where W is the length of each projection line and Z is the total number of projection lines. The W*Z projection image is inverted again to obtain the final target projection image.
2. The method for rapid projection of three-dimensional images in security inspection CT scans according to claim 1, characterized in that, The rotation axis is the X-axis, Y-axis, or Z-axis in the coordinate system of the object under test.
3. The method for rapid projection of three-dimensional images in security inspection CT scans according to claim 1, characterized in that, The expression for normalizing the merged projection image is as follows: Grey_new=Grey_old / max_grey*255, In the formula, Grey_new is the new grayscale value, Grey_old is the old grayscale value, and max_grey is the maximum grayscale value.
4. The method for rapid projection of three-dimensional images in security inspection CT scans according to claim 1, characterized in that, After normalizing the merged projection map to obtain a target projection map of size W*Z, the method further includes: Place the target projection image with size W*Z into a blank image with a preset size of 1024*1024.
5. The method for rapid projection of three-dimensional images in security inspection CT scans according to claim 1, characterized in that, The process of inverting the colors of the W*Z projection image again to obtain the final target projection image includes: Set the background grayscale of the W*Z projection image to 255 to obtain the final target projection image.
6. A rapid projection system for three-dimensional images in security inspection CT scans, characterized in that, include: The slicing module is configured to acquire a three-dimensional image matrix of the object to be tested, and to slice the three-dimensional image matrix along the rotation axis to obtain several slice images. The first color inversion processing module is configured to perform color inversion processing on several slice images to obtain several target slice images, wherein the color inversion processing is to set the background grayscale of the several slice images to 0; The rotation module is configured to rotate all target slice images based on a preset rotation coordinate transformation rule, the expression of which is: i=(yH / 2)*sinθ+(xW / 2)*cosθ+w / 2 j=(yH / 2)*cosθ-(xW / 2)*sinθ+h / 2, W = w * |cosθ| + h * |sinθ| H = w*|sinθ| + h*|cosθ| In the formula, i is the original x-coordinate of the target slice image before rotation, y is the target y-coordinate of the target slice image after rotation, H is the height of the target slice image after rotation, θ is the rotation angle, x is the target x-coordinate of the target slice image after rotation, W is the width of the target slice image after rotation, w is the width of the target slice image before rotation, j is the original y-coordinate of the target slice image, and h is the height of the target slice image before rotation. The projection module is configured to project all rotated slice images along a direction perpendicular to the rotation axis to obtain several projection lines. Each gray value on each projection line is obtained by accumulating the gray values of H pixels, with a gray value range of 0 to 255*H. The merging module is configured to merge the plurality of projection lines and normalize the merged projection image to obtain a projection image of size W*Z, where W is the length of each projection line and Z is the total number of projection lines. The second color inversion processing module is configured to perform color inversion processing on the projection image with a size of W*Z to obtain the final target projection image.
7. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Three-dimensional measurement method based on single aerial picture of unmanned aerial vehicle
CN116309844A
Back projection reconstruction method and device, electronic equipment and storage medium
CN116863018A