Picture correction method of projector, projection device and storage medium

By using a preset calibration image of multiple circular feature points in the projector and the camera to form a binocular system, the projection transformation relationship between the projection surface and the projector is calculated, which solves the trapezoidal distortion caused by the non-vertical optical axis of the projector lens. problem, improving the accuracy of projection screen correction.

CN118678035APending Publication Date: 2024-09-20ANKER INNOVATIONS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310300751.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

The optical axis of the projector's lens is not perpendicular to the projection surface, causing trapezoidal distortion in the projected image. The existing technology has a problem of reduced correction accuracy when focusing is not completed.

Method used

A preset calibration image with multiple circular feature points is used for projection. The projection transformation relationship between the projection surface and the projector is calculated using the image information captured by the camera. The binocular system is used for image correction to ensure correction accuracy.

Benefits of technology

Even if the projector has not completed focusing, trapezoidal correction is achieved through the preset calibration pattern of multiple circular feature points, which improves the accuracy of projection screen correction and avoids the impact of out-of-focus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118678035A
    Figure CN118678035A
Patent Text Reader

Abstract

The invention discloses a picture correction method of a projector, a projection device and a storage medium. The method comprises the following steps: projecting a preset calibration image with a plurality of circular feature points to a projection plane to obtain a calibration picture; obtaining a shot image obtained by shooting the calibration picture through a camera; acquiring first position information of the plurality of circular feature points in the preset calibration image, and acquiring second position information of the plurality of circular feature points in the shot image; calculating a projection transformation relationship between the projection surface and the projector by using the first position information and the second position information; and performing image correction on a picture to be projected on the projection plane by the projector by using the projection transformation relation. In this way, the precision of correcting the projection picture can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of projection technology, and in particular to a projector image correction method, a projection device and a storage medium. Background Art

[0002] With the development of science and technology, various projectors have been widely used in various occasions. Specifically, a projector is a display device for generating a projection image, and can project the projection image to be displayed onto a projection surface, such as a wall, a screen, etc.

[0003] When using a projection device for projection, the optical axis of the projector lens is not perpendicular to the projection surface due to the placement and placement of the projector, resulting in trapezoidal distortion of the projection image on the projection surface. In addition, during the correction of the projection image, if the projector has not completed the focus, the correction accuracy will be affected by the defocus. Summary of the invention

[0004] The embodiments of the present application provide a projector screen correction method, a projection device, and a storage medium, which can improve the accuracy of correcting the projection screen.

[0005] In a first aspect, an embodiment of the present application provides a method for correcting an image of a projector, comprising: projecting a preset calibration image having multiple circular feature points onto a projection surface to obtain a calibrated image; obtaining a captured image obtained by capturing the calibration image with a camera; obtaining first position information of the multiple circular feature points in the preset calibration image, and obtaining second position information of the multiple circular feature points in the captured image; calculating a projection transformation relationship between the projection surface and the projector using the first position information and the second position information; and performing image correction on a picture to be projected by the projector on the projection surface using the projection transformation relationship.

[0006] In the second aspect, an embodiment of the present application provides a projector, including a projector and a camera arranged on the projector; the projector includes a processor, a memory, a communication circuit and a projection module, the memory and the projection module are coupled to the processor; the camera is coupled to the processor; the memory is used to store a computer program, and the processor is used to execute the computer program to implement the image correction method of the projector provided in the present application as described above.

[0007] The beneficial effects of the present application are as follows: Different from the prior art, a preset calibration image with multiple circular feature points is projected onto a projection surface to obtain a calibration picture. A captured image obtained by shooting the calibration picture with a camera is obtained, the first position information of multiple circular feature points in the preset calibration image is obtained, and the second position information of multiple circular feature points in the captured image is obtained. The projection transformation relationship between the projection surface and the projector is calculated using the first position information and the second position information, and the image to be projected by the projector on the projection surface is corrected using the projection transformation relationship. The present application sets a camera so that the camera and the projector lens form a binocular system, shoots the calibration picture obtained by projecting based on the preset calibration image through the camera, and calculates the projection transformation relationship between the projection surface and the projector using the different position information of the circular feature points in the preset calibration image in the preset calibration image and the captured image, so that the projection transformation relationship can be used to correct the picture to be projected on the projection surface. That is, the present application converts the projection picture correction problem into a homography measurement between two imaging surfaces. In addition, the preset calibration image in the present application has multiple circular feature points. The calculation of the centroid of the circle is more accurate because all pixels outside the circle can be used. Even if the edges of the circular spots taken when the projector is not focused are blurred, the centroid position can be accurately determined. Therefore, even if the projector has not completed the focus and the projected image is not clear, the trapezoidal correction function can be achieved through the preset calibration pattern with multiple circular feature points, so that the correction is not affected by defocusing, and the accuracy of the correction of the projected image is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 is a schematic block diagram of a projection device in an embodiment of the projection device of the present application;

