Any curved surface projection splicing correction method, system, equipment and medium
Through row-column scanning and interpolation inverse mapping technology, the accuracy and speed problems of projection splicing correction in existing flight simulation equipment are solved, efficient splicing and color transition of special-shaped curtains and multi-row projections are achieved, and the correction speed and robustness are improved.
Patent Information
- Application Number
- CN202410658491.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-03
AI Technical Summary
The projection splicing correction method in existing flight simulation equipment relies on manual operation, is not accurate and takes a long time, and cannot effectively handle the splicing between special-shaped curtains and multi-row and multi-column projections, and the existing automatic correction method has fitting failure and oscillation problems. , unable to satisfy the custom correction strategy.
The row-column scanning method is used to collect and identify the projected image of the projector, and the position of the screen calibration point is accurately obtained through median filtering and interpolation inverse mapping technology for distortion correction and splicing. It supports the splicing of special-shaped curtains and multi-row projections, and uses specific Color transition functions optimize color blending.
It significantly improves the correction speed and robustness, supports non-standard dome distortion correction, realizes the splicing of arbitrary rows and columns and non-aligned projection channels, optimizes the color transition of splicing strips, and reduces operation time and cost.
Smart Images

Figure CN118587274A
Abstract
Description
Technical Field
[0001] The invention belongs to the field of virtual vision, and in particular relates to a method, system, equipment and medium for stitching and correcting arbitrary curved surface projection. Background Art
[0002] In most current flight simulation devices, visual imaging is performed by projection. Projection on an actual screen is real image imaging, and after multiple optical processes such as lenses, it becomes virtual image imaging. In order to achieve realistic effects during simulation, large field of view and multi-channel projection are used. In most devices, manual correction methods are used for pre-distortion correction of projected images, and these methods often have defects such as the correction results largely rely on human subjective feelings and low accuracy.
[0003] At the same time, due to manual operation, each calibration takes a long time. When the flight simulation platform is running, in order to simulate the feeling of weightlessness and overweight, the entire simulation cabin will often move. The fixedly installed projector may deviate due to the shaking, causing the projection splicing strips of adjacent channels to produce ghost images. Once the ghosting affects the normal training of the pilot, it needs to be re-spliced. However, according to the existing technical solutions, the re-splicing work takes a long time and has high operating costs, which greatly delays the normal training plan. The common correction methods in the existing market can be roughly divided into two categories:
[0004] The first is the manual correction method. This method requires setting up a total station near the viewpoint of the equipment cabin design, and manually finding the angle of each curtain calibration point relative to the viewpoint. The entire surface is calculated and inferred based on the position angle of all points relative to the viewpoint. For the processing of the fusion band between multi-channel stitching, the points in the image are manually dragged, and the stitching band is fused by manual evaluation.
[0005] The second is automatic calibration by program, which is a common calibration method at present. By marking a calibration grid on the projection screen, the calibration is automatically performed through camera acquisition to obtain the calibration matrix. This method is limited by the accuracy of camera shooting and it is difficult to strictly align with the calibration grid.
[0006] The existing technology "An automatic surface projection correction and splicing method" (ICVRV 2022Automatic Correctionand Splicing of Multi-channel Projection Based on a Curve Intersection Model) uses a network camera module to communicate with the camera and uses file mapping to read pictures in the main program. The approximate area of the screen calibration point is manually selected and the sub-pixel coordinates are accurately calculated by the program. The projector projects an elliptical curve, and the camera collects the imaging image on the screen. The ellipse parameters are adjusted according to the iterative strategy for fitting, and the corrected Apriltag image of the middle channel is projected to calculate the splicing anchor point of the splicing belt. The splicing band fusion is achieved, but there are the following defects: although the splicing correction time is much shorter than the manual time, the single-channel view correction time still takes 1-2 hours; the use of the projected elliptical curve to fit the curtain calibration points is theoretically a local convergence model, and there are fitting failures or oscillations in actual use; the correction stitching model can only be applied to spherical and quasi-spherical curtains, and cannot adapt to special-shaped curtains; the splicing band fusion method is only applicable to horizontal splicing, and cannot meet the splicing between multiple rows and columns of projections; the system strategy and communication module have low degrees of freedom and cannot meet the customized correction strategy. Summary of the invention
[0007] In order to overcome the problems existing in the prior art, the present invention provides a method, system, device and medium for correcting the projection stitching of an arbitrary curved surface, which are used to overcome the existing defects.
[0008] A method for correcting arbitrary curved surface projection stitching, the method comprising the steps of:
[0009] S1. Collect the projected image projected by the projector on any curved screen to obtain the image captured by the camera;
[0010] S2. Identify and detect the image captured by the camera to obtain the position of the screen calibration point in the image captured by the camera;
[0011] S3. Obtain the corresponding rough position of each screen calibration point on the projected image;
[0012] S4. Correcting the rough position to obtain a fine position;
[0013] S5. Perform interpolation inverse mapping on the fine position to obtain the coordinates of each pixel on the original image corresponding to the projected image, and complete the distortion correction of the projected image;
[0014] S6. On the basis of distortion correction, overlapping bands formed by different channels projected by different projectors are spliced to form a spliced band;
[0015] S7. Perform color transition on the splicing tape to complete the calibration.
[0016] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein S2 includes:
[0017] S21. The camera image is processed by using two median filters of different sizes to obtain two images;
[0018] S22. Subtracting the two images to obtain an image to be selected;
[0019] S23. Mark the local area including the calibration point in the image to be selected, mark the pixels of the calibration point as 255, and mark the pixels of the non-calibration point as 0;
[0020] S24. Calculate the average value of the coordinates of all pixels with a value of 255 as the sub-pixel coordinates of the calibration point;
[0021] S25. Perform S21-S24 processing on each camera-captured image, and finally obtain the position of the screen calibration point in the camera-captured image.
[0022] According to the above aspects and any possible implementation, an implementation is further provided, wherein S3 specifically includes:
[0023] S31. A horizontal straight line is projected onto the screen by a projector;
[0024] S32. Shooting the image of the horizontal straight line on the screen;
[0025] S33. Calculate the distance between this line and the nearest row calibration point among all screen calibration points;
[0026] S34. If the absolute value of the distance is less than or equal to 2, the x or y coordinate of the horizontal line is used as the x or y coordinate of the line calibration point on the projected image;
[0027] S35. If the absolute value is greater than 2, the x or y coordinate of the horizontal line is changed to reduce the distance;
[0028] S36. Repeat the above steps to find the coordinates of all screen calibration points in the row, that is, obtain the corresponding rough position of each screen calibration point on the projection image.
[0029] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein S4 specifically includes:
[0030] S41. Mark the rough position of the calibration point corresponding to the projector image to obtain the marking point, which is projected onto the screen by the projector;
[0031] S42. Shooting the image projected by the projector onto the screen, and calculating the position of the marking point on the captured image;
[0032] S43. Calculate the distance between the calibration point and the marking point according to the rough position corresponding to the calibration point and the position of the marking point on the captured image;
[0033] S44. If the distance is greater than or equal to 0.2 pixels, return to step S41 to change the coordinates of the calibration point of the rough position, and gradually reduce the distance between the two points;
[0034] S45. If the distance is less than 0.2 pixels, the position of the marking point on the captured image is the precise coordinate of the calibration point.
[0035] According to the above aspects and any possible implementation, an implementation is further provided, wherein S5 comprises: S51. interpolating the positions of the curtain calibration points in row a and column b corresponding to the projection image to obtain the coordinates of the curtain calibration points in row 2a and column 2b corresponding to the projection image;
[0036] S52. Interpolate the coordinates corresponding to the curtain calibration points in row 2a and column 2b to obtain the coordinates on the projection image corresponding to the curtain calibration points of 2m*2n;
[0037] S53. According to the coordinates on the projection image corresponding to the 2m*2n screen calibration points, inversely map the coordinates on the projection image corresponding to each pixel of the m*n original image, where a, b, m and n are all integers.
[0038] According to the above aspects and any possible implementation, an implementation is further provided, wherein the interpolation in S51 adopts the griddata method, and the interpolation in S52 adopts the SmoothBivariateSpline method.
[0039] According to the above aspects and any possible implementation, an implementation is further provided, in S7, color transition of the splicing belt is performed using the following formula:
[0040]
[0041] Where u = 0.5, σ = 0.25, x normal are the normalized coordinates of the splicing band.
[0042] The present invention also provides an arbitrary curved surface projection stitching correction system, the system implements the method described, and includes the following modules:
[0043] The acquisition module is used to acquire the projection image projected by the projector on any curved screen to obtain the image captured by the camera;
[0044] An identification and detection module, used to identify and detect the image taken by the camera, and obtain the position of the screen calibration point in the image taken by the camera;
[0045] A calculation module, used to obtain the corresponding rough position of each screen calibration point on the projected image;
[0046] A correction module, used for correcting the rough position to obtain a fine position;
[0047] An interpolation inverse mapping module is used to perform interpolation inverse mapping on the fine position to obtain the coordinates of each pixel on the original image corresponding to the projected image, and complete distortion correction on the projected image;
[0048] A splicing module, used for splicing overlapping bands formed by different channels projected by different projectors to form a splicing band on the basis of distortion correction;
[0049] The transition module is used to perform color transition on the splicing belt to complete the correction.
[0050] The present invention further provides an electronic device, comprising:
[0051] A memory storing executable instructions;
[0052] A processor is used to execute the executable instructions in the memory to implement the method.
[0053] The present invention also provides a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described.
[0054] Beneficial effects of the present invention
[0055] The arbitrary curved surface projection stitching correction method of the present invention comprises the steps of: collecting a projection image projected by a projector on an arbitrary curved surface screen to obtain a camera-shot image; identifying and detecting the camera-shot image to obtain the position of a screen calibration point in the camera-shot image; obtaining the corresponding rough position of each screen calibration point on the projection image; correcting the rough position to obtain a fine position; interpolating and inverse mapping the fine position to obtain the coordinates of each pixel on the original image corresponding to the projection image, and completing distortion correction for the projection image; on the basis of distortion correction, stitching overlapping bands formed by different channels projected by different projectors to form a stitching band; performing color transition on the stitching band to complete correction. Based on the existing splicing correction technology, the present invention upgrades the image correction method and adopts row and column scanning to perform correction, which greatly improves the correction speed and robustness; can support distortion correction on non-standard spherical screens and special-shaped screens; improves the method of splicing splicing strips, and can support splicing between arbitrary rows and columns and non-aligned projection channels; optimizes the color fusion function of the splicing strip, so that the color transition between different channels is smoother. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a schematic diagram of the operation of the network camera interface;
[0057] Figure 2 It is the picture of the curtain calibration points taken by the camera;
[0058] Figure 3 It is a projector that projects a picture containing horizontal straight lines;
[0059] Figure 4 yes Figure 3 The image projected on the screen is a picture taken by a camera;
[0060] Figure 5 It is the effect captured by the camera after the projector projects a point onto the screen;
[0061] Figure 6 It is the A calibration diagram;
[0062] Figure 7 It is the B calibration diagram;
[0063] Figure 8 It is the image of A calibration image after pre-distortion correction;
[0064] Fig. 9 It is the image of the B calibration image after pre-distortion correction;
[0065] Fig.10 yes Figure 8 The picture taken by the camera is projected onto the screen by the projector;
[0066] Fig.11 yes Fig. 9 The picture taken by the camera is projected onto the screen by the projector;
[0067] Fig.12 It is a schematic diagram of splicing single channels with color transition and superimposed brightness;
[0068] Fig.13 It is a schematic diagram of the image position corresponding to the normalized Xnormal coordinates of the splicing band color transition function;
[0069] Fig.14 It is a schematic diagram of the inverse mapping coordinates;
[0070] Fig.15 is a flow chart of the method. DETAILED DESCRIPTION
[0071] In order to better understand the technical solution of the present invention, the content of the present invention includes but is not limited to the specific implementation methods described below, and similar technologies and methods should be considered to be within the scope of protection of the present invention. In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.
[0072] It should be clear that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all 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.
[0073] The present invention provides a method for correcting the projection of an arbitrary curved surface, such as Fig.15 As shown, the method comprises the steps of:
[0074] S1. Collect the projected image projected by the projector on any curved screen to obtain the image captured by the camera;
[0075] S2. Identify and detect the image captured by the camera to obtain the position of the screen calibration point in the image captured by the camera;
[0076] S3. Obtain the corresponding rough position of each screen calibration point on the projected image;
[0077] S4. Correcting the rough position to obtain a fine position;
[0078] S5. Perform interpolation inverse mapping on the fine position to obtain the coordinates of each pixel on the original image corresponding to the projected image, and complete the distortion correction of the projected image;
[0079] S6. On the basis of distortion correction, overlapping bands formed by different channels projected by different projectors are spliced to form a spliced band;
[0080] S7. Perform color transition on the splicing tape to complete the calibration.
[0081] In order to better understand the principles of the subsequent steps of this method, several terms used in the present invention are now explained:
[0082] Curtain calibration points: marking points marked on the curved curtain, including but not limited to fluorescent marking points, reflective points, active light source marking points, etc., the purpose of which is to mark the area on the curved curtain where the image should be presented after distortion correction.
[0083] Original image: a normal image to be displayed without pre-distortion;
[0084] Projected image: The image obtained after the original image is pre-distorted, and the image is projected by a projector.
[0085] Camera captures image: The projected image is projected onto the screen through a projector, and then the camera captures the image presented on the screen.
[0086] Specifically, the process of the present invention is as follows:
[0087] 1. Get the image taken by the camera.
[0088] The image obtained after the original image is pre-distorted, i.e., the projected image, is projected by a projector onto a screen with marked screen calibration points. At this time, a camera is used to capture the image presented on the screen to obtain a camera-captured image, or a camera-captured photo. The camera can use a network camera or a physical camera. When a network camera is used, run the following Figure 1 As shown, no limitation is given here.
[0089] 2. Identification and detection of curtain calibration points
[0090] The background color of the photos captured by the camera is uneven and similar to the color of the calibration points, and there are many noise points and other light spots. If the traditional HSV color recognition, thresholding and other means are used, the effect is poor. Therefore, the present invention uses the image difference method to process the calibration points of the curtain taken by the camera. The calibration points of the curtain taken by the camera are similar to salt and pepper noise (i.e., impulse noise) with larger granularity, which can be processed by median filtering.
[0091] Read the screen calibration point image taken by the camera, such as Figure 2As shown. First, a median filter with a convolution kernel size of 1 is performed, and then a median filter with a convolution kernel size of 21 is performed. The two images obtained after the two median filter processes are subtracted to obtain the image to be selected, and a local image area containing a single calibration point is selected from it. After the selected local image area is binarized, the pixels of the calibration point are marked as 255, and the pixels of the non-calibration point are marked as 0; then the coordinates of all pixels with a value of 255 are statistically averaged to obtain the sub-pixel coordinates of the calibration point. The sub-pixel coordinates are pixel coordinates, and the x and y of the sub-pixel coordinates are decimals, that is, the coordinates are more accurate, and the position of the calibration point is automatically detected and circled. The selection order is to select rows starting from the first available calibration point in the upper left corner of the camera image. After all the calibration points of the curtain captured by the camera are selected, the center of all calibration points is calculated and the data is saved in the required format. This step is the position of the manually selected calibration point on the camera image, that is, the position of the screen calibration point on the captured image is (xc, yc).
[0092] 3. Rough calibration of calibration points based on row and column scanning
[0093] After the position of the screen calibration point on the camera image is calculated in step 2, this method uses row scanning and column scanning to find the corresponding y coordinate and x coordinate of each screen calibration point on the projected image. The specific steps of row scanning are as follows: the position of the screen calibration point on the captured image is obtained in the recognition and detection of the curtain calibration point in step 2. Assuming that the picture taken by the camera (i.e., the image taken by the camera) is P1, the position of the screen calibration point on the captured image corresponds to the coordinates (X1, Y1) in the P1 image.
[0094] This step three uses the "position of the screen calibration point on the camera image" calculated in step two, and uses the same camera to shoot the projection of the horizontal line on the screen. At this time, let the captured image be P2. P1 and P2 are two images taken by the camera at a fixed position, so the coordinates (X1, Y1) in the P1 image can also represent the point at the same position in P2. Although P2 only captures the projection of the horizontal line on the screen, the point with coordinates (X1, Y1) on image P2 still represents the position of the screen calibration point on the captured image. Then the next iterative operation is to adjust the position of the projector projecting this horizontal curve, so that the horizontal line captured on the P2 image coincides with the coordinates (X1, Y1), that is, the Y1 coordinate can be saved; similarly, adjust the projected vertical line to coincide with the coordinates (X1, Y1), that is, the x1 coordinate can be saved. The specific steps are as follows:
[0095] 1. Project a horizontal straight line onto the screen from a projector. The color of the line can be red, blue, green, etc. Figure 3 As shown;
[0096] 2. The camera captures the image projected by the projector on the screen, such as Figure 4 As shown;
[0097] 3. Calculate the distance between this line and the nearest row calibration point (X1, Y1) on the image captured by the camera;
[0098] 4. If the absolute value of the distance is less than or equal to 2, the y coordinate of the calibration point (X1, Y1) corresponding to the projection image is recorded as the y coordinate of the current horizontal line;
[0099] 5. If the absolute value is greater than 2, change the y coordinate of the horizontal line to reduce the distance;
[0100] 6. Repeat the above steps to find the y coordinates of all the calibration points in the row.
[0101] Similarly, the x coordinates of all calibration points (X1, Y1) can be obtained by column scanning. Therefore, the x coordinates and y coordinates of each calibration point in the projection can be obtained respectively, and the rough position (xa, ya) of the calibration point on the projected image can be obtained.
[0102] Since the camera is a color camera, this method simultaneously calculates the coordinates of three rows and three columns of calibration points by separately identifying the three colors of red, green and blue, which greatly speeds up the correction speed.
[0103] 4. Fine calibration of calibration points
[0104] After step 3, the rough position of each calibration point on the projected image is obtained. In this step, this method will find more accurate coordinates. The specific steps are as follows:
[0105] 1. Draw a dot at the approximate position (xa, ya) of the calibration point on the projected image, and project the image with the dot onto the screen by the projector, that is, the image with the dot is projected again by the projector;
[0106] 2. The camera captures the image of the projector, and the position of this point on the image taken by the camera (xb, yb) is obtained through computer vision processing, such as Figure 5 As shown;
[0107] 3. According to the position obtained in step 2 and the position of the calibration point manually selected in step 2 on the camera image, that is, the position (xc, yc) of the screen calibration point on the captured image, calculate the distance between the two points (xb, yb) and (xc, yc);
[0108] 4. If the distance is greater than or equal to 0.2 pixels, change the x and y coordinates obtained in Step 3 after processing. The specific method is as follows: If xe ≥ xd, then xa = xa - 0.1; if xb < xc, then xa = xa + 0.1; if ye ≥ yd, then ya = ya - 0.1; if yb < yc, then ya = ya + 0.1;
[0109] 5. If the distance is less than 0.2 pixels, it can be determined that the updated (xa, ya) meets the requirement of ending the iteration, and the iteration is exited.
[0110] This method can simultaneously perform precise calibration of the rough positions corresponding to all calibration points, calculate all points simultaneously, so the time consumption of this part only depends on the point with the longest calculation time among all these points. When the number of points currently tested is about two hundred, the time consumption is less than 3 minutes.
[0111] V. Interpolation inverse mapping
[0112] In the previous step, the present invention obtained the precise positions on the projection image corresponding to all the calibration points on the curtain. Since each calibration point on the curtain corresponds to the pixel position of the original image at the design time. Taking an example but not limited to this example, for a calibration point of 9 rows and 15 columns corresponding to an image of 1920*1080, then the coordinates corresponding to row 0 and column 0 are (0, 0), and the coordinates corresponding to row 9 and column 15 are (1919, 1079).
[0113] For the projection image of the calibration point of a rows and b columns on the curtain, corresponding to the original image of m*n pixels, a, b, m, and n are all integers, and a and b are the numbers of rows and columns of the calibration points, with values ranging from 9 to 15, m*n is the resolution of the projection image, ranging from 1920*1080 to 3840*2160, 1920*1080 is 1080p, and 3840*2160 is 4k. The specific steps of the interpolation inverse mapping in this step are as follows:
[0114] 1. Interpolate the position of the calibration point of a rows and b columns on the projection image using the griddata method to obtain the coordinates on the projection image corresponding to the calibration points of 2a rows and 2b columns. griddata is an existing algorithm, and the specific operation is to interpolate data in a two-dimensional coordinate system;
[0115] 2. Interpolate the coordinates corresponding to the calibration points of 2a rows and 2b columns into the coordinates on the projection image corresponding to the calibration points of 2m*2n using the SmoothBivariateSpline method; the SmoothBivariateSpline method is an existing algorithm, which performs two-dimensional smooth surface interpolation on data in a two-dimensional coordinate system;
[0116] 3. According to the coordinates on the projection image corresponding to the 2m*2n screen calibration points, inversely map the coordinates on the projection image corresponding to each pixel in the m*n original image, that is, the inverse mapping parameters. For example, if it is known that the coordinates on the projection image corresponding to some points such as the screen calibration point (Xp, Yp) are (Xp', Yp') and other corresponding relationships, according to the pixel positions of (Xp', Yp'), (Xp'+1, Yp'), (Xp', Yp'+1), (Xp'+1, Yp'+1) and (Xq+1, Yq+1), the pixel position of (Xq+1, Yq+1) corresponding to (Xp+1', Yp+1') can be inferred. Finally, this step can obtain the coordinates of each pixel on the projection image projected by the projector corresponding to the pixel of the original image, that is, the inverse mapping parameters, such as Fig.13 shown.
[0117] 6. Splicing with splicing in complex situations
[0118] After processing steps three to five, the image projected by the projector has basically completed distortion correction. Since the simulator's visual system uses multi-channel projection to present the image, the projected images need to be spliced together to form a continuous and smooth image. In order to achieve a continuous and smooth image. The visual system is designed so that there will be overlapping bands in the image areas projected by different projectors. However, there is a certain deviation between the images projected by different channels, which will cause the overlapping bands to become blurred, so this step is performed on the basis of completing the distortion correction. This step splices the channel A01 image, and the channel A00 image remains unchanged as the anchor image for splicing. The process is as follows:
[0119] 1. In channel A00, according to the inverse mapping parameters obtained in step 5, convert the 1920*1080 images A and B into Figure 6 and Figure 7 As shown, pre-distortion is performed to obtain projection images A1 and B1, such as Figure 8 and Fig. 9 shown.
[0120] 2. In channel A00, project A1 and B1 onto the screen. In channel A01, the camera takes pictures and obtains the coordinates of all April tags on the camera image. The shape of April tags is similar to a QR code. All coordinates calculated by combining the two calibration pictures are recorded as (xd, yd). The picture obtained after the camera takes pictures is as follows: Fig.10 and Fig.11 As shown;
[0121] 3. In channel A01: select in advance which calibration points of the screen belong to the calibration points of the splicing belt, and draw points on the projection image corresponding to the coordinates of these calibration points (i.e. (xa, ya) in step 4.5), and project them onto the screen by the projector;
[0122] 4. In channel A01: The camera captures the effect after imaging projected on the curtain by the projector in step 3, and through computer vision processing, the position of the points on the painting in the picture captured by the camera is recorded as (xe, ye).
[0123] 5. In channel A01: According to (xe, ye) and (xd, yd) in step 2, calculate the distance between these two corresponding points.
[0124] 6. If the distance is greater than or equal to 0.2 pixels, by changing (xa, ya), gradually reduce the distance between the two points, and then return to step 3 of this step for iterative calculation. The specific method is: if xe ≥ xd, then xa = xa - 0.1; if xe < xd, then xa = xa + 0.1; if ye ≥ yd, then ya = ya - 0.1,; if ye < yd, then ya = ya + 0.1;
[0125] 7. If the distance is less than 0.2 pixels, it can be determined that the splicing coordinates of the splicing band of this point have been obtained.
[0126] Repeat the above steps to obtain all the splicing bands.
[0127] VII. Color transition of the splicing band
[0128] When adjacent channels (such as channel A00 in step six) are projected, there is an overlapping part in the image, and this area becomes the splicing band. If no color transition is performed, this area will be significantly brighter than other areas. In the actual test and use process of this method, the transition function with the best effect is determined, and the expression is:
[0129]
[0130] where u = 0.5, σ = 0.25, x normal is the normalized coordinate of the splicing band, as Fig.14 shown, x normal is the normalized coordinate of the splicing band, that is, the side coordinate close to the image edge on the splicing band of the image is 0, and the side coordinate close to the image center is 1. The present invention includes but is not limited to this state, and it is possible that the splicing band is on the upper, lower, left, or right edge of the image. The single-channel color transition of the splicing band and the superimposed brightness are as Fig.12 shown. In the entire splicing band, as approaching the edge, the brightness of the pixels linearly approaches 0% from the original 100% according to the transition function f(x normal ). The abscissa from 0.0 to 1.0 is the splicing band, f(1 - x normal ) represents the brightness when the adjacent channel splicing band is projected, f(x normal ) represents the brightness when the splicing band of this channel is projected, and f(x normal ) + f(1 - x normal) represents the theoretical sum of the projection brightness.
[0131] As an embodiment disclosed by the present invention, the present invention further discloses a system for stitching and correcting arbitrary curved surface projections. The system implements the method described, and includes the following modules:
[0132] The acquisition module is used to acquire the projection image projected by the projector on any curved screen to obtain the image captured by the camera;
[0133] An identification and detection module, used to identify and detect the image taken by the camera, and obtain the position of the screen calibration point in the image taken by the camera;
[0134] A calculation module, used to obtain the corresponding rough position of each screen calibration point on the projected image;
[0135] A correction module, used for correcting the rough position to obtain a fine position;
[0136] An interpolation inverse mapping module is used to perform interpolation inverse mapping on the fine position to obtain the coordinates of each pixel on the original image corresponding to the projected image, and complete distortion correction on the projected image;
[0137] A splicing module, used for splicing overlapping bands formed by different channels projected by different projectors to form a splicing band on the basis of distortion correction;
[0138] The transition module is used to perform color transition on the splicing belt to complete the correction.
[0139] As an embodiment disclosed in the present invention, the present invention further discloses an electronic device, the electronic device comprising:
[0140] A memory storing executable instructions;
[0141] A processor is used to execute the executable instructions in the memory to implement the method described in the present invention.
[0142] As an embodiment disclosed in the present invention, the present invention further discloses a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described in the present invention.
[0143] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0144] The above description shows and describes several preferred embodiments of the present invention, but as mentioned above, it should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the application concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not depart from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A method for stitching and correcting arbitrary curved surface projection, characterized in that: The method comprises the steps of: S1. Collect the projected image projected by the projector on any curved screen to obtain the image captured by the camera; S2. Identify and detect the image captured by the camera to obtain the position of the screen calibration point in the image captured by the camera; S3. Obtain the corresponding rough position of each screen calibration point on the projected image; S4. Correcting the rough position to obtain a fine position; S5. Perform interpolation inverse mapping on the fine position to obtain the coordinates of each pixel on the original image corresponding to the projected image, and complete the distortion correction of the projected image; S6. On the basis of distortion correction, overlapping bands formed by different channels projected by different projectors are spliced to form a spliced band; S7. Perform color transition on the splicing tape to complete the calibration.
2. The arbitrary curved surface projection stitching correction method according to claim 1, characterized in that: The S2 includes: S21. The camera image is processed by using two median filters of different sizes to obtain two images; S22. Subtracting the two images to obtain an image to be selected; S23. Mark the local area including the calibration point in the image to be selected, mark the pixels of the calibration point as 255, and mark the pixels of the non-calibration point as 0; S24. Calculate the average value of the coordinates of all pixels with a value of 255 as the sub-pixel coordinates of the calibration point; S25. Perform S21-S24 processing on each camera-captured image, and finally obtain the position of the screen calibration point in the camera-captured image.
3. The arbitrary curved surface projection stitching correction method according to claim 2, characterized in that: The S3 specifically includes: S31. A horizontal straight line is projected onto the screen by a projector; S32. Shooting the image of the horizontal straight line on the screen; S33. Calculate the distance between this line and the nearest row calibration point among all screen calibration points; S34. If the absolute value of the distance is less than or equal to 2, the x or y coordinate of the horizontal line is used as the x or y coordinate of the line calibration point on the projected image; S35. If the absolute value is greater than 2, the x or y coordinate of the horizontal line is changed to reduce the distance; S36. Repeat the above steps to find the coordinates of all screen calibration points in the row, that is, obtain the corresponding rough position of each screen calibration point on the projection image.
4. The arbitrary curved surface projection stitching correction method according to claim 1, characterized in that: The S4 specifically includes: S41. Mark the rough position of the calibration point corresponding to the projector image to obtain the marking point, which is projected onto the screen by the projector; S42. Shooting the image projected by the projector onto the screen, and calculating the position of the marking point on the captured image; S43. Calculate the distance between the calibration point and the marking point according to the rough position corresponding to the calibration point and the position of the marking point on the captured image; S44. If the distance is greater than or equal to 0.2 pixels, return to step S41 to change the coordinates of the calibration point of the rough position, and gradually reduce the distance between the two points; S45. If the distance is less than 0.2 pixels, the position of the marking point on the captured image is the precise coordinate of the calibration point.
5. The arbitrary curved surface projection stitching correction method according to claim 1, characterized in that: The S5 includes: S51. interpolating the positions of the curtain calibration points in row a and column b corresponding to the projection image to obtain the coordinates of the curtain calibration points in row 2a and column 2b corresponding to the projection image; S52. Interpolate the coordinates corresponding to the curtain calibration points in row 2a and column 2b to obtain the coordinates on the projection image corresponding to the curtain calibration points of 2m*2n; S53. According to the coordinates on the projection image corresponding to the 2m*2n screen calibration points, inversely map the coordinates on the projection image corresponding to each pixel of the m*n original image, where a, b, m and n are all integers.
6. The arbitrary curved surface projection stitching correction method according to claim 5, characterized in that: The interpolation in S51 uses the griddata method, and the interpolation in S52 uses the SmoothBivariateSpline method.
7. The arbitrary curved surface projection stitching correction method according to claim 1, characterized in that: In S7, the color transition of the splicing belt is performed using the following formula: Where u = 0.5, σ = 0.25, x normal are the normalized coordinates of the splicing band.
8. An arbitrary curved surface projection stitching correction system, characterized in that: The system implements the method described in any one of claims 1 to 7, and includes the following modules: The acquisition module is used to acquire the projection image projected by the projector on any curved screen to obtain the image captured by the camera; An identification and detection module, used to identify and detect the image taken by the camera, and obtain the position of the screen calibration point in the image taken by the camera; A calculation module, used to obtain the corresponding rough position of each screen calibration point on the projected image; A correction module, used for correcting the rough position to obtain a fine position; An interpolation inverse mapping module is used to perform interpolation inverse mapping on the fine position to obtain the coordinates of each pixel on the original image corresponding to the projected image, and complete distortion correction on the projected image; A splicing module, used for splicing overlapping bands formed by different channels projected by different projectors to form a splicing band on the basis of distortion correction; The transition module is used to perform color transition on the splicing belt to complete the correction.
9. An electronic device, characterized in that: The electronic device comprises: A memory storing executable instructions; A processor, wherein the processor runs the executable instructions in the memory to implement the method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.
Citation Information
Cited By
Correction method and system, storage medium, program product, electronic equipment and vehicle
CN119991521A
Calibration Method, System, Storage Medium, Program Product, Electronic Device and Vehicle
CN119991521B
