Image splicing method based on large-angle fast reflector parameter measuring device

The parameters of a large-angle fast-reflecting mirror are extracted by image stitching. The Canny algorithm and Harris corner detection are used to solve the problem of small angle measurement range in traditional measurement methods and achieve high-precision parameter measurement.

CN118918002APending Publication Date: 2024-11-08西安应用光学研究所
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411211830.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing technologies cannot effectively measure the performance parameters of large-angle fast reflectors, especially those with amplitudes ranging from 20 mrad to 500 mrad. The small field of view of traditional autocollimators makes measurement difficult.

Method used

An image stitching method based on a large-angle fast reflector parameter measurement device is adopted. Edge features are extracted by Canny algorithm, combined with Harris corner detection and Gaussian filtering, and the horizontal and vertical coordinate alignment of the image is calculated to realize image stitching. The tilt angle of the reflector is calculated based on the centroid of the light spot.

Benefits of technology

It improves the angle measurement range and accuracy, meets the testing requirements of high-frequency bandwidth for fast reflectors, and has a simple and highly portable algorithm, making it suitable for testing large-angle fast reflectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918002A_ABST
    Figure CN118918002A_ABST
Patent Text Reader

Abstract

The invention provides an image splicing method based on a large-angle fast reflector parameter measuring device, which comprises the following steps of: firstly, acquiring two target images, and respectively converting the two target images into grey-scale maps; the method comprises the following steps: firstly, extracting edge features of a middle marking band of two images through a Canny algorithm to determine a transverse alignment coordinate; common feature points are extracted through corner detection, alignment coordinates in the vertical direction are determined, and an image is spliced; and finally, the rotation angle of the fast reflecting mirror is calculated according to the spacing distance of the centroid coordinates of the two light spots. According to the method, image splicing is carried out by means of common edge pixel point traversal and angular point feature extraction, so that the speed of the method is higher than that of a common splicing algorithm, and the accuracy of the angle calculated by the spliced image is higher; in combination with a large-angle fast reflecting mirror angle measuring device, the algorithm also meets the test requirements of the large-angle fast reflecting mirror; and meanwhile, the algorithm is simple and high in portability, and can be easily integrated into other measuring devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of optical measurement, and in particular relates to an image stitching method based on a large-angle fast reflector parameter measuring device. Background Art

[0002] Traditional experimental methods for measuring the performance parameters of fast reflectors primarily rely on measuring the mirror's swing angle with an autocollimator to test its linearity and repeatability. However, due to the autocollimator's small field of view, the measured swing angle amplitude is very small. This makes it impossible to measure the performance parameters of fast reflectors with wide angles, ranging from 20mrad to 500mrad. Furthermore, there is no fast and effective method for measuring the parameters of fast reflectors with wide angles. Summary of the Invention

[0003] The purpose of the present invention is to solve one or more problems existing in the prior art, and to provide an image stitching method based on a large-angle fast reflector parameter measurement device to achieve image stitching, thereby increasing the angle measurement range and improving the existing measurement method to meet the test requirements of the high-frequency bandwidth of the fast reflector.

[0004] To achieve the above objectives, the technical solutions provided by the present invention are:

[0005] An image stitching method based on a large-angle fast reflector parameter measurement device comprises the following steps:

[0006] Step 1: Use a large-angle fast reflector parameter measurement device to obtain two target images, and use the human eye color sensitivity formula to convert the two target images into grayscale images respectively;

[0007] Step 2: Use the Canny algorithm to extract the edge images of the two grayscale images respectively;

[0008] Step 3: Traverse each row of the two edge images, determine the abscissa of the edge curve, and determine the abscissa alignment amount based on the difference in abscissas;

[0009] Step 4: Use the Harris feature corner extraction method to extract corner features from the two edge images, and determine the vertical coordinate alignment between the common pixels of the two edge images based on the common landmark features in the two edge images;

[0010] Step 5: stitch the images according to the corresponding horizontal and vertical coordinate alignment to obtain a stitched image;

