determining the projection ratio of a projection lens according to the projection ratio of a camera of the projector, the first distance from the camera to a projection curtain and the second distance from the projection lens of the projector to the projection curtain;
and determining the size of a projection picture of the projector on the projection curtain according to the projection ratio of the projection lens and the second distance.
In one possible implementation manner, the determining, according to the projection ratio of the projection lens and the second distance, a projection screen size of the projector on the projection screen includes:
determining the projection width of the projection lens on the projection curtain according to the ratio between the second distance and the projection ratio of the projection lens;
determining the projection height of the projection lens on the projection curtain according to the projection width and a preset formula;
and determining the size of a projection picture of the projection lens on the projection curtain according to the projection width and the projection height.
In one possible implementation manner, the size of a projection screen of the projector on the projection curtain is determined by the following formula:
S=W×H;
W=d2/cr2;
H=W×9/16;
wherein S is the size of a projection picture, W is the projection width, H is the projection height, D2 is the second distance, cr2 is the projection ratio of the projection lens, and D H /D W Is the ratio of the projection height to the projection width.
In one possible implementation manner, the determining the projection ratio of the projection lens according to the projection ratio of the camera of the projector, the first distance between the camera and the projection curtain, and the second distance between the projection lens of the projector and the projection curtain includes:
calculating the product of the projection ratio of the camera of the projector and the second distance from the projection lens of the projector to the projection curtain to obtain projection parameters;
and determining the ratio of the projection parameter to the first distance from the camera to the projection curtain as the projection ratio of the projection lens.
A second aspect of embodiments of the present disclosure provides a projector-projected yaw angle determination apparatus, the apparatus comprising:
the first determining module is configured to determine the size of a projection picture of the projection lens on the projection curtain according to the projection ratio of the camera of the projector, the first distance from the camera to the projection curtain and the second distance from the projection lens of the projector to the projection curtain;
the second determining module is configured to determine the projection corner coordinates of the projection corner of the projection lens projected on the projection curtain according to the size of the projection picture and the second distance;
the third determining module is configured to determine the characteristic corner coordinates for each projection corner obtained by the camera according to the rotation matrix and the projection corner coordinates;
a fourth determining module configured to determine a projection yaw angle of the projector according to the feature angular point coordinates, the projection angular point coordinates, the lens origin coordinates of the lens origin where the projection lens is located, and the projection ratio of the camera;
and the correction module is configured to correct the image to be projected according to the projection yaw angle.
In one possible implementation manner, the fourth determining module is configured to:
searching a corresponding optimal search point on an extension line of a connecting line of the lens origin point coordinate of the lens origin point where the projection lens is positioned and the characteristic angular point coordinate according to the characteristic angular point coordinates and the projection ratio of the camera, wherein each optimal search point is a point where a first space vector formed by each characteristic angular point coordinate and the lens origin point coordinate of the lens origin point is best close to a second space vector formed by the corresponding projection angular point coordinate and the lens origin point coordinate of the lens origin point;
determining the distance from each optimal searching point to the lens origin according to the coordinates of each optimal searching point and the lens origin coordinates of the lens origin where the projection lens is positioned;
according to the distance from each optimal search point to the origin of the lens, determining a plane vector of a projection plane formed by the coordinates of the projection angular points relative to the origin of the lens where the projection lens is positioned;
and determining the projection yaw angle of the projector according to the plane vector and the distance corresponding to each optimal search point.
In one possible implementation manner, the fourth determining module is configured to:
constructing a third space vector on an extension line of a connecting line of the lens origin coordinates of the lens origin where the projection lens is positioned and the characteristic angular point coordinates according to the distance corresponding to each optimal searching point;
and calculating the included angle between each third space vector and the plane vector to obtain the projection yaw angle of the projector.
In one possible implementation manner, the first determining module is configured to:
determining the projection ratio of a projection lens according to the projection ratio of a camera of the projector, the first distance from the camera to a projection curtain and the second distance from the projection lens of the projector to the projection curtain;
and determining the size of a projection picture of the projector on the projection curtain according to the projection ratio of the projection lens and the second distance.
In one possible implementation manner, the first determining module is configured to:
determining the projection width of the projection lens on the projection curtain according to the ratio between the second distance and the projection ratio of the projection lens;
determining the projection height of the projection lens on the projection curtain according to the projection width and a preset formula;
and determining the size of a projection picture of the projection lens on the projection curtain according to the projection width and the projection height.
In one possible implementation manner, the size of a projection screen of the projector on the projection curtain is determined by the following formula:
S=W×H;
W=d2/cr2;
H=W×9/16;
wherein S is the size of a projection picture, W is the projection width, H is the projection height, D2 is the second distance, cr2 is the projection ratio of the projection lens, and D H /D W Is the ratio of the projection height to the projection width.
In one possible implementation manner, the first determining module is configured to:
calculating the product of the projection ratio of the camera of the projector and the second distance from the projection lens of the projector to the projection curtain to obtain projection parameters;
and determining the ratio of the projection parameter to the first distance from the camera to the projection curtain as the projection ratio of the projection lens.
A third aspect of the disclosed embodiments provides a projector, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute executable instructions stored in the memory to perform the method of any one of the first aspects.
The invention provides a projector projection yaw angle determining method and device and a projector. Compared with the prior art, the method has the following beneficial effects:
determining the size of a projection picture of a projection lens on a projection curtain according to the projection ratio of a camera of a projector, the first distance from the camera to the projection curtain and the second distance from the projection lens of the projector to the projection curtain; according to the size of the projection picture and the second distance, determining the projection corner coordinates of the projection corner of the projection lens projected on the projection curtain; according to the rotation matrix and the projection angular point coordinates, determining characteristic angular point coordinates for each projection angular point, which are acquired by a camera; and determining a projection yaw angle of the projector according to the characteristic angular point coordinates, the projection angular point coordinates, the lens origin coordinates of the lens origin where the projection lens is positioned and the projection ratio of the camera. The projector can automatically determine the projection yaw angle of the projector according to the projection ratio of the camera, the rotation matrix, the first distance from the camera to the projection curtain and the second distance from the projection lens of the projector to the projection curtain, and correct the image to be projected according to the projection yaw angle. The method can avoid the tedious adjustment process caused by manual operation, and can improve the accuracy of projection yaw angle determination, thereby improving the definition of projection pictures of the projector.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
fig. 1 is a flowchart of a projector-projected yaw angle determination method according to an embodiment of the present disclosure.
Fig. 2 is a schematic projection view according to an embodiment of the present disclosure.
Fig. 3 is a schematic view of various angles of a projector according to an embodiment of the specification.
Fig. 4 is a flowchart for implementing step S14 in fig. 1, according to an embodiment of the present disclosure.
Fig. 5 is a flowchart for implementing step S11 in fig. 1, according to an embodiment of the present disclosure.
Fig. 6 is a flowchart for implementing step S112 in fig. 5, according to an embodiment of the present disclosure.
Fig. 7 is a block diagram of a projector-projected yaw angle determination apparatus according to an embodiment of the present specification.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
To achieve the above object, the present disclosure provides a projector-projected yaw angle determination method, and fig. 1 is a flowchart illustrating a projector-projected yaw angle determination method according to an embodiment. The method comprises the following steps:
in step S11, a projection screen size of the projection lens on the projection screen is determined according to the projection ratio of the camera of the projector, the first distance from the camera to the projection screen, and the second distance from the projection lens of the projector to the projection screen.
In the embodiment of the disclosure, the projector is configured with a camera and a projection lens, where the projection lens may be an LCD lens, and as shown in fig. 2, the camera and the projection lens are on the same straight line with respect to the projection curtain.
In the embodiments of the present disclosure, the projection ratio is also referred to as a transmission coefficient, and refers to the ratio of the transmitted light flux to the incident light flux. The value of which depends on the direction of the incident light, the molecular structure and thickness of the material. That is, the projection ratio of the camera can be directly determined according to the transmitted light flux and the incident light flux of the camera.
The first distance from the camera to the projection curtain refers to the minimum distance from the camera to the projection curtain, the second distance from the projection lens to the projection curtain refers to the minimum distance from the projection lens to the projection curtain, and the first distance and the second distance should be equal originally, but the first distance and the second distance are different due to the fact that the arrangement position of the projector cannot be parallel to the projection curtain absolutely.
In step S12, according to the size of the projection screen and the second distance, the coordinates of the projection corner of the projection lens projected on the projection curtain are determined.
With continued reference to fig. 2, the projection lens projects a projection image with ABCD as a projection angular point, and the camera shoots an image with the corresponding ABCD as a feature point, and finds an optimal installation angle Cx, cy, cz through wireless approximation to enable the ABCD theory and the actual approach shot by the camera. The installation angles Cx, cy, cz are angles of the origin P of the lens where the projection lens is located relative to the origin Q where the camera is located.
The specific calibration parameters are as follows:
W = d2/cr2,H = W*D H /D W ,Z=2000mm
the coordinates of the projection corner a are: (-W/2, H/2, Z)
The coordinates of the projection corner B are: (W/2, H/2, Z)
The coordinates of the projection corner point C are: c (-W/2. -H/2, Z)
The coordinates of the projection corner point D are: d (W/2, H/2, Z)
In step S13, according to the rotation matrix and the projection angular point coordinates, determining the feature angular point coordinates for each projection angular point obtained by the camera;
in the embodiment of the disclosure, the coordinates of the feature point abcd corresponding to the camera are normalized by the projection ratio cr1 of the camera after the installation angles Cx, cy, cz are rotated. Wherein the mounting angles Cx, cy, cz are rotated by the rotation matrix.
Wherein the rotation matrix may be expressed as follows:
wherein R is z For the yaw matrix parameters,R y For the pitch matrix parameters, R x For the roll matrix parameters, yaw is the yaw angle, pitch is the pitch angle, and roll is the roll angle.
In step S14, a projection yaw angle of the projector is determined according to the feature angular point coordinates, the projection angular point coordinates, the lens origin coordinates of the lens origin where the projection lens is located, and the projection ratio of the camera.
Referring to fig. 3, when the projector is in the initial posture after the initial correction, a three-dimensional coordinate system is established with the initial posture of the projector as a reference. For example, as shown in fig. 3, the X-axis is the projection direction of the projector in the initial posture in the horizontal plane, Y is the direction perpendicular to the X-axis in the horizontal plane, and Z is the vertical direction. Yaw angle Yaw is the angle in the system space coordinate system about the Z-axis, other angles may also include Roll angle Roll in the direction about the x-axis and Pitch angle Pitch in the direction about the y-axis.
When the projector yaw, the projector rotates around the Z axis, namely the XY plane rotates around the Z axis, an X1Y1 plane is formed after rotation, and an included angle gamma formed by the X axis and the X1 axis (or an included angle gamma formed by the Y axis and the Y1) is the yaw angle of the projector.
In step S15, the image to be projected is corrected according to the projected yaw angle.
And correcting the offset of the image to be projected in the direction around the Z axis according to the projection yaw angle, so that the image to be projected can avoid offset in the direction around the Z axis and distortion of the projected image.
In one embodiment, if the projector further has a roll offset and a pitch offset around the X axis and around the Y axis, the roll offset angle and the pitch offset angle may be determined in combination with the prior art, and the image to be projected may be corrected according to the projection yaw angle, the roll offset angle, and the pitch offset angle.
According to the technical scheme, the size of a projection picture of a projection lens on a projection curtain is determined according to the projection ratio of a camera of a projector, the first distance from the camera to the projection curtain and the second distance from the projection lens of the projector to the projection curtain; according to the size of the projection picture and the second distance, determining the projection corner coordinates of the projection corner of the projection lens projected on the projection curtain; according to the rotation matrix and the projection angular point coordinates, determining characteristic angular point coordinates for each projection angular point, which are acquired by a camera; and determining a projection yaw angle of the projector according to the characteristic angular point coordinates, the projection angular point coordinates, the lens origin coordinates of the lens origin where the projection lens is positioned and the projection ratio of the camera. The projector can automatically determine the projection yaw angle of the projector according to the projection ratio of the camera, the rotation matrix, the first distance from the camera to the projection curtain and the second distance from the projection lens of the projector to the projection curtain, and correct the image to be projected according to the projection yaw angle. The method can avoid the tedious adjustment process caused by manual correction operation, and can improve the accuracy of projection yaw angle determination, thereby improving the definition of projection pictures of the projector.
In one possible implementation manner, referring to fig. 4, in step S14, the determining, according to the feature angular point coordinates, the projection angular point coordinates, the lens origin coordinates of the lens origin where the projection lens is located, and the projection ratio of the camera, the projection yaw angle of the projector includes:
in step S141, according to the feature angular point coordinates and the projection ratio of the camera, a corresponding optimal search point is searched for on an extension line of a line connecting the lens origin point coordinates of the lens origin point where the projection lens is located and the feature angular point coordinates.
And each optimal search point is a point of which a first space vector formed by each characteristic angular point coordinate and the lens origin coordinate of the located lens origin is optimally close to a second space vector formed by the corresponding projection angular point coordinate and the lens origin coordinate of the located lens origin.
In step S142, a distance from each of the best search points to the lens origin is determined according to the coordinates of each of the best search points and the lens origin coordinates of the lens origin where the projection lens is located.
It is understood that, calculating the euclidean distance between the coordinates of each of the best search points and the lens origin coordinates of the lens origin where the projection lens is located obtains the distance from each of the best search points to the lens origin.
In step S143, a plane vector of a projection plane formed by the coordinates of the projection angular point with respect to the origin of the lens where the projection lens is located is determined according to the distance between each of the optimal search points and the origin of the lens.
And determining a normal vector of a projection plane formed by the coordinates of the projection angular points relative to the origin of the lens where the projection lens is located according to the distance between each optimal search point and the origin of the lens, and obtaining a plane vector according to the normal vector.
In step S144, a projected yaw angle of the projector is determined according to the plane vector and the distance corresponding to each of the optimal search points.
In the embodiment of the disclosure, the offset angle of the corresponding feature angular point coordinates relative to the plane vector can be calculated according to the distance corresponding to each optimal search point, and the projection yaw angle of the projector can be calculated according to a plurality of offset angles.
In one possible implementation manner, in step S143, determining, in step S143, a projected yaw angle of the projector according to the plane vector and a distance corresponding to each of the optimal search points includes:
and constructing a third space vector on an extension line of a connecting line of the lens origin coordinates of the lens origin where the projection lens is positioned and the characteristic angular point coordinates according to the distance corresponding to each optimal searching point.
It can be understood that the direction of each third space vector is the connecting line direction of the lens origin coordinate of the lens origin where the projection lens is located and the characteristic corner coordinate, and the distances corresponding to the corresponding optimal search points are equal in value.
And calculating the included angle between each third space vector and the plane vector to obtain the projection yaw angle of the projector.
In the embodiment of the disclosure, based on the calculation principle of the vector dot product, the vector α multiplied by cos β is the projection length of the vector α on the vector γ, and then the projection length (i.e., the plane vector) of the third space vector on the projection curtain can be obtained by multiplying the cos β by each third space vector, the value of β is calculated by back-pushing, and the projection yaw angle of the projector can be obtained according to the trigonometric function relationship.
In one possible implementation manner, referring to fig. 5, in step S11, determining a projection screen size of the projection lens on the projection screen according to a projection ratio of the camera of the projector, a first distance between the camera and the projection screen, and a second distance between the projection lens of the projector and the projection screen includes:
in step S111, the projection ratio of the projection lens is determined according to the projection ratio of the camera of the projector, the first distance from the camera to the projection curtain, and the second distance from the projection lens of the projector to the projection curtain.
In step S112, a projection screen size of the projector on the projection screen is determined according to the projection ratio of the projection lens and the second distance.
In one possible implementation manner, referring to fig. 6, in step S112, the determining, according to the projection ratio of the projection lens and the second distance, a size of a projection screen of the projector on the projection screen includes:
in step S1121, determining a projection width of the projection lens on the projection curtain according to a ratio between the second distance and a projection ratio of the projection lens;
in step S1122, the projection height of the projection lens on the projection curtain is determined according to the projection width and a preset formula.
The preset formula is used for expressing the ratio relation between the projection width and the projection height. For example, projection width: projection height = 16:9, projection width: projection height = 4:3.
in step S1123, a projection screen size of the projection lens on the projection screen is determined according to the projection width and the projection height.
And determining the product of the projection width and the projection height as the projection picture size of the projection lens on the projection curtain.
In one possible implementation manner, the size of a projection screen of the projector on the projection curtain is determined by the following formula:
S=W×H;
W=d2/cr2;
H=W×D H /D W ;
wherein S is the size of a projection picture, W is the projection width, H is the projection height, D2 is the second distance, cr2 is the projection ratio of the projection lens, and D H /D W Is the ratio of the projection height to the projection width.
In one possible implementation manner, in step S111, the determining the projection ratio of the projection lens according to the projection ratio of the camera of the projector, the first distance between the camera and the projection curtain, and the second distance between the projection lens of the projector and the projection curtain includes:
calculating the product of the projection ratio of the camera of the projector and the second distance from the projection lens of the projector to the projection curtain to obtain projection parameters;
and determining the ratio of the projection parameter to the first distance from the camera to the projection curtain as the projection ratio of the projection lens.
In the embodiment of the disclosure, the projection ratio of the projection lens may be calculated by the following formula:
cr2=cr1×u2/u1;
wherein cr2 is the projection ratio of the projection lens, cr1 is the projection ratio of the camera, u2 is the second distance from the projection lens to the projection curtain, and u1 is the first distance from the camera to the projection curtain.
The projection ratio of the projection lens at any second distance can be obtained through the formula.
The embodiment of the disclosure also provides a projector projection yaw angle determining device, referring to fig. 7, the device includes:
a first determining module 710 configured to determine a projection screen size of a projection lens of the projector on a projection screen according to a projection ratio of the camera of the projector, a first distance from the camera to the projection screen, and a second distance from the projection lens of the projector to the projection screen;
a second determining module 720 configured to determine, according to the size of the projection screen and the second distance, coordinates of a projection corner of the projection lens projected on the projection screen;
a third determining module 730, configured to determine, according to the rotation matrix and the projection angular point coordinates, feature angular point coordinates for each projection angular point obtained by the camera;
a fourth determining module 740, configured to determine a projection yaw angle of the projector according to the feature angular point coordinates, the projection angular point coordinates, the lens origin coordinates of the lens origin where the projection lens is located, and the projection ratio of the camera;
a correction module 750 configured to correct an image to be projected according to the projected yaw angle.
In one possible implementation manner, the fourth determining module 740 is configured to:
searching a corresponding optimal search point on an extension line of a connecting line of the lens origin point coordinate of the lens origin point where the projection lens is positioned and the characteristic angular point coordinate according to the characteristic angular point coordinates and the projection ratio of the camera, wherein each optimal search point is a point where a first space vector formed by each characteristic angular point coordinate and the lens origin point coordinate of the lens origin point is best close to a second space vector formed by the corresponding projection angular point coordinate and the lens origin point coordinate of the lens origin point;
determining the distance from each optimal searching point to the lens origin according to the coordinates of each optimal searching point and the lens origin coordinates of the lens origin where the projection lens is positioned;
according to the distance from each optimal search point to the origin of the lens, determining a plane vector of a projection plane formed by the coordinates of the projection angular points relative to the origin of the lens where the projection lens is positioned;
and determining the projection yaw angle of the projector according to the plane vector and the distance corresponding to each optimal search point.
In one possible implementation manner, the fourth determining module 740 is configured to:
constructing a third space vector on an extension line of a connecting line of the lens origin coordinates of the lens origin where the projection lens is positioned and the characteristic angular point coordinates according to the distance corresponding to each optimal searching point;
and calculating the included angle between each third space vector and the plane vector to obtain the projection yaw angle of the projector.
In one possible implementation manner, the first determining module 710 is configured to:
determining the projection ratio of a projection lens according to the projection ratio of a camera of the projector, the first distance from the camera to a projection curtain and the second distance from the projection lens of the projector to the projection curtain;
and determining the size of a projection picture of the projector on the projection curtain according to the projection ratio of the projection lens and the second distance.
In one possible implementation manner, the first determining module 710 is configured to:
determining the projection width of the projection lens on the projection curtain according to the ratio between the second distance and the projection ratio of the projection lens;
determining the projection height of the projection lens on the projection curtain according to the projection width and a preset formula;
and determining the size of a projection picture of the projection lens on the projection curtain according to the projection width and the projection height.
In one possible implementation manner, the size of a projection screen of the projector on the projection curtain is determined by the following formula:
S=W×H;
W=d2/cr2;
H=W×9/16;
wherein S is the size of a projection picture, W is the projection width, H is the projection height, D2 is the second distance, cr2 is the projection ratio of the projection lens, and D H /D W Is the ratio of the projection height to the projection width.
In one possible implementation manner, the first determining module 710 is configured to:
calculating the product of the projection ratio of the camera of the projector and the second distance from the projection lens of the projector to the projection curtain to obtain projection parameters;
and determining the ratio of the projection parameter to the first distance from the camera to the projection curtain as the projection ratio of the projection lens.
wherein the processor is configured to execute executable instructions stored in the memory to perform the method of any one of the preceding embodiments.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the above embodiments, and various changes, modifications, substitutions and alterations can be made to these embodiments within the scope of the technical idea of the present disclosure, which all fall within the scope of protection of the present disclosure.
It should be further noted that, where specific features described in the foregoing embodiments are combined in any suitable manner, they should also be regarded as disclosure of the present disclosure, and various possible combinations are not separately described in order to avoid unnecessary repetition. The technical scope of the present application is not limited to the contents of the specification, and must be determined according to the scope of claims.