A method and device for calibrating parameters of projection equipment

By initializing the attitude and projecting preset sample diagrams in the projection equipment for corner point detection and matrix calculation, the existing projection equipment calibration methods are solved, and efficient and adaptive projection equipment parameter calibration is achieved.

CN119094714BActive Publication Date: 2025-05-09CHUZHOU OBE DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411088605.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2025-05-09
Estimated Expiration
2044-08-09

AI Technical Summary

Technical Problem

The calibration methods of existing projection equipment have problems such as high cost, low efficiency, and inability to adapt to the parameters, especially the internal parameter focal length and external parameter Z direction translation changes of the projector at different distances cannot be adapted.

Method used

By initializing the current attitude of the projection device, projecting preset samples to the projection screen, performing corner point detection and homographic matrix calculation, obtaining the rotation matrix and optical machine internal parameters of the projection device's camera coordinate system to the optical machine coordinate system, iterative updates until the preset conditions are met, and the final optical machine external parameters and camera internal parameters are output.

Benefits of technology

It realizes an efficient calibration method without chessboard calibration board and without projecting Gray code images. It can automatically focus to adjust the clarity of the projected image, and adaptively adjust the internal and external parameters of the projection optical machine, improving calibration efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094714B_ABST
    Figure CN119094714B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for calibrating parameters of a projection device, and the present invention has the following beneficial effects: (1) The calibration method does not require the setting of a checkerboard calibration plate, thereby reducing complexity and cost; (2) The calibration method of the present application does not require the projection of a series of Gray code images with coded information, but only requires the projection of a checkerboard image onto a wall, and subsequent processing is performed by taking a photo with a camera, thereby greatly shortening the processing time and improving efficiency; (3) The projection optical machine of the present application faces the wall, projects a checkerboard image onto the wall, and can automatically focus to adjust the clarity of the projection image; (4) The present application can adaptively adjust the focal length of the internal parameters of the projection optical machine and the Z-direction translation of the external parameters between the projection optical machine and the camera according to the number of motor steps after automatic focusing at different distances, thereby finally realizing the parameter calibration of the projection device, and the processing process is simple and efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the field of projection equipment, and in particular to a method and device for calibrating parameters of projection equipment. Background Art

[0002] At present, the popularity of projectors for home use is increasing. LCD projectors have become the first choice of consumers due to their high cost-effectiveness. For LCD projector manufacturers, how to reduce the calibration stations of LCD projectors, reduce the calibration objects required for calibration, and improve the efficiency of LCD projector calibration, thereby increasing the output of LCD projectors and reducing costs are important considerations. The method for calibrating the internal and external parameters of the optical machine and camera of traditional projectors usually places some fixed-size checkerboard calibration plates on the calibration station, projects Gray codes with coded information onto the checkerboard calibration plates, and then captures these images with the camera to calibrate the internal and external parameters of the projection optical machine and camera. However, the above-mentioned traditional calibration method has the following defects: (1) an external chessboard calibration plate of fixed size must be placed, which is relatively expensive; (2) the projection optical machine must project the Gray code with coded information, which increases the time required for calibration; (3) the image projected by the projection optical machine is projected on the chessboard and the background, and the chessboard and the background are not on the same plane, resulting in the image projected by the optical machine not being in the best clear position on the chessboard; (4) after the internal and external parameters of the projection optical machine and the camera are calibrated, at different distances, the internal parameter focal length of the projection optical machine and the Z-direction translation in the external parameter are variable, and the internal and external parameters at different distances cannot be changed adaptively.

[0003] Therefore, how to design a calibration method for projection equipment with high efficiency, low cost and the ability to adaptively adjust parameters is a technical problem to be solved. Summary of the invention

[0004] Based on this, it is necessary to provide a method and device for calibrating parameters of a projection device in response to the existing problems.

[0005] In a first aspect, an embodiment of the present application provides a method for calibrating parameters of a projection device, comprising the following steps:

[0006] Initializing the current posture of the projecting device under test so that the projecting device faces the projection surface;

[0007] Projecting a preset sample image onto the projection screen to form a first projection image;

[0008] Performing corner point detection on the first projection image to obtain first coordinate data of all corner points of the first projection image;

[0009] Obtaining a homography matrix of the projection device according to the first coordinate data and the preset coordinate data corresponding to all corner points of the preset sample image;

