Image transformation method based on Gaussian function parameterized representation
By decomposing images into Gaussian functions and performing linear algebra operations, the problem of high computational complexity in rotating high-resolution and 3D images is solved, achieving efficient image rotation and rendering, which is suitable for medical imaging and remote sensing data processing.
Patent Information
- Application Number
- CN202511184497.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-12-12
AI Technical Summary
In high-resolution and 3D images, the computational complexity of image rotation is high, which leads to a decrease in real-time response speed. Existing technologies are unable to effectively solve the problems of real-time processing and efficient rendering of large-scale data.
The image is decomposed into a series of Gaussian functions. The image transformation operation is transformed into linear algebraic operations on the Gaussian function parameters through the Gaussian space transformation model, avoiding complex coordinate transformation and interpolation calculations. The Gaussian function parameters are optimized by an accumulation rendering algorithm and a loss function.
It improves the computational efficiency of image rotation, making it suitable for real-time processing and efficient rendering of large-scale data, especially for medical imaging and remote sensing data processing, while reducing computational complexity and error accumulation.
Smart Images

Figure CN121120365A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of image processing, and more particularly relates to an image transformation method based on Gaussian function parameterization representation. BACKGROUND
[0002] Image transformation includes image rotation, image scaling and image translation. Taking image rotation as an example, image rotation is a basic operation in image processing and is widely used in various scenarios, including image editing, computer vision, medical imaging and other fields. In a conventional two-dimensional image, rotation is usually used to adjust the direction or angle of the image, while in a three-dimensional image, the rotation operation is an indispensable interactive way, which can help users intuitively understand the image content from different perspectives. For example, in medical images, doctors can observe anatomical structures from multiple angles by combining image rotation with volume rendering algorithms; in remote sensing images, users perform rotation operations to analyze terrain or target changes.
[0003] Although image rotation is a basic function, its computational complexity increases significantly in high-resolution images (such as remote sensing images, the number of image pixels often exceeds 1024x1024) and three-dimensional images (such as three-dimensional medical images). The core of rotation is to perform point-by-point coordinate transformation and high-precision interpolation on image data, which requires a large number of floating-point operations and logical judgments. Therefore, in high-resolution images or large-scale scenarios (such as two-dimensional images with more than 1024x1024 pixels), the amount of computation required increases dramatically, and the speed of image rotation decreases, especially in real-time interactive scenarios. Although algorithm optimization and GPU acceleration techniques can alleviate the computational bottleneck to some extent, in the context of high-resolution and large-scale data, the pressure of real-time response is still prominent. SUMMARY
[0004] In view of the above defects or improvement needs of the prior art, the purpose of the present application is to provide an image transformation method based on Gaussian function parameterization representation, which decomposes the target image to be transformed into a series of Gaussian basis functions with explicit geometric properties, and converts the image transformation operation into linear algebra operations on Gaussian basis function parameters through a Gaussian space transformation model, especially suitable for image rotation transformation, which can avoid complex coordinate transformation and interpolation calculation, effectively improving the calculation efficiency of image rotation. The present application is particularly suitable for real-time processing and efficient rendering of large-scale data and can be applied to medical imaging, remote sensing data processing and other fields.
[0005] To achieve the above purpose, according to one aspect of the present application, an image transformation method based on Gaussian function parameterization representation is provided, characterized in that it comprises: S1: taking a two-dimensional image or a three-dimensional image to be processed as a target image, initializing a Gaussian function set, the Gaussian function set containing a spatial position parameter, a shape parameter and a color amplitude parameter; the initialization is to assign the spatial position parameter, the shape parameter and the color amplitude parameter according to preset values; S2: generating a rendering image by using an accumulated rendering algorithm, a value of any pixel point in the rendering image being obtained by accumulating contribution values and color values of all Gaussian functions capable of covering the point in a preset effective range of the Gaussian function; S3: training all parameters in the Gaussian function set to obtain an optimized Gaussian function set with a loss function convergence as a target; the optimized Gaussian function set containing an optimized spatial position parameter, an optimized shape parameter and an optimized color amplitude parameter; wherein the loss function is calculated from a difference between the rendering image and the target image, and the parameters of the Gaussian function set are adjusted through iterative optimization until the rendering image and the target image reach a preset error requirement at a pixel level or the number of iterations reaches a preset value; S4: performing parameterized Gaussian representation on the target image by using the optimized Gaussian function set obtained in step S3; S5: establishing a Gaussian space transformation model based on the parameterized Gaussian representation according to a requirement of image transformation, and converting an updating process of pixel values in the image transformation into updating of position parameters and shape parameters in the Gaussian function set; wherein the Gaussian space transformation model updates the position parameters and the shape parameters in the Gaussian function set by constructing a linear transformation matrix corresponding to the image transformation and performing linear algebra operation; the image transformation includes at least one of image rotation, image scaling and image translation; S6: generating a rendering image again by using the updated Gaussian function set and the accumulated rendering algorithm, the rendering image being the transformed image.
[0006] As a further preferred embodiment of the present application, in step S1, the parameters in the Gaussian function set include: a center coordinate representing the spatial position parameter, a covariance matrix representing the shape parameter, and an image color value representing the color amplitude parameter; wherein is a Gaussian dimension, which is preset according to a dimension of the target image.
[0007] As a further preferred embodiment of the present application, when the target image is a two-dimensional image, the Gaussian function set is a two-dimensional Gaussian function set, ; the covariance matrix is decomposed into a rotation angle and a scaling factor . When the target image is a three-dimensional image, the Gaussian function set is a three-dimensional Gaussian function set, Covariance matrix Decompose into quaternions and scaling factor .
[0008] As a further preferred embodiment of the present invention, the set of Gaussian functions is denoted as follows: , The set of two-dimensional Gaussian functions ; The set of three-dimensional Gaussian functions , in, The preset number of Gaussian functions in the Gaussian function set; In step S1, initializing the Gaussian function set involves setting the center coordinates... Initialize them to be randomly distributed in the image space, and initialize other parameters to 0.
[0009] As a further preferred embodiment of the present invention, a rendering image is generated using an additive rendering algorithm, and in the obtained rendering image, any coordinates... The pixel value is obtained by summing the contribution values and color values of all Gaussian functions that can cover the point within the preset effective range of the Gaussian function; The cumulative rendering process is as follows: ,but: In the formula, Represent the covariance matrix; In the formula, To express summation; in, , This indicates that the Gaussian function at the point... The contribution value, Indicates the rendered image. To render all pixels in the image, Representation and point The number of effectively overlapping Gaussian functions; the effective range of each Gaussian function is defined by three times its standard deviation.
[0010] As a further preferred embodiment of the present invention, when the target image in step S1 is a three-dimensional image... During the image transformation stage, an accumulation rendering algorithm can be applied to a slice of the 3D image to obtain the transformed 2D slice image. Let the normal direction of the slice be the z-axis direction, and establish a three-dimensional xyz coordinate system. The z-axis coordinate of the slice is denoted as . Then, the center point of the two-dimensional Gaussian function corresponding to this slice. Covariance matrix and color value The formula is derived by the formula of conditional Gaussian distribution:
[0011]
[0012]
[0013] wherein, is a two-dimensional covariance matrix about direction, is a covariance matrix between direction and direction, is a variance of direction; the center point of the two-dimensional Gaussian function, covariance matrix and color value comprise a Gaussian function set of a two-dimensional slice image, a rendering image is generated by using an accumulation rendering algorithm after a linear algebra operation corresponding to an image transformation operation is performed on the Gaussian function set of the two-dimensional slice image, and then a transformed two-dimensional slice image is obtained.
[0014] As a further preferred embodiment of the present application, in step S3, the loss function is a mean square error between the rendering image and the target image , and the loss function is expressed as: ; wherein, represents summation.
[0015] As a further preferred embodiment of the present application, in step S5, the position parameters and the shape parameters in the Gaussian function set are updated by constructing a linear transformation matrix corresponding to the image transformation and performing a linear algebra operation: When the image transformation is image rotation: When the target image is a two-dimensional image, it is assumed that the center of the target image is located at the origin of the coordinate system, and the rotation operation is performed around the origin of the coordinate system, and the rotation angle is , then the rotation matrix is , and the calculation formula is:
[0016] The Gaussian space transformation model is composed of two parts: rotation of Gaussian center coordinates and rotation of Gaussian rotation angle; wherein the rotated Gaussian center coordinates are , and the rotated Gaussian rotation angle is ; therefore, the updated Gaussian function set is ; When the target image is a three-dimensional image, assuming the center of the target image is located at the origin of the coordinate system, and it rotates about the x, y, and z axes respectively. Angle, then rotation matrix and rotation quaternions The calculation formula is:
[0017]
[0018] in Representing quaternion multiplication; The Gaussian space transformation model consists of two parts: rotation of the Gaussian central coordinates and rotation of the Gaussian quaternions; wherein, the rotated Gaussian central coordinates are... The rotated Gaussian quaternion is Therefore, the updated set of Gaussian functions is: .
[0019] As a further preferred embodiment of the present invention, in step S5, the Gaussian space transformation model is updated by constructing a linear transformation matrix corresponding to the image transformation and then updating the position and shape parameters in the Gaussian function set through linear algebra operations: When an image is transformed into an image scaled: Assuming the image center is located at the origin, and the scaling factor is calculated with the origin as the scaling center, the scaling factor is... The scaling matrix is based on diagonal matrix The diagonal of the matrix is The rest are 0; The Gaussian space transformation model consists of two parts: scaling of the Gaussian center coordinates and scaling of the Gaussian scaling factor; wherein, the scaled Gaussian center coordinates are... The scaled Gaussian scaling factor is Therefore, the updated set of two-dimensional Gaussian functions is: The updated set of three-dimensional Gaussian functions is ; When an image is transformed into an image translation: assuming the translation vector is... The Gaussian space transformation model consists of a translation of the Gaussian center coordinates, where the translated Gaussian center coordinates are... Therefore, the updated set of two-dimensional Gaussian functions is: The updated set of three-dimensional Gaussian functions is .
[0020] According to another aspect of the present invention, the present invention provides an image transformation system based on Gaussian function parameterization, characterized in that it includes: a Gaussian function set initialization module configured to initialize a Gaussian function set according to a target image, the Gaussian function set comprising spatial position parameters, shape parameters, and color amplitude parameters; the initialization is to assign the spatial position parameters, the shape parameters, and the color amplitude parameters with preset values; wherein the target image is a two-dimensional image or a three-dimensional image to be processed by transformation; a rendering module configured to generate a rendered image by using an accumulated rendering algorithm, a value of any pixel point in the rendered image being obtained by accumulating contribution values and color values of all Gaussian functions capable of covering the point within a preset effective range of the Gaussian functions; a Gaussian function set optimization module configured to train all parameters in the Gaussian function set with a loss function convergence as a target to obtain an optimized Gaussian function set; the optimized Gaussian function set comprises optimized spatial position parameters, optimized shape parameters, and optimized color amplitude parameters; wherein the loss function is calculated from a difference between the rendered image and the target image, and the parameters of the Gaussian function set are adjusted through iterative optimization until the rendered image and the target image reach a preset error requirement at a pixel level or an iteration number reaches a preset value; a target image modeling module configured to perform a parameterized Gaussian representation on the target image by using the optimized Gaussian function set obtained by the Gaussian function set optimization module; a Gaussian space transformation module configured to convert an updating process of pixel values in image transformation into updating of position parameters and shape parameters in the Gaussian function set; wherein the Gaussian space transformation model updates the position parameters and the shape parameters in the Gaussian function set through linear algebra operations by constructing a linear transformation matrix corresponding to the image transformation; wherein the image transformation comprises at least one of image rotation, image scaling, and image translation; an image transformation module configured to generate a rendered image again by using the accumulated rendering algorithm with the updated Gaussian function set, the rendered image being the transformed image.
[0021] Compared with the prior art, the above technical scheme of the present application implicitly represents an image represented by discrete pixels by a series of continuous functions, specifically, a series of Gaussian functions with explicit geometric properties, so that, taking image rotation as an example of image transformation, the discrete image rotation operation can be converted into linear algebra operations on the parameters of the Gaussian functions, avoiding the cumbersome coordinate transformation, interpolation calculation, and judgment process in the traditional interpolation-based image rotation method, and greatly improving the calculation efficiency.
[0022] The present application is directed to a target image, using a set of optimized Gaussian functions obtained by training, constructing the set of optimized Gaussian functions as a parameterized Gaussian representation of the target image, which implicitly models the target image through a set of continuous functions containing spatial position, shape and color amplitude, and serves as the core basis for subsequent image rotation operation geometric transformation calculation. Considering that the covariance matrix has physical meaning only when it is positive semi-definite, and cannot guarantee its positive semi-definiteness during training, in a two-dimensional Gaussian function, the covariance matrix can be decomposed into a rotation angle and a scaling factor ; in a three-dimensional Gaussian function, the covariance matrix can be decomposed into a quaternion and a scaling factor .
[0023] The present application decomposes an image into a weighted sum of a series of Gaussian functions with explicit geometric properties (such as position, direction, shape), and the geometric parameter characteristics enable image transformation operations to be converted into linear algebra operations on function parameters, for example, image rotation, which can avoid complex coordinate transformation and interpolation calculation in traditional methods, improve the calculation efficiency of image rotation, and provide a new solution for real-time processing and efficient expression of large-scale image data.
[0024] The present application uses cumulative rendering and parameter optimization techniques to efficiently reconstruct image rendering; image transformation (especially image rotation) is achieved through simple linear algebra operations, which is particularly suitable for real-time processing and efficient rendering of large-scale data, and can be applied to medical imaging, remote sensing data processing and other fields, including two-dimensional images and three-dimensional images, and has high practical value and promotion prospects.
[0025] Specifically, the present application can achieve the following beneficial effects: 1. Due to the continuity and differentiability of Gaussian functions, a small number of parameters can be used to efficiently model an image while preserving local detail features. This parameterized representation allows the superposition of multiple Gaussian functions to reconstruct an image represented by discrete pixels with implicit continuous functions. Since the Gaussian function parameters (including center position, covariance matrix, amplitude, etc.) have explicit geometric meaning, image transformation operations including image rotation can be completed by performing matrix transformation on the Gaussian center and covariance matrix. Taking a two-dimensional surface as an example, the surface coordinates can be regarded as two-dimensional image coordinates, the surface height can be regarded as the image color value, and the corresponding Gaussian function set is a two-dimensional Gaussian function set, the Gaussian dimension , the covariance matrix is decomposed into a rotation angle and a scaling factor .
[0026] 2. When using Gaussian functions to parameterize two-dimensional or three-dimensional images, if the target image undergoes an image transformation, the original set of Gaussian functions cannot represent the transformed target image. Without a Gaussian space transformation model, it is necessary to retrain on the transformed target image and re-optimize to obtain the corresponding set of Gaussian functions. This invention proposes a method that directly adjusts the parameters of the Gaussian functions to adapt to image transformations using a Gaussian space transformation model, greatly improving efficiency and flexibility.
[0027] 3. This invention is particularly suitable for image rotation transformations. Existing rotation algorithms require calculating the position of each pixel after rotation, which is tedious and time-consuming. This invention first represents the target image using a set of Gaussian functions based on the parameterization method of Gaussian functions; then, the rotation of all pixels in the image rotation operation (similar to image translation and scaling) is transformed into the rotation of Gaussian parameters in the Gaussian function set; at the same time, the rotation of Gaussian parameters only requires simple linear algebra operations for updating; finally, the updated Gaussian parameters are re-accumulated and rendered to obtain the rotated image. By modeling Gaussian functions, the complex image rotation operation is decoupled from traditional coordinate transformation and interpolation calculations, avoiding pixel-by-pixel calculations and interpolation operations, and significantly reducing computational complexity. Attached Figure Description
[0028] Figure 1 The flowchart of the image transformation method based on Gaussian function parameterization provided by the present invention is shown.
[0029] Figure 2 This is a comparison chart of the visualization results of the method of the present invention with the original target image (GT, ground truth) and other methods after processing. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0031] Example 1 Taking image transformation into image rotation as an example, the process of the image rotation method based on Gaussian function parameterization provided by this invention is as follows: Figure 1 As shown, in this embodiment, a three-dimensional medical image is used as the target image. The method is operations S1-S6. E1 is the evaluation experiment of operation S4, and E2 is the evaluation experiment of operation S6, in order to illustrate the effectiveness of the method of the present invention.
[0032] Operation S1, obtaining a target image: three-dimensional brain MRI data and three-dimensional heart MRI data are selected from Task01_BrainTumour and Task02_Heart sub-tasks in a Medical Segmentation Decathlon (MSD) dataset respectively; and abdominal CT three-dimensional data is obtained from a 2019 Kidney Tumor Segmentation Challenge (KiTS19) dataset. The size of the brain MRI data is 127x240x240, the size of the heart MRI data is 130x320x320, and the size of the abdominal CT data is 150x512x512, which are respectively taken as target images to perform the following reconstruction to obtain a corresponding Gaussian function set.
[0033] Since the three target images exemplified in the embodiment are all three-dimensional data, the Gaussian function set is initialized as , the function set contains 100000 three-dimensional Gaussian functions (that is, N = 100000; of course, other preset values can also be used, the larger N is, the more Gaussian functions increase, the better the reconstruction result is, and the more detailed the details are, but the calculation complexity will increase; in addition, if the target image is a two-dimensional image, the Gaussian function set is taken as a two-dimensional Gaussian function set, , the covariance matrix is decomposed into a rotation angle and a scaling factor , the two-dimensional Gaussian function set is taken as an initial state of optimization; The covariance matrix is calculated from the rotation matrix and the scaling matrix , which is similar to the conventional operation. Specifically: in the three-dimensional case, is a rotation quaternion, which can be converted into a rotation matrix according to the conventional operation (denoted as ) (in the two-dimensional case, is a rotation angle, which can also be converted into a rotation matrix according to the conventional operation, denoted as ). The scaling matrix is a diagonal matrix based on , the diagonal line of the matrix is , and the rest is 0, which is denoted as (the two-dimensional case is the same). That is:
[0034] Operation S2, calculating a rendered image through an accumulated rendering process . The rendered image and the target image are one-to-one corresponding. In the embodiment, any coordinate The pixel value of the point is obtained by accumulating the contribution values of all the Gaussian functions covering the point, and the formula is:
[0035]
[0036] wherein, represents the contribution value of the Gaussian function at the point , represents the rendered image, all the pixel points in the rendered image, represents the number of Gaussian functions effectively overlapping with the point . The effective range of each Gaussian function is defined by its three standard deviation boundary, which corresponds to the 99% confidence interval of the Gaussian distribution (that is, the boundary corresponds to 99% of the cumulative probability density in the Gaussian distribution, which constitutes the effective range of the Gaussian function; of course, in addition to using the three standard deviation boundary, other preset requirements can also be used to define the effective range of the Gaussian function).
[0037] Operation S3, training the Gaussian function parameters with the loss function converging as the goal, wherein the loss function is calculated by the difference between the rendered image and the target image, and the parameters of the Gaussian function are adjusted through optimization until the rendered image and the target image are consistent; According to the embodiments of the present application, the loss function is as follows (which can measure the difference between the rendered image and the target image ):
[0038] Operation S3-1, 100000 iterations of training are performed on the Gaussian parameters (of course, other preset iteration times can also be used), and the rendering process is a differentiable process, which is developed in the CUDA kernel, and the training process uses the Adam optimizer, wherein the initial learning rate is 10 -3 , and the learning rate is halved every 20000 rounds.
[0039] Operation S4, the Gaussian function set after the training is completed is used as the Gaussian function parameterized representation of the target image, which is used for subsequent image rotation operations.
[0040] Experiment E1, the training process is evaluated to prove that the representation method based on the Gaussian function can better fit the target image. Specifically, the rendered image is calculated according to the accumulated rendering process described in operation S2 using the Gaussian function set after the training is completed, and the rendered image is compared with the target image, so as to evaluate the effectiveness of the algorithm of the Gaussian function parameterized representation.
[0041] In Experiment E1-1, evaluation indexes were selected. In this embodiment, Peak Signal-to-Noise Ratio (PSNR) and Multiscale Structured Similarity Index (MS-SSIM) were adopted. The larger the two are, the smaller the error is.
[0042] In experiment E1-2, a comparative algorithm is selected. In this embodiment, the most advanced image representation methods are selected, including the traditional JPEG algorithm, the SCI algorithm based on implicit neural representation technology, the IREM algorithm and the CuNeRF algorithm. These comparative algorithms are only used to compare the effectiveness of the method of the present application in image representation, and the purpose is to prove that the representation method based on Gaussian function can better fit the target image. Among them, the JPEG algorithm uses the code of OpenCV library (opencv-python4.12.0.88, Released: Jul 7, 2025), SCI, and CuNeRF uses the official code and configuration mentioned in the related papers (among them, the SCI related paper can be referred to: Yang, R., Xiao, T., Cheng, Y., Cao, Q., Qu, J., Suo, J., Dai, Q.: Sci: A spectrum concentrated implicit neural compression for biomedical data. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 37, pp. 4774{4782 (2023); the CuNeRF related paper can be referred to: Chen, Z., Yang, L., Lai, J.H., Xie, X.: Cunerf: Cube-based neural radiance field for zero-shot medical image arbitrary-scale super resolution. In: Proceedings of the IEEE / CVF international conference on computer vision. pp. 21185{21195 (2023)), and IREM is independently implemented according to the description in the related paper (the IREM related paper can be referred to: Wu, Q., Li, Y., Xu, L., Feng, R., Wei, H., Yang, Q., Yu, B., Liu, X., Yu, J., Zhang, Y.: Irem: High-resolution magnetic resonance image reconstruction via implicit neural representation.In: Medical Image Computing and Computer Assisted Intervention{MICCAI 2021: 24th International Conference, Strasbourg, France,September 27{October 1, 2021, Proceedings, Part VI 24. pp. 65{74. Springer(2021) ).
[0043] Experiments E1-3, evaluate the reconstruction capability of the algorithm based on the Gaussian function parameterization representation, Figure 2 The reconstruction results of the above image representation algorithms for three-dimensional images are shown. The JPEG algorithm has obvious artifacts, while the methods based on implicit neural representation technology (such as SCI, IREM and CuNeRF) have blurring and significant loss of details. In contrast, the method of the present application can better preserve structural details, especially at tissue boundaries. The index comparison in Table 1 shows that the method of the present application is superior to other algorithms. Methods based on implicit neural representation technology are highly sensitive to data modalities. In contrast, the method of the present application performs outstanding image representation quality on all data, showing obvious advantages in fidelity and robustness.
[0044] Table 1 Image representation quality comparison
[0045] Operation S5, according to the Gaussian space transformation model, the image rotation operation is converted into a linear algebra operation of the Gaussian function set, by performing linear operation on the parameters of the Gaussian function (including position, shape parameters).
[0046] Wherein: the image rotation operation is converted into a linear algebra operation of the Gaussian function set, the process is: the center of the target image is located at the origin of the coordinate system, according to the angle of image rotation to obtain the rotation matrix And the rotation quaternion ; The Gaussian space transformation model consists of two parts: rotation of Gaussian center coordinates and rotation of Gaussian quaternions; wherein the rotated Gaussian center coordinates are , and the rotated Gaussian quaternion is . Therefore, the updated Gaussian function set is . Wherein represents the multiplication of quaternions.
[0047] Specifically, in this embodiment, since the target image is a three-dimensional image, it is assumed that the center of the target image is located at the origin of the coordinate system, and the image is rotated around the x, y, and z axes respectively angle, the rotation matrix and the rotation quaternion The calculation formula is:
[0048]
[0049] wherein represents the multiplication of the quaternion.
[0050] If the target image is a two-dimensional image, assuming that the center of the target image is located at the origin of the coordinate system, and the rotation operation is performed around the origin of the coordinate system, the rotation angle is , the rotation matrix is , and the calculation formula is:
[0051] At this time, for a two-dimensional image, the Gaussian space transformation model is composed of two parts: rotation of the Gaussian center coordinates and rotation of the Gaussian rotation angle; wherein the rotated Gaussian center coordinates are , and the rotated Gaussian rotation angle is ; therefore, the updated Gaussian function set is .
[0052] Operation S6, the rotated image is generated again based on the accumulation rendering algorithm (similar to step S2).
[0053] Experiment E2, the above image rotation is evaluated, and it is proved that the representation method based on the Gaussian function has advantages in image rotation time and rotation accumulation error.
[0054] Experiment E2-1, rotation operation is performed on abdominal CT images of different sizes, and the running time is evaluated. Specifically, for a three-dimensional image, the rotation angle around the Z-axis direction is 30°, and the rotation angles of the X-axis and Y-axis directions are both 5°. The traditional Bicubic method completes image rotation through point-by-point coordinate transformation of the pixel grid; while the method of the application completes the operation by applying the rotation matrix to the Gaussian parameter matrix, and finally accumulates rendering to obtain the rotated image. In order to ensure the fairness of the experiment, the experimental environment is strictly controlled: only single-core CPU is used during running, and GPU acceleration, multi-thread parallelism and memory optimization and other technologies that may affect performance comparison are disabled. Table 2 shows the rotation time comparison of the method of the application and the bicubic rotation. The running time of the method of the application in the rotation task is significantly better than that of the traditional bicubic rotation method, not only showing excellent efficiency in small-scale image processing, but also having obvious performance advantages in complex tasks and large-scale data scenarios.
[0055] Table 2 Rotation time (s) comparison
[0056] Experiment E2-2 compares the cumulative error of rotation. Abdominal CT images are rotated 360° around the Z-axis, with rotation angles set to 30°, 10°, 5°, and 1° for each rotation. Each rotation is iteratively accumulated based on the result of the previous rotation. The error is calculated by comparing the data after the 360° rotation with the original data to analyze the changes in cumulative error during rotation. Table 3 shows a comparison of the cumulative error of the method in this example and that of bicubic rotation. The bicubic rotation method requires point-by-point interpolation based on the pixel grid for each rotation, and the cumulative error gradually amplifies with the increase of the number of iterations. In contrast, this method avoids cumulative error during rotation. In each rotation, this method directly completes the operation by performing linear algebraic operations on the Gaussian parameters, fundamentally eliminating the error accumulation problem caused by multiple iterations in traditional methods.
[0057] Table 3 Comparison of Rotational Cumulative Error (PSNR)
[0058] Furthermore, in the image transformation stage, the cumulative rendering algorithm of this invention supports slice rendering operations in the 3D image. That is, it extracts the 2D slice Gaussian parameters corresponding to the target slice plane from the 3D Gaussian function, and performs the cumulative rendering algorithm only on that slice, thereby avoiding redundant rendering calculations on the complete 3D dataset. This applies to rendering horizontal slices. At that time, the distribution on any two-dimensional cross-section is obtained from the three-dimensional distribution, and the center point of the new two-dimensional Gaussian function is obtained. Covariance matrix and color value It can be derived from the formula for the conditional Gaussian distribution, which is:
[0059]
[0060]
[0061] in, It is about The two-dimensional covariance matrix of the direction. yes direction and The covariance matrix between directions yes Variance of direction.
[0062] The above embodiments are merely examples. Linear algebraic operations on the Gaussian function set are also applicable to other image transformation operations. The process where image scaling directly affects the geometric parameters of the Gaussian function set is as follows: assuming the image center is located at the origin, and using the origin as the scaling center, the scaling factor is... The scaling matrix is based on diagonal matrix The diagonal of the matrix is The remainder is 0. The Gaussian space transformation model consists of two parts: scaling of the Gaussian center coordinates and scaling by the Gaussian scaling factor; wherein, the scaled Gaussian center coordinates are... The scaled Gaussian scaling factor is Therefore, the updated set of two-dimensional Gaussian functions is: The updated set of three-dimensional Gaussian functions is .
[0063] The process of image translation directly acting on the set of Gaussian functions is as follows: the center position of all Gaussian functions is directly moved. Assume the translation vector is... Then the center positions of all Gaussian functions are updated to Therefore, the updated set of two-dimensional Gaussian functions is: The updated set of three-dimensional Gaussian functions is .
[0064] In addition to single-type transformations, the present invention is also applicable to combinations of multiple types of transformations (e.g., rotation + scaling, rotation + translation, or rotation + scaling + translation).
[0065] Furthermore, consistent with common mathematical expressions, in this invention... It represents the set of real numbers.
[0066] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of image transformation based on a Gaussian function parameterized representation, characterized in that, The method comprises the following steps: S1: taking a two-dimensional image or a three-dimensional image to be processed as a target image, initializing a Gaussian function set, the Gaussian function set containing spatial position parameters, shape parameters and color amplitude parameters; the initialization is to assign the spatial position parameters, the shape parameters and the color amplitude parameters with preset values; S2: generating a rendered image using an accumulation rendering algorithm, the value of any pixel point in the rendered image being obtained by accumulating the contribution values and color values of all Gaussian functions capable of covering the point in a preset effective range of the Gaussian functions; S3: training all parameters in the Gaussian function set to obtain an optimized Gaussian function set with the convergence of a loss function as a target; the optimized Gaussian function set containing optimized spatial position parameters, optimized shape parameters and optimized color amplitude parameters; wherein the loss function is calculated from the difference between the rendered image and the target image, and the parameters of the Gaussian function set are adjusted through iterative optimization until the rendered image and the target image reach a preset error requirement at the pixel level or the number of iterations reaches a preset value; S4: performing parameterized Gaussian representation on the target image using the optimized Gaussian function set obtained in step S3; S5: establishing a Gaussian space transformation model based on the parameterized Gaussian representation according to the requirements of image transformation, and converting the update process of pixel values in image transformation into the update of position parameters and shape parameters in the Gaussian function set; wherein the Gaussian space transformation model updates the position parameters and the shape parameters in the Gaussian function set by constructing a linear transformation matrix corresponding to the image transformation and performing linear algebra operations; the image transformation includes at least one of image rotation, image scaling and image translation; S6: generating a rendered image again using the updated Gaussian function set through the accumulation rendering algorithm, and the rendered image is the transformed image.
2. The image transform method based on the parameterized representation of Gaussian functions according to claim 1, characterized in that, In step S1, the parameters in the Gaussian function set include: center coordinates covariance matrix shape parameters represented by color amplitude parameters represented by image color values wherein, n is the dimension of the Gaussian, which is preset according to the dimension of the target image.
3. The image transform method based on the parameterized representation of Gaussian functions according to claim 2, characterized in that, When the target image is a two-dimensional image, the set of Gaussian functions is a set of two-dimensional Gaussian functions, ; a covariance matrix is decomposed into a rotation angle and a scaling factor ; When the target image is a three-dimensional image, the set of Gaussian functions is a set of three-dimensional Gaussian functions, ; a covariance matrix decomposed into quaternions and a scaling factor .
4. The image transform method based on the parameterized representation of Gaussian functions according to claim 3, characterized in that, The set of Gaussian functions is denoted by , the set of two-dimensional Gaussian functions ; the set of three-dimensional Gaussian functions , wherein, is a predetermined number of Gaussian functions in the set of Gaussian functions; In step S1, the set of Gaussian functions is initialized, which is to set the center coordinates are initialized to a random distribution in the image space and the other parameters are initialized to 0.
5. The image transform method based on the parameterized representation of Gaussian function according to claim 4, characterized in that, The rendering image is generated by using an accumulation rendering algorithm, and in the rendering image, a pixel value of an arbitrary coordinate is obtained by accumulating contribution values and color values of all Gaussian functions that can cover the point by a preset effective range of the Gaussian function. The rendering process is accumulated in memory Then: ; where, denotes the covariance matrix; ; wherein denotes the sum; in, , This indicates that the Gaussian function at the point... The contribution value, Indicates the rendered image. To render all pixels in the image, Representation and point The number of effectively overlapping Gaussian functions; the effective range of each Gaussian function is defined by three times its standard deviation.
6. The image transform method based on the parameterized representation of Gaussian function according to claim 2, wherein, When the target image in step S1 is a three-dimensional image, During the image transformation stage, the accumulation rendering algorithm can be used to process a certain slice in the three-dimensional image to obtain a two-dimensional slice image after transformation; The normal direction of the slice is the z-axis direction, an xyz three-dimensional coordinate system is established, and the z-axis coordinate of the slice is denoted as Then, the center point of the two-dimensional Gaussian function corresponding to the slice is The covariance matrix And the color value The formula is derived by the conditional Gaussian distribution formula. wherein, is about the direction of the two-dimensional covariance matrix, is the covariance matrix between the direction of the direction of is the variance of the direction of a center point of the two-dimensional Gaussian function a covariance matrix a color value The Gaussian function set constituting the two-dimensional slice image is subjected to linear algebra operation corresponding to the image transformation operation, and then a rendering image is generated by using an accumulation rendering algorithm, so that the transformed two-dimensional slice image is obtained.
7. The image transform method based on the parameterized representation of Gaussian function according to claim 5, wherein, In step S3, the loss function is the mean squared error between the rendered image and the target image The loss function is expressed as: ; wherein denotes the sum.
8. The image transform method based on the parameterized representation of Gaussian function according to claim 2, wherein, In step S5, the Gaussian space transformation model updates the position parameters and the shape parameters in the Gaussian function set by constructing a linear transformation matrix corresponding to the image transformation and performing linear algebra operations: When the image transformation is image rotation: When the target image is a two-dimensional image, it is assumed that the center of the target image is located at the origin of the coordinate system, and the rotation operation is performed around the origin of the coordinate system, and the rotation angle is , the rotation matrix is , and the calculation formula is: The Gaussian space transformation model comprises two parts Composition: rotation of the Gaussian center coordinates and rotation of the Gaussian rotation angle; wherein the rotated Gaussian center coordinates are , and the rotated Gaussian rotation angle is ; and thus the updated set of Gaussian functions is ; When the target image is a three-dimensional image, it is assumed that the center of the target image is located at the origin of the coordinate system, and the rotation matrix and the rotation quaternion are calculated by rotating around the x, y, and z axes by angles respectively. wherein denotes quaternion multiplication; The Gaussian space transformation model consists of two parts: rotation of Gaussian center coordinates and rotation of Gaussian quaternions; wherein the rotated Gaussian center coordinates are , the rotated Gaussian quaternions are ; and thus the updated Gaussian function set is .
9. The image transform method based on the parameterized representation of Gaussian function according to claim 2, wherein, In step S5, the Gaussian space transformation model updates the position parameters and the shape parameters in the Gaussian function set by constructing a linear transformation matrix corresponding to the image transformation and performing linear algebra operations: When the image transformation is image scaling: Assume that the image center is located at the coordinate origin and the scaling center is the origin, and the scaling coefficient is The scaling matrix is a diagonal matrix based on where the matrix diagonal is and the rest are 0; The Gaussian space transformation model comprises two parts Composition: scaling of the Gaussian center coordinates and scaling of the Gaussian scaling factor; wherein the scaled Gaussian center coordinates are , and the scaled Gaussian scaling factor is ; thus, the updated set of two-dimensional Gaussian functions is , and the updated set of three-dimensional Gaussian functions is ; When the image transformation is image translation: assume the translation vector is , the Gaussian space transformation model consists of the translation of the Gaussian center coordinates, where the translated Gaussian center coordinates are ; therefore, the updated two-dimensional Gaussian function set is , and the updated three-dimensional Gaussian function set is .
10. An image transformation system based on a Gaussian function parameterized representation, characterized in that, The method comprises the following steps: A Gaussian function set initialization module is configured to initialize a Gaussian function set according to a target image, the Gaussian function set containing spatial position parameters, shape parameters and color amplitude parameters; the initialization is to assign the spatial position parameters, the shape parameters and the color amplitude parameters with preset values; wherein the target image is a two-dimensional image or a three-dimensional image to be processed. The rendering module is configured to generate a rendered image by using a cumulative rendering algorithm, wherein a value of any pixel point in the rendered image is obtained by accumulating contribution values and color values of all Gaussian functions capable of covering the point within a preset effective range of the Gaussian function; The Gaussian function set optimization module is configured to train all parameters in the Gaussian function set to obtain an optimized Gaussian function set, with loss function convergence as a target, wherein the optimized Gaussian function set comprises optimized spatial position parameters, optimized shape parameters, and optimized color amplitude parameters; the loss function is calculated based on a difference between the rendered image and a target image, and the parameters of the Gaussian function set are adjusted through iterative optimization until the rendered image and the target image reach a preset error requirement at a pixel level or an iteration number reaches a preset value; The target image modeling module is configured to perform parameterized Gaussian representation on the target image based on the optimized Gaussian function set obtained by the Gaussian function set optimization module; The Gaussian space transformation module is configured to convert an updating process of pixel values in image transformation into updating of position parameters and shape parameters in the Gaussian function set; the Gaussian space transformation model updates the position parameters and the shape parameters in the Gaussian function set through linear algebra operations by constructing a linear transformation matrix corresponding to the image transformation; the image transformation comprises at least one of image rotation, image scaling, and image translation; The image transformation module is configured to generate a rendered image again by using the cumulative rendering algorithm based on the updated Gaussian function set, and the rendered image is the transformed image.