Ladder correction evaluation method, computer equipment and storage medium
By taking the projection surface image by the camera and calculating the vertex position, keystone correction evaluation index is generated, which solves the problem of poor keystone correction evaluation effect in the prior art, and achieves more accurate and efficient evaluation.
Patent Information
- Application Number
- CN202311394487.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-05-02
AI Technical Summary
The current evaluation effect of keystone correction evaluation method is poor and is susceptible to artificial subjective factors, resulting in inconsistent evaluation results.
By obtaining the projection surface image taken by the camera, determining the trapezoidal area image, and calculating the position of each vertex relative to the camera, an evaluation index of the keystone correction screen is generated.
This method can accurately reflect the effect of the keystone correction screen, avoid the influence of artificial subjective factors, and improve the accuracy and efficiency of evaluation.
Smart Images

Figure CN119922288A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of trapezoidal correction, and in particular to a trapezoidal correction evaluation method, a computer device, and a storage medium. Background Art
[0002] A projector is a device that projects images or videos onto a screen or wall. Its working principle is to project the image onto the projection surface through the light emitted by the lens, forming a visible image. However, due to the different angles or distances between the projector and the projection surface, the image projected onto the projection surface may be distorted compared to the original image, so the projector needs to be keystone corrected to fix the tilt or deformation of the image.
[0003] Currently, when evaluating the results of keystone correction, manual observation is mainly used to determine whether the keystone correction effect is qualified. However, this method has high requirements for the evaluator, so its evaluation efficiency is relatively low, and the evaluation process is easily affected by subjective factors. Specifically, each person has a different degree of acceptance of the keystone correction effect. For the same projection screen, different people may come up with different evaluation results, resulting in a relatively poor evaluation effect. Summary of the invention
[0004] One purpose of the embodiments of the present application is to provide a trapezoidal correction evaluation method to solve the technical problem that the evaluation effect of the current trapezoidal correction evaluation method is relatively poor.
[0005] In a first aspect, an embodiment of the present application provides a trapezoidal correction evaluation method, comprising:
[0006] Acquire a captured image of a projection surface captured by a camera, wherein the projection surface is used to project a trapezoidal correction image, and the trapezoidal correction image includes a plurality of vertices;
[0007] Determining a trapezoidal area image corresponding to the trapezoidal correction screen according to the captured image;
[0008] Determine the vertex position of each vertex relative to the camera according to the trapezoidal area image;
[0009] An evaluation index of the trapezoidal correction screen is generated based on the plurality of vertex positions.
[0010] In combination with the first aspect, in a possible implementation manner, determining the vertex position of each vertex relative to the camera according to the trapezoidal area image includes:
[0011] Determine the pixel position of each vertex in the pixel coordinate system of the camera according to the trapezoidal area image;
[0012] Determining the intrinsic parameters of the camera and the extrinsic parameters of the camera relative to the projection surface;
[0013] The pixel position of each vertex is converted into the vertex position according to the intrinsic parameters and the extrinsic parameters.
[0014] In combination with the first aspect, in a possible implementation manner, the projection surface includes a calibration plate, the calibration plate includes a plurality of corner points, the calibration plate is configured with a calibration plate coordinate system, the camera is configured with a camera coordinate system, and determining an external parameter of the camera relative to the projection surface includes:
[0015] Determining the intrinsic parameters of the camera;
[0016] Determine the two-dimensional coordinates of the plurality of corner points in the calibration plate coordinate system, and the three-dimensional coordinates of the plurality of corner points in the camera coordinate system;
[0017] The external parameters between the camera and the projection surface are calculated according to the intrinsic parameters of the camera, the two-dimensional coordinates and the three-dimensional coordinates.
[0018] In combination with the first aspect, in a possible implementation manner, converting the pixel position of each vertex into the vertex position according to the intrinsic parameter and the extrinsic parameter includes:
[0019] Determine an internal parameter matrix and an external parameter matrix according to the internal parameters and the external parameters;
[0020] The pixel coordinates corresponding to the pixel position are subjected to matrix transformation processing by using the intrinsic parameter matrix and the extrinsic parameter matrix, so as to convert the pixel coordinates of each vertex into vertex coordinates.
[0021] In combination with the first aspect, in a possible implementation manner, the evaluation index includes a horizontal index, and the step of generating the evaluation index of the trapezoidal correction image according to the plurality of vertex positions includes:
[0022] Determining a boundary of the trapezoidal correction image in a horizontal direction as a horizontal boundary;
[0023] Based on the vertex position, a first angle between the horizontal boundary and the horizontal direction is calculated to obtain the horizontal index.
[0024] In combination with the first aspect, in a possible implementation manner, the evaluation index includes a vertical index, and the evaluation index for generating the trapezoidal correction image according to the plurality of vertex positions includes:
[0025] Determining a boundary of the trapezoidal correction image in a vertical direction as a vertical boundary;
[0026] Based on the vertex position, a second angle between the vertical boundary and the vertical direction is calculated to obtain the vertical index.
[0027] In combination with the first aspect, in a possible implementation manner, the evaluation index includes a deviation ratio index, the deviation ratio index includes a horizontal deviation ratio index and a vertical deviation ratio index, and the evaluation index for generating the trapezoidal correction image according to the plurality of vertex positions includes:
[0028] Determining the upper boundary, the lower boundary, the left boundary and the right boundary of the trapezoidal correction image;
[0029] Based on the vertex position, calculating the difference between the upper boundary and the lower boundary as the horizontal deviation ratio index;
[0030] Based on the vertex position, the difference between the left boundary and the right boundary is calculated as the vertical deviation ratio index.
[0031] In combination with the first aspect, in a possible implementation manner, after generating the evaluation index of the trapezoidal correction picture, the method further includes:
[0032] Determining whether the evaluation index is less than a preset evaluation threshold;
[0033] If so, determining that the trapezoidal correction image is qualified;
[0034] If not, it is determined that the keystone correction image is unqualified.
[0035] In a second aspect, the present application also provides a trapezoidal correction evaluation device, including:
[0036] A data acquisition module, used for acquiring an image captured by a camera on a projection surface, wherein the projection surface is used for projecting a trapezoidal correction image, and the trapezoidal correction image includes a plurality of vertices;
[0037] A data detection module, used to determine a trapezoidal area image corresponding to the trapezoidal correction image according to the captured image;
[0038] A data calibration module, used for determining the vertex position of each vertex relative to the camera according to the trapezoidal area image;
[0039] The index generating module is used to generate the evaluation index of the trapezoidal correction picture according to the plurality of vertex positions.
[0040] In a third aspect, an embodiment of the present application further proposes a computer device, comprising a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the computer device implements the trapezoidal correction evaluation method as described above.
[0041] In a fourth aspect, an embodiment of the present application further proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the trapezoidal correction evaluation method as described above.
[0042] The embodiments of the present application can achieve the following technical effects:
[0043] Based on the method proposed in the embodiment of the present application, a captured image obtained by shooting a trapezoidal correction image with a camera is first obtained, and the vertex position of each vertex in the trapezoidal correction image relative to the camera is determined based on the captured image, and finally the evaluation index of the trapezoidal correction image is calculated based on the positions of each vertex. Among them, the vertex position of each vertex relative to the camera can characterize the relative relationship between each vertex in the trapezoidal correction image projected onto the projection surface, so the evaluation index calculated based on the positions of each vertex can accurately reflect the effect of the trapezoidal correction image. Since the process of generating the evaluation index does not require human participation, the influence of individual subjective factors on the evaluation results is avoided, and the evaluation effect is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 A schematic diagram of a trapezoidal correction evaluation scenario provided in an embodiment of the present application;
[0046] Figure 2 A schematic diagram of a flow chart of a trapezoidal correction evaluation method provided in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of determining camera extrinsic parameters based on a calibration plate provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of a trapezoidal correction screen provided in an embodiment of the present application;
[0049] Figure 5 It is a structural schematic diagram of a trapezoidal correction evaluation device provided in an embodiment of the present application;
[0050] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0052] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0053] Related technologies involved in the embodiments of this application:
[0054] A projector is a device that can project images or videos onto a screen or other projection surface. It is connected to computers, VCD, DVD, BD, DV and other devices through various interfaces and outputs video or image signals. In daily use of the projector, it is necessary to ensure that the projector lens forms a right angle with the projection surface to ensure a certain projection effect. If the vertical relationship between the two cannot be ensured, it may cause trapezoidal distortion of the image displayed on the projection surface, that is, the corresponding edges in the image are inconsistent, resulting in trapezoidal distortion.
[0055] In order to eliminate trapezoidal distortion, today's projectors generally provide users with a trapezoidal correction function to correct the distorted trapezoidal image to a standard rectangle, which mainly includes optical trapezoidal correction solutions and digital trapezoidal correction solutions. The optical trapezoidal correction solution refers to adjusting the trapezoid by adjusting the physical position of the lens, while the digital trapezoidal correction solution uses software or hardware methods to achieve trapezoidal correction. Since the optical trapezoidal correction solution has high requirements on the size and cost of the projector, the digital trapezoidal correction solution is more widely used in current projectors. Regardless of the solution adopted, in order to ensure the effect of the trapezoidal correction, the effect of the trapezoidal correction needs to be evaluated so that the projector can basically achieve the purpose of trapezoidal correction.
[0056] In order to better explain the present application, the application scenarios involved in the embodiments of the present application are first described. Figure 1 , Figure 1 The figure shows a schematic diagram of a trapezoidal correction evaluation scenario. Figure 1As shown, the scene includes a projector 10, a projection surface 20, a camera 30 and a host computer 40. The projector 10 is used to project a trapezoidal correction picture after trapezoidal correction onto the projection surface 20. The camera 30 is used to shoot the trapezoidal correction picture displayed on the projection surface 20 and send the shot image to the host computer 40 so that the host computer 40 can evaluate the effect of the trapezoidal correction based on the shot image.
[0057] Among them, the camera 30 and the host computer 40 are connected by wire or wireless communication. The wired communication connection can be in the form of various communication connections that transmit information through tangible media such as metal wires and optical fibers; the wireless communication connection can be in the form of 5G communication, 4G communication, 3G communication, 2G communication, CDMA, Zig-Bee, Bluetooth, wireless broadband (Wi-Fi), ultra-wideband (UWB) and near field communication (NFC), CDMA2000, GSM, Infrared (IR), ISM, RFID, UMTS / 3GPPw / HSDPA, WiMAXWi-Fi or ZigBee, etc.
[0058] It can be understood that the specific form of the upper computer 40 can be a device with data processing capabilities, such as PLC, MCU, microcontroller, tablet computer, server or other similar computer equipment, etc., which is used to communicate with the camera 30 and control the camera 30 to perform shooting actions. Based on this understanding, the camera 30 is the lower computer corresponding to the upper computer 40.
[0059] In some embodiments, after acquiring the captured image taken by the camera 30, the upper computer 40 first determines the trapezoidal area image corresponding to the trapezoidal correction screen based on the captured image, then determines the vertex positions of each vertex of the image relative to the camera 30 in the trapezoidal area image, and finally calculates the evaluation index of the trapezoidal correction screen based on the vertex positions of each vertex.
[0060] As a feasible implementation method, the specific form of the evaluation index can be a certain numerical value. The upper computer 40 pre-stores multiple thresholds set by the implementers, and each threshold is used to evaluate an evaluation index. By comparing the values of each evaluation index with its corresponding threshold, it can be accurately determined whether a certain evaluation index meets expectations, that is, whether the effect of trapezoidal correction meets expectations.
[0061] Based on the above Figure 1 The trapezoidal correction evaluation scenario shown in the figure proposes a trapezoidal correction evaluation method that can be applied to Figure 1 The host computer 40 is shown.
[0062] For details, please refer to Figure 2 , Figure 2The flowchart of the keystone correction evaluation method is shown, including:
[0063] Step S10, obtaining a captured image of a projection surface captured by a camera, wherein the projection surface is used to project a trapezoidal correction image, and the trapezoidal correction image includes a plurality of vertices;
[0064] It should be noted that the camera referred to in this embodiment can be any image acquisition device or equipment in a broad sense, such as a digital camera, an industrial camera, an image sensor or other similar machine vision systems, etc. The photosensitive element of the image acquisition device or equipment faces the projection surface to record the trapezoidal correction image projected by the projector. The projector has a trapezoidal correction function, and the trapezoidal correction image obtained after the trapezoidal correction is projected onto the projection surface, and then captured and photographed by the camera.
[0065] It can be understood that the trapezoidal correction image projected onto the projection surface should be a standard or approximate rectangle, including four vertices. The four sides of the rectangle can be determined according to the relative position relationship of the four vertices. Under ideal conditions, the rectangle should satisfy the conditions that opposite sides are equal and adjacent sides are perpendicular.
[0066] In some embodiments, the captured image captured by the camera is converted into a digital signal for compression and sent to a host computer for data processing through a predetermined communication method. After receiving the digital signal, the host computer decompresses the digital signal according to a predetermined encoding and decoding method to determine the captured image captured by the camera.
[0067] Step S20, determining a trapezoidal area image corresponding to the trapezoidal correction image according to the captured image;
[0068] The captured image collected by the camera includes a trapezoidal area image, which is obtained by capturing the trapezoidal correction screen. It is easy to understand that in addition to the trapezoidal area image, the captured image may also include images on the projection surface that are not related to the trapezoidal correction screen. This part of the image cannot be used to evaluate the effect of the trapezoidal correction. Therefore, it is necessary to determine the trapezoidal area image corresponding to the trapezoidal correction screen in the captured image.
[0069] In some embodiments, the trapezoidal region image is determined by a quadrilateral detection tool provided by OpenCV (Open Source Computer Vision, open source computer vision library), and the quadrilateral detection tool of OpenCV has built-in functions and algorithms for image processing and computer vision. For example, in this embodiment, the image edge information can be determined by an image edge detection algorithm (such as the Canny operator), and the image edge information can be detected by a contour detection algorithm (such as the findContours function) to determine the contour of the trapezoidal region image. The contour of the trapezoidal region image is appropriately screened and processed to obtain contour information that meets the characteristics of the quadrilateral, that is, the trapezoidal region image is determined.
[0070] In other embodiments, the camera has built-in program instructions for detecting the image it captures. When the camera captures the projection surface, the camera's processor runs the program instructions to detect the captured image in real time, thereby adjusting the camera's shooting lens so that the camera tries to capture only content related to the trapezoidal correction image, and reduces content in the captured image captured by the camera that is not related to the trapezoidal correction image, thereby reducing the task complexity of the host computer in determining the trapezoidal area image.
[0071] Step S30, determining the vertex position of each vertex relative to the camera according to the trapezoidal area image;
[0072] The vertex position of each vertex relative to the camera refers to the vertex position of each vertex in the trapezoidal correction picture displayed by the projection surface in the real three-dimensional world.
[0073] It is understandable that different camera shooting angles will have different effects on the captured images, causing the captured images to have certain distortions compared to the real world. Therefore, if the trapezoidal correction image is directly evaluated based on the pixel position of each vertex in the captured image, the evaluation results may not accurately reflect the effect of the trapezoidal correction.
[0074] In some embodiments, the vertex position of each vertex can be determined in the form of coordinates. Based on this understanding, there is a camera coordinate system for representing the pixel position of each vertex, and an objective coordinate system (i.e., a coordinate system in the three-dimensional real world) for representing the vertex position of each vertex relative to the camera. It can be understood by those skilled in the art that, based on the intrinsic and extrinsic parameters of the camera, the vertex position of the same object in the camera coordinate system can be converted to its vertex position in the objective coordinate system, that is, the vertex position relative to the camera is obtained.
[0075] Step S40: generating an evaluation index of the trapezoidal correction image according to the plurality of vertex positions.
[0076] Among them, the evaluation index is an index used to judge whether the correction effect of the trapezoidal correction screen is qualified. According to different evaluation dimensions, the evaluation index may include: an index used to determine whether the trapezoidal correction screen is horizontal, an index used to determine whether there are sharp corners in the trapezoidal correction screen, and an index used to determine whether the deviation ratio of the trapezoidal correction screen is reasonable (generally, the deviation ratio of the trapezoidal correction screen is as small as possible).
[0077] Based on the above embodiments, the present application provides a trapezoidal correction evaluation method, which uses a camera to capture an image of a projection surface to determine a trapezoidal area image, so as to determine the vertex positions of each vertex in the trapezoidal correction image, thereby generating an evaluation index of the trapezoidal correction image based on the vertex positions. Compared with the manual evaluation method, the present method can avoid the uncontrollable influence of personal subjective factors on the evaluation process, and the evaluation process is simpler, and there is no need to rely on on-site measurements to determine parameters, which significantly improves the accuracy of the evaluation. In addition, the evaluation efficiency of the present method is higher, so the trapezoidal correction evaluation of a large number of projectors is more sufficient.
[0078] Furthermore, in the above embodiment, the vertex position of each vertex relative to the camera is determined based on the trapezoidal area image, including: determining the pixel position of each vertex in the pixel coordinate system of the camera based on the trapezoidal area image; determining the intrinsic parameters of the camera, and the extrinsic parameters of the camera relative to the projection surface; and converting the pixel position of each vertex into a vertex position based on the intrinsic parameters and the extrinsic parameters.
[0079] The specific form of the pixel position may be a coordinate in a pixel coordinate system, which refers to a two-dimensional coordinate system established in the trapezoidal region image. As a feasible implementation, the point in the upper left corner of the trapezoidal region image is determined as the origin of the pixel coordinate system, the right side of the origin in the horizontal direction is determined as the x-axis direction of the pixel coordinate system, and the bottom side of the origin in the vertical direction is determined as the y-axis direction of the pixel coordinate system. After determining the pixel coordinate system, the coordinates of each pixel point in the trapezoidal region image may be further determined. In this embodiment, only the pixel coordinates of the vertices of the trapezoidal region image need to be determined. Therefore, only the pixel coordinates of the pixel points corresponding to each vertex need to be determined in the pixel coordinate system, and the pixel position of each vertex in the pixel coordinate system of the camera is obtained.
[0080] It can be understood that the intrinsic parameters of the camera are parameters that characterize the geometric features and imaging characteristics of the camera imaging, and determine the process of mapping points in the real three-dimensional world to the images taken by the camera. Specifically, the intrinsic parameters of the camera are usually a set of parameters, mainly including: focal length (f), which is used to characterize the distance from the camera lens to the imaging plane. The focal length determines the field of view and the size of the viewing angle of the camera; the principal point (cx, cy), that is, the optical center position of the camera imaging plane, characterizes the intersection position of the camera optical axis (optical center) and the imaging plane, and is generally located at the center of the imaging plane.
[0081] The extrinsic parameters of a camera refer to the position and posture of the camera in the world coordinate system, specifically the position and posture of the camera relative to the shooting scene during shooting, and mainly include: a rotation matrix, which is used to characterize the direction or posture of the camera. The rotation matrix is usually represented by a 3x3 matrix, and the elements in the matrix represent the rotation relationship between the camera coordinate system and the world coordinate system; a translation vector, which is used to characterize the position of the origin of the camera coordinate system in the world coordinate system. Usually, the translation vector is a three-dimensional vector indicating the translation distance of the camera in three spatial directions. In this embodiment, the extrinsic parameters of the camera refer to the extrinsic parameters of the camera relative to the projection surface, that is, the position and posture of the camera relative to the projection surface.
[0082] In some embodiments, when determining the intrinsic parameters of the camera, a pre-set calibration image is captured by the camera, and then the captured image is processed using the camera calibration tool of OPenCV. The camera calibration tool of OPenCV detects the calibration image and the captured image, calculates the focal length, principal point position, distortion coefficient and other information of the camera, and thus determines the intrinsic parameters of the camera.
[0083] In some embodiments, the projection surface includes a calibration plate, the calibration plate includes multiple corner points, the calibration plate is configured with a calibration plate coordinate system, the camera is configured with a camera coordinate system, and the external parameters of the camera relative to the projection surface are determined, including: determining the intrinsic parameters of the camera; determining the two-dimensional coordinates of the multiple corner points in the calibration plate coordinate system, and the three-dimensional coordinates of the multiple corner points in the camera coordinate system; and calculating the external parameters between the camera and the projection surface based on the intrinsic parameters, two-dimensional coordinates and three-dimensional coordinates of the camera.
[0084] Among them, the calibration plate refers to a tool used for camera calibration. The calibration plate is usually provided with a specific pattern, which can provide known feature points and size information to facilitate the camera calibration algorithm to calculate the camera's external parameters.
[0085] Specifically, refer to Figure 3 , Figure 3 The figure shows a schematic diagram of determining the camera external parameters according to the calibration plate. The calibration plate is pressed against the wall by adjusting the level (the wall in this embodiment is similar to the projection surface in the above embodiment, so the external parameters between the camera and the calibration plate are the external parameters between the camera and the projection surface), and the calibration plate includes a plurality of corner points, based on which a calibration plate coordinate system as shown in the figure can be established, and the two-dimensional coordinates of each corner point in the calibration plate in the calibration plate coordinate system can be determined, and based on the position of the camera, a camera coordinate system can be further established, and the camera coordinate system includes the calibration plate coordinate system, and the calibration plate coordinate system indicates the x-axis and y-axis directions of the camera coordinate system, and the direction of the z-axis can be determined by the directions of the x-axis and y-axis in the calibration plate coordinate system.
[0086] Furthermore, in the above embodiment, the pixel position of the vertex corresponds to a pixel coordinate, and the vertex position corresponds to a vertex coordinate. The pixel position of each vertex is converted into a vertex position based on the intrinsic parameters and the extrinsic parameters, including: determining the intrinsic parameter matrix and the extrinsic parameter matrix based on the intrinsic parameters and the extrinsic parameters; performing matrix transformation processing on the pixel coordinates corresponding to the pixel position through the intrinsic parameter matrix and the extrinsic parameter matrix to convert the pixel coordinates of each vertex into vertex coordinates.
[0087] The process of matrix transformation of pixel coordinates according to the intrinsic parameter matrix and the extrinsic parameter matrix is referred to the following formula (1):
[0088]
[0089] Among them, (u0,v0) is the pixel coordinate of any vertex, (x0,y0,0) is the vertex coordinate of any vertex, R cp and t cp The rotation matrix and translation matrix of the external parameters are determined according to the external parameters. Then, the vertex coordinates corresponding to the same vertex can be calculated based on the pixel coordinates.
[0090] Specifically, in the above embodiment, the evaluation index includes a horizontal index, and the evaluation index of the trapezoidal correction image is generated according to multiple vertex positions, including: determining that the boundary of the trapezoidal correction image in the horizontal direction is a horizontal boundary; based on the vertex position, calculating the first angle between the horizontal boundary and the horizontal direction to obtain the horizontal index.
[0091] Reference Figure 4 , assuming that the trapezoidal correction screen is a quadrilateral, including four vertices A, B, C, and D, whose coordinates are: A(x0,y0,0), B(x1,y1,0), C(x2,y2,0), and D(x3,y3,0), then the angles between the sides AB and CD and the horizontal direction can be calculated according to the coordinates of the four vertices A, B, C, and D, that is, the first angle is obtained, and the first angle is the horizontal index.
[0092] More specifically, in the above embodiment, the evaluation index also includes a vertical index. Based on multiple vertex positions, the evaluation index of the trapezoidal correction image is generated, including: determining that the boundary of the trapezoidal correction image in the vertical direction is a vertical boundary; based on the vertex position, calculating the second angle between the vertical boundary and the vertical direction to obtain the vertical index.
[0093] Still with the above Figure 4 For example, according to the coordinates of the four vertices A, B, C, and D, the angles between the sides AD and BC and the vertical direction can be calculated, that is, the second angle is obtained, and the second angle is the vertical coordinate.
[0094] Furthermore, in the above embodiment, the evaluation index includes a deviation ratio index, and the deviation ratio index includes a horizontal deviation ratio index and a vertical deviation ratio index. The evaluation index of the trapezoidal correction image generated according to multiple vertex positions includes: determining the upper boundary, lower boundary, left boundary and right boundary of the trapezoidal correction image; based on the vertex position, calculating the difference between the upper boundary and the lower boundary as the horizontal deviation ratio index; based on the vertex position, calculating the difference between the left boundary and the right boundary as the vertical deviation ratio index.
[0095] Still with the above Figure 4 For example, according to the coordinates of the four vertices A, B, C, and D, the difference between the side AB and the side DC can be calculated as the horizontal deviation ratio index, and the difference between the side AD and the side BC can be used to obtain the vertical deviation ratio index.
[0096] Furthermore, after generating the evaluation indicators of the trapezoidal correction screen, it also includes: judging whether the evaluation indicator is less than a preset evaluation threshold; if so, determining that the trapezoidal correction screen is qualified; if not, determining that the trapezoidal correction screen is unqualified.
[0097] Among them, the evaluation threshold includes evaluation thresholds of multiple dimensions, each corresponding to an evaluation index. If a certain evaluation index is judged to be less than the evaluation threshold of its corresponding dimension, it can be considered that the trapezoidal correction picture is unqualified under this dimension. Specifically, different projectors have different product positioning, so their requirements for trapezoidal correction are different, that is, the emphasis on the evaluation indicators of trapezoidal correction is different. For example, the implementer can conduct corresponding product research. If the research finds that the tilt of the picture most affects the user experience, the threshold corresponding to the horizontal index can be reduced. When the calculated horizontal index exceeds the threshold, it is considered that the projector evaluated at this time does not meet the standard. Similarly, the thresholds of other evaluation indicators can be adjusted to adapt to the definition of the product, and further optimization can be performed when the projector does not meet the standard.
[0098] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.
[0099] As another aspect of the embodiment of the present application, the embodiment of the present application provides a trapezoidal correction evaluation device. The trapezoidal correction evaluation device can be a software module, and the software module includes a plurality of instructions, which are stored in a memory, and the processor can access the memory and call the instructions for execution to complete the trapezoidal correction evaluation method described in the above-mentioned various embodiments.
[0100] In some embodiments, the trapezoidal correction evaluation device can also be constructed by hardware devices, for example, the trapezoidal correction evaluation device can be constructed by one or more chips, and each chip can work in coordination with each other to complete the trapezoidal correction evaluation method described in each of the above embodiments. For another example, the trapezoidal correction evaluation device can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0101] For details, please refer to Figure 5 , Figure 5 The figure shows a structural schematic diagram of a trapezoidal correction evaluation device 50, as shown in the figure, comprising:
[0102] A data acquisition module 501 is used to acquire an image captured by a camera shooting a projection surface, wherein the projection surface is used to project a trapezoidal correction image, and the trapezoidal correction image includes a plurality of vertices;
[0103] A data detection module 502, configured to determine a trapezoidal area image corresponding to the trapezoidal correction image according to the captured image;
[0104] A data calibration module 503, used to determine the vertex position of each vertex relative to the camera according to the trapezoidal area image;
[0105] The index generating module 504 is used to generate an evaluation index of the trapezoidal correction image according to the plurality of vertex positions.
[0106] In a possible implementation, the data calibration module 503, when used to determine the vertex position of each vertex relative to the camera according to the trapezoidal area image, is specifically used to:
[0107] Determine the pixel position of each vertex in the pixel coordinate system of the camera according to the trapezoidal area image;
[0108] Determining the intrinsic parameters of the camera and the extrinsic parameters of the camera relative to the projection surface;
[0109] The pixel position of each vertex is converted into the vertex position according to the intrinsic parameters and the extrinsic parameters.
[0110] In a possible implementation, the data calibration module 503, when used to determine the external parameters of the camera relative to the projection surface, is specifically used to:
[0111] Determining the intrinsic parameters of the camera;
[0112] Determine the two-dimensional coordinates of the plurality of corner points in the calibration plate coordinate system, and the three-dimensional coordinates of the plurality of corner points in the camera coordinate system;
[0113] The external parameters between the camera and the projection surface are calculated according to the intrinsic parameters of the camera, the two-dimensional coordinates and the three-dimensional coordinates.
[0114] In a possible implementation, the data calibration module 503, when used to convert the pixel position of each vertex into the vertex position according to the intrinsic parameter and the extrinsic parameter, is specifically used to:
[0115] Determine an internal parameter matrix and an external parameter matrix according to the internal parameters and the external parameters;
[0116] The pixel coordinates corresponding to the pixel position are subjected to matrix transformation processing by using the intrinsic parameter matrix and the extrinsic parameter matrix, so as to convert the pixel coordinates of each vertex into vertex coordinates.
[0117] In a possible implementation, the indicator generation module 504, when used to generate the evaluation indicator of the trapezoidal correction picture according to the plurality of vertex positions, is specifically used to:
[0118] Determining a horizontal boundary of the trapezoidal correction image as a first boundary;
[0119] Based on the vertex position, a first angle between the first boundary and the horizontal direction is calculated to obtain the first index.
[0120] In a possible implementation, the index generating module 504, when used to generate the evaluation index of the trapezoidal correction picture according to the plurality of vertex positions, is further used to:
[0121] Determining a boundary of the trapezoidal correction image in a vertical direction as a second boundary;
[0122] Based on the vertex position, a second angle between the second boundary and the vertical direction is calculated to obtain the second index.
[0123] In a possible implementation, the index generating module 504, when used to generate the evaluation index of the trapezoidal correction picture according to the plurality of vertex positions, is further used to:
[0124] Determining the upper boundary, the lower boundary, the left boundary and the right boundary of the trapezoidal correction image;
[0125] Based on the vertex position, calculating the difference between the upper boundary and the lower boundary as the third horizontal index;
[0126] Based on the vertex position, a difference between the left boundary and the right boundary is calculated as the vertical third index.
[0127] In a possible implementation, the index generating module 504, when used to generate the evaluation index of the trapezoidal correction picture according to the plurality of vertex positions, is further used to:
[0128] Determining whether the evaluation index is less than a preset evaluation threshold;
[0129] If so, determining that the trapezoidal correction image is qualified;
[0130] If not, it is determined that the keystone correction image is unqualified.
[0131] It should be noted that the above-mentioned trapezoidal correction evaluation device 50 can execute the trapezoidal correction evaluation method provided in the embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiment of the trapezoidal correction evaluation device 50, please refer to the trapezoidal correction evaluation method provided in the embodiment of the present application.
[0132] See also Figure 6 , Figure 6 60 is a schematic diagram of a computer device provided in an embodiment of the present application. The computer device 60 includes one or more processors 61 and a memory 62. The memory 62 is connected to the one or more processors 61, for example, connected to the processor 61 via a bus.
[0133] The processor 61 is configured to support the computer device to perform the corresponding functions in the method in the above method embodiment. The processor 61 can be a central processing unit 61 (CPU), a network processor 61 (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0134] The memory 62 is used to store program codes, etc. The memory 62 may include a volatile memory 62 (VM), such as a random access memory 62 (RAM); the memory 62 may also include a non-volatile memory 62 (NVM), such as a read-only memory 62 (ROM), a flash memory 62, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 62 may also include a combination of the above-mentioned types of memory 62.
[0135] The memory 62 can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the trapezoidal correction evaluation method in the embodiment of the present application. The processor 61 executes various functional applications and data processing of the trapezoidal correction evaluation method and the trapezoidal correction evaluation device by running the non-volatile software programs, instructions and modules stored in the memory 62, that is, realizes the functions of the various modules or units of the trapezoidal correction evaluation method and the trapezoidal correction evaluation device provided in the above method embodiment.
[0136] The memory 62 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function. The data storage area may store data created according to the use of the trapezoidal correction evaluation device, etc. In some embodiments, the memory 62 may optionally include a memory 62 remotely arranged relative to the processor 61, and these remote memories 62 may be connected to the trapezoidal correction evaluation device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0137] The one or more modules are stored in the memory 62, and when executed by the one or more processors 61, the trapezoidal correction evaluation method in any of the above-mentioned method embodiments is executed, for example, the method steps described in the above-mentioned method embodiments are executed to realize the functions of the modules described in the above-mentioned device embodiments.
[0138] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the above embodiment.
[0139] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0140] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A trapezoidal correction evaluation method, characterized in that: include: Acquire a captured image of a projection surface captured by a camera, wherein the projection surface is used to project a trapezoidal correction image, and the trapezoidal correction image includes a plurality of vertices; Determining a trapezoidal area image corresponding to the trapezoidal correction screen according to the captured image; Determine the vertex position of each vertex relative to the camera according to the trapezoidal area image; An evaluation index of the trapezoidal correction screen is generated based on the plurality of vertex positions.
2. The method according to claim 1, characterized in that Determining the vertex position of each vertex relative to the camera according to the trapezoidal area image includes: Determine the pixel position of each vertex in the pixel coordinate system of the camera according to the trapezoidal area image; Determining the intrinsic parameters of the camera and the extrinsic parameters of the camera relative to the projection surface; The pixel position of each vertex is converted into the vertex position according to the intrinsic parameters and the extrinsic parameters.
3. The method according to claim 2, characterized in that The projection surface includes a calibration plate, the calibration plate includes a plurality of corner points, the calibration plate is configured with a calibration plate coordinate system, the camera is configured with a camera coordinate system, and determining the external parameters of the camera relative to the projection surface includes: Determining the intrinsic parameters of the camera; Determine the two-dimensional coordinates of the plurality of corner points in the calibration plate coordinate system, and the three-dimensional coordinates of the plurality of corner points in the camera coordinate system; The external parameters between the camera and the projection surface are calculated according to the intrinsic parameters of the camera, the two-dimensional coordinates and the three-dimensional coordinates.
4. The method according to claim 2, characterized in that: The pixel position of the vertex corresponds to the pixel coordinates, and the vertex position corresponds to the vertex coordinates. The pixel position of each vertex is converted into the vertex position according to the internal parameters and the external parameters, including: Determine an internal parameter matrix and an external parameter matrix according to the internal parameters and the external parameters; The pixel coordinates corresponding to the pixel position are subjected to matrix transformation processing by using the intrinsic parameter matrix and the extrinsic parameter matrix, so as to convert the pixel coordinates of each vertex into vertex coordinates.
5. The method according to any one of claims 1 to 4, characterized in that: The evaluation index includes a horizontal index, and the evaluation index of the trapezoidal correction screen is generated according to the plurality of vertex positions, including: Determining a boundary of the trapezoidal correction image in a horizontal direction as a horizontal boundary; Based on the vertex position, a first angle between the horizontal boundary and the horizontal direction is calculated to obtain the horizontal index.
6. The method according to any one of claims 1 to 4, characterized in that: The evaluation index includes a vertical index, and the evaluation index for generating the trapezoidal correction image according to the plurality of vertex positions includes: Determining a boundary of the trapezoidal correction image in a vertical direction as a vertical boundary; Based on the vertex position, a second angle between the vertical boundary and the vertical direction is calculated to obtain the vertical index.
7. The method according to any one of claims 1 to 4, characterized in that: The evaluation index includes a deviation ratio index, and the deviation ratio index includes a horizontal deviation ratio index and a vertical deviation ratio index. The evaluation index for generating the trapezoidal correction image according to the plurality of vertex positions includes: Determining the upper boundary, the lower boundary, the left boundary and the right boundary of the trapezoidal correction image; Based on the vertex position, calculating the difference between the upper boundary and the lower boundary as the horizontal deviation ratio index; Based on the vertex position, the difference between the left boundary and the right boundary is calculated as the vertical deviation ratio index.
8. The method according to claim 1, characterized in that After generating the evaluation index of the trapezoidal correction picture, the method further includes: Determining whether the evaluation index is less than a preset evaluation threshold; If so, determining that the trapezoidal correction image is qualified; If not, it is determined that the keystone correction image is unqualified.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the computer device implements the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 8.