[0010] According to the homography matrix and the preset function model, a rotation matrix from the camera coordinate system of the projection device to the optomechanical coordinate system of the projection device is obtained;

[0011] Obtaining second coordinate data of all corner points of the first projection image in the optical-mechanical coordinate system according to original optical-mechanical internal parameters of the projection device and a first distance from the projection device to the projection surface;

[0012] Obtaining third coordinate data of all corner points of the first projection image in the camera coordinate system according to the rotation matrix and the coordinate translation vector;

[0013] Performing coordinate correspondence and function processing on the second coordinate data and the third coordinate data to obtain an optimal camera intrinsic parameter;

[0014] Performing spatial processing on the third coordinate data to obtain a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image;

[0015] Determining whether a difference between the first distance and the second distance satisfies a first condition and / or whether the horizontal rotation angle satisfies a second condition;

[0016] In response to the difference between the first distance and the second distance satisfying a first condition and / or the horizontal rotation angle satisfying a second condition, updating the current optical-mechanical internal parameters according to a preset iterative model and repeating the above steps;

[0017] The current optical machine external parameters, the optimal camera internal parameters, the rotation matrix and the coordinate translation vector are output as final parameters of the projection device.

[0018] Preferably, the homography matrix is ​​obtained by formula (1):

[0019]

[0020] Where z is the scale factor, (x pi ,y pi ) are the corner coordinates of the preset sample image, where (x ci ,y ci ) are the coordinates of the corner points of the first projection image, and n is the number of corner points of the first projection image and the preset sample image.

[0021] Preferably, the rotation matrix M is obtained by decomposing the homography matrix through SVD.

[0022] Preferably, the second coordinate data is expressed by formula (2):

[0023]

[0024] z ai =R1 (2);

[0025] Among them, (x ai ,y ai , z ai ) is each three-dimensional coordinate value of the second coordinate data, i=1…n; (c x , c y , f x , f y ) is the current optical-mechanical internal parameter of the projection device, and R1 is the first distance from the projection device to the projection surface.

[0026] Preferably, the third coordinate data is expressed by formula (3):

[0027]

[0028] Among them, (x aci ,y aci , z aci ) is each three-dimensional coordinate value of the third coordinate data, i=1…n; (T x , T y , T z ) is the coordinate translation vector of the projection device.

[0029] Preferably, coordinate correspondence and function processing are performed on the second coordinate data and the third coordinate data to obtain an optimal camera intrinsic parameter, including:

[0030] Normalizing the third coordinate data to obtain normalized third coordinate data;

[0031] Establish a coordinate correspondence relationship between the normalized third coordinate data and the second coordinate data according to formula (4) and perform least squares transformation to obtain the optimal camera intrinsic parameter;

[0032] Wherein, formula (4) is:

[0033]

[0034] Among them, (x aci’ ,y aci’ ) is each three-dimensional coordinate value of the normalized third coordinate data, i = 1...n, x aci’ =x aci / z aci ,y aci’ =y aci / z aci ;(c xm_c , c ym_c , f xm_c , f ym_c) is the optimal camera internal parameter.

[0035] Preferably, spatially processing the third coordinate data to obtain a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image includes:

[0036] Performing least squares spatial plane fitting on the third coordinate data to obtain a spatial plane equation (5);

[0037] Obtaining a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image according to the spatial plane equation (5);

[0038] Among them, the spatial plane equation (5) is:

[0039] Z = Ax + By + C (6);

[0040] The second distance R2 from the projection device to the first projection image is expressed by formula (6):

[0041]

[0042] The horizontal rotation angle yaw of the projection device relative to the first projection image is expressed by formula (7):

[0043]

[0044] Preferably, the first condition is expressed by formula (8):

[0045] |R1-R2|≥ΔR (8);

[0046] The second condition is expressed by formula (9):

[0047] yaw ≥ Δa (9);

[0048] Wherein, ΔR is the preset distance threshold; Δa is the preset angle threshold.

[0049] Preferably, the preset iterative model is expressed by formula (10):

[0050] c x '=c x ±step,c y '=c y ±step (10);

[0051] Among them, c x ' and c y ' are the two updated values ​​of the current camera internal parameters, c x and c yare the two values ​​of the current camera internal parameters before updating, and step is the number of motor movement steps.

[0052] In a second aspect, an embodiment of the present application provides a parameter calibration device for a projection device, comprising:

[0053] An initialization unit, used for initializing the current posture of the measured projection device so that the projection device faces the projection surface;

