Method and system for eliminating projection image distortion based on augmented reality
By obtaining the tilt angle of the projection device and using a hash algorithm to obtain the correction coefficient, the projection picture is corrected, and the problems of projection picture distortion and image quality reduction in the prior art are solved, and high-quality projection picture correction is achieved.
Patent Information
- Application Number
- CN202211512548.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-11-28
AI Technical Summary
The prior art uses the keystone correction method to correct the projected image, which leads to a decrease in the image quality of the projected image, and cannot effectively solve the problem of projected image distortion.
By obtaining the tilt angle of the projection device, a distorted picture and a normal picture are generated, and the hashing algorithm is used to obtain correction coefficients to correct the distorted picture to ensure that the projected picture is corrected without degrading the picture quality.
Without reducing the image quality of the projected image, the problem of projected image distortion is effectively solved and the use scenarios of augmented reality programs are expanded.
Smart Images

Figure CN116033129B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to augmented reality technology, and in particular to a method and system for eliminating projection picture distortion based on augmented reality. Background Art
[0002] The image is projected on the projection device by the program developed based on augmented reality. Since the projected surface is irregular, the distance and angle from different parts of the projection surface to the projector are different. This causes the projected image to have different distortions in different parts of the projection surface, and this distortion increases as the difference between the normal direction of the projection target surface and the direction of the projection center axis increases. Since the unit area at different positions on the surface is projected onto the projection surface differently, the projected image is distorted. In order to achieve a satisfactory projection effect, the projected image needs to be distorted and compensated according to the shape of the projected object.
[0003] In the prior art, such as patent CN202110396260.5, a method, device, projection equipment and storage medium for trapezoidal correction of a projection screen; the projection screen is corrected by a trapezoidal correction method, which will reduce the image quality of the projection screen; Summary of the invention
[0004] The present invention aims to solve the problem that the projection picture quality is reduced by correcting the projection picture by the trapezoidal correction method in the prior art, and provides a method and system for eliminating the distortion of the projection picture based on augmented reality.
[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions:
[0006] A method for eliminating projection image distortion based on augmented reality, the method comprising:
[0007] Obtaining the tilt angle of the projection device;
[0008] The generation of distorted images and normal images is based on the tilt angle of the projection device to obtain distorted images and normal images. When the distortion angle is 0 degrees, it is a normal image, otherwise it is a distorted image.
[0009] Correction of distorted images: Compare the distorted images with the normal images through the hash algorithm to obtain the correction coefficient; Correct the distorted images through the correction coefficient;
[0010] The corrected picture is projected through a projection device to obtain a normal picture.
[0011] Preferably, the method for correcting the distorted image includes:
[0012] Step 1, obtain the distorted image and the normal image of the same size; the size is: K1*K2, where K1 is the length of the pixel and K2 is the width of the pixel
[0013] Step 2, reducing the image size, dividing the image in step 1 into sub-images of the same size, and the size of the sub-image is (K1*K2) / H, where H is the reduction ratio;
[0014] Step 3, color simplification, graying the sub-image pixels in step 2, thereby obtaining T-level grayscale Gray, where T is the grayscale level;
[0015] Step 4, calculate the average value GrayRAV of all grayscale pixels in step 3;
[0016] Step 5, obtaining the image fingerprint, comparing the grayscale Gray in step 3 with the grayscale average GrayRAV in step 4, when Gray is greater than or equal to GrayRAV; the result is 1; otherwise the result is 0; the obtained results are combined to obtain the image fingerprint;
[0017] Step 6, obtaining the correction coefficient, comparing the image fingerprint of the normal picture with the image fingerprint of the distorted image, so as to determine the number of image data with different image fingerprints, and the number of image data is the correction coefficient;
[0018] Step 7: Correct the distorted image based on a correction coefficient, where the correction coefficient is the number of different image pixels in the distorted image.
[0019] Preferably, obtaining the tilt angle of the projection device includes:
[0020] Directly obtain the tilt angle from the projection device or set the tilt by custom settings.
[0021] In order to solve the above technical problems, the present invention also provides a system for eliminating projection picture distortion based on augmented reality, which is implemented by the method for eliminating projection picture distortion based on augmented reality;
[0022] A module for acquiring a tilt angle of a projection device, wherein the module is used to acquire a tilt angle of the projection device;
[0023] The generation module of the distorted image and the normal image obtains the distorted image and the normal image according to the tilt angle of the projection device. When the distortion angle is 0 degrees, it is a normal image, otherwise it is a distorted image.
[0024] A correction module for distorted images, which compares the distorted images with normal images through a hash algorithm to obtain correction coefficients; and corrects the distorted images through the correction coefficients;
[0025] The projection module of the picture projects the corrected picture through the projection device to obtain a normal picture.
[0026] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for eliminating projection image distortion based on augmented reality are implemented.
[0027] In order to solve the above technical problems, the present invention also provides an electronic device, which includes: a memory for storing a computer program; and a processor for implementing the steps of the method for eliminating projection image distortion based on augmented reality when executing the computer program.
[0028] The present invention has significant technical effects due to the adoption of the above technical solution:
[0029] The present invention projects the picture projected by the projection device onto the ground at an inclined angle, thereby solving the problem of distortion of the projected picture without reducing the picture quality of the projected picture.
[0030] The present invention not only solves the problem of image distortion, but also can break away from the constraint of whether the projection device itself has trapezoidal correction, thereby expanding and enhancing the usage scenarios of current programs. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the present invention;
[0032] Figure 2 This is a flow chart of distortion picture correction of the present invention; DETAILED DESCRIPTION
[0033] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0034] Example 1
[0035] A method for eliminating projection image distortion based on augmented reality. Figure 1 The method includes:
[0036] Obtaining the tilt angle of the projection device;
[0037] The generation of distorted images and normal images is based on the tilt angle of the projection device to obtain distorted images and normal images. When the distortion angle is 0 degrees, it is a normal image, otherwise it is a distorted image.
[0038] Correction of distorted images: Compare the distorted images with the normal images through the hash algorithm to obtain the correction coefficient; Correct the distorted images through the correction coefficient;
[0039] The corrected picture is projected through a projection device to obtain a normal picture.
[0040] The projection device, the ground and the projected image form a triangle. The projection device and the ground are at a 90-degree vertical relationship. The tilt angle of the projection device is obtained. 90 degrees minus the tilt angle is the angle between the projection device and the ground, referred to as the device angle. The internal angle of the triangle is 180 degrees. Subtract 90 degrees from the device angle to get the angle that the image needs to be adjusted, which is the tilt angle of the projection device. Figure 2 In the present invention, the correction method of the distorted image includes:
[0041] Step 1, obtain the distorted image and the normal image of the same size; the size is: K1*K2, where K1 is the length of the pixel and K2 is the width of the pixel
[0042] Step 2, reducing the image size, dividing the image in step 1 into sub-images of the same size, and the size of the sub-image is (K1*K2) / H, where H is the reduction ratio;
[0043] Step 3, color simplification, graying the sub-image pixels in step 2, thereby obtaining T-level grayscale Gray, where T is the grayscale level;
[0044] Step 4, calculate the average value GrayRAV of all grayscale pixels in step 3;
[0045] Step 5, obtaining the image fingerprint, comparing the grayscale Gray in step 3 with the grayscale average GrayRAV in step 4, when Gray is greater than or equal to GrayRAV; the result is 1; otherwise the result is 0; the obtained results are combined to obtain the image fingerprint;
[0046] Step 6, obtaining the correction coefficient, comparing the image fingerprint of the normal picture with the image fingerprint of the distorted image, so as to determine the number of image data with different image fingerprints, and the number of image data is the correction coefficient;
[0047] Step 7: Correct the distorted image based on a correction coefficient, where the correction coefficient is the number of different image pixels in the distorted image.
[0048] Acquiring the tilt angle of the projection device includes: directly acquiring the tilt angle through the projection device.
[0049] Example 2
[0050] Based on Example 1, the inclination angle of the projection device in this example is a user-defined inclination, and the inclination set in this example is 30 degrees.
[0051] Example 3
[0052] Based on the above embodiment, this embodiment reduces the captured distorted image and normal image to the same size of 1920*1080, eliminating the image differences caused by different sizes / ratios.
[0053] The distorted image and the normal image are evenly cut into 100 sub-images of 192*108 size.
[0054] Convert the sub-image to 192*108 20736 grayscales, that is, all pixels have only 20736 colors in total; calculate the grayscale average of all 20736 pixels; each pixel corresponds to a grayscale; compare the grayscale of each pixel with the average value, and record it as 1 if it is greater than or equal to the average value, and record it as 0 if it is less than the average value; combine the comparison results of the previous step together to form a 20736-bit integer, and obtain the image fingerprint data of the normal picture and the image fingerprint data of the distorted picture respectively; compare the image fingerprint data of the normal picture and the image fingerprint data of the distorted picture with different images to see how many bits in the 20736 bits are different; cyclically compare 100 copies of the sub-image. The difference between the image fingerprint data of the normal picture and the image fingerprint data of the distorted picture of the overall pixel points can be obtained. According to the difference between the image fingerprint data of the normal picture and the image fingerprint data of the distorted picture, calculate how to adjust the pixel points of the distorted picture, and obtain the pixel points of the normal picture, and obtain the correction coefficient.
[0055] Example 4
[0056] Based on the above embodiments, the system for eliminating projection picture distortion based on augmented reality in this embodiment is implemented by the method for eliminating projection picture distortion based on augmented reality;
[0057] A module for acquiring a tilt angle of a projection device, wherein the module is used to acquire a tilt angle of the projection device;
[0058] The generation module of the distorted image and the normal image obtains the distorted image and the normal image according to the tilt angle of the projection device. When the distortion angle is 0 degrees, it is a normal image, otherwise it is a distorted image.
[0059] The distortion picture correction module compares the distortion picture with the normal picture through the hash algorithm to obtain the correction coefficient; the distortion picture is corrected by the correction coefficient; the picture projection module projects the corrected picture through the projection device to obtain the normal picture
[0060] Example 5
[0061] Based on the above embodiments, this embodiment provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for eliminating projection image distortion based on augmented reality are implemented.
[0062] Example 6
[0063] Based on the above embodiments, this embodiment provides an electronic device, which includes: a memory for storing a computer program; and a processor for implementing the steps of the method for eliminating projection image distortion based on augmented reality when executing the computer program.
Claims
1. A method for eliminating projection image distortion based on augmented reality, the method comprising: Obtaining the tilt angle of the projection device; The generation of distorted images and normal images is based on the tilt angle of the projection device to obtain distorted images and normal images. When the distortion angle is 0 degrees, it is a normal image, otherwise it is a distorted image. Correction of distorted images: Compare the distorted images with the normal images through the hash algorithm to obtain the correction coefficient; Correct the distorted images through the correction coefficient; Projection of the picture: projecting the corrected picture through a projection device to obtain a normal picture; The correction methods for distorted images include: Step 1, obtaining a distorted image and a normal image of the same size; the size is: K1*K2, where K1 is the length of a pixel and K2 is the width of a pixel; Step 2: reducing the image size. The image in step 1 is divided into sub-images of the same size. The size of the sub-image is (K1*K2) / H, where H is the reduction ratio. Step 3, color simplification, graying the sub-image pixels in step 2, thereby obtaining T-level grayscale Gray, where T is the grayscale level; Step 4, calculate the average value GrayRAV of all grayscale pixels in step 3; Step 5, obtaining the image fingerprint, comparing the grayscale Gray in step 3 with the grayscale average GrayRAV in step 4, when Gray is greater than or equal to GrayRAV; the result is 1; otherwise the result is 0; the obtained results are combined to obtain the image fingerprint; The difference between the image fingerprint data of the normal picture and the image fingerprint data of the distorted picture is obtained for the overall pixel points. According to the difference between the image fingerprint data of the normal picture and the image fingerprint data of the distorted picture, it is calculated how to adjust the pixel points of the distorted picture, the pixel points of the normal picture can be obtained, and the correction coefficient is obtained.
2. The method for eliminating projection image distortion based on augmented reality according to claim 1, characterized in that: The acquisition of the tilt angle of the projection device includes: Directly obtain the tilt angle from the projection device or set the tilt by custom settings.
3. A system for eliminating projection image distortion based on augmented reality, characterized in that: A system implemented by the method for eliminating projection image distortion based on augmented reality as described in any one of claims 1-2; A module for acquiring a tilt angle of a projection device, wherein the module is used to acquire a tilt angle of the projection device; The generation module of the distorted image and the normal image obtains the distorted image and the normal image according to the tilt angle of the projection device. When the distortion angle is 0 degrees, it is a normal image, otherwise it is a distorted image. A correction module for distorted images, which compares the distorted images with normal images through a hash algorithm to obtain correction coefficients; and corrects the distorted images through the correction coefficients; The projection module of the picture projects the corrected picture through the projection device to obtain a normal picture.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for eliminating projection image distortion based on augmented reality as described in any one of claims 1 to 2 are implemented.
5. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for eliminating projection image distortion based on augmented reality as described in any one of claims 1 to 2 when executing the computer program.
Citation Information
Patent Citations
Keystone correction method and device for projection picture, projection equipment and computer storage medium
CN113518212A
A trapezoidal correction ultrashort focus projection apparatus with dual cameras and a method thereof
CN109040728A
Projection picture correction method and device, electronic equipment and readable storage medium
CN110996081A