[0009] Figure 2 is a schematic block diagram of a projector in an embodiment of a projection device of the present application;

[0010] Figure 3 It is a flowchart of an embodiment of a method for correcting a picture of a projector of the present application;

[0011] Figure 4 It is a timing diagram of an embodiment of a method for correcting a picture of a projector of the present application;

[0012] Figure 5 It is a first projection schematic diagram of an embodiment of a method for correcting an image of a projector of the present application;

[0013] Figure 6 It is a second projection schematic diagram of an embodiment of the image correction method for a projector of the present application;

[0014] Figure 7 is a schematic diagram of a preset calibration image in an embodiment of a method for image correction of a projector of the present application;

[0015] Figure 8 is a schematic diagram of projective transformation in an embodiment of a method for correcting a picture of a projector of the present application;

[0016] Fig. 9 It is a schematic diagram of the positional relationship between the projection coordinate system and the world coordinate system in an embodiment of the image correction method of the projector of the present application;

[0017] Fig.10 It is a schematic diagram of the principle of camera internal parameters and lens internal parameters in an embodiment of the image correction method of the projector of the present application;

[0018] Fig.11 It is a third projection schematic diagram in the embodiment of the image correction method of the projector of the present application;

[0019] Fig.12 It is a circuit structure diagram of a computer-readable storage medium embodiment of the present application. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0021] With the development of science and technology, various projectors have been widely used in various occasions. Specifically, a projector is a display device for generating a projection image, and can project the projection image to be displayed onto a projection surface, such as a wall, a screen, etc.

[0022] After long-term research, the inventor found that in the process of using a projection device for projection, due to the placement position and placement method of the projector, the optical axis of the projector lens is not perpendicular to the projection surface, resulting in the projection picture on the projection surface having trapezoidal distortion, affecting the user's viewing experience. In the process of using a camera for calibration in the prior art, most of the calibration patterns in the form of a checkerboard are used for calibration, and the accuracy of the corner point extraction of the checkerboard depends on the clarity of the edges of the black and white grids. When the projector is calibrated using a camera, if the projector has not completed focusing, the unclear projected checkerboard calibration pattern will affect the calibration result, resulting in a decrease in the accuracy of the trapezoidal correction. In order to solve the above technical problems, the present application proposes the following embodiments.

[0023] like Figure 1 and Figure 2As shown, the projection device 100 in the embodiment of the projection device of the present application may include a projector 110 and a camera 120 disposed on the projector 110. Specifically, the projector 110 may include a processor 111, a memory 112, a communication circuit 113 and a projection module 114.

[0024] The projection module 114 may include a lens 115. In the projection device 100, the positions of the lens 115 and the camera 120 are relatively fixed, and a binocular system can be formed by the lens 115 and the camera 120, so as to realize the correction of the projection picture.

[0025] The memory 112 is used to store computer programs, and may be a RAM (Read-Only Memory), a ROM (Random Access Memory), or other types of storage devices. Specifically, the memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory is used to store at least one program code.

[0026] The processor 111 is used to control the operation of the projection device 100. The processor 111 may also be referred to as a CPU (Central Processing Unit). The processor 111 may be an integrated circuit chip having the ability to process signals. The processor 111 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor 111 may also be any conventional processor, etc.

[0027] The processor 111 is used to execute the computer program stored in the memory 112 to implement the projector image correction method described in the embodiment of the projector image correction method of the present application.

[0028] The communication circuit 113 is a connecting device or circuit used by the projection device 100 to communicate with external devices, so that the processor 111 can exchange data with the external devices via the communication circuit 113 .

