Image processing method based on spherical group gray morphology
By using dynamic structural element construction technology based on SO(3) group theory, the nonlinear distortion problem of spherical orthophoto projection images is solved, realizing efficient and accurate spherical image processing, which is applicable to fields such as computer vision, astronomical observation, panoramic monitoring and industrial inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIDIAN UNIV
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies, when processing spherical orthophoto images, cannot adapt to nonlinear radial distortion by using morphological processing with fixed structural elements, resulting in incorrect or lost edge feature shapes. At the same time, they rely on external parameter acquisition and iterative parameter search, which leads to low computational efficiency, poor versatility, and inconvenient system deployment.
The dynamic structural element construction technique based on SO(3) group theory is adopted. By analyzing the geometric mapping relationship of the sphere, dynamic structural elements are generated to adapt to the nonlinear distortion of the spherical orthophoto projection. The inherent geometric properties of the image are used for self-closing processing without the need for external parameters and iterative optimization.
It achieves the accurate preservation of the true physical shape of the edge features of spherical images while removing noise, improving feature extraction accuracy and computational efficiency, reducing system deployment complexity, and is applicable to various types of spherical projection images.
Smart Images

Figure CN121961858A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electronic digital data technology, and further relates to an image processing method based on spherical group grayscale morphology in the field of image processing technology. This invention can be used in computer vision, astronomical observation, panoramic monitoring, biomedicine, precision industrial manufacturing, and inspection fields, achieving noise removal from spherical images while perfectly preserving the true geometric structure and texture details of the sphere's surface. Background Technology
[0002] In computer vision, astronomical observation, panoramic monitoring, and industrial precision inspection, the acquired images are often orthographic projections of three-dimensional spheres onto a two-dimensional plane. Examples include images of Mars taken by the Hubble Space Telescope or bearing ball bearings photographed by an industrial camera. Whether it's an orthographic projection obtained through a camera or a perspective projection, geometric distortion is an unavoidable core problem. Traditional image processing techniques, especially morphological filtering (erosion, dilation, opening / closing operations), are typically based on the Euclidean geometry assumption, which assumes the image plane is isotropic and uses fixed-shape (e.g., circle, square) structuring elements for translation operations across the entire image. This assumption fails when processing spherical projection images because the projection process introduces nonlinear radial compression or stretching, resulting in a discrepancy between the geometric scales of the image edges and center. Directly applying traditional operators easily leads to shape distortion, artifacts, or feature loss at image edges (e.g., planetary polar caps, panoramic seams), severely impacting subsequent feature extraction and measurement accuracy.
[0003] China University of Mining and Technology disclosed a method for obtaining parameters of a spherical perspective projection model in its patent application "A Method for Obtaining Correction Parameters of a Spherical Perspective Projection Model" (Application No.: 2014104330299, Publication No.: CN 104200468 A). The implementation steps of this method are: first, set the lateral distortion coefficient. (0.80–1.20, step size 0.01) and longitudinal distortion coefficient (0.80~1.20, step size 0.01), all coefficient combinations are traversed through 40×40=1600 iterations; for each set of coefficients, fisheye distortion is corrected based on a spherical perspective projection model; the corrected image is converted to grayscale, and traditional erosion, dilation, and opening / closing operations are performed sequentially to obtain the reconstructed image. The shortcomings of this method are that it relies on traditional fixed-structure element erosion, dilation, and opening / closing operations in the reconstruction process of the corrected image, without considering the nonlinear radial distortion that varies with latitude in spherical orthophoto projection. Even after parameter correction, fixed-structure elements can still cause shape distortion or loss of detail in non-horizontal / vertical features of the sphere's edge (such as the elliptical contour of a planet's polar cap or the curved surface defects of a bearing ball). Furthermore, the 1600 iterations of parameter search result in high algorithm complexity and low efficiency.
[0004] Tsinghua University disclosed a human eye-tracking method based on three-dimensional spherical Taylor expansion in its patent application "A Human Eye-Tracking Method Based on Three-Dimensional Spherical Taylor Expansion" (Application No.: 2017102235289, Publication No.: CN 107145224 A). The method's implementation steps are as follows: First, establish the correspondence between vertices of a three-dimensional eye model and two-dimensional pixels through the camera projection matrix; based on the physiological structure of the eye, binarize the grayscale of the three-dimensional eye model surface, and directly read the grayscale values of the two-dimensional pixels from the input image; take the difference between the grayscale values on both sides along the spherical azimuth and zenith angles as the spherical grayscale gradient of the vertex along the corresponding direction; define the difference function and its three-dimensional Taylor expansion to find the minimum value, iteratively obtain the rotational change of the eye model, and achieve eye-tracking. The drawback of this method is that it requires prior acquisition of external information such as the camera's intrinsic and extrinsic parameter matrices and the three-dimensional eye model, resulting in a high deployment threshold. Furthermore, this method uses a binary grayscale distribution assumption based on the structure of the eyeball, which results in low feature extraction accuracy for complex continuous grayscale textures in general spherical projection images such as the surface of Mars and bearing balls. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of the prior art by providing an image processing method based on spherical group grayscale morphology. This method aims to solve the problems of existing technologies that use fixed structural elements for morphological processing, which cannot adapt to the nonlinear radial distortion of spherical orthophoto projection, resulting in incorrect or lost edge feature shapes; and the problems of existing technologies relying on complex processes such as external parameter acquisition and iterative parameter search, resulting in low computational efficiency, poor versatility, and inconvenient system deployment.
[0006] The idea behind achieving the objective of this invention is as follows: This invention utilizes a dynamic structural element construction technique based on SO(3) group theory to deeply analyze the geometric mapping relationship of spherical orthophoto projection. Pixel coordinates are normalized using the sphere radius as the unit. Dynamic structural elements are constructed by defining spherical geometric constraint thresholds, meaning the morphological structural elements dynamically change with pixel position. A circular neighborhood is generated at the image center, and an elliptical neighborhood is adaptively generated at the edge region due to radial compression characteristics. This ensures that the structural elements maintain consistent geometric scale with each position on the sphere, solving the problem in existing technologies where fixed structural elements are used for morphological processing, which cannot adapt to the nonlinear radial distortion of spherical orthophoto projection, leading to incorrect or lost edge feature shapes. Furthermore, this invention uses a self-closing-loop processing operator generation technique based on the inherent geometric properties of the image. It can complete the entire process relying solely on the core geometric properties of the spherical image itself (sphere center coordinates and sphere radius), without requiring external auxiliary parameters such as camera intrinsic and extrinsic parameters, 3D models, or iterative parameter search or assumptions about grayscale distribution for specific scenes. The coordinates of the sphere's center and the radius of the sphere can be directly obtained from the width and height of the grayscale image to be processed. The structural element parameters are generated in real time by analyzing the spherical geometry formula, without the need for manual calibration or multiple rounds of iterative optimization. This solves the problems of existing technologies that rely on complex processes such as obtaining external parameters and iterative parameter search, resulting in low computational efficiency, poor versatility, and inconvenient system deployment.
[0007] The implementation steps of this invention are as follows:
[0008] Step 1: Extract the sphere from the grayscale image to be processed to generate an effective disk region;
[0009] Step 2: For each valid pixel within the valid disk region, select all neighboring pixels that satisfy the constraints from the valid disk region to form the dynamic structural element neighborhood of the current valid pixel.
[0010] Step 3: Extract the minimum value of all neighboring pixels in the neighborhood of each dynamic structural element to form an intermediate grayscale image after the erosion operation.
[0011] Step 4: Extract the maximum value of the neighboring pixels in the intermediate grayscale image, assign the maximum value to the target valid pixel, and output the final grayscale image.
[0012] Furthermore, the step of extracting the sphere from the grayscale image to be processed is as follows:
[0013] The first step is to use the center of the grayscale image to be processed as the center of the sphere, and obtain the coordinates of the center of the sphere as follows: Where w is equal to the width of the grayscale image to be processed, and h is equal to the height of the grayscale image to be processed.
[0014] The second step is to use 90% of the minimum value of the width and height of the grayscale image to be processed as the radius of the sphere.
[0015] Furthermore, the step of generating the effective disk region is as follows:
[0016] The first step is to generate a two-dimensional grid coordinate matrix with the same size as the grayscale image to be processed;
[0017] The second step is to calculate the distance from each pixel in the grayscale image to be processed to the center of the sphere. Euclidean distance ;
[0018] ;
[0019] The third step will satisfy: All pixels are determined to be valid pixels, and all valid pixels are grouped into a valid disk region, where, This represents the radius of the sphere.
[0020] Furthermore, the steps for constructing the dynamic structuring element neighborhood of the effective pixel are as follows:
[0021] The first step is to select an unselected pixel from the valid disk area;
[0022] The second step is to calculate the selected pixels respectively. Normalized coordinates Compared with other pixels to be judged in the valid disk area Normalized coordinates ;
[0023] , ;
[0024] , ;
[0025] The third step is to form a neighborhood of dynamic structural elements corresponding to the selected pixel points by combining all the pixels to be judged that meet the constraints.
[0026] The fourth step is to determine whether all pixels in the valid disk area have been selected. If so, obtain the dynamic structural element neighborhood of all pixels in the valid disk area; otherwise, proceed to the first step.
[0027] Furthermore, the constraints are as follows:
[0028] ;
[0029] in, Indicates the selected pixel. The horizontal normalized coordinates are derived from Calculated; Indicates the selected pixel. The vertical normalized coordinates are derived from Calculated; Indicates the pixel to be judged The horizontal normalized coordinates are derived from Calculated; Indicates the pixel to be judged The vertical normalized coordinates are derived from Calculated; Indicates the geometric constraint threshold. , Represents the relative radius of the spherical reference structural element, that is, the ratio of the radius of the spherical cap to the radius of the sphere corresponding to the structural element, and its value ranges from [value missing]. .
[0030] Furthermore, the intermediate grayscale image after the erosion operation refers to the following: for each effective pixel, the minimum value of all neighboring pixel values within the neighborhood of its dynamic structuring element is selected, and this minimum value is used as the eroded pixel value of the current effective pixel. The eroded pixel values of all effective pixels are then combined to form an intermediate grayscale image after the erosion operation. This operation effectively eliminates bright noise points smaller than the scale of the dynamic structuring element, and because the dynamic structuring element adapts to the spherical geometry, it does not destroy the surface features of the sphere.
[0031] Furthermore, the extraction of the maximum value of neighboring pixels in the intermediate grayscale image refers to extracting the maximum value of neighboring pixels in the intermediate grayscale image from the same dynamic structuring element neighborhood of each effective pixel in the eroded intermediate grayscale image, ensuring that the erosion operation is based on consistent spherical geometric constraints.
[0032] Furthermore, assigning the maximum value to the target effective pixel means assigning the maximum value of the neighboring pixel values to the same effective pixel that is eroded in step 3, thereby completing the maximum value assignment operation of the pixel and restoring the effective features that were reasonably suppressed during the erosion process.
[0033] Compared with the prior art, the present invention has the following advantages:
[0034] First, because this invention uses a dynamic structural element construction technique based on SO(3) group theory, it overcomes the problem in existing technologies that use fixed structural elements for morphological processing, which cannot adapt to the nonlinear radial distortion of spherical orthophoto projection, leading to incorrect or lost edge feature shapes. This allows the invention to process spherical projection images as accurately as planar images, removing noise while preserving the true physical shapes of features such as planetary polar caps and bearing ball surface defects, significantly improving the accuracy and fidelity of edge region feature extraction in spherical projection images.
[0035] Secondly, because the present invention uses a self-closing-loop processing operator generation technology based on the intrinsic geometric properties of the image, it overcomes the shortcomings of the existing technology that relies on external parameters such as camera intrinsic and extrinsic parameter matrices and 3D models, as well as the complex process of iteratively solving for changes or searching for parameters. This makes the computational efficiency of the present invention significantly improved and its versatility greatly enhanced. It can be adapted to various spherical projection images such as astronomical observation and industrial inspection, while reducing the system deployment cost and operational complexity. Attached Figure Description
[0036] Figure 1 This is a flowchart of the present invention;
[0037] Figure 2 The grayscale image to be processed is used in the simulation experiment of this invention embodiment;
[0038] Figure 3 This is a comparison chart of the effects of simulation experiments in an embodiment of the present invention, wherein... Figure 3 (a) is a diagram showing the simulation results of the method of the present invention. Figure 3 (b) is a simulation experiment result using traditional morphological methods. Detailed Implementation
[0039] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0040] Reference Figure 1 The implementation steps of the embodiments of the present invention will be further described below.
[0041] Step 1: Extract the sphere from the grayscale image to be processed.
[0042] The steps for extracting the sphere from the grayscale image to be processed are as follows:
[0043] Step 1.1: Using the center of the grayscale image to be processed as the center of the sphere, the coordinates of the sphere center are obtained as follows: , where w is equal to the width of the grayscale image to be processed, and h is equal to the height of the grayscale image to be processed.
[0044] Step 1.2: Use 90% of the minimum value of the width and height of the grayscale image to be processed as the radius of the sphere.
[0045] Step 2: Generate valid disk areas.
[0046] The steps for generating the effective disk region are as follows:
[0047] Step 2.1: Generate a two-dimensional grid coordinate matrix with the same size as the grayscale image to be processed.
[0048] Step 2.2: Calculate the distance from each pixel in the grayscale image to be processed to the center of the sphere. Euclidean distance .
[0049] ;
[0050] Step 2.3 will satisfy: All pixels are determined to be valid pixels, and all valid pixels are grouped into a valid disk region, where, This represents the radius of the sphere.
[0051] In an embodiment of the present invention, the grayscale image to be processed is a picture with a size of A pixel-based orthographic projection grayscale image of Mars. Based on the image width and height, the coordinates of the center of the sphere's outline are obtained. for , sphere radius It is 230 pixels.
[0052] Step 3: Define the parameters of the spherical reference structure element.
[0053] Set the relative radius parameter of the spherical reference structural element ( This parameter represents the ratio of the spherical cap radius to the sphere radius corresponding to the structural element on the sphere's surface. It is used to calculate geometric constants. This parameter represents the geometric constraint threshold corresponding to the baseline structural element on the sphere.
[0054] ;
[0055] In an embodiment of the present invention, taking That is, the radius of the structural element is 10% of the radius of the sphere, and the calculated geometric constraint threshold is... .
[0056] Step 4: Build dynamic structural elements pixel by pixel.
[0057] The steps for constructing the dynamic structuring element neighborhood of the effective pixel are as follows:
[0058] Step 4.1: Select an unselected pixel from the valid disk area.
[0059] Step 4.2, calculate the selected pixels respectively. Normalized coordinates Compared with other pixels to be judged in the valid disk area Normalized coordinates ;
[0060] , ;
[0061] , .
[0062] Step 4.3: Form the neighborhood of the selected pixel into a dynamic structural element that meets all the constraints.
[0063] Step 4.4: Determine whether all pixels in the valid disk area have been selected. If yes, obtain the dynamic structural element neighborhood of all pixels in the valid disk area; otherwise, proceed to step 4.1.
[0064] The constraints are as follows:
[0065] ;
[0066] in, Indicates the selected pixel. The horizontal normalized coordinates are derived from Calculated; Indicates the selected pixel. The vertical normalized coordinates are derived from Calculated; Indicates the pixel to be judged The horizontal normalized coordinates are derived from Calculated; Indicates the pixel to be judged The vertical normalized coordinates are derived from Calculated; Indicates the geometric constraint threshold. , Represents the relative radius of the spherical reference structural element, that is, the ratio of the radius of the spherical cap to the radius of the sphere corresponding to the structural element, and its value ranges from [value missing]. .
[0067] In an embodiment of the present invention, pixels located below the effective disk area and near the edge are selected. The pixel value of this point is 120. Calculate the selected pixel value. Normalized coordinates = .
[0068] Traverse other pixels to be judged within the valid disk area. Determine whether it belongs to the selected pixel based on the constraints. Dynamic structural elements. Here, we select... Click on the pixel to be judged directly below. To make a judgment, first, calculate... Normalized coordinates = Substituting the constraints, the calculated left-hand side value is approximately The constraints are satisfied; therefore, the pixel point Belongs to pixels The neighborhood of dynamic structural elements.
[0069] Step 5: Perform spherical grayscale etching operation.
[0070] For each valid pixel In the neighborhood of a defined dynamic structuring element The minimum pixel value is selected and used as the eroded pixel value of the current valid pixel. The eroded pixel values of all valid pixels are combined to form an intermediate grayscale image after the erosion operation.
[0071] In an embodiment of the present invention, pixels If the minimum pixel value among all pixels in the dynamic neighborhood is 115, then the current pixel value is... Updated to 115.
[0072] Step 6: Perform the assignment of the maximum pixel value.
[0073] From the neighborhood of the same dynamic structuring element of each effective pixel in the eroded intermediate grayscale image, extract the maximum value of the neighboring pixel value in the intermediate grayscale image, and assign the maximum value to the current effective pixel to restore the effective features that were reasonably suppressed during the erosion process.
[0074] In an embodiment of the present invention, pixels If the maximum value of a pixel in the dynamic neighborhood is 135, then the current pixel... The pixel value is updated to 135.
[0075] Step 7: After traversing all valid pixels, obtain the result image.
[0076] The resulting image is composed of all pixels. This image removes bright noise smaller than the size of the structuring element while preserving the large-scale geometric features of the sphere's edge without distortion.
[0077] The effectiveness of this invention can be further demonstrated through the following simulation.
[0078] 1. Simulation experimental conditions.
[0079] The hardware platform for the simulation experiment of this invention is: an Intel Core i7-9700 CPU with a main frequency of 3.0GHz and 8GB of memory.
[0080] The software platform for the simulation experiment of this invention is: Windows 10 operating system and Matlab R2022b.
[0081] The input image used in the simulation experiment of this invention is of size [size missing]. A grayscale image, in JPG format, such as... Figure 2 As shown. Simulation parameters of this invention: sphere radius Pixel, relative radius of spherical reference structuring element .
[0082] 2. Simulation content and result analysis.
[0083] The simulation experiment of this invention utilizes the present invention to perform a spherical opening operation on an input grayscale image, that is, first performing an erosion operation and then a dilation operation to obtain the processed image. The differences in processing effects between the method of this invention and the traditional Euclidean morphological method are then compared, and the experimental results are as follows: Figure 3 As shown.
[0084] Figure 3 (b) shows the result of traditional Euclidean opening operation. It can be seen that in the polar region, due to the use of fixed circular structural elements, the perspective compression of the edges cannot be adapted, resulting in the shape of the polar cap being non-physically "cut", the edges appearing jagged, and some polar cap features being lost.
[0085] Figure 3 (a) shows the spherical opening operation result of the present invention. It can be seen that the polar cap region retains a complete elliptical shape and the edge transition is natural and smooth.
[0086] In summary, the simulation results of this invention show that the spherical grayscale image processing method of this invention can overcome projection distortion when processing spherical projection images, and retain the true physical shape of edge features such as planetary polar caps while removing noise, thereby improving the accuracy and fidelity of spherical grayscale image feature extraction.
Claims
1. An image processing method based on spherical group grayscale morphology, characterized in that, The steps of this image processing method include the following: Step 1: Extract the sphere from the grayscale image to be processed to generate an effective disk region; Step 2: For each valid pixel within the valid disk region, select all neighboring pixels that satisfy the constraints from the valid disk region to form the dynamic structural element neighborhood of the current valid pixel. Step 3: Extract the minimum value of all neighboring pixels in the neighborhood of each dynamic structural element to form an intermediate grayscale image after the erosion operation. Step 4: Extract the maximum value of the neighboring pixels in the intermediate grayscale image, assign the maximum value to the target valid pixel, and output the final grayscale image.
2. The image processing method according to claim 1, characterized in that, The steps for extracting the sphere from the grayscale image to be processed in step 1 are as follows: The first step is to use the center of the grayscale image to be processed as the center of the sphere, and obtain the coordinates of the center of the sphere as follows: Where w is equal to the width of the grayscale image to be processed, and h is equal to the height of the grayscale image to be processed. The second step is to use 90% of the minimum value of the width and height of the grayscale image to be processed as the radius of the sphere.
3. The image processing method according to claim 2, characterized in that, The steps for generating the effective disk region described in step 1 are as follows: The first step is to generate a two-dimensional grid coordinate matrix with the same size as the grayscale image to be processed; The second step is to calculate the distance from each pixel in the grayscale image to be processed to the center of the sphere. Euclidean distance ; ; The third step will satisfy: All pixels are determined to be valid pixels, and all valid pixels are grouped into a valid disk region, where, This represents the radius of the sphere.
4. The image processing method according to claim 3, characterized in that, The steps for constructing the dynamic structuring element neighborhood of the effective pixels in step 2 are as follows: The first step is to select an unselected pixel from the valid disk area; The second step is to calculate the selected pixels respectively. Normalized coordinates Compared with other pixels to be judged in the valid disk area Normalized coordinates ; , ; , ; The third step is to form a neighborhood of dynamic structural elements corresponding to the selected pixel points by combining all the pixels to be judged that meet the constraints. The fourth step is to determine whether all pixels in the valid disk area have been selected. If so, obtain the dynamic structural element neighborhood of all pixels in the valid disk area; otherwise, proceed to the first step.
5. The image processing method according to claim 4, characterized in that, The constraints described in step 2 are as follows: ; in, Indicates the selected pixel. The horizontal normalized coordinates are derived from Calculated; Indicates the selected pixel. The vertical normalized coordinates are derived from Calculated; Indicates the pixel to be judged The horizontal normalized coordinates are derived from Calculated; Indicates the pixel to be judged The vertical normalized coordinates are derived from Calculated; Indicates the geometric constraint threshold. , Represents the relative radius of the spherical reference structural element, that is, the ratio of the radius of the spherical cap to the radius of the sphere corresponding to the structural element, and its value ranges from [value missing]. .
6. The image processing method according to claim 1, characterized in that, The intermediate grayscale image after the erosion operation mentioned in step 3 refers to the following: for each effective pixel, the minimum value of all neighboring pixel values in the neighborhood of its dynamic structuring element is selected, and this minimum value is used as the eroded pixel value of the current effective pixel. The eroded pixel values of all effective pixels are combined to form an intermediate grayscale image after the erosion operation. This operation effectively eliminates bright noise points smaller than the scale of the dynamic structuring element, and because the dynamic structuring element adapts to the spherical geometry, it will not destroy the surface features of the sphere.
7. The image processing method according to claim 1, characterized in that, Step 4, which involves extracting the maximum value of neighboring pixels in the intermediate grayscale image, means extracting the maximum value of neighboring pixels in the intermediate grayscale image from the same dynamic structuring element neighborhood of each effective pixel in the eroded intermediate grayscale image, ensuring that the erosion operation is based on consistent spherical geometric constraints.
8. The image processing method according to claim 1, characterized in that, The step 4 of assigning the maximum value to the target effective pixel means assigning the maximum value of the neighboring pixel value to the same effective pixel that was eroded in step 3, completing the maximum value assignment operation of the pixel, and restoring the effective features that were reasonably suppressed during the erosion process.
Citation Information
Patent Citations
Method for obtaining correction parameter of spherical perspective projection model
CN104200468A
Human eye sight tracking method and device based on three-dimensional spherical Taylor expansion
CN107145224A