[0054] A projection unit, used for projecting a preset sample image onto a projection screen to form a first projection image;

[0055] A position detection unit, configured to perform corner point detection on the first projection image to obtain first coordinate data of all corner points of the first projection image;

[0056] A first matrix calculation unit, which obtains a homography matrix of the projection device according to the first coordinate data and preset coordinate data corresponding to all corner points of the preset sample image;

[0057] A second matrix calculation unit, which obtains a rotation matrix from the camera coordinate system of the projection device to the optomechanical coordinate system of the projection device according to the homography matrix and a preset function model;

[0058] A first coordinate calculation unit, used for obtaining second coordinate data of all corner points of the first projection image in an optical-mechanical coordinate system according to original optical-mechanical internal parameters of the projection device and a first distance from the projection device to the projection surface;

[0059] A second coordinate calculation unit, used for obtaining third coordinate data of all corner points of the first projection image in the camera coordinate system according to the rotation matrix and the coordinate translation vector;

[0060] A parameter acquisition unit, performing coordinate correspondence and function processing on the second coordinate data and the third coordinate data to obtain an optimal camera intrinsic parameter;

[0061] an angle acquisition unit, configured to perform spatial processing on the third coordinate data to obtain a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image;

[0062] a judging unit, configured to judge whether a difference between the first distance and the second distance satisfies a first condition and / or whether the horizontal rotation angle satisfies a second condition;

[0063] an updating unit, configured to update the current optical-mechanical intrinsic parameter according to a preset iterative model in response to a difference between the first distance and the second distance satisfying a first condition and / or the horizontal rotation angle satisfying a second condition;

[0064] The output unit is used to output the current optical machine external parameters, the optimal camera internal parameters, the rotation matrix and the coordinate translation vector as the final parameters of the projection device.

[0065] Compared with the prior art, the present invention has the following beneficial effects: (1) The calibration method does not require the setting of a checkerboard calibration plate, thereby reducing complexity and cost; (2) The calibration method of the present application does not require the projection of a series of Gray code images with coded information, but only requires the projection of a checkerboard image onto the wall, and subsequent processing is performed by taking a photo with a camera, thereby greatly shortening the processing time and improving efficiency; (3) The projection optical machine of the present application faces the wall, projects a checkerboard image onto the wall, and can automatically focus to adjust the clarity of the projected image; (4) The present application can adaptively adjust the focal length of the internal parameters of the projection optical machine and the Z-direction translation of the external parameters between the projection optical machine and the camera according to the number of motor steps after automatic focusing at different distances, thereby finally realizing the parameter calibration of the projection equipment, and the processing process is simple and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] By referring to the following drawings, the exemplary embodiments of the present invention can be more completely understood. The drawings are used to provide a further understanding of the embodiments of the present application, and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present invention and do not constitute a limitation of the present invention. In the drawings, the same reference numerals generally represent the same parts or steps.

[0067] Figure 1 A flowchart of a method for calibrating parameters of a projection device provided according to an exemplary embodiment of the present application;

[0068] Figure 2 A schematic diagram of a chessboard provided according to an exemplary embodiment of the present application;

[0069] Figure 3 A schematic structural diagram of a parameter calibration device for a projection device provided by another exemplary embodiment of the present application is shown;

[0070] Figure 4 A structural schematic diagram of an electronic device provided by another exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0071] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0072] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0073] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0074] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0075] An embodiment of the present application provides a method for calibrating a projection device, which is described below in conjunction with the accompanying drawings.

[0076] Reference Figure 1 , which shows a method for calibrating a projection device provided in some embodiments of the present application. As shown in the figure, the method may include the following steps:

[0077] S101: Initializing the current posture of the projecting device under test so that the projecting device faces the projection surface;

[0078] Specifically, before the projection device is calibrated, the posture of the projection device to be measured needs to be adjusted so that it faces the projection surface.

[0079] S102: Projecting a preset sample image onto a projection screen to form a first projection image;

[0080] Specifically, the projector projects a predefined sample image onto the screen. In a preferred embodiment, the sample image may be an Aruco code, a chessboard, or other graphics. Figure 2 The chessboard shown is used to illustrate.

[0081] S103: Perform corner point detection on the first projection image to obtain first coordinate data of all corner points of the first projection image;