[0029] The embodiment of the projector image correction method of the present application can be applied to the scene of correcting the projection device 100. Figure 3As shown. This embodiment may include the following steps: S100: Project a preset calibration image with multiple circular feature points onto a projection surface to obtain a calibration picture. S200: Obtain a captured image obtained by shooting the calibration picture with a camera. S300: Obtain first position information of multiple circular feature points in the preset calibration image, and obtain second position information of multiple circular feature points in the captured image. S400: Calculate the projection transformation relationship between the projection surface and the projector using the first position information and the second position information. S500: Perform image correction on the picture to be projected by the projector on the projection surface using the projection transformation relationship.

[0030] A preset calibration image with multiple circular feature points is projected onto the projection surface to obtain a calibration picture. A captured image obtained by shooting the calibration picture with the camera 120 is obtained, the first position information of the multiple circular feature points in the preset calibration image is obtained, and the second position information of the multiple circular feature points in the captured image is obtained. The projection transformation relationship between the projection surface and the projector 110 is calculated using the first position information and the second position information, and the image of the picture to be projected on the projection surface by the projector 110 is corrected using the projection transformation relationship. The present application sets the camera 120 so that the camera 120 and the lens 115 of the projector 110 form a binocular system, and the calibration picture obtained by projecting based on the preset calibration image is photographed by the camera 120, and the different position information of the circular feature points in the preset calibration image in the preset calibration image and the captured image is used to calculate the projection transformation relationship between the projection surface and the projector 110, so that the picture to be projected on the projection surface can be corrected using the projection transformation relationship. That is, the present application converts the projection picture correction problem into the homography measurement between the two imaging surfaces. Furthermore, the preset calibration image in the present application has a plurality of circular feature points, and the calculation of the centroid of the circle is relatively accurate because all pixels outside the circle can be used. Even if the edges of the circular spots taken when the projector 110 is not in focus are blurred, the centroid position can be accurately determined. Therefore, even if the projector 110 has not completed the focus and the projection picture is not clear, the trapezoidal correction function can be realized through the preset calibration pattern with a plurality of circular feature points, so that the correction is not affected by the defocus, and the accuracy of the correction of the projection picture is improved.

[0031] like Figure 4 As shown, this embodiment is described in detail below.

[0032] S100: Projecting a preset calibration image having a plurality of circular feature points onto a projection surface to obtain a calibration image.

[0033] The change in the posture of the projector 110 may be caused by a change in the placement of the projector 110 or a change in the position of the projector 110. Specifically, when the projector 110 is projecting, a normal rectangular image is displayed. However, when the posture of the projector 110 changes, that is, when the projector 110 is deflected horizontally or vertically, the distance and angle between the lens 115 and the projection surface change, and the projection on the projection surface will be a trapezoid, which hinders normal viewing, so the projector 110 needs to be recalibrated. For example, if Figure 5 and Figure 6 As shown, Figure 5 The left figure in the figure is a schematic diagram of horizontal deflection. When the projector 110 is projecting forward, the displayed image is a rectangle ABCD. After being rotated horizontally by a certain angle, the projected image becomes a trapezoid BCEF. Figure 6 The right figure in the figure is a schematic diagram of vertical deflection. When the projector 110 is projecting forward, the displayed image is a rectangle ABCD. After being vertically rotated by a certain angle, the projected image becomes a trapezoid BCFE.

[0034] The preset calibration image can be an image with multiple circular feature points, such as Figure 7 As shown, specifically, the preset calibration image can be a dot grid image, which is composed of evenly distributed circular spots. The centroid calculation of the circle is more accurate because all pixels outside the circle can be used. Even if the edges of the circular spots taken when the projector 110 is not focused are blurred, the centroid position can be accurately determined. Therefore, even if the projector 110 has not completed the focus and the projection picture is not clear, the trapezoidal correction function can be achieved through the preset calibration pattern with multiple circular feature points, so that the correction is not affected by the defocus, and the accuracy of the correction of the projection picture is improved.

[0035] When the posture of the projector 110 changes, a preset calibration image having a plurality of circular feature points may be projected onto a projection surface to obtain a calibration picture, and thus calibration may be performed based on the projection picture.

[0036] In one implementation, how to project a preset calibration image having a plurality of circular feature points onto a projection surface to obtain a calibration image may be referred to the following steps included in S100:

[0037] S110: Acquire posture information detected by the accelerometer of the projector.

[0038] S120: Using the posture information, determine whether the posture of the projector has changed.

[0039] S130: If yes, projecting the preset calibration image having a plurality of circular feature points onto the projection surface to obtain a projection picture.

