A method for correcting the superposition error of ship icon images
By denoising and two-dimensional Gaussian filtering on naval images, combined with neural network clustering, the problem of multi-angle image superposition errors is solved, the image resolution and accuracy are improved, and the image quality and recognition capabilities are enhanced.
Patent Information
- Application Number
- CN202110439499.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-23
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-04-23
AI Technical Summary
In coast guard, maritime and ship management systems, when images are fused after multi-angle shooting, due to the environment, measurement errors and different fields of view, there are large errors in image superposition, which affects image quality, resolution and sensitivity.
By acquiring multiple frames of images at the same time for denoising processing, the two-dimensional Gaussian filtering method is used to remove discrete noise, and combined with neural network clustering and non-local mean filters, image splicing is performed to correct errors.
The resolution and accuracy of the image are improved, the image superposition error is reduced, and the visual quality and recognition sensitivity are enhanced.
Smart Images

Figure CN113298725B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship icon image recognition, and in particular to a method for correcting a ship icon image superposition error. Background Art
[0002] In military and civilian fields such as coast guard, maritime affairs, and ship management systems, image monitoring has become an important source of information. It has become an important application field to quickly and effectively extract ship targets from real-time monitoring, automatically identify the identity of ships, and issue warnings for abnormal ship behavior.
[0003] In target detection technology, image fusion technology is often used after multi-angle shooting to identify icon images. Due to the influence of the environment, measurement errors, and different fields of view, images obtained from different angles are also different. When multiple images are directly superimposed on the same area, there are large errors in the images, and the image quality, resolution, and sensitivity will be affected. Therefore, it is necessary to propose a method for correcting the superposition error of ship icon images. Summary of the invention
[0004] The present invention provides a method for correcting the superposition error of a ship icon image. The method obtains multiple frames of images at the same time, performs denoising on the images to improve the resolution of the images, and then superimposes the images. A two-dimensional Gaussian filtering method is used to remove discrete noise from the errors generated by the superposition to obtain a complete ship icon image.
[0005] The technical solution of the present invention is:
[0006] A method for correcting a ship icon image superposition error, comprising:
[0007] Step 1: obtain multiple frames of icon images of the target ship at the same time, and perform noise reduction processing to obtain a deblurred image;
[0008] Step 2: superimpose the deblurred images and perform binarization to output image data;
[0009] Step 3: Cluster the image data using a neural network method and divide it into multiple class region data;
[0010] Step 4: Use two-dimensional Gaussian filtering to remove discrete noise in the class area to obtain a corrected image, and then stitch the corrected image to obtain a complete ship icon image.
[0011] Preferably, the noise reduction processing in step 1 includes:
[0012] The icon image is gradiented using edge detection algorithm, and the gradient image is used as a guide image for pre-filtering;
[0013]
[0014] Where D i represents the filtered image, i represents the pixel point, w j represents the local block centered at point i, I represents the gradient map, a j , b j represents the linear transformation parameter, μ j represents the pixel mean of the gradient map, σ j represents the pixel variance of the gradient map, F i Represents an icon image, Represents the pixel mean of the icon image;
[0015] Calculate the similarity coefficients of adjacent blocks of the pre-filtered image and improve the weight function of the non-local mean filter;
[0016]
[0017] In the formula, w(i,j) represents the weight coefficient, Z(i) represents the weighting factor, S represents the similarity coefficient, q represents the smoothing coefficient, and dist represents the Euclidean distance.
[0018] Preferably, the calculation formula of the similarity coefficient is:
[0019]
[0020] In the formula, m, n represent adjacent blocks, μ m Represents the pixel mean of m blocks, μ n represents the pixel mean of n blocks, σ m 2 represents the pixel variance of m blocks, σ n 2 represents the pixel variance of n blocks, σ mn 2 represents the pixel covariance of m and n blocks, represents the pixel variance of m blocks, and C1, C2, and C3 represent minimum parameters.
[0021] Preferably, the image superposition in step 2 includes:
[0022] The deblurred image coordinates are calibrated according to the image shooting position and angle, and then a grayscale image is generated;
[0023] Use gradient operator to extract the boundary of grayscale image;
[0024] Analyze the geometric deviation between the deblurred image boundary and the environment image;
[0025] Correcting the deblurred image deviation by geometric transformation to obtain a corrected image;
[0026] Superimpose the corrected images according to the corresponding coordinates.
[0027] Preferably, boundary extraction includes:
[0028] Traverse the grayscale image and calculate the gradient modulus of the pixel points;
[0029] The points where the gradient modulus is greater than the modulus threshold are regarded as boundary points;
[0030]
[0031] In the formula, f(x,y) represents the gray value of the current point, and g represents the gradient modulus.
[0032] Preferably, the corrected deblurred image deviation formula is:
[0033]
[0034] In the formula, (X D ,X D ) represents the actual coordinates of the error point, is the image coordinate corresponding to the error point, θ is the deviation angle, dx is the horizontal increment of the deviation, and dy is the vertical increment of the deviation.
[0035] Preferably, the binarization includes:
[0036] Normalize each row of the grayscale image and then binarize the entire image.
[0037] The normalization formula is
[0038] The binarization formula is:
[0039] Among them, E represents the normalized value, e represents the value before normalization, V min Indicates the minimum grayscale value, V max represents the maximum grayscale value, f represents the binary output value, g represents the pixel grayscale value, and thres represents the grayscale threshold.
[0040] Preferably, step three includes:
[0041] Use neural networks to divide image data into 2-20 categories;
[0042] Calculate the evaluation index of clustering results under each classification number;
[0043]
[0044] In the formula, DB represents the evaluation index, N represents the number of categories, and M i Represents the inter-class distance of the i-th class data, M j Represents the distance between classes of data of the jth class, MAX represents the maximum value, represents the intra-class similarity of the i-th class of data, Represents the intra-class similarity of the j-th class of data;
[0045] The clustering scheme with the smallest evaluation index is taken as the optimal clustering scheme.
[0046] Preferably, in step 4, removing discrete noise includes:
[0047] Calculate the first and second partial derivatives of a two-dimensional Gaussian template;
[0048] The class region data is filtered using the first-order partial derivative and the second-order partial derivative to obtain the class region map partial derivative;
[0049] According to the partial derivative of the class region graph, the curvature value of the class region graph curve is calculated;
[0050] Among them, the two-dimensional Gaussian template is
[0051] Where h(t,z) represents the Gaussian function, t,z represent the independent variables, and ν represents the standard deviation.
[0052] Preferably, the curvature value is calculated as:
[0053]
[0054] Where K represents the curvature value, Indicates the direction angle, H x ′,H′ y represents the first-order partial derivative, H x ″ x ,H′ y ' y represents the second-order partial derivative, H x ″ y ,H′ y ' x represents mixed partial derivatives, represents the first-order directional derivative, represents the second-order directional derivative.
[0055] The beneficial effects of the present invention are:
[0056] 1. The present invention provides a method for correcting the superposition error of a ship icon image, which obtains multiple frames of images at the same time, denoises the images to improve the image resolution, and then superimposes the images. A two-dimensional Gaussian filtering method is used to remove discrete noise from the errors generated by the superposition, thereby obtaining a complete ship icon image with high image resolution and accuracy.
[0057] 2. The present invention provides a method for correcting the superposition error of a ship icon image, which adopts a non-local mean filter to improve the weight function, filters and reconstructs the image, effectively filters out the noise of the image, and improves the visual quality of the image.
[0058] 3. The present invention provides a method for correcting the overlay error of a ship icon image. The method utilizes the boundary error between the environment image and the collected ship image to correct the image before overlaying it. This can effectively reduce the error caused by image overlay and reduce the difficulty of error correction.
[0059] 4. The present invention provides a method for correcting the superposition error of a ship icon image, which performs two-dimensional Gaussian filtering after neural network clustering, and has high precision in removing discrete noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 A flow chart of a method for correcting ship icon image superposition errors provided by the present invention.
[0061] Figure 2 FIG. 4 is a flowchart of a noise reduction process in one embodiment of the present invention.
[0062] Figure 3 A frame of ship icon image obtained in one embodiment of the present invention;
[0063] Figure 4 is a ship icon image after noise reduction processing in one embodiment of the present invention;
[0064] Figure 5 The figure is a flow chart of a method for image superposition in one embodiment of the present invention.
[0065] Figure 6 The figure is a flowchart of neural network clustering in one embodiment of the present invention.
[0066] Figure 7 The figure is a flow chart of a method for removing discrete noise in one embodiment of the present invention. DETAILED DESCRIPTION
[0067] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0068] It should be noted that, in the description of the present invention, the terms "middle", "upper", "lower", "lateral", "inner", etc. indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of description, and do not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, it should be noted that, in the description of the present invention, unless otherwise clearly specified and limited, the terms "set", "install", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0069] like Figure 1 As shown, a method for correcting the overlay error of a ship icon image includes:
[0070] S110, acquiring multiple frames of icon images of the target ship at the same time, and performing noise reduction processing to obtain a deblurred image;
[0071] S120, superimposing the deblurred images and binarizing and outputting image data;
[0072] Among them, binarization includes:
[0073] Normalize each row of the grayscale image and then binarize the entire image.
[0074] The normalization formula is
[0075] The binarization formula is:
[0076] Among them, E represents the normalized value, e represents the value before normalization, V min Indicates the minimum grayscale value, V max represents the maximum grayscale value, f represents the binary output value, g represents the pixel grayscale value, and thres represents the grayscale threshold.
[0077] Normalization processing can effectively avoid interference in subsequent processing caused by insufficient image contrast.
[0078] S130, clustering the image data using a neural network method to divide it into a plurality of class region data;
[0079] S140, using two-dimensional Gaussian filtering to remove discrete noise in the class region to obtain a corrected image, and stitching the corrected image to obtain a complete ship icon image.
[0080] By acquiring multiple frames of images at the same time, the images are denoised to improve the image resolution, and then the images are superimposed. The two-dimensional Gaussian filtering method is used to remove discrete noise from the errors generated by the superposition to obtain a complete ship icon image with high image resolution and accuracy.
[0081] Further, such as Figure 2 The noise reduction processing shown includes:
[0082] S111, gradient the icon image using an edge detection algorithm, and perform pre-filtering using the gradient image as a guide image;
[0083]
[0084] Where D i represents the filtered image, i represents the pixel point, w j represents the local block centered at point i, I represents the gradient map, a j , b j represents the linear transformation parameter, μ j represents the pixel mean of the gradient map, σ j represents the pixel variance of the gradient map, F i Represents an icon image, Represents the pixel mean of the icon image;
[0085] Using the gradient map as the guide map and using the guided filter for pre-filtering can reduce noise while retaining image edge details and the texture information of the scene.
[0086] S112, calculating the similarity coefficients of adjacent blocks of the pre-filtered image, the calculation formula of the similarity coefficient is:
[0087]
[0088] In the formula, m, n represent adjacent blocks, μ m Represents the pixel mean of m blocks, μ n represents the pixel mean of n blocks, σ m 2 represents the pixel variance of m blocks, σ n 2 represents the pixel variance of n blocks, σ mn 2 represents the pixel covariance of m and n blocks, represents the pixel variance of m blocks, and C1, C2, and C3 represent minimum parameters.
[0089] S113, improving the weight function of the non-local mean filter by using the similarity coefficient;
[0090]
[0091] In the formula, w(i,j) represents the weight coefficient, Z(i) represents the weighting factor, S represents the similarity coefficient, q represents the smoothing coefficient, and dist represents the Euclidean distance.
[0092] The images of the ship are obtained at different shooting positions and angles. Due to the certain errors between different shooting devices, after directly superimposing multiple frames of images on the same area, the image quality is limited by the shooting device with the worst image quality. The resolution and target recognition sensitivity of the final image will be affected. Because noise reduction processing is performed on the collected images, the image quality can be effectively improved, thereby improving the superposition effect.
[0093] In a specific embodiment, the ship icon image obtained is as follows: Figure 3 As shown in the figure, the image after noise reduction is Figure 4 As shown, it can be seen that the resolution of the image is greatly improved through noise reduction processing.
[0094] Further, such as Figure 5 As shown, the image overlay includes:
[0095] S121, calibrating the deblurred image coordinates according to the image shooting position and angle, and then generating a grayscale image;
[0096] Since the data of each acquisition device belongs to its own independent single coordinate system, it is necessary to convert the relative spatial position and direction relationship between each single coordinate system before image superposition. The coordinate system calibration measurement method includes industrial measurement calibration methods such as polar coordinate measurement based on high-precision total station, three-coordinate measuring machine, digital industrial photogrammetry, industrial measurement by theodolite, and calibration methods using special calibration fields.
[0097] S122, using a gradient operator to extract the boundary of the grayscale image;
[0098] Traverse the deblurred image and calculate the gradient modulus of the pixel points;
[0099] The points where the gradient modulus is greater than the modulus threshold are regarded as boundary points;
[0100]
[0101] In the formula, f(x,y) represents the gray value of the current point, and g represents the gradient modulus.
[0102] S123, analyzing the geometric deviation between the deblurred image boundary and the environment image;
[0103] S124, correcting the deblurred image deviation by geometric transformation to obtain a corrected image;
[0104] The corrected deblurred image deviation formula is:
[0105]
[0106] In the formula, (X D ,X D ) represents the actual coordinates of the error point, is the image coordinate corresponding to the error point, θ is the deviation angle, dx is the horizontal increment of the deviation, and dy is the vertical increment of the deviation.
[0107] Since the data of the ship icon image is obtained through machine vision technology, there are bound to be errors. The shift of geometric shapes usually includes translation deviation and rotation deviation. Geometric correction before image superposition can effectively reduce the error of the superimposed image and reduce the difficulty of error correction after superposition.
[0108] S125, superimposing the corrected images according to corresponding coordinates.
[0109] Further, such as Figure 6 As shown, step S130 specifically includes:
[0110] S131, using a neural network to divide the image data into 2-20 categories;
[0111] S132, calculating the evaluation index of the clustering result under each classification number;
[0112]
[0113] In the formula, DB represents the evaluation index, N represents the number of categories, and M i Represents the inter-class distance of the i-th class data, M j Represents the distance between classes of data of the jth class, MAX represents the maximum value, represents the intra-class similarity of the i-th class of data, Represents the intra-class similarity of the j-th class of data;
[0114] The smaller the DB value is, the smaller the intra-class distance of the clustering result is, the larger the inter-class distance is, and the more reasonable the clustering scheme is.
[0115] S133: taking the clustering scheme with the smallest evaluation index as the optimal clustering scheme.
[0116] Further, such as Figure 7 As shown, removing discrete noise includes:
[0117] S141, calculating the first-order partial derivative and the second-order partial derivative of the two-dimensional Gaussian template;
[0118] Among them, the two-dimensional Gaussian template is
[0119] Where h(t,z) represents the Gaussian function, t,z represent the independent variables, and ν represents the standard deviation.
[0120] S142, filtering the class region data using the first-order partial derivative and the second-order partial derivative to obtain a class region graph partial derivative;
[0121] S143, calculating the curvature value of the class area graph curve according to the partial derivative of the class area graph;
[0122] The curvature value is calculated as:
[0123]
[0124] Where K represents the curvature value, Indicates the direction angle, H x ′,H′ y represents the first-order partial derivative, H x ″ x ,H′ y ' y represents the second-order partial derivative, H x ″ y ,H′ y ' x represents mixed partial derivatives, represents the first-order directional derivative, represents the second-order directional derivative.
[0125] A multi-scale and multi-directional two-dimensional Gaussian rate wave template is adopted. Taking into account the multi-directional and uncertain random distribution of the curve trend of the ship icon image, four directions of 0°, 45°, 90° and 135° are selected to calculate the curve curvature and perform image correction. The discrete noise is well controlled and removed.
[0126] The present invention provides a method for correcting the superposition error of a ship icon image. The method obtains multiple frames of images at the same time, performs denoising on the images to improve the resolution of the images, and then superimposes the images. A two-dimensional Gaussian filtering method is used to remove discrete noise from the errors generated by the superposition, so as to obtain a complete ship icon image with high image resolution and high error correction accuracy.
[0127] The above contents are only embodiments of the present invention. The common sense such as the known specific structures and characteristics in the scheme is not described in detail here. It is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific implementations. Without departing from the present invention, several modifications and improvements can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A method for correcting the superposition error of a ship icon image, characterized in that: include: Step 1: obtain multiple frames of icon images of the target ship at the same time, and perform noise reduction processing to obtain a deblurred image; The noise reduction process in step 1 includes: Gradient the icon image using an edge detection algorithm, and perform pre-filtering using the gradient map as a guide map; Where D i represents the filtered image, i represents the pixel point, w j represents the local block centered at point i, I represents the gradient map, a j , b j represents the linear transformation parameter, μ j represents the pixel mean of the gradient map, σ j represents the pixel variance of the gradient map, F i Represents an icon image, Represents the pixel mean of the icon image; Calculate the similarity coefficients of adjacent blocks of the pre-filtered image and improve the weight function of the non-local mean filter; In the formula, w(i,j) represents the weight coefficient, Z(i) represents the weighting factor, S represents the similarity coefficient, q represents the smoothing coefficient, and dist represents the Euclidean distance; The calculation formula of the similarity coefficient is: In the formula, m, n represent adjacent blocks, μ m Represents the pixel mean of m blocks, μ n represents the pixel mean of n blocks, σ m 2 represents the pixel variance of m blocks, σ n 2 represents the pixel variance of n blocks, σ mn 2 represents the pixel covariance of m and n blocks, represents the pixel variance of m blocks, C1, C2, C3 represent minimum parameters; Step 2: superimposing the deblurred images and binarizing them to output image data; Step 3: clustering the image data using a neural network method to divide it into a plurality of class region data; Step 4: Use two-dimensional Gaussian filtering to remove discrete noise in the class area to obtain a corrected image, and splice the corrected image to obtain a complete ship icon image.
2. The method for correcting the superposition error of the ship icon image according to claim 1, characterized in that: The image superposition in step 2 includes: Calibrate the deblurred image coordinates according to the image shooting position and angle, and then generate a grayscale image; Using a gradient operator to extract the boundary of the grayscale image; Analyzing the geometric deviation between the deblurred image boundary and the environment image; Correcting the deblurred image deviation by geometric transformation to obtain a corrected image; The corrected images are superimposed according to corresponding coordinates.
3. The method for correcting the superposition error of the ship icon image according to claim 2, characterized in that: The boundary extraction comprises: Traversing the grayscale image, calculating the gradient modulus of the pixel points; The point where the gradient modulus is greater than the modulus threshold is taken as a boundary point; In the formula, f(x,y) represents the gray value of the current point, and g represents the gradient modulus.
4. The method for correcting the superposition error of the ship icon image according to claim 3, characterized in that: The corrected deblurred image deviation formula is: In the formula, (X D ,Y D ) represents the actual coordinates of the error point, (D x0 ,D y0 ) is the image coordinate corresponding to the error point, θ is the deviation angle, dx is the horizontal increment of the deviation, and dy is the vertical increment of the deviation.
5. The method for correcting the superposition error of the ship icon image according to claim 4, characterized in that: The binarization includes: Normalizing each row of the grayscale image and then binarizing the entire image; The normalization formula is: The binarization formula is: Among them, E represents the normalized value, e represents the value before normalization, V min Indicates the minimum gray value, V max represents the maximum grayscale value, f represents the binary output value, g represents the pixel grayscale value, and thres represents the grayscale threshold.
6. The method for correcting the superposition error of the ship icon image according to claim 5, characterized in that: The step three comprises: Using a neural network to divide the image data into 2-20 classes; Calculate the evaluation index of clustering results under each classification number; In the formula, DB represents the evaluation index, N represents the number of categories, and M i Represents the inter-class distance of the i-th class data, M j Represents the distance between classes of data of the jth class, MAX represents the maximum value, represents the intra-class similarity of the i-th class of data, Represents the intra-class similarity of the j-th class of data; The clustering scheme with the smallest evaluation index is taken as the optimal clustering scheme.
7. The method for correcting the superposition error of the ship icon image according to claim 6, characterized in that: In the step 4, removing discrete noise includes: Calculate the first and second partial derivatives of a two-dimensional Gaussian template; Filtering the class region data using the first-order partial derivative and the second-order partial derivative to obtain a class region map partial derivative; Calculating the curvature value of the curve of the class area graph according to the partial derivative of the class area graph; Wherein, the two-dimensional Gaussian template is Where h(t,z) represents the Gaussian function, t,z represent the independent variables, and ν represents the standard deviation.
8. The method for correcting the superposition error of the ship icon image according to claim 7, characterized in that: The calculation formula of the curvature value is: Where K represents the curvature value, Indicates the direction angle, H x ′,H′ y represents the first-order partial derivative, H x ″ x ,H′ y ' y represents the second-order partial derivative, H x ″ y ,H′ y ' x represents mixed partial derivatives, represents the first-order directional derivative, represents the second-order directional derivative.
Citation Information
Patent Citations
Neighborhood windowing based non-local mean value CT (Computed Tomography) imaging de-noising method
CN103116879A
Improved fuzzy C mean value clustering based image clustering method and device
CN108830289A