[0011] Step 6: Calculate the number of pixels between the two light spot centroids in the stitched image. Calculate the displacement of the light spot in the image space based on the number of pixels and the pixel size of the high-speed camera. Calculate the rotation angle of the light spot based on the object-image formula, which is the swing angle of the fast reflex mirror.

[0012] Furthermore, in step 2, after smoothing the image using Gaussian filtering, the gradient direction and amplitude of each pixel in the grayscale image are calculated, and the non-maximum suppression algorithm is used to remove the spurious effect. Then, the strong and weak edges are divided according to the double threshold method, and finally the isolated weak edges are eliminated.

[0013] Furthermore, in step 4, the edge image is first processed using the following formula:

[0014]

[0015] Among them, w(x,y) represents the weight function of the sliding window, which can be a constant or a Gaussian function. E(u,v) represents the change of the pixel weight coefficient when the sliding window moves in all directions under the offset (u,v). I(x+u,y+v): represents the pixel value of the image after the offset (u,v). I(x,y) represents the pixel value at position (x,y) in the edge image. Taylor expansion of the above formula can be obtained:

[0016]

[0017] Among them, M represents the gradient covariance matrix for calculating the Harris corner point. Since E(u,v) is related to M, the Harris corner point evaluation coefficient is defined as follows:

[0018] R=det(M)-k(tr(M)) 2

[0019] Where k represents a constant weight coefficient, det(M) = γ1γ2, tr(M) = γ1+γ2, γ1 and γ2 represent the eigenvectors of the gradient oblique variance matrix M. Substituting the eigenvectors into the formula yields the following:

[0020] R=γ1γ2-k(γ1+γ2) 2

[0021] The above formula converts the calculated pixel value measurement rate of change into the eigenvector of the gradient covariance matrix. When R is large, that is, greater than the set threshold, it means that the two eigenvectors are similar or close, then the two points are similar corner points. The features of these two similar corner points are the coordinate positions of the two similar corner points in the edge image. Taking two similar corner points as a group, the average value of the translation between all similar corner points is calculated as the vertical coordinate alignment amount between the common pixels of the two edge images.

[0022] Furthermore, the gradient covariance matrix is ​​similar to the following formula:

[0023]

[0024] Among them, I x and I y Gradients in the X and Y directions respectively.

[0025] Furthermore, in step 6, based on the calculated alignment amount of the horizontal and vertical coordinates, for the image to be translated in the two images, the top rows or columns of the image are deleted or blank rows or columns are inserted to achieve the same horizontal and vertical coordinates of the pixels.

[0026] Furthermore, in step 1, the large-angle fast reflector parameter measurement device includes: a laser, a fast reflector, a first high-speed camera, a second high-speed camera, a computer, and a blackboard;

[0027] The blackboard is placed vertically in front of the first high-speed camera and the second high-speed camera, and a marking tape is attached to the blackboard between the sight lines of the first high-speed camera and the second high-speed camera;

[0028] The laser mirror is placed directly above a reflective mirror. The visible laser beam emitted by the laser is reflected by the fast reflector and hits the blackboard. The first high-speed camera and the second high-speed camera placed side by side take pictures of the beam reflected on the blackboard. The two target images captured by the first high-speed camera and the second high-speed camera are sent to a computer electrically connected to them. The two target images are spliced ​​by the computer and the swing angle of the reflector is calculated.

[0029] The advantages of the present invention are:

[0030] The image stitching method provided by the present invention, based on a large-angle rapid reflector parameter measurement device, first uses the Canny algorithm to extract the edge features of the middle marker bands of the two images to determine the horizontal alignment coordinates. Corner point detection is then used to extract shared feature points to determine the vertical alignment coordinates, and the images are stitched together. Finally, the rotation angle of the rapid reflector is calculated based on the distance between the centroid coordinates of the two light spots. Because this method relies on shared edge pixel traversal and corner point feature extraction for image stitching, it is faster than conventional stitching algorithms, and the angle calculated from the stitched image is more accurate. Furthermore, when combined with a large-angle rapid reflector angle measurement device, this algorithm also meets the testing requirements of large-angle rapid reflectors. Furthermore, the algorithm is simple and highly portable, making it easy to integrate into other measurement devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The features and advantages of the present invention will become more readily understood through the following description with reference to the accompanying drawings, which are not drawn to scale and in which some features are exaggerated or minimized to show details of particular components.