[0082] Specifically, when the sample image projected by the projector is displayed on the projection screen, the image taken by the camera is defined as the first projection image, and the first projection image is subjected to corner point detection. Here, the corner points refer to all the corner points of the chessboard. Generally speaking, the corner points are extreme points, that is, points with particularly prominent attributes in some aspects, isolated points with the maximum or minimum intensity in some attributes, and the end points of line segments. For an image, the part within the circle as shown in the figure is the corner point of the image, which is the connection point of the object's contour line. Specifically, for an image, the corner point coordinates are the pixel point coordinates.

[0083] S104: Obtaining a homography matrix of a projection device according to the first coordinate data and preset coordinate data corresponding to all corner points of the preset sample image;

[0084] Specifically, it is detected that the number of corner points of the first projection image is n, and the coordinates of the n corner points are (x c1 ,y c1 ), (x c2 ,y c2 ),……(x cn ,y cn ), the coordinates of n preset corner points of the predefined sample image (x p1 ,y p1 ), (x p2 ,y p2 ),……,(x pn ,y pn ), the homography matrix is ​​derived by the following formula (1):

[0085]

[0086] Where z is the scale factor, (x pi ,y pi ) is the coordinate of the corner point of the preset sample image, where (x ci ,y ci ) is the corner point coordinate of the first projection image, n is the number of corner points of the first projection image and the preset sample image. Specifically, after one-to-one correspondence between the corner point coordinates of the first projection image and the corner point coordinates of the preset sample image, the homography matrix can be obtained by the following process:

[0087] Assume that the homography matrix H is a 3*3 matrix, then it is expressed as After eliminating the scale factor z, the coordinates of each corner point of the preset sample image can be expressed as:

[0088]

[0089] Among them, assuming H 33=1, then H has 8 independent unknown elements, and each pair of corresponding corner point coordinates can provide the above two constraint equations. Therefore, when the number of corresponding corner point pairs is equal to 4, the homography matrix H can be obtained. When the number of corresponding corner point pairs is greater than 4, the least squares method can be used to calculate the optimal homography matrix H.

[0090] S105: Obtaining a rotation matrix from a camera coordinate system of the projection device to an optomechanical coordinate system of the projection device according to the homography matrix and a preset function model;

[0091] Specifically, the rotation matrix M is obtained by decomposing the homography matrix through SVD; specifically, it is calculated by the decomposeHomographyMat function of opencv.

[0092] S106: Obtaining second coordinate data of all corner points of the first projection image in the optical-mechanical coordinate system according to the original optical-mechanical internal parameters of the projection device and the first distance from the projection device to the projection surface;

[0093] Specifically, the second coordinate data is expressed by formula (2):

[0094]

[0095] z ai =R1 (2);

[0096] Among them, (x ai ,y ai , z ai ) is each three-dimensional coordinate value of the second coordinate data, i=1…n; (c x , c y , f x , f y ) is the current optical-mechanical internal parameter of the projection device, and R1 is the first distance from the projection device to the projection surface.

[0097] S107: Obtain third coordinate data of all corner points of the first projection image in the camera coordinate system according to the rotation matrix and the coordinate translation vector;

[0098] Specifically, in this embodiment, the third coordinate data is expressed by formula (3):

[0099]

[0100] Among them, (x aci ,y aci , z aci ) is each three-dimensional coordinate value of the third coordinate data, i=1…n; (T x , T y , T z) is the translation vector matrix of the projection device, which characterizes the relationship between the original optomechanical extrinsics and the original camera extrinsics, and represents the translation parameters between the two.

[0101] S108: performing coordinate correspondence and function processing on the second coordinate data and the third coordinate data to obtain an optimal camera internal parameter;

[0102] Specifically, step S108 includes the following steps:

[0103] Normalizing the third coordinate data to obtain normalized third coordinate data;

[0104] The normalized third coordinate data and the second coordinate data are established in accordance with formula (4) and least squares are performed to obtain the optimal camera intrinsic parameters;

[0105] Wherein, formula (4) is:

[0106]

[0107] Among them, (x aci’ ,y aci’ ) is each three-dimensional coordinate value of the normalized third coordinate data, i = 1...n, x aci’ =x aci / z aci ,y aci’ =y aci / z aci ;(c xm_c , c ym_c , f xm_c , f ym_c ) is the optimal camera internal parameter.

[0108] S109: spatially processing the third coordinate data to obtain a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image;

[0109] Specifically, step S109 includes the following steps:

[0110] Performing least squares spatial plane fitting on the third coordinate data to obtain a spatial plane equation (5);