[0040] The accelerometer may be pre-set in the projector 110, and is used to detect changes in the posture information of the projector 110. Specifically, the posture information detected by the accelerometer of the projector 110 may be obtained, and the posture information may be used to determine whether the posture of the projector 110 has changed. In the process of determining whether the posture of the projector 110 has changed, the currently obtained posture information may be compared with the posture information obtained last time, so as to determine whether the posture of the projector 110 has changed. Furthermore, the accelerometer of the projector 110 may detect the posture information at preset intervals.

[0041] In one implementation, for a projector 110 without an accelerometer, the projection screen can be monitored in real time by the camera 120, and the contour of the projection surface and the contour of the projection screen can be detected at the same time. If a large deformation occurs, it can be determined that the posture of the projector 110 has changed.

[0042] S200: Acquire a captured image obtained by capturing a calibration image with a camera.

[0043] After the preset calibration image with multiple circular feature points is projected onto the projection surface to obtain the calibration picture, the calibration picture can be photographed by the camera 120 to obtain a photographed image. Since the calibration needs to be corrected based on the calibration picture projected by the preset calibration image, the calibration picture is photographed by the camera 120 to obtain a photographed image, which can facilitate analysis and processing of the photographed image, and thus facilitate correction.

[0044] S300: Acquire first position information of a plurality of circular feature points in a preset calibration image, and acquire second position information of a plurality of circular feature points in a captured image.

[0045] The first position information may include coordinate information of the plurality of circular feature points in a pre-projected image before the preset calibration image is projected. The second position information may include coordinate information of the plurality of circular feature points in a camera 120 coordinate system corresponding to the captured image.

[0046] Based on the focusing principle, it can be known that the shooting picture taken by the camera 120 and the pre-projection picture can be associated through the homography matrix, that is, p 1 =H 21 p 2 , where p 1 is a set of coordinate information of multiple circular feature points in the pre-projection image before the preset calibration image is projected, p 2 is the second position information set of multiple circular feature points in the captured image, H 21 is the homography matrix.

[0047] By obtaining the first position information of multiple circular feature points in a preset calibration image and obtaining the second position information of multiple circular feature points in the captured image, the homography matrix can be calculated using the first position information and the second position information, and then the plane parameters of the projector coordinate system of the projector can be calculated based on the homography matrix, and the plane parameters can be used for correction.

[0048] In one implementation, the first position information may be acquired during the pre-projection process. For how to acquire the second position information of the plurality of circular feature points in the captured image, reference may be made to the following steps included in S300:

[0049] S310: Detect and identify a plurality of circular feature points in the captured image, and determine second position information of the plurality of circular feature points in the captured image when the plurality of circular feature points are detected.

[0050] In the process of acquiring the second position information, multiple circular feature points may be detected and identified in the captured image, and the second position information of the multiple circular feature points in the captured image may be determined when the multiple circular feature points are detected. Specifically, when the multiple circular feature points are detected, the coordinate information of the multiple circular feature points in the coordinate system of the camera 120 corresponding to the captured image may be determined by processing and calculating the multiple circular feature points.

[0051] In one implementation, S310 may include the following steps:

[0052] S311: performing binarization processing on the captured image based on a number of different preset grayscale thresholds to obtain a number of binary images.

[0053] The preset grayscale threshold may be a threshold pre-set in the projector 110 and used for binarization of the captured image. Specifically, a plurality of preset grayscale thresholds may be set.

[0054] The captured image is binarized based on a number of different preset grayscale thresholds, thereby obtaining a number of binarized images. Specifically, the number of the binarized images is the same as the number of the preset grayscale thresholds.

[0055] S312: Extracting a cluster region consisting of connected regions from each binary image.

[0056] In order to facilitate the calculation of the second position information, a cluster region composed of connected regions may be extracted from each binary image.

[0057] In one implementation, the following steps may be referred to for how to extract the cluster region composed of connected regions from each binary image:

[0058] S3121: Connect adjacent pixels with equal grayscale values ​​in each binary image to obtain a connected region, and splice several connected regions to obtain a cluster region.

[0059] The connected region may include a region formed by connecting adjacent pixels with equal grayscale values ​​in the binary image. In the process of extracting the cluster region composed of the connected regions from each binary image, the adjacent pixels with equal grayscale values ​​in each binary image may be connected to obtain the connected region, and then several connected regions may be spliced ​​to obtain the cluster region.