[0032] Figure 1 is a flow chart of an image stitching method for a large-angle fast reflector parameter measurement device according to an embodiment of the present invention;

[0033] Figure 2 2 is a schematic diagram of a parameter measurement device for a large-angle fast reflector according to an embodiment of the present invention;

[0034] Figure 3 It is a calculated effect diagram in an embodiment of the present invention.

[0035] In the figure: 1-laser mirror; 2-fast reflex mirror; 3-first high-speed camera; 4-second high-speed camera; 5-computer; 6-blackboard. DETAILED DESCRIPTION

[0036] The present invention will be described in detail below with reference to the accompanying drawings by means of exemplary embodiments of the present invention. It should be noted that the following detailed description of the present invention is only for the purpose of illustration and is not intended to limit the present invention.

[0037] In order to solve the problem of small angle measurement range of traditional two-dimensional fast reflector; the aiming method in the angle measurement process is generally an autocollimator and is limited by the angle measurement range, a large-angle fast reflector angle measurement device is provided. Figure 1 As shown, the large-angle fast reflection mirror parameter measurement device includes: a laser 1, a fast reflection mirror 2, a first high-speed camera 3, a second high-speed camera 4, a computer 5, and a blackboard 6.

[0038] The blackboard 6 is vertically placed in front of the first high-speed camera 3 and the second high-speed camera 4 . A marking tape is attached to the blackboard 6 between the sight lines of the first high-speed camera 3 and the second high-speed camera 4 .

[0039] The laser mirror 1 is placed directly above the reflective mirror 2. The visible laser beam emitted by the laser 1 is reflected by the quick reflector 2 and hits the blackboard 6. The first high-speed camera 3 and the second high-speed camera 4 placed side by side take pictures of the light beam reflected on the blackboard 6. The two target images captured by the first high-speed camera 3 and the second high-speed camera 4 are sent to a computer 5 electrically connected to them. The two target images are spliced ​​by the computer 5, and the swing angle of the reflective mirror 2 is calculated.

[0040] An image stitching method based on a large-angle fast reflector parameter measurement device, such as Figure 2 As shown, the following steps are included:

[0041] Step 1: Use the large-angle fast reflector parameter measurement device to obtain two target images. The human eye color sensitivity formula converts the two target images into grayscale images respectively:

[0042] GRAY=0.3R+0.59G+0.1B

[0043] In the above formula, GRAY represents the pixel value of the grayscale image, and R, G, and B represent the pixel values ​​of each color channel of the color image.

[0044] Step 2: Use the Canny algorithm to extract the edge images of the two grayscale images respectively.

[0045] After smoothing the image with Gaussian filtering, the gradient direction and amplitude of each pixel in the grayscale image are calculated, and the non-maximum suppression algorithm is used to remove stray effects (that is, solve the pixel with the largest amplitude in each area). Then, the strong and weak edges are divided according to the double threshold method (those less than the smaller threshold are removed, those greater than the smaller and less than the larger threshold are weak edges, and those greater than the larger threshold are strong edges). Finally, isolated weak edges are eliminated.

[0046] Step 3: Traverse each row of the two edge images, determine the abscissa of the edge curve, and determine the abscissa alignment amount based on the difference between the abscissas.

[0047] Step 4: Use the Harris feature corner extraction method to extract corner features from the two edge images, and determine the vertical coordinate alignment between the common pixels of the two edge images based on the common landmark features in the two edge images.

[0048] Specifically, the edge image is first processed using the following formula:

[0049]