[0111] Obtaining a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image according to the spatial plane equation (5);

[0112] Among them, the spatial plane equation (5) is:

[0113] Z = Ax + By + C (5);

[0114] The second distance R2 from the projection device to the first projection image is expressed by formula (6):

[0115]

[0116] The horizontal rotation angle yaw of the projection device relative to the first projection image is expressed by formula (7):

[0117]

[0118] S110: Determine whether a difference between the first distance and the second distance satisfies a first condition and / or whether a horizontal rotation angle satisfies a second condition;

[0119] The first condition is expressed by formula (8):

[0120] |R1-R2|≥ΔR (8);

[0121] The second condition is expressed by formula (9):

[0122] yaw ≥ Δa (9);

[0123] Among them, ΔR is a preset distance threshold; Δa is a preset angle threshold. Specifically, ΔR is generally 3 to 5 centimeters, and Δa is generally about 1 degree.

[0124] S111: in response to the difference between the first distance and the second distance satisfying the first condition and / or the horizontal rotation angle satisfying the second condition, updating the current optical-mechanical internal parameters according to a preset iterative model and repeating the above steps;

[0125] Specifically, as long as one of the conditions 1 and 2 is not satisfied, the current optical machine internal parameters are updated and the above method steps are repeated to recalibrate the parameters of the projection device.

[0126] Specifically, the preset iterative model is expressed by formula (10):

[0127] c x '=c x ±step,c y '=c y ±step (10);

[0128] Among them, c x ' and c y ' are the two updated values ​​of the current camera internal parameters, c x and c y are the two values ​​of the current camera internal parameters before updating, and step is the number of motor movement steps.

[0129] S112: Output the current optical machine external parameters, the optimal camera internal parameters, the rotation matrix and the coordinate translation vector as the final parameters of the projection device.

[0130] Specifically, the current optomechanical extrinsic parameters and the optimal camera intrinsic parameters are obtained. By performing coordinate transformation through the rotation matrix and the coordinate translation vector, the optimal optomechanical extrinsic parameters and the optimal camera extrinsic parameters can be obtained and used as the final parameters of the projection device. At this point, the projection device has completed parameter calibration.

[0131] Compared with the prior art, the present invention has the following beneficial effects: (1) The calibration method does not require the setting of a checkerboard calibration plate, thereby reducing complexity and cost; (2) The calibration method of the present application does not require the projection of a series of Gray code images with coded information, but only requires the projection of a checkerboard image onto the wall, and subsequent processing is performed by taking a photo with a camera, thereby greatly shortening the processing time and improving efficiency; (3) The projection optical machine of the present application faces the wall, projects a checkerboard image onto the wall, and can automatically focus to adjust the clarity of the projected image; (4) The present application can adaptively adjust the focal length of the internal parameters of the projection optical machine and the Z-direction translation of the external parameters between the projection optical machine and the camera according to the number of motor steps after automatic focusing at different distances, thereby finally realizing the parameter calibration of the projection equipment, and the processing process is simple and efficient.

[0132] In the above embodiment, a method is provided, and correspondingly, the present application also provides a device. The device provided in the embodiment of the present application can implement the above method, and the device can be implemented by software, hardware, or a combination of software and hardware. For example, the device may include integrated or separate functional modules or units to perform the corresponding steps in the above methods.

[0133] In some implementations of the embodiments of the present application, the device 20 provided in the embodiments of the present application is based on the same inventive concept as the method provided in the aforementioned embodiments of the present application and has the same beneficial effects.

[0134] like Figure 3 As shown, the device 20 may include:

[0135] An initialization unit 201 is used to initialize the current posture of the measured projection device so that the projection device faces the projection surface;

[0136] A projection unit 202 is used to project a preset sample image onto a projection screen to form a first projection image;

[0137] A position detection unit 203 is used to perform corner point detection on the first projection image to obtain first coordinate data of all corner points of the first projection image;

[0138] A first matrix calculation unit 204 is configured to obtain a homography matrix of the projection device according to the first coordinate data and the preset coordinate data corresponding to all corner points of the preset sample image;

[0139] A second matrix calculation unit 205 is configured to obtain a rotation matrix from the camera coordinate system of the projection device to the optomechanical coordinate system of the projection device according to the homography matrix and a preset function model;