[0060] S313: Based on the centroid position of each cluster region, cluster regions whose centroid distance is less than a preset distance threshold are merged to form a combined cluster region.

[0061] Since the plurality of feature points are circular, the second position information corresponding to the circular feature points can be determined based on the centroid of the circle, so the second position information can be obtained by calculating the centroid position of the cluster area. And since the cluster areas may overlap due to a short distance, the centroid position of each cluster area can be combined to form a combined cluster area with a centroid distance less than a preset distance threshold.

[0062] S314: Determine the centroid position of the cluster area that meets the preset shape feature among all the combined cluster areas, and obtain a plurality of circular feature points and corresponding second position information.

[0063] After merging the cluster areas whose centroid distance is less than the preset distance threshold to form a combined cluster area, the centroid position of the cluster area that meets the preset shape characteristics can be determined in all the combined cluster areas to obtain multiple circular feature points and corresponding second position information.

[0064] Specifically, in the process of determining the centroid position of the cluster area that meets the preset shape characteristics among all the combined cluster areas, the combined cluster areas that meet the preset shape characteristics can be screened out by judging whether the area, roundness, convexity and other characteristics of the combined cluster areas meet the preset shape characteristics, and the centroid position of the combined cluster areas that meet the preset shape characteristics is determined as the second position information.

[0065] S400: Calculate the projection transformation relationship between the projection surface and the projector using the first position information and the second position information.

[0066] After the first position information and the second position information are acquired, the projection transformation relationship between the projection surface and the projector 110 may be calculated using the first position information and the second position information, and then projection correction may be performed using the projection transformation relationship.

[0067] In one implementation, how to calculate the projection transformation relationship between the projection surface and the projector using the first position information and the second position information may refer to the following steps included in S400:

[0068] S410: Calculate the plane parameters of the projection surface relative to the projector coordinate system of the projector in a preset association relationship by using the first position information and the second position information.

[0069] The preset association relationship can be used to characterize the association relationship between the first position information, the second position information and the plane parameter. The plane parameter can be used to characterize the projection transformation relationship.

[0070] After the first position information and the second position information are acquired, the plane parameters of the projection surface relative to the projector coordinate system of the projector 110 may be calculated using the first position information and the second position information in a preset association relationship.

[0071] In one implementation, how to use the first position information and the second position information to calculate the plane parameters of the projection surface relative to the projector coordinate system of the projector in the preset association relationship may refer to the following steps included in S410:

[0072] S411: Performing a projective transformation calculation on the first position information and the second position information to obtain a homography matrix, and using the homography matrix to calculate a plane parameter in a preset association relationship.

[0073] Projective transformation can also be called homography, which means mapping points on a projective plane to another projective plane, and mapping straight lines to straight lines, with the property of line preservation. Specifically, the projective transformation can be represented by a 3*3 non-singular homogeneous matrix H. Figure 8 As shown, assuming that the homography between the two images has been obtained, the two images can be associated through the homography matrix H: Among them, X 1 represents a point in image 1, X 2 Represents the points in image 2, that is, image 2 can be transformed to image 1 through the homography matrix H.

[0074] The preset association relationship can be used to characterize the association relationship between the homography matrix and the plane parameters.

[0075] Since the captured image captured by the camera 120 and the pre-projected image can be associated through the homography matrix, that is, the first position information and the second position information can be associated through the homography matrix. Therefore, the first position information and the second position information can be projected and transformed to obtain the homography matrix. After obtaining the homography matrix, the plane parameters can be calculated based on the preset association relationship and the homography matrix.

[0076] In one implementation, how to calculate the plane parameters using the homography matrix in the preset association relationship may refer to the following steps included in S411:

[0077] S4111: Calculate the plane parameters by using the transformation parameters and the homography matrix between the camera and the projector to perform mathematical operations in a preset relationship.

[0078] The preset association relationship can be used to characterize the mathematical relationship between the transformation parameters and the plane parameters and the homography matrix. Specifically, the transformation parameters can be the inherent parameters used for converting between the captured image and the pre-projected image corresponding to the same projection screen.

[0079] In the process of calculating the plane parameters by using the homography matrix in the preset association relationship, the plane parameters can be calculated by performing mathematical operations on the transformation parameters between the camera 120 and the projector 110 and the homography matrix in the preset association relationship.

[0080] In one implementation, S4111 may include the following steps:

[0081] S41111: Calculate the plane parameters by performing mathematical operations in the associated relationship using the intrinsic parameters of the camera, the intrinsic parameters of the projector, the rotation matrix, the translation matrix, and the homography matrix.

[0082] The transformation parameters may include the internal parameters of the camera 120, the internal parameters of the lens 115 of the projector 110, the rotation matrix and the translation matrix used for mutual conversion between the camera coordinate system of the camera 120 and the projection coordinate system of the projector 110. Specifically, Fig. 9 As shown, the projection coordinate system of the projector 110 has a certain viewing angle and relative translation relative to the world coordinate system, so the point P on the world coordinate system w To point P on the projector coordinate system c It needs to be obtained through rotation and translation, that is, after rotation and translation, that is: Pc = R*Pw+t. Fig.10 As shown, according to the pinhole imaging principle, the point P of the projector coordinate system or the camera coordinate system can be c (x, y, z), converted to the pixel position P'(u, v) in the image, that is, Here, K is an internal parameter of the lens 115 or the camera 120 of the projector 110 , which will not change due to external factors.

[0083] In the process of using the transformation parameters and the homography matrix between the camera 120 and the projector 110 to perform mathematical operations in a preset relationship to calculate the plane parameters, the intrinsic parameters of the camera 120, the intrinsic parameters of the lens 115 of the projector 110, the rotation matrix and the translation matrix, and the homography matrix can be used to perform mathematical operations in the relationship to calculate the plane parameters, and then the plane parameters can be used for correction.

[0084] S500: Performing image correction on the picture to be projected on the projection surface by the projector using the projection transformation relationship.

[0085] After the projection transformation relationship is determined, the projection transformation relationship may be used to perform image correction on the picture to be projected on the projection surface by the projector 110 .

[0086] In one implementation, how to use the projection transformation relationship to perform projection correction on the picture to be projected by the projector 110 on the projection surface to correct the shape of the projected picture may refer to the following steps included in S500:

[0087] S510: Performing an inverse projection transformation on the picture to be projected by the projector on the projection surface using the plane parameters, so as to correct the picture shape of the projection picture.

[0088] After calculating the plane parameters, the plane parameters can be used to perform a projection inverse transformation on the picture to be projected on the projection surface by the projector 110 to correct the situation of the projection picture. When the posture of the projector 110 changes, the originally rectangular projection picture will appear trapezoidal. By performing a projection inverse transformation on the picture to be projected on the projection surface based on the plane parameters, the projected picture can be made to return to a rectangle.

[0089] In one implementation, how to use the plane parameters to perform inverse projection transformation on the picture to be projected by the projector on the projection surface to correct the picture shape of the projection picture may refer to the following steps included in S510:

[0090] S511: Before the projector focuses, a plane normal vector is used to perform an inverse projection transformation on the picture to be projected by the projector on the projection surface, so as to correct the picture shape of the projection picture.

[0091] The plane parameters may include a plane normal vector of the projection plane relative to the projector coordinate system of the projector 110. Specifically, by using the intrinsic parameters of the camera 120, the intrinsic parameters of the lens 115 of the projector 110, the rotation matrix and the translation matrix, and the homography matrix to perform mathematical operations in an associated relationship, the plane normal vector of the projection plane relative to the projector coordinate system of the projector 110 is calculated, so that before the projector 110 focuses, the plane normal vector can be used to perform a projection inverse transformation on the picture to be projected on the projection plane by the projector 110 to correct the picture shape of the projection picture.

[0092] For example, if Fig.11 As shown, by performing an inverse projection transformation on the image to be projected on the projection surface, the projected image can be restored to a rectangular shape. If the projector 110 is regarded as a camera system, the trapezoidal correction system problem can be transformed into a homography measurement of the plane between two different cameras. Specifically, in 3D space, assuming that the plane of the projection surface in the projector coordinate system is in is the plane normal vector, d is the distance from the origin of the projector 110 to the plane, then the point P on the projection surface satisfies n T P+d=0, which is Assume that the rotation matrix and translation matrix in the transformation parameters of the projector coordinate system to the camera coordinate system are R and t respectively. Since the camera 120 is fixedly set in the projector 110, the rotation matrix R and the translation matrix t are fixed values. The coordinates of the point P in the projector coordinate system in the camera coordinate system are P'=RP+t, and its first position information in the captured image after normalization satisfies p 1 =K 1 P', K 1 is the internal parameter of the camera 120. In summary, we can get Among them, K 2 is the internal reference of the lens 115 of the projector 110, p 2 is the coordinate in the pre-projection image. 1 =H 21 p 2 , can be obtained By performing a projective transformation calculation on the first position information and the second position information, the homography matrix H can be obtained: 21 , and then the plane normal vector can be calculated Finally, we can use the plane normal vector The image to be projected by the projector 110 on the projection surface is subjected to projection inverse transformation to correct the image shape of the projection image.