[0050] Among them, w(x,y) represents the weight function of the sliding window, which can be a constant or a Gaussian function. E(u,v) represents the change of the pixel weight coefficient when the sliding window moves in all directions under the offset (u,v). I(x+u,y+v): represents the pixel value of the image after the offset (u,v). I(x,y) represents the pixel value at position (x,y) in the edge image. Taylor expansion of the above formula can be obtained:

[0051]

[0052] Among them, M represents the gradient covariance matrix for calculating the Harris corner point. The gradient covariance matrix is ​​similar to the following formula:

[0053]

[0054] Among them, I x and I y Gradients in the X and Y directions respectively.

[0055] Since E(u,v) is related to M, the Harris corner evaluation coefficient is defined as follows:

[0056] R=det(M)-k(tr(M)) 2

[0057] Where k represents a constant weight coefficient, det(M) = γ1γ2, tr(M) = γ1+γ2, γ1 and γ2 represent the eigenvectors of the gradient oblique variance matrix M. Substituting the eigenvectors into the formula yields the following:

[0058] R=γ1γ2-k(γ1+γ2) 2

[0059] The above formula converts the calculated pixel value rate of change into the eigenvector of the gradient covariance matrix. When R is large, it means that the two eigenvectors are similar or close, and the two points are similar corner points. The two similar corner point features are the coordinate positions of the two similar corner points in the edge image.

[0060] For example, (x, y) and (u, v). Assuming that the width and height of the two images are W and H respectively, then according to the corner coordinate characteristics, the horizontal and vertical coordinate translation between the images are:

[0061] △x=wxu

[0062] △y=yu

[0063] Taking two similar corner points as a group, the average translation amount between all similar corner points is calculated as the vertical coordinate alignment amount between the common pixels of the two edge images.

[0064] Step 5: Perform image stitching based on the corresponding alignment of the horizontal and vertical coordinates to obtain a stitched image.

[0065] Step 6: Calculate the number of pixels between the two light spot centroids in the stitched image. Calculate the displacement of the light spot in the image space based on the number of pixels and the pixel size of the high-speed camera. Calculate the rotation angle of the light spot based on the object-image formula, which is the swing angle of the fast reflex mirror.

[0066] According to the calculated translation amount of the horizontal and vertical coordinates, for the image to be translated in the two images, the top rows or columns of the image are deleted or blank rows or columns are inserted to achieve the same correspondence between the horizontal and vertical coordinates of the pixels between the images.

[0067] According to the coordinate difference between the two spots in the stitched image, the swing angle of the fast mirror is calculated according to the object-image formula:

[0068]

[0069] Where pix is ​​the pixel size, f is the focal length of the lens, and x is right is the horizontal coordinate of the center of mass of the right spot, x left is the horizontal coordinate of the center of mass of the light spot on the left.

[0070] Based on the common corner feature relationships between the overlapping regions of the two images (including the gradient directional characteristics of the images at the same spatial coordinates), the coordinates of the scattered points on the overlapping edges are calculated. Furthermore, based on these scattered point coordinates, the horizontal and vertical coordinate translations of the two images are calculated, thus rapidly achieving image stitching. Finally, the swing angle of the quick-reflection mirror is calculated based on the geometric relationship between the laser displacement distance and the swing angle of the quick-reflection mirror in the stitched image.

[0071] like Figure 3 As shown in the figure, the calculated effect of the present invention is obtained. From the figure, it can be seen that the numbers on the logo tape are seamlessly spliced. After reading the image pixel values, it can be found that the pixel error after splicing can be within 1 pixel in the actual effect, and there is no white edge at the edge of the spliced ​​image. Therefore, the spliced ​​image has the characteristics of high precision and good effect.

[0072] Finally, it should be noted that the features mentioned and / or illustrated in the above description of the exemplary embodiments of the present invention may be incorporated into one or more other embodiments in the same or similar manner, combined with features in other embodiments, or substituted for corresponding features in other implementations. The technical solutions obtained by such combination or substitution shall also be deemed to be included in the scope of protection of the present invention.

Claims