[0140] A first coordinate calculation unit 206, configured to obtain second coordinate data of all corner points of the first projection image in an optical-mechanical coordinate system according to original optical-mechanical internal parameters of the projection device and a first distance from the projection device to the projection surface;

[0141] A second coordinate calculation unit 207, configured to obtain third coordinate data of all corner points of the first projection image in the camera coordinate system according to the rotation matrix and the coordinate translation vector;

[0142] A parameter acquisition unit 208 performs coordinate correspondence and function processing on the second coordinate data and the third coordinate data to obtain an optimal camera intrinsic parameter;

[0143] An angle acquisition unit 209, configured to perform spatial processing on the third coordinate data to obtain a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image;

[0144] A judging unit 210, configured to judge whether a difference between the first distance and the second distance satisfies a first condition and / or whether the horizontal rotation angle satisfies a second condition;

[0145] An updating unit 211, configured to update the current optical-mechanical intrinsic parameter according to a preset iterative model in response to a difference between the first distance and the second distance satisfying a first condition and / or the horizontal rotation angle satisfying a second condition;

[0146] The output unit 212 is used to output the current optical-mechanical extrinsic parameters, the rotation matrix and the coordinate translation vector as the final parameters of the projection device.

[0147] The specific principles of this embodiment are the same as those of the above embodiment, and will not be described in detail here.

[0148] An embodiment of the present application also provides an electronic device corresponding to the method provided in the aforementioned embodiment. The electronic device may be an electronic device used for a server, such as a server, including an independent server and a distributed server cluster, etc., to execute the above method; the electronic device may also be an electronic device used for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the above method.

[0149] Please refer to Figure 4 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 4As shown, the electronic device 40 includes: a processor 400, a memory 401, a bus 402 and a communication interface 403, and the processor 400, the communication interface 403 and the memory 401 are connected via the bus 402; the memory 401 stores a computer program that can be run on the processor 400, and the processor 400 executes the aforementioned method of the present application when running the computer program.

[0150] The memory 401 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0151] The bus 402 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 401 is used to store programs, and the processor 400 executes the programs after receiving execution instructions. The method disclosed in any implementation of the above-mentioned embodiment of the present application may be applied to the processor 400, or implemented by the processor 400.

[0152] The processor 400 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 400. The above processor 400 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 401, and the processor 400 reads the information in the memory 401 and completes the steps of the above method in combination with its hardware.

[0153] The electronic device provided in the embodiment of the present application and the method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, operated or implemented by them.

[0154] It should be noted that the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0156] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0157] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0158] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0159] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application.

Claims

1. A method for calibrating parameters of a projection device, characterized in that: The steps include: Initializing the current posture of the projecting device under test so that the projecting device faces the projection surface; Projecting a preset sample image onto the projection screen to form a first projection image; Performing corner point detection on the first projection image to obtain first coordinate data of all corner points of the first projection image; Obtaining a homography matrix of the projection device according to the first coordinate data and the preset coordinate data corresponding to all corner points of the preset sample image; According to the homography matrix and the preset function model, a rotation matrix from the camera coordinate system of the projection device to the optomechanical coordinate system of the projection device is obtained; Obtaining second coordinate data of all corner points of the first projection image in the optical-mechanical coordinate system according to original optical-mechanical internal parameters of the projection device and a first distance from the projection device to the projection surface; Obtaining third coordinate data of all corner points of the first projection image in the camera coordinate system according to the rotation matrix and the coordinate translation vector; Performing coordinate correspondence and function processing on the second coordinate data and the third coordinate data to obtain an optimal camera intrinsic parameter; Performing spatial processing on the third coordinate data to obtain a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image; Determining whether a difference between the first distance and the second distance satisfies a first condition and / or whether the horizontal rotation angle satisfies a second condition; In response to the difference between the first distance and the second distance satisfying a first condition and / or the horizontal rotation angle satisfying a second condition, updating the current optical-mechanical internal parameters according to a preset iterative model and repeating the above steps; The current optical-mechanical intrinsic parameters, the optimal camera intrinsic parameters, the rotation matrix and the coordinate translation vector are output as final parameters of the projection device.