[0093] In one implementation, after performing inverse projection transformation on the picture to be projected by the projector 110 on the projection surface using the plane normal vector to correct the picture shape of the projection picture, the following steps may be included:

[0094] S600: adjusting the projection focal length of the projector by using the distance, and projecting a picture on the projection surface with the adjusted projection focal length.

[0095] Since the plane parameters may also include the distance between the projection plane and the origin of the projector coordinate system, after the plane normal vector is used to perform a projection inverse transformation on the picture to be projected by the projector 110 on the projection plane to correct the picture shape of the projection picture, the distance may be used to adjust the projection focal length of the projector, and the picture is projected on the projection plane with the adjusted projection focal length, thereby achieving focus.

[0096] In one implementation, how to use the distance to adjust the focus of the projection focal length of the projector may refer to the following steps included in S600:

[0097] S610: Acquire the current position of the lens of the projector.

[0098] S620: Calculate the target position to which the lens should move using the distance.

[0099] S630: driving a stepping motor for driving the movement of the lens to push the lens to a target position, so as to achieve focus adjustment of the projection focal length.

[0100] In the process of adjusting the projection focal length of the projector 110 by using the distance, the current position of the lens 115 of the projector 110 can be obtained, and the target position to which the lens 115 should be moved can be calculated by using the distance. The stepper motor used to drive the lens 115 to move is driven to push the lens 115 to the target position to achieve the focus adjustment of the projection focal length, thereby achieving fast or even imperceptible focusing.

[0101] For example, if the distance between the current position of the lens 115 of the projector 110 and the target position is 5 nm, the stepper motor can be driven to push the lens 115 5 nm to the target position, thereby achieving focusing.

[0102] In summary, when the posture of the projector 110 changes, a preset calibration image with multiple circular feature points is projected onto the projection surface to obtain a projection picture. A captured image obtained by capturing the projection picture through the camera 120 is obtained, first position information of multiple circular feature points in the preset calibration image is obtained, and second position information of multiple circular feature points in the captured image is obtained. The plane parameters of the projector coordinate system of the projection surface relative to the projector are calculated in a preset association relationship using the first position information and the second position information. Since the preset association relationship is used to characterize the association relationship between the first position information and the second position information and the plane parameters, the plane parameters can be used to perform a projection inverse transformation on the picture to be projected by the projector on the projection surface to correct the picture shape of the projection picture. The present application sets a camera 120 so that the camera 120 and the lens 115 of the projector 110 form a binocular system, and uses the camera 120 to shoot the projection screen obtained by projecting based on the preset calibration image, and uses the different position information of the circular feature points in the preset calibration image and the captured image to calculate the plane parameters of the projector coordinate system after the projector changes its posture, so that the plane parameters can be used to correct the screen to be projected on the projection surface. That is, the present application converts the projection screen correction problem into the homography measurement between two imaging surfaces. In addition, the preset calibration image in the present application has multiple circular feature points, and the centroid calculation of the circle is more accurate because all pixels outside the circle can be used. Even if the edges of the circular spots taken when the projector 110 is not focused are blurred, the centroid position can be accurately determined. Therefore, even if the projector 110 has not completed the focus and the projection screen is not clear, the trapezoidal correction function can be realized by the preset calibration pattern with multiple circular feature points, so that the correction is not affected by the defocusing, and the accuracy of the correction of the projection screen is improved.

[0103] See also Fig.12 , if the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium 300. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions / computer programs to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks, and electronic terminals such as computers, mobile phones, laptops, tablet computers, cameras, etc. having the above-mentioned storage media.

[0104] The description of the execution process of the program data in the computer-readable storage medium can refer to the description in the above-mentioned embodiment of the image correction method of the projector of the present application, and will not be repeated here.