1. An image stitching method based on a large-angle fast reflector parameter measurement device, characterized in that: The following steps are involved: Step 1: Acquire two target images using a large-angle fast reflector parameter measurement device, and convert the two target images into grayscale images respectively; Step 2: Use the Canny algorithm to extract the edge images of the two grayscale images respectively; Step 3: traverse each row of the two edge images, determine the abscissa of the edge curve, and determine the abscissa alignment amount according to the difference of the abscissas; Step 4: Use the Harris feature corner point extraction method to extract corner point features from the two edge images, and determine the vertical coordinate alignment amount between the common pixels of the two edge images based on the common marker band features in the two edge images; Step 5: stitch the images according to the corresponding alignment values ​​of the horizontal and vertical coordinates to obtain a stitched image; Step 6: Calculate the number of pixels between the centroids of the two light spots in the stitched image, calculate the displacement of the light spot in the image space based on the number of pixels and the pixel size of the high-speed camera, and calculate the rotation angle of the light spot based on the object-image formula, which is the swing angle of the large-angle fast reflector.

2. The image stitching method based on the large-angle fast reflector parameter measurement device according to claim 1, characterized in that: In step 2, after smoothing the image using Gaussian filtering, the gradient direction and amplitude of each pixel in the grayscale image are calculated, and the stray effect is removed using the non-maximum suppression algorithm. Then, the strong and weak edges are divided according to the double threshold method, and finally the isolated weak edges are eliminated.

3. The image stitching method based on the large-angle fast reflector parameter measurement device according to claim 1, characterized in that: In step 4, the edge image is first processed using the following formula: Among them, w(x,y) represents the weight function of the sliding window, E(u,v) represents the change of the pixel weight coefficient when the sliding window moves in all directions under the offset (u,v), I(x+u,y+v) represents the pixel value of the image position (x,y) after the offset (u,v), and I(x,y) represents the pixel value at the position (x,y) in the edge image. Taylor expansion of the above formula is obtained: Among them, M represents the gradient covariance matrix for calculating the Harris corner point, E(u,v) is related to M, and the Harris corner point evaluation coefficient is defined as follows: R=det(M)-k(tr(M)) 2 Where k represents a constant weight coefficient, det(M) = γ1γ2, tr(M) = γ1+γ2, γ1 and γ2 represent the eigenvectors of the gradient oblique variance matrix M. Substituting the eigenvectors into the formula yields the following: R=γ1γ2-k(γ1+γ2) 2 If R is greater than the set value, it indicates that the two points are similar corner points. Taking two similar corner points as a group, the average translation amount between all similar corner points is calculated as the vertical coordinate alignment amount.

4. The image stitching method based on the large-angle fast reflector parameter measurement device according to claim 3, characterized in that: The gradient covariance matrix looks like this: Among them, I x and I y The gradients in the X and Y directions respectively.

5. The image stitching method based on the large-angle fast reflector parameter measurement device according to claim 1, characterized in that: In step 6, according to the calculated alignment amount of the horizontal and vertical coordinates, for the image to be translated in the two images, the top row or column of the image is deleted or a blank row or column is inserted to achieve the same correspondence between the horizontal and vertical coordinates of the pixels between the images.

6. The image stitching method based on the large-angle fast reflector parameter measurement device according to claim 1, characterized in that: In step 1, the large-angle fast reflector parameter measurement device includes: a laser, a fast reflector, a first high-speed camera, a second high-speed camera, a computer, and a blackboard; The blackboard is vertically placed in front of the first high-speed camera and the second high-speed camera, and a marking tape is attached to the blackboard between the sight lines of the first high-speed camera and the second high-speed camera; The laser mirror is placed directly above a reflector. The visible laser beam emitted by the laser is reflected by the fast reflector and hits the blackboard. The first high-speed camera and the second high-speed camera placed side by side take pictures of the beam reflected on the blackboard. The two target images collected by the first high-speed camera and the second high-speed camera are sent to a computer electrically connected to them. The two target images are spliced ​​by the computer and the swing angle of the reflector is calculated.