2. The method according to claim 1, characterized in that The homography matrix is ​​obtained by formula (1): (1); in, is the homography matrix, z is the scale factor, are the corner point coordinates of the preset sample image, where ( are the corner coordinates of the first projection image, is the number of corner points of the first projection image and the preset sample image.

3. The method according to claim 2, characterized in that The rotation matrix is ​​obtained by decomposing the homography matrix through SVD.

4. The method according to claim 3, characterized in that The second coordinate data is expressed by formula (2): (2); in,( , , ) is each three-dimensional coordinate value of the second coordinate data, ; ( , , ) is the current optical and mechanical internal parameter of the projection device, is the first distance from the projection device to the projection surface.

5. The method according to claim 4, characterized in that The third coordinate data is expressed by formula (3): (3); in, is the rotation matrix, ( , , ) is each three-dimensional coordinate value of the third coordinate data, ; ( , , ) is the coordinate translation vector of the projection device.

6. The method according to claim 5, characterized in that The second coordinate data and the third coordinate data are subjected to coordinate correspondence and function processing to obtain an optimal camera intrinsic parameter, including: Normalizing the third coordinate data to obtain normalized third coordinate data; Establish a coordinate correspondence relationship between the normalized third coordinate data and the second coordinate data according to formula (4) and perform least squares transformation to obtain the optimal camera intrinsic parameter; Among them, formula (4) is: (4); in, and They are respectively the third coordinate data after normalization Coordinates and coordinate; , , ; ( , , , ) is the optimal camera internal parameter.

7. The method according to claim 6, characterized in that The third coordinate data is spatially processed to obtain a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image, including: Perform least squares spatial plane fitting on the third coordinate data to obtain a spatial plane equation (5); Obtaining a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image according to the spatial plane equation (5); Among them, the spatial plane equation (5) is: (5); Among them, the second distance from the projection device to the first projection image It is expressed by formula (6): (6); The horizontal rotation angle of the projection device relative to the first projection image is It is expressed by formula (7): (7); in, and The third coordinate data are The column vector consisting of the axis coordinates and A column vector consisting of axis coordinates; A, B, C are the coefficients representing the plane equation obtained by the least squares method; yes A column vector of the third coordinate data before normalization consisting of the axis coordinates.

8. The method according to claim 7, characterized in that The first condition is expressed by formula (8): (8); The second condition is expressed by formula (9): (9); in, is a preset distance threshold; is the preset angle threshold.

9. The method according to claim 8, characterized in that The preset iterative model is expressed by formula (10): (10); in, and are the two updated values ​​of the current camera intrinsic parameters, and are the two values ​​of the current camera intrinsic parameters before updating, The number of steps the motor moves.

10. A parameter calibration device for a projection device, characterized in that: include: An initialization unit, used for initializing the current posture of the measured projection device so that the projection device faces the projection surface; A projection unit, used for projecting a preset sample image onto a projection screen to form a first projection image; A position detection unit, configured to perform corner point detection on the first projection image to obtain first coordinate data of all corner points of the first projection image; A first matrix calculation unit, which obtains a homography matrix of the projection device according to the first coordinate data and preset coordinate data corresponding to all corner points of the preset sample image; A second matrix calculation unit, which obtains a rotation matrix from the camera coordinate system of the projection device to the optomechanical coordinate system of the projection device according to the homography matrix and a preset function model; A first coordinate calculation unit, used for obtaining second coordinate data of all corner points of the first projection image in an optical-mechanical coordinate system according to original optical-mechanical internal parameters of the projection device and a first distance from the projection device to the projection surface; A second coordinate calculation unit, used for obtaining third coordinate data of all corner points of the first projection image in the camera coordinate system according to the rotation matrix and the coordinate translation vector; A parameter acquisition unit, performing coordinate correspondence and function processing on the second coordinate data and the third coordinate data to obtain an optimal camera intrinsic parameter; an angle acquisition unit, configured to perform spatial processing on the third coordinate data to obtain a second distance from the projection device to the first projection image and a horizontal rotation angle of the projection device relative to the first projection image; a judging unit, configured to judge whether a difference between the first distance and the second distance satisfies a first condition and / or whether the horizontal rotation angle satisfies a second condition; an updating unit, configured to update a current optical-mechanical intrinsic parameter according to a preset iterative model in response to a difference between the first distance and the second distance satisfying a first condition and / or the horizontal rotation angle satisfying a second condition; The output unit is used to output the current optical-mechanical intrinsic parameters, the optimal camera intrinsic parameters, the rotation matrix and the coordinate translation vector as the final parameters of the projection device.

Citation Information

Patent Citations

  • Projection equipment and projection image correction method based on optical machine camera calibration

    CN114401390A

  • Projector ray machine calibration method and device and projection equipment

    CN117857754A