[0105] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for calibrating a projector image, characterized in that: include: Projecting a preset calibration image having a plurality of circular feature points onto a projection surface to obtain a calibration image; Acquire a captured image obtained by shooting the calibration picture with a camera; Acquire first position information of the plurality of circular feature points in the preset calibration image, and acquire second position information of the plurality of circular feature points in the captured image; Calculating a projection transformation relationship between the projection surface and the projector using the first position information and the second position information; The projection transformation relationship is used to perform image correction on the picture to be projected by the projector on the projection surface.

2. The method according to claim 1, characterized in that The calculating the projection transformation relationship between the projection surface and the projector by using the first position information and the second position information includes: Calculating the plane parameters of the projection surface relative to the projector coordinate system of the projector in a preset association relationship using the first position information and the second position information; wherein the preset association relationship is used to characterize the association relationship between the first position information and the second position information and the plane parameters, and the plane parameters are used to characterize the projection transformation relationship; The using the projection transformation relationship to perform image correction on the picture to be projected by the projector on the projection surface includes: The plane parameters are used to perform inverse projection transformation on the picture to be projected by the projector on the projection surface, so as to correct the picture shape of the projection picture.

3. The method according to claim 2, characterized in that The calculating the plane parameters of the projection surface relative to the projector coordinate system of the projector in a preset association relationship by using the first position information and the second position information includes: A projective transformation is performed on the first position information and the second position information to obtain a homography matrix, and the plane parameters are calculated using the homography matrix in the preset association relationship; wherein the preset association relationship is used to characterize the association relationship between the homography matrix and the plane parameters.

4. The method according to claim 1, characterized in that: The acquiring second position information of the plurality of circular feature points in the captured image includes: The plurality of circular feature points are detected and identified in the captured image, and second position information of the plurality of circular feature points in the captured image is determined when the plurality of circular feature points are detected.

5. The method according to claim 4, characterized in that: The detecting and identifying the plurality of circular feature points in the captured image, and determining second position information of the plurality of circular feature points in the captured image when the plurality of circular feature points are detected, comprises: Binarizing the captured image based on a number of different preset grayscale thresholds to obtain a number of binary images; wherein the number of the binary images is the same as the number of the preset grayscale thresholds; Extracting a cluster region composed of connected regions from each of the binary images; Based on the centroid position of each of the cluster regions, the cluster regions whose centroid distance is less than a preset distance threshold are merged to form the combined cluster region; The centroid position of the mass region that meets the preset shape feature is determined in all the combined mass regions to obtain the multiple circular feature points and the corresponding second position information.

6. The method according to claim 5, characterized in that: The step of extracting a cluster region composed of connected regions from each of the binary images comprises: Adjacent pixels with equal grayscale values ​​in each of the binary images are connected to obtain the connected region, and a number of the connected regions are spliced ​​to obtain the cluster region.

7. The method according to claim 3, characterized in that The step of calculating the plane parameters by using the homography matrix in the preset association relationship includes: The plane parameters are calculated by performing mathematical operations on the transformation parameters between the camera and the projector and the homography matrix in the preset association relationship; wherein the preset association relationship is used to characterize the mathematical relationship between the transformation parameters and the plane parameters and the homography matrix, and the transformation parameters are inherent parameters used for converting between the captured image and the pre-projection image corresponding to the same projection image.

8. The method according to claim 7, characterized in that The transformation parameters include the internal parameters of the camera, the internal parameters of the projector, a rotation matrix and a translation matrix used for mutual conversion between the camera coordinate system and the projection coordinate system of the projector; The using the transformation parameters between the camera and the projector and the homography matrix to perform mathematical operations in the preset association relationship to calculate the plane parameters includes: The plane parameters are calculated by performing mathematical operations in the association relationship using the intrinsic parameters of the camera, the intrinsic parameters of the projector, the rotation matrix, the translation matrix, and the homography matrix.

9. The method according to claim 8, characterized in that The plane parameters include a plane normal vector of the projection surface relative to a projector coordinate system of the projector; The using the plane parameters to perform inverse projection transformation on the picture to be projected by the projector on the projection surface to correct the picture shape of the projection picture includes: Before the projector is focused, the plane normal vector is used to perform an inverse projection transformation on the picture to be projected by the projector on the projection surface, so as to correct the picture shape of the projection picture.

10. A projection device, characterized in that: The system comprises a projector and a camera disposed on the projector; the projector comprises a processor, a memory, a communication circuit and a projection module, the memory and the projection module are coupled to the processor; the camera is coupled to the processor; The memory is used to store a computer program, and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 9.