WO2022267595A1 - Projection correction method and apparatus, device, and storage medium - Google Patents

Projection correction method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2022267595A1
WO2022267595A1 PCT/CN2022/083560 CN2022083560W WO2022267595A1 WO 2022267595 A1 WO2022267595 A1 WO 2022267595A1 CN 2022083560 W CN2022083560 W CN 2022083560W WO 2022267595 A1 WO2022267595 A1 WO 2022267595A1
Authority
WO
WIPO (PCT)
Prior art keywords
vertex
projection
image
coordinates
correction
Prior art date
Application number
PCT/CN2022/083560
Other languages
French (fr)
Chinese (zh)
Inventor
冉宏威
王鑫
Original Assignee
成都极米科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都极米科技股份有限公司 filed Critical 成都极米科技股份有限公司
Publication of WO2022267595A1 publication Critical patent/WO2022267595A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3179Video signal processing therefor
    • H04N9/3185Geometric adjustment, e.g. keystone or convergence
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/74Projection arrangements for image reproduction, e.g. using eidophor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]

Definitions

  • the present application relates to the field of projection technology, and in particular, to a projection correction method, device, electronic equipment, and storage medium.
  • the commonly used keystone correction methods include automatic keystone correction (Auto Keystone, AK) and manual "4-point correction".
  • AK automatic keystone correction
  • 4-point correction manual "4-point correction"
  • the user can only use "4 Manual point-by-point correction or use the "AK” function to calibrate again.
  • the adjustment efficiency of "4-point correction” is slow, and the AK correction effect is not good.
  • the user manually adjusts the picture using "4-point correction there is currently no correction solution that can quickly correct the original image.
  • the purpose of this application is to provide a projection correction method, device, electronic equipment and storage medium for the deficiencies in the above-mentioned prior art, so as to solve the problem that users in the prior art can only use “4-point correction” to perform manual point-by-point correction or Use the "AK” function to calibrate again, the adjustment efficiency of "4-point calibration” is slow, and the AK calibration effect is not good. Or, when the user manually adjusts the image using "4-point correction", there is currently no correction solution that can quickly correct the original image.
  • the embodiment of the present application provides a projection correction method, including:
  • a first adjustment operation for the first vertex of the projected picture is obtained, the first adjustment operation is used to indicate: move the first vertex along a first direction by a first distance;
  • the vertex coordinates of the optomechanical image determine the outer frame of the analog imaging element corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging element; wherein, the outer frame of the analog imaging element is a rectangular frame;
  • the projection is performed according to the image of the new optical machine, and the corrected projection picture is obtained.
  • the embodiment of the present application also provides a projection correction device, the device includes:
  • An acquisition module configured to acquire a first adjustment operation for the first vertex of the projected image on the projection correction page after keystone correction, and the first adjustment operation is used to indicate: align the first vertex along the first direction move the first distance;
  • a response module configured to respond to the first adjustment operation and obtain the vertex coordinates of the optomechanical image corresponding to the projection screen
  • a determining module configured to determine the outer frame of the analog imaging element corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging element according to the vertex coordinates of the optomechanical image; wherein, the outer frame of the analog imaging element
  • the frame is a rectangular frame; based on the first distance, the frame coordinates of the frame of the simulated imaging element and a frame correction function associated with a preset display ratio, determine a new optical-mechanical image for correcting the projected frame;
  • the projection module is configured to perform projection according to the new optical machine image to obtain a corrected projection picture.
  • an embodiment of the present application provides an electronic device, including: a processor, a storage medium, and a bus.
  • the storage medium stores machine-readable instructions executable by the processor.
  • the processor executes machine-readable instructions to execute the steps of the projection correction method as provided in the first aspect.
  • an embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the projection correction method provided in the first aspect are executed.
  • An embodiment of the present application provides a projection correction method, device, device, and storage medium.
  • the method includes: acquiring the first adjustment operation for the first vertex of the projection screen on the projection correction page after trapezoidal correction, and the first adjustment operation It is used to indicate: move the first vertex along the first direction by the first distance; respond to the first adjustment operation, obtain the vertex coordinates of the optical-mechanical image corresponding to the projection screen; determine the simulation corresponding to the optical-mechanical image according to the vertex coordinates of the optical-mechanical image
  • the outer frame of the imaging component and the outer frame coordinates of the simulated imaging component frame wherein, the simulated imaging component outer frame is a rectangular frame; based on the first distance, the frame coordinates of the simulated imaging component outer frame are associated with the preset display ratio.
  • the function is used to determine the new optical machine image used to correct the projected picture; perform projection according to the new light machine image to obtain the corrected projected picture.
  • the outer frame of the analog imaging component corresponding to the optical-mechanical image and the analog imaging
  • the outer frame coordinates of the outer frame of the component can be calculated according to the first distance that the first vertex in the projected picture moves along the first direction, the outer frame coordinates of the simulated imaging component outer frame, and the picture correction function.
  • the image after trapezoid correction can be corrected conveniently, which can effectively improve the correction efficiency of the projected picture; on the other hand, by introducing and preset
  • the image correction function related to the display ratio can improve the accuracy of projection image correction and improve the user's viewing experience.
  • this application proposes to obtain the difference function of the abscissa of the second effective projection vertex calculated by the automatic trapezoidal correction algorithm and the quick correction algorithm, and obtain the compensated second effective projection based on the difference function of the abscissa of the second effective projection vertex
  • the coordinates of the vertex then, use the second effective projected vertex coordinates after compensation to carry out shortcut keystone correction to obtain the corrected projection picture, so that the mutation of the corrected projected picture obtained is reduced, and there are only B
  • the lateral mutation of point C, and the mutation of points A and D are generally within a dozen pixels (4K resolution), which effectively solves the problem of sudden changes in the corrected projection screen.
  • animation is used to make a gradient effect between switching the optical-mechanical image to the calculated new optical-mechanical image, so that the frames of images in the animation image Projection is carried out at a certain interval, so that when the optical machine image is switched to the new optical machine image, the user can hardly feel the sudden change of the corrected projected picture, which effectively reduces the sudden change of the projected picture seen by the user, thus improving the user experience. viewing experience.
  • the application also proposes to determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the second effective projection vertex abscissa and the difference value of the second effective projection vertex abscissa, so that the target correction coefficient can be used to Correcting the coordinates of the vertices of the second effective projection can effectively solve the problem of sudden changes in the projection screen after the shortcut keystone correction is compatible with AK correction.
  • FIG. 1 is a first schematic flow diagram of a projection correction method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a projection correction page provided by an embodiment of the present application.
  • Fig. 3 is a schematic diagram of the image change process of the glazing machine of the imaging element when using the shortcut keystone correction function to adjust the projected picture provided by the embodiment of the present application;
  • Fig. 4 is a schematic diagram of the outer frame of the analog imaging element corresponding to the optomechanical image provided by the embodiment of the present application;
  • FIG. 5 is a schematic diagram of a functional relationship provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of a projection diagram provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another functional relationship provided by the embodiment of the present application.
  • FIG. 8 is a schematic diagram of another functional relationship provided by the embodiment of the present application.
  • FIG. 9 is a schematic diagram of another projection relationship provided by the embodiment of the present application.
  • Fig. 10 is a schematic diagram of the vertex coordinates of the optomechanical image provided by the embodiment of the present application.
  • FIG. 11 is a schematic diagram of correction of a projection screen provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of the first fitting function of the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the fully automatic keystone correction algorithm provided by the embodiment of the present application;
  • FIG. 13 is a schematic diagram of the second fitting function of the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the shortcut correction algorithm provided by the embodiment of the present application;
  • FIG. 14 is a schematic diagram of changes in an opto-mechanical image during the correction process of a projected picture provided by an embodiment of the present application.
  • the projected picture on the wall changes from a rectangular picture to a right-angled trapezoidal picture.
  • the projection light machine may have a DMD (Digital Micromirror Device), and the DMD is an array composed of a plurality of high-speed digital light reflection switches. It is composed of many small aluminum reflective mirrors. The number of lenses is determined by the display resolution. One small lens corresponds to one pixel and is used to image the projection screen. After the light source is emitted, it will be projected on the DMD and displayed on the projection wall through imaging. When correcting the projection screen on the projection wall, the pixel value of each pixel on the DMD can be adjusted to adjust the projection on the wall. the shape of the screen.
  • DMD Digital Micromirror Device
  • FIG. 1 is a first schematic flowchart of a projection correction method provided in an embodiment of the present application
  • FIG. 2 is a schematic diagram of a projection correction page provided in an embodiment of the present application.
  • the subject of execution of the method may be a controller, a processor and other devices in the projection light machine, or may be a computer, a server and other devices independent of the projection light machine.
  • the method may include:
  • the "projection correction page” refers to a page used to correct the projection screen.
  • the projection correction page may include a shortcut correction control and at least one adjustment control, wherein the background of the projection correction page Can be any background.
  • the user may input a first adjustment operation for the first vertex of the above-mentioned "projection picture" on the projection correction page through the adjustment control in the "projection correction page", wherein the first vertex may refer to the designated point.
  • the adjustment controls may include a first adjustment control and a second adjustment control
  • the first adjustment control may be used to adjust the vertical downward movement of points in the "projection screen”
  • the second adjustment control may be used to Adjust the point in the "Projected Screen” to move vertically upwards.
  • the user can control the first adjustment control through the button in the remote control of the projection light machine, so as to move the first vertex in the "projected picture" by the first distance along the first direction, taking the projected picture shown in Figure 2 as Take a right-angled trapezoid as an example, assuming that the first vertex is point a1, the first adjustment control can be controlled by a button, and the first adjustment operation can be input to move point a1 to point a2 along the vertical direction, where the first distance is available in pixels
  • the number of points represents, for example, moving point a1 by n pixels along the vertical direction ad to reach point a2, that is, the first distance is a1a2. Pressing the first adjusting button once corresponds to adjusting a fixed step value s, which can also be understood as the above n pixel points.
  • the optical machine image can be understood as the DMD image input into the DMD of the projection optical machine for projecting the above-mentioned projection picture.
  • the frame of the simulated imaging component is a rectangular frame with a preset display ratio. For example, if the preset display ratio of the projection screen is 16:9, then the frame of the analog imaging component here is a rectangular frame of 16:9.
  • the simulated imaging component frame may be understood as a virtual DMD frame, and the imaging component frame may be understood as a real DMD frame.
  • the optomechanical image and the area corresponding to the frame of the simulated imaging element corresponding to the optomechanical image can be clearly obtained.
  • FIG. 3 is a schematic diagram of the image change process of the polisher of the imaging element when using the shortcut keystone correction function to adjust the projection screen provided by the embodiment of the present application.
  • the ordinate Ay of the first projected point (such as point A in Fig. 4) that has a mapping relationship with the first vertex of the projection screen (such as point a1 in Fig. 2) on the optomechanical image always moves on the left boundary of the imaging element outer frame
  • the abscissa Bx of the second projected point (for example, point B in FIG. 4 ) always moves on the upper boundary of the outer frame of the imaging element.
  • the first step is to obtain the adjustment operation for the preset vertex in the projection screen, and determine the cumulative step value mstep corresponding to the adjustment operation;
  • the user can enter the shortcut correction mode by operating the shortcut correction control on any page (such as a video playback page, a music playback page, etc.), so as to correct the currently displayed projection screen Make corrections.
  • any page such as a video playback page, a music playback page, etc.
  • the adjustment operation described above may be a user's press operation on the first adjustment control or the second adjustment control input in the remote controller of the projector.
  • the preset vertex is point a
  • the initial projection screen is abcd
  • the user can press the first adjustment control to move the a point down to a1 , each time the first adjustment control is pressed, the corresponding cumulative step value mstep increases by a fixed step value s, and the initial mstep is 0.
  • the second adjustment control is pressed, the corresponding accumulated step value mstep is reduced by a fixed step value s.
  • the preset vertex changes accordingly, from point a to point b, which is not specifically limited in the present application.
  • the projection light machine when the projection light machine is placed horizontally, when the projected picture is projected onto the wall at any horizontal angle with the DMD, the light diagram of the projected picture is always a right-angled trapezoid.
  • the projection angle remains unchanged, the light on the wall
  • the map is also always unchanged, and the projected picture always moves within the range of the light map.
  • the second step is to update the optomechanical image corresponding to the above-mentioned projected image according to the cumulative step value mstep corresponding to the above-mentioned adjustment operation (that is, the vertical coordinate a_y of the preset vertex) and the image correction function matching the preset display ratio, and obtain the target image .
  • an adjustment operation is input for each pair of preset vertices to move the preset vertices downward.
  • the change process of the corrected projection screen can be seen in the left figure of Figure 11. It can be seen that after repeated adjustments, the projection The screen is transformed step by step from a trapezoid to a rectangle with a preset display ratio.
  • the light diagram is always a right-angled trapezoid (because the light source of the projection device is on the same level as the bottom edge of the DMD), when the projection angle is different
  • the light map on the wall also does not change, and the picture is always moving within the range of the light map.
  • point d of the image on the DMD is moved down by Pn pixels. Assuming that the aspect ratio of the DMD is 16:9, then the long side of the DMD can be set to 16 and the short side to 9,
  • FIG. 6 is a schematic diagram of a projection diagram provided by an embodiment of the present application. Description of the projection diagram: O is the light source, plane P1 is the DMD, P2 is the imaginary facing the wall, and P3 is the real wall with a certain inclination to the projection light machine.
  • d3a'b'h2 is a light graph, when the angle of the projection light machine remains unchanged, the shape of the light graph does not change, and the initial projection image can be considered to overlap with the light image d3a'b'h2, when the preset point in the initial projection image
  • the projected image fa'b'h2 on the wall is just a rectangular image at this time.
  • the original image dabc of the DMD is correspondingly changed to abce, that is, through the acquired moving distance of d3f, That is, the above-mentioned target distance can be calculated correspondingly to obtain the number of moving pixels of de, that is, the above-mentioned moving parameters of the target point on the DMD can be obtained.
  • the functional relationship between the number of moving pixels of de and the distance of de can be Calculate the target distance x, where x refers to the distance of de, P n refers to the number of moving pixels of de, M refers to the physical resolution of the DMD in the projection light machine, and D refers to the display ratio of the projection screen , in this embodiment, take the physical resolution of the DMD as 1080, and the projection screen display ratio as 16:9 as an example, then, the corresponding can be according to the formula It should be noted that this solution is applicable when the physical resolution of the DMD in the projection light machine and the display ratio of the projection screen are other values.
  • FIG. 7 is a schematic diagram of another functional relationship provided by the embodiment of the present application
  • FIG. 8 is a schematic diagram of another functional relationship provided by the embodiment of the present application.
  • L d3h2 corresponds to 1
  • L a'b' corresponds to K1
  • L h2b' corresponds to K
  • the light map ratio can also refer to the proportional relationship between K, K1 and 1, where,
  • the first intersection point between the light map and the target curve can be determined first, that is, it can be drawn in the light map A target curve
  • the slope of the target curve can be obtained according to the preset display ratio mentioned above. Taking the preset display ratio of 16:9 as an example, the slope of the target curve can be 9/16.
  • the above-mentioned operation of making the target curve can be realized through a program, and the parameters in the program can include light map data, slope of the target curve and other data.
  • the determined light diagram can be a right-angled trapezoid d3-a'-b'-h2 in the figure
  • the target curve can be h2d5, wherein the specified non-parallel sides of the right-angled trapezoid included on the target curve That is to say h2b', the specified parallel side also refers to d3h2, and the second intersection point also refers to h2, through the second intersection point and the preset slope, the specific shape of the target curve can be determined, then, the light diagram and the target can be further obtained
  • the first point of intersection of the curves may be referred to as point g.
  • a rectangular image matching a preset display ratio is determined, and vertices of the rectangular image include the first intersection point and the second intersection point.
  • the rectangular image f-g-m-h2 matching the preset display ratio can be determined in the light diagram of the projection screen.
  • the coordinates of the above-mentioned first intersection point g can be calculated based on the ratio data of the obtained light map, the curve function of the above-mentioned target curve, and the function corresponding to the specified non-parallel side d3a' of the right-angled trapezoid in Figure 5, the coordinates of the above-mentioned first intersection point g can be calculated .
  • the curve function equation of the target curve h2d5 can be obtained: Wherein, the slope of the target curve is determined according to a preset display ratio of 16:9. And the function equation corresponding to the specified non-parallel side d3a' is: Simultaneous solution can get the first intersection point
  • the light source is O
  • the first light source curve can refer to Ob'
  • the second light source curve can refer to Ob"'
  • the included angle can refer to ⁇ B.
  • Px, Py are the abscissa and ordinate of point b respectively, since the coordinates of the original image dabc in the projection light machine are known, so Px, Py are also known.
  • Px, Py are the abscissa and ordinate of point b respectively, since the coordinates of the original image dabc in the projection light machine are known, so Px, Py are also known.
  • the above-mentioned picture correction function matching the preset display ratio can refer to the above-mentioned formula for calculating the coordinates a′′b′′cd” of the four points.
  • the specific implementation of the second step above is:
  • FIG. 4 For the schematic diagram of the analog imaging element frame corresponding to the optomechanical image provided by the embodiment of the present application; however, as shown in Fig. 4, when the user performs AK keystone correction and manual After 4-point correction or screen zooming, the optical-mechanical image corresponding to the projected screen obtained is located in the center of the "imaging element frame", rather than close to the boundary of the imaging element frame, so there are AK correction functions, manual 4-point correction, and image zooming Compatible with the shortcut keystone correction, in order to continue to be compatible with the shortcut keystone correction function after AK, manual 4-point correction or image scaling, to improve the speed and accuracy of projection screen correction.
  • the embodiment of the present application can obtain the vertex coordinates of the opto-mechanical image at the current moment (that is, the opto-mechanical image corresponding to the AK, manual 4-point correction, or the screen zoomed projection screen), and based on the vertex coordinates of the opto-mechanical image, determine the corresponding The frame of the simulated imaging component and the coordinates of the frame of the frame of the simulated imaging component, so that when the user uses the shortcut keystone correction function to adjust the projection screen, the optomechanical image can move on the boundary of the frame of the simulated imaging component.
  • the frame correction function associated with the frame coordinates of the frame of the simulated imaging element and the preset display scale determine a new optomechanical image for correcting the projected frame.
  • the image correction function associated with the preset display ratio refers to the calculation formula for calculating the four-point coordinates of the effective projection area of the new optical machine image in the projection optical machine.
  • the abscissa and ordinate of the point corresponding to point b in Fig. 9 replace Px and Py in the above formula. Therefore, after obtaining the outer frame coordinates of the outer frame of the simulated imaging element, the first one in the projected picture obtained above can be obtained.
  • the "first distance" that the vertex moves along the first direction and the picture correction function determine the new optical-mechanical image used to correct the projected picture, so as to realize the fast trapezoidal correction of the projected picture, and also solve the trapezoidal correction and fast trapezoidal Correct compatibility issues.
  • the new optical machine image can be input to the projection optical machine, and the image is projected according to the size of the new optical machine image to obtain the "corrected projection picture".
  • the keystone corrected picture can be conveniently corrected , which can effectively improve the efficiency of projected picture correction;
  • the accuracy of projected picture correction can be improved, and the user's viewing experience can be improved.
  • step S102 to step S105 can correct the projected picture from abcd to A1B1C1d.
  • the user can continue to input the second adjustment operation, the third adjustment operation, the fourth adjustment operation, etc., and continuously move the point a in the projection screen downwards, and the above steps can be repeated for each adjustment operation input
  • the change process of the projected picture after correction can be referred to the left diagram of Figure 11 until the projected picture is corrected to a standard rectangle (such as a 16:9 standard rectangle) that matches the preset display ratio. It can be compatible with the convenient keystone correction scheme after performing keystone correction (AK or manual keystone correction) on the projected picture, and quickly adjust the keystone corrected picture to a standard rectangle that matches the preset display ratio.
  • AK keystone correction
  • this solution is also applicable to the projected picture after optical zooming and zooming.
  • the first adjustment operation for the first vertex of the projected picture after optical zooming and zooming can still be obtained.
  • the first adjustment operation executes the above steps S102 to S105 to realize convenient correction of the screen.
  • the embodiment of the present application provides a method for projection correction, the method includes: obtaining a first adjustment operation for the first vertex of the projection screen on the projection correction page after trapezoidal correction, the first adjustment operation is used to Instruction: move the first vertex along the first direction by a first distance; respond to the first adjustment operation, obtain the vertex coordinates of the projection screen corresponding to the opto-mechanical image; determine the analog imaging element corresponding to the opto-mechanical image according to the vertex coordinates of the opto-mechanical image Outer frame, and the outer frame coordinates of the outer frame of the simulated imaging element; wherein, the outer frame of the simulated imaging element is a rectangular frame; based on the first distance, the outer frame coordinates of the outer frame of the simulated imaging element and the picture correction function, determine the projection image used for correction The Xinguangji image; project according to the Xinguangji image to obtain the corrected projection screen.
  • the outer frame of the analog imaging component corresponding to the optical-mechanical image and the analog imaging can be calculated according to the first distance that the first vertex in the projected picture moves along the first direction, the outer frame coordinates of the simulated imaging component outer frame, and the picture correction function.
  • the image after trapezoid correction can be corrected conveniently, which can effectively improve the correction efficiency of the projected picture; on the other hand, by introducing and preset
  • the image correction function related to the display ratio can improve the accuracy of projection image correction and improve the user's viewing experience.
  • determining the outer frame of the analog imaging component corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging component may include:
  • the side length parameters of the simulated imaging component frame include: a height parameter of the simulated imaging component frame, and a width parameter of the simulated imaging component frame.
  • the side length parameter of the frame of the simulated imaging device can be calculated according to the vertex coordinates of the optomechanical image.
  • calculating the side length parameter of the frame of the analog imaging component may include:
  • the resulting optical-mechanical image corresponding to the projected picture is not a standard right-angled trapezoid.
  • the following method can be used to process the optomechanical image to obtain a standard rectangular trapezoidal optomechanical image and simulate the outer frame of the imaging element.
  • Fig. 10 is a schematic diagram of the vertex coordinates of the optomechanical image provided by the embodiment of the present application; (A_x_raw, A_y_raw), B(B_x_raw, B_y_raw), C(C_x_raw, C_y_raw) and D(D_x_raw, D_y_raw).
  • the coordinates of the circumscribed rectangle corresponding to the optomechanical image can be determined according to the maximum abscissa, minimum abscissa, maximum ordinate, and minimum abscissa of the vertices of the optomechanical image.
  • S1102. Determine the height parameter of the circumscribed rectangle as the height parameter of the frame of the simulated imaging component.
  • the preset display ratio is 16:9 as an example, that is, the ratio between the height parameter and the width parameter in the frame of the simulated imaging device complies with the standard display ratio.
  • the side length of the outer frame of the simulated imaging element can be obtained according to the above-mentioned "coordinates of the circumscribed rectangle corresponding to the optical-mechanical image" parameters, and further calculate the vertex coordinates of the frame of the simulated imaging component.
  • the extension direction of the simulated imaging component frame can also be determined according to the vertex coordinates of the optomechanical image.
  • the optomechanical image is a quadrilateral.
  • the outer frame of the simulated imaging component corresponding to the optomechanical image and the outer frame coordinates of the simulated imaging component are determined. Methods may also include:
  • the two vertices of the designated side of the quadrilateral respectively indicate point A and point B shown in FIG. 10 , that is, A(A_x_raw, A_y_raw), B(B_x_raw, B_y_raw).
  • the designated side can be understood as the top side of the quadrilateral.
  • S1302. Determine the extension direction of the frame of the analog imaging component according to the ordinates of the two vertices of the designated side.
  • the following embodiments will specifically explain how to determine a new opto-mechanical image for correcting the projected image based on the first distance, the image correction function associated with the frame coordinates of the frame of the simulated imaging element, and the preset display ratio.
  • step S104 based on the first distance, the frame correction function associated with the frame coordinates of the frame of the simulated imaging component and the preset display scale, determine a new optomechanical image for correcting the projected frame, including:
  • the relationship between the first vertex in the projected picture and the first vertex in the initial projected picture is calculated.
  • the vertex corresponds to the second distance moved by the initial vertex.
  • a_y (2*pow(10,-12)*pow(A_y,5)-2*pow(10,-9)*pow (A_y,4)+pow(10,-6)*pow(A_y,3)+pow(10,-4)*pow(A_y,2)+1.0091*(A_y)+0.9359).
  • the second distance to move the initial vertex can be understood as a step value of the movement of the first vertex in the projection frame relative to the corresponding initial vertex in the initial projection frame.
  • the relative relationship between the first vertex a1 in the projected picture and the first vertex in the initial projected picture can be calculated. corresponds to the second distance aa1 of the movement of the initial vertex.
  • S1402. Determine a total moving distance based on the first distance and the second distance.
  • the total moving distance aa2 of the first vertex in the initial projection frame during the correction process can be calculated.
  • the total moving distance here can be understood as the accumulative step value of the movement of the first vertex in the projection picture relative to the corresponding initial vertex in the initial projection picture after responding to the first adjustment operation.
  • S1403. Determine the coordinates of the effective projection area of the new optical machine image according to the picture correction function associated with the total moving distance, the frame coordinates of the frame of the simulated imaging element, and the preset display scale.
  • the picture correction function associated with the preset display ratio refers to the calculation formula for calculating the four-point coordinates of the effective projection area of the new light machine image in the projection light machine.
  • the pixel values of each pixel in the effective projection area can be correspondingly adjusted, that is, the pixel values of each pixel in the corresponding opto-mechanical image of the projection screen can be updated, so that the image formed by the original opto-mechanical image It is transformed into imaging by the new optical machine image to obtain the new optical machine image for correcting the projected picture.
  • the trapezoidal correction is fully automatic trapezoidal correction
  • the area shape of the effective projection area is a right-angled trapezoid
  • the effective projection area A2B2CD includes the first effective projection vertex A2 that has a mapping relationship with the first vertex in the projection screen, And the second effective projection vertex B2 that forms the hypotenuse of a right-angled trapezoid with the first effective projection vertex;
  • the coordinates of the first effective projection vertex are A2 (x1, d1)
  • the coordinates of the second effective projection vertex are B2 (x2, d2);
  • step S1403 according to the picture correction function associated with the total moving distance, the outer frame coordinates of the simulated imaging component frame and the preset display ratio, determine the coordinates of the effective projection area of the new optical machine image, including:
  • the abscissa B2_x value of the second projected vertex will be calculated according to the ordinate A1_y value of the first projected vertex of the optical-mechanical image corresponding to the projected screen , but because the calculation method of "keystone correction” is different from the calculation method of "quick keystone correction", the calculated B2_x value will have a certain difference, so the outer frame of the outer frame of the simulated imaging component is directly based on the total moving distance
  • the picture correction function associated with the coordinates and the preset display ratio determines the coordinates of the effective projection area of the Xinguangji image, which will cause the problem of sudden change in the corrected projection picture.
  • this application proposes that the difference between the abscissa of the second effective projection vertex calculated by the automatic trapezoidal correction algorithm and the shortcut correction algorithm can be obtained through multiple experimental fitting methods
  • the function ⁇ Bx f(Ay).
  • the difference value ⁇ B2_x of the abscissa of the second effective projected vertex can be calculated.
  • the calculated coordinates of the abscissa of the second effective projection vertex B2 can be further calculated according to the picture correction function associated with the total moving distance, the frame coordinates of the frame of the simulated imaging element, and the preset display ratio, denoted as B2_cx .
  • S1605. Determine the coordinates of the second effective projection vertex according to the calculated coordinates of the abscissa of the second effective projection vertex and the difference value between the abscissa of the second effective projection vertex.
  • Figure 12 is a schematic diagram of the first fitting function of the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the fully automatic keystone correction algorithm provided by the embodiment of the present application
  • Figure 13 is a quick correction provided by the embodiment of the present application
  • the optical-mechanical image is a quadrilateral.
  • step S105 project according to the new optical-mechanical image to obtain a corrected projection image, including:
  • projection can be performed according to the animation image generated above. Since the animation image is composed of multiple frame images, each frame image in the animation image is projected at a certain interval, so that in the future When the optical-mechanical image is switched to the new optical-mechanical image, the user can hardly feel the sudden change of the corrected projected picture, which effectively reduces the sudden change of the projected picture seen by the user, thereby improving the user's viewing experience.
  • the optomechanical image is a quadrilateral.
  • step S1605 according to the calculated coordinates of the abscissa of the second effective projection vertex and the difference value between the abscissa of the second effective projection vertex, determine the coordinates of the second effective projection vertex, including:
  • the target correction coefficient is calculated based on the abscissa of the second projected vertex of the optical-mechanical image, that is to say, when the user enters the quick and convenient correction mode for the first time, the target correction coefficient has been obtained in advance.
  • the target correction factor will not change during the adjustment.
  • the target correction coefficient can be obtained through the following calculation method.
  • the above step of obtaining the target correction coefficient includes:
  • it can be calculated according to the calculation formula of the first vertex a1 corresponding to the second distance aa1 moved by the initial vertex a in the initial projection picture shown in FIG. 11 and the above-mentioned four-point coordinates of the new optical machine image Calculated coordinate B1_cx of the abscissa of the second projected vertex in the optomechanical image.
  • Px in the above-mentioned formula is the second distance aa1
  • a"_x is the calculated coordinate B1_cx of the abscissa of the second projected vertex, that is, Px in the above-mentioned formula is a known quantity
  • a" The value of _x can be calculated to obtain the calculated coordinate B1_cx of the abscissa of the second projected vertex in the optical-mechanical image.
  • S2202. Calculate the target correction coefficient according to the calculated coordinates of the abscissa of the second projected vertex, the actual abscissa of the second projected vertex in the optomechanical image, and the difference value of the abscissa of the second projected vertex.
  • the first initial projected vertex in the initial optical-mechanical image corresponding to the initial projected picture can be calculated according to the second distance and the preset mapping calculation formula between the vertex of the optical-mechanical image and the vertex in the initial projected picture, and then, according to the initial The difference function of the abscissa of the first initial projection vertex in the optomechanical image and the abscissa of the second effective projection vertex in the effective projection area corresponding to the corrected projection picture is calculated to obtain the difference value ⁇ B1_x of the abscissa of the second projection vertex in the optomechanical image.
  • the actual abscissa B1_x of the second projection vertex in the optical-mechanical image and the calculated coordinate B1_cx of the abscissa of the second projection vertex can be calculated to obtain the actual abscissa of the second projection vertex in the optical-mechanical image
  • correct_factor is the target correction factor.
  • S2102. Determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
  • the coordinates of the second valid projection vertex may also be determined in the following manner.
  • the following embodiments will specifically explain how to determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
  • determining the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the second effective projection vertex abscissa and the difference value of the second effective projection vertex abscissa includes:
  • the correction threshold is a preset threshold set according to correction experience.
  • the corrected projection screen When the range of the manual correction screen is too large, the corrected projection screen will have a partial mutation. If the user manually adjusts the range too large, the optical-mechanical image on the DMD is random. In order to correct the optical-mechanical image, this degree of mutation It is inevitable.
  • the detection target correction coefficient is less than the correction threshold, trigger execution based on the difference between the calculated coordinates of the abscissa of the second effective projection vertex and the abscissa of the second effective projection vertex, and determine the coordinates of the second effective projection vertex .
  • the following phenomena may usually occur: when the screen is projected on the left, when the AK avoids obstacles or manually adjusts the screen range too far to the right, use "quick keystone correction" to adjust the screen to the right all the time,
  • point A in the optomechanical image moves upward along the left edge of the analog imaging component frame
  • point B first moves along the upper edge to the upper right point and then remains stationary.
  • point A moves along the upper edge of the analog imaging component frame
  • point B moves down again.
  • FIG. 14 is a schematic diagram of changes in an opto-mechanical image during the correction process of a projected picture provided by an embodiment of the present application. As shown in Figure 14, when AK is used for obstacle avoidance or the manual adjustment of the screen is too large, the optomechanical image is too close to the right side, causing the calculated frame of the simulated imaging component to exceed the physical boundary of the real DMD.
  • Point B in the optical-mechanical image should have moved down after the upper boundary of the simulated imaging element frame moved to the right to point B', but because Bx exceeds the boundary, point B will not move first, when the calculated Bx After equal to B'x, point B will move down again.
  • the solution proposed by this application the ratio of the picture after Bx exceeds the boundary is all distorted, and the value of Bx needs to be limited, and when Bx exceeds the boundary, stop the calculation behind, so that the user cannot continue to adjust the picture to the right, which can be effective Solve the problem that the shortcut keystone correction screen is abnormal after manual adjustment of the screen range is too large.
  • the function implemented by the projection correction device provided in the embodiment of the present application corresponds to the steps performed by the above method.
  • the device can be understood as the above-mentioned projection light machine, or server, or the processor of the server, and can also be understood as a component that realizes the functions of this application under the control of the server independent of the above-mentioned server or processor.
  • the The device may include: an acquisition module 2500 , a response module 2501 , a determination module 2502 , and a projection module 2503 .
  • the obtaining module 2500 is configured to obtain a first adjustment operation for the first vertex of the projected picture on the projection correction page after keystone correction, the first adjustment operation is used to indicate: move the first vertex along the first direction by a first distance;
  • Response module 2501 configured to respond to the first adjustment operation and obtain the vertex coordinates of the corresponding optomechanical image of the projection screen;
  • the determining module 2502 is used to determine the outer frame of the simulated imaging component corresponding to the optomechanical image and the outer frame coordinates of the simulated imaging component frame according to the vertex coordinates of the optomechanical image; wherein, the outer frame of the simulated imaging component is a rectangular frame; based on the first 1. distance, frame coordinates of the frame of the simulated imaging element and a picture correction function, to determine the new optical machine image used to correct the projected picture;
  • the projection module 2503 is configured to perform projection according to the new optical machine image to obtain a corrected projection picture.
  • the determination module 2502 is also used to:
  • the vertex coordinates of the frame of the simulated imaging component are calculated.
  • the determination module 2502 is also used to:
  • the circumscribing rectangle corresponding to the opto-mechanical image, wherein the opto-mechanical image is a quadrilateral, and the circumscribing rectangle is a rectangle matching the quadrilateral;
  • the width parameter of the frame of the simulated imaging component is calculated.
  • the optomechanical image is a quadrilateral
  • the acquisition module is also used to acquire the ordinates of the two vertices of the specified side of the quadrilateral;
  • the determination module is further configured to determine the extension direction of the frame of the analog imaging component according to the ordinates of the two vertices of the specified side.
  • the determination module 2502 is also used to:
  • the optomechanical image corresponding to the projected picture is updated to obtain a new optomechanical image for correcting the projected picture.
  • the trapezoidal correction is fully automatic trapezoidal correction
  • the area shape of the effective projection area is a right-angled trapezoid
  • the effective projection area includes a first effective projection vertex that has a mapping relationship with the first vertex, and forms a right-angled trapezoid with the first effective projection vertex
  • the second effective projection vertex of the hypotenuse the coordinates of the first effective projection vertex are (x1, d1), and the coordinates of the second effective projection vertex are (x2, d2);
  • the determining module 2502 is also used for:
  • the coordinates of the second effective projection vertex are determined according to the calculated coordinates of the abscissa of the second effective projection vertex and the difference value between the abscissa of the second effective projection vertex.
  • the obtaining module 2500 is also used for:
  • the optomechanical image is a quadrilateral
  • the projection module 2503 is also used for:
  • an animation image associated with the optical-mechanical image and the new optical-mechanical image is generated
  • the obtaining module 2500 is also used to obtain the target correction coefficient
  • the determination module 2502 is further configured to determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
  • the determination module 2502 is also used to:
  • acquire module 2500 also for:
  • the calculated coordinates of the abscissa of the second projected vertex in the optical-mechanical image are calculated
  • the target correction coefficient is calculated.
  • acquire module 2500 also for:
  • the fitting function between the preset vertex of the optical-mechanical image and the vertex in the initial projection image calculate the first vertex in the projection image relative to the first vertex in the initial projection image The second distance that corresponds to the initial vertex movement.
  • the above modules may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), or, one or more microprocessors (digital singnal processor, DSP for short), or, one or more Field Programmable Gate Arrays (Field Programmable Gate Array, FPGA for short), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP digital singnal processor
  • FPGA Field Programmable Gate Array
  • the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, referred to as CPU) or other processors that can call program codes.
  • CPU central processing unit
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC for short).
  • the above-mentioned modules may be connected or communicate with each other via a wired connection or a wireless connection.
  • Wired connections may include metal cables, fiber optic cables, hybrid cables, etc., or any combination thereof.
  • Wireless connections may include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, etc., or any combination thereof.
  • Two or more modules can be combined into a single module, and any one module can be divided into two or more units.
  • the above modules may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), or one or more micro Processor (Digital Singnal Processor, DSP for short), or one or more Field Programmable Gate Arrays (Field Programmable Gate Array, FPGA for short), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Array
  • the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, referred to as CPU) or other processors that can call program codes.
  • CPU Central Processing Unit
  • these modules can be integrated together and implemented in the form of a System-on-a-chip (SOC for short).
  • SOC System-on-a-chip
  • An embodiment of the present application provides an electronic device, the apparatus may be integrated into a terminal device or a chip of the terminal device, and the terminal may be a computing device with a data processing function.
  • the device includes: a processor 2601 and a memory 2602 .
  • the memory 2602 is used to store programs, and the processor 2601 invokes the programs stored in the memory 2602 to execute the foregoing method embodiments.
  • the specific implementation manner and technical effect are similar, and will not be repeated here.
  • the memory 2602 stores program codes.
  • the processor 2601 executes the projection correction method according to various exemplary embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification. various steps.
  • the processor 2601 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • a general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the memory 2602 can be used to store non-volatile software programs, non-volatile computer-executable programs and modules.
  • the memory may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Magnetic Memory, Disk, discs and more.
  • a memory is, but is not limited to, any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
  • the memory 2602 in the embodiment of the present application may also be a circuit or any other device capable of implementing a storage function, and is used for storing program instructions and/or data.
  • the present application further provides a program product, such as a computer-readable storage medium, including a program, and the program is used to execute the foregoing method embodiments when executed by a processor.
  • a program product such as a computer-readable storage medium, including a program
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
  • the above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium.
  • the above-mentioned software functional units are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or a processor (English: processor) to execute the functions described in various embodiments of the present application. part of the method.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), magnetic disk or optical disc, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • magnetic disk or optical disc etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Transforming Electric Information Into Light Information (AREA)
  • Projection Apparatus (AREA)

Abstract

The present application relates to the technical field of projection, and provides a projection correction method and apparatus, a device, and a storage medium. The method comprises: in a projection correction page after keystone correction, obtaining a first adjustment operation for a first vertex of a projection screen; in response to the first adjustment operation, obtaining vertex coordinates of a light engine image corresponding to the projection screen; determining, according to the vertex coordinates of the light engine image, an outer frame of a simulated imaging element corresponding to the light engine image, and coordinates of the outer frame of the simulated imaging element, the outer frame of the simulated imaging element being a rectangular frame; on the basis of a first distance, the coordinates of the outer frame of the simulated imaging element, and a screen correction function associated with a preset display scale, determining a new light engine image for correcting the projection screen; and performing projection according to the new light engine image to obtain a corrected projection screen. In the present application, on one hand, the screen subjected to keystone correction can be conveniently corrected; on the other hand, by introducing the screen correction function associated with the preset display scale, the accuracy of projection screen correction is improved.

Description

投影校正方法、装置、设备及存储介质Projection correction method, device, equipment and storage medium 技术领域technical field
本申请涉及投影技术领域,具体而言,涉及一种投影校正方法、装置、电子设备及存储介质。The present application relates to the field of projection technology, and in particular, to a projection correction method, device, electronic equipment, and storage medium.
背景技术Background technique
随着社会经济的发展和电子信息技术的进步,智能投影行业迎来了大发展,随之带来的问题便是投射画面的校正问题,如何快速的校正投影画面成为了投影行业重要课题。With the development of social economy and the advancement of electronic information technology, the intelligent projection industry has ushered in a great development, and the problem that comes with it is the correction of the projection screen. How to quickly correct the projection screen has become an important issue in the projection industry.
目前,通常使用的梯形校正方法,包括全自动梯形校正(Auto Keystone,AK)和手动“4点校正”。其中,当用户使用AK校正投影画面,并在正常使用投影仪过程中移动了投影仪时,会导致墙上的投影画面由矩形画面变成了直角梯形画面,现有技术是用户只能使用“4点校正”进行手动逐点校正或者使用“AK”功能再次校正,“4点校正”调整效率缓慢,AK校正效果不佳。或者,当用户使用“4点校正”手动调整了画面时,目前没有什么校正方案可以在原来图像上做快速的校正。At present, the commonly used keystone correction methods include automatic keystone correction (Auto Keystone, AK) and manual "4-point correction". Among them, when the user uses AK to correct the projected picture and moves the projector during normal use of the projector, the projected picture on the wall will change from a rectangular picture to a right-angled trapezoidal picture. In the prior art, the user can only use "4 Manual point-by-point correction or use the "AK" function to calibrate again. The adjustment efficiency of "4-point correction" is slow, and the AK correction effect is not good. Or, when the user manually adjusts the picture using "4-point correction", there is currently no correction solution that can quickly correct the original image.
发明内容Contents of the invention
本申请的目的在于,针对上述现有技术中的不足,提供一种投影校正方法、装置、电子设备及存储介质,以便解决现有技术用户只能使用“4点校正”进行手动逐点校正或者使用“AK”功能再次校正,“4点校正”调整效率缓慢,AK校正效果不佳。或者,当用户使用“4点校正”手动调整了画面时,目前没有什么校正方案可以在原来图像上做快速的校正的问题。The purpose of this application is to provide a projection correction method, device, electronic equipment and storage medium for the deficiencies in the above-mentioned prior art, so as to solve the problem that users in the prior art can only use "4-point correction" to perform manual point-by-point correction or Use the "AK" function to calibrate again, the adjustment efficiency of "4-point calibration" is slow, and the AK calibration effect is not good. Or, when the user manually adjusts the image using "4-point correction", there is currently no correction solution that can quickly correct the original image.
为实现上述目的,本申请实施例采用的技术方案如下:In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
第一方面,本申请实施例提供了一种投影校正方法,包括:In the first aspect, the embodiment of the present application provides a projection correction method, including:
在梯形校正后的投影校正页面中,获取针对投影画面的第一顶点的第一调整操作,所述第一调整操作用于指示:将所述第一顶点沿着第一方向移动第一距离;On the projection correction page after keystone correction, a first adjustment operation for the first vertex of the projected picture is obtained, the first adjustment operation is used to indicate: move the first vertex along a first direction by a first distance;
响应所述第一调整操作,获取所述投影画面对应光机图像的顶点坐标;Responding to the first adjustment operation, acquiring the vertex coordinates of the optomechanical image corresponding to the projection screen;
依照所述光机图像的顶点坐标,确定所述光机图像对应的模拟成像元件外框、以及所述模拟成像元件外框的外框坐标;其中,所述模拟成像元件外框为矩形框;According to the vertex coordinates of the optomechanical image, determine the outer frame of the analog imaging element corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging element; wherein, the outer frame of the analog imaging element is a rectangular frame;
基于所述第一距离、所述模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定用于校正所述投影画面的新光机图像;Determine a new optomechanical image for correcting the projected image based on the first distance, the frame coordinates of the frame of the simulated imaging element, and a frame correction function associated with a preset display scale;
依照所述新光机图像进行投影,得到校正后的投影画面。The projection is performed according to the image of the new optical machine, and the corrected projection picture is obtained.
第二方面,本申请实施例还提供了一种投影校正装置,所述装置包括:In the second aspect, the embodiment of the present application also provides a projection correction device, the device includes:
获取模块,用于在梯形校正后的投影校正页面中,获取针对投影画面的第一顶点的第一调整操作,所述第一调整操作用于指示:将所述第一顶点沿着第一方向移动第一距离;An acquisition module, configured to acquire a first adjustment operation for the first vertex of the projected image on the projection correction page after keystone correction, and the first adjustment operation is used to indicate: align the first vertex along the first direction move the first distance;
响应模块,用于响应所述第一调整操作,获取所述投影画面对应光机图像的顶点坐标;A response module, configured to respond to the first adjustment operation and obtain the vertex coordinates of the optomechanical image corresponding to the projection screen;
确定模块,用于依照所述光机图像的顶点坐标,确定所述光机图像对应的模拟成像元件外框、以及所述模拟成像元件外框的外框坐标;其中,所述模拟成像元件外框为矩形框;基于所述第一距离、所述模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定用于校正所述投影画面的新光机图像;A determining module, configured to determine the outer frame of the analog imaging element corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging element according to the vertex coordinates of the optomechanical image; wherein, the outer frame of the analog imaging element The frame is a rectangular frame; based on the first distance, the frame coordinates of the frame of the simulated imaging element and a frame correction function associated with a preset display ratio, determine a new optical-mechanical image for correcting the projected frame;
投影模块,用于依照所述新光机图像进行投影,得到校正后的投影画面。The projection module is configured to perform projection according to the new optical machine image to obtain a corrected projection picture.
第三方面,本申请实施例提供了一种电子设备,包括:处理器、存储介质和总线,存储介质存储有处理器可执行的机器可读指令,当电子设备运行时,处理器与存储介质之间通过总线通信,处 理器执行机器可读指令,以执行时执行如第一方面中提供的投影校正方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium Through bus communication, the processor executes machine-readable instructions to execute the steps of the projection correction method as provided in the first aspect.
第四方面,本申请实施例提供了一种存储介质,该存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如第一方面提供的投影校正方法的步骤。In a fourth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the projection correction method provided in the first aspect are executed.
本申请的有益效果是:The beneficial effect of this application is:
本申请实施例提供一种投影校正方法、装置、设备及存储介质,该方法包括:在梯形校正后的投影校正页面中,获取针对投影画面的第一顶点的第一调整操作,第一调整操作用于指示:将第一顶点沿着第一方向移动第一距离;响应第一调整操作,获取投影画面对应光机图像的顶点坐标;依照光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标;其中,模拟成像元件外框为矩形框;基于第一距离、模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定用于校正投影画面的新光机图像;依照新光机图像进行投影,得到校正后的投影画面。在本方案中,通过获取梯形校正后的投影画面对应的光机图像的顶点坐标,并基于该光机图像的顶点坐标,进一步地确定该光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标,使得可以根据投影画面中的第一顶点沿着第一方向移动的第一距离、模拟成像元件外框的外框坐标以及画面校正函数,计算得到用于校正投影画面的新光机图像,以便于依照得到的新光机图像进行图像投影,这样,一方面可以对梯形校正后的画面进行便捷校正,可有效的提高投影画面校正效率;另一方面,通过引入与预设显示比例关联的画面校正函数,可以提高投影画面校正的准确度,提高用户的观影体验。An embodiment of the present application provides a projection correction method, device, device, and storage medium. The method includes: acquiring the first adjustment operation for the first vertex of the projection screen on the projection correction page after trapezoidal correction, and the first adjustment operation It is used to indicate: move the first vertex along the first direction by the first distance; respond to the first adjustment operation, obtain the vertex coordinates of the optical-mechanical image corresponding to the projection screen; determine the simulation corresponding to the optical-mechanical image according to the vertex coordinates of the optical-mechanical image The outer frame of the imaging component and the outer frame coordinates of the simulated imaging component frame; wherein, the simulated imaging component outer frame is a rectangular frame; based on the first distance, the frame coordinates of the simulated imaging component outer frame are associated with the preset display ratio. The function is used to determine the new optical machine image used to correct the projected picture; perform projection according to the new light machine image to obtain the corrected projected picture. In this solution, by obtaining the vertex coordinates of the optical-mechanical image corresponding to the projection screen after trapezoidal correction, and based on the vertex coordinates of the optical-mechanical image, the outer frame of the analog imaging component corresponding to the optical-mechanical image and the analog imaging The outer frame coordinates of the outer frame of the component can be calculated according to the first distance that the first vertex in the projected picture moves along the first direction, the outer frame coordinates of the simulated imaging component outer frame, and the picture correction function. In order to project images according to the obtained Xinguangji image, on the one hand, the image after trapezoid correction can be corrected conveniently, which can effectively improve the correction efficiency of the projected picture; on the other hand, by introducing and preset The image correction function related to the display ratio can improve the accuracy of projection image correction and improve the user's viewing experience.
另外,本申请提出可以获取通过全自动梯形校正算法与快捷校正算法计算第二有效投影顶点横坐标的差异函数,并基于第二有效投影顶点横坐标的差异函数,得到补偿后的第二有效投影顶点的坐标,然后,使用补偿后的第二有效投影顶点坐标进行快捷梯形校正,以得到校正后的投影画面,这样,使得到的校正后的投影画面的突变减小了,并且只存在B、C点横向突变,A点和D点的突变一般在十几个像素(4K分辨率)之内,有效解决了校正后的投影画面存在突变的问题。In addition, this application proposes to obtain the difference function of the abscissa of the second effective projection vertex calculated by the automatic trapezoidal correction algorithm and the quick correction algorithm, and obtain the compensated second effective projection based on the difference function of the abscissa of the second effective projection vertex The coordinates of the vertex, then, use the second effective projected vertex coordinates after compensation to carry out shortcut keystone correction to obtain the corrected projection picture, so that the mutation of the corrected projected picture obtained is reduced, and there are only B, The lateral mutation of point C, and the mutation of points A and D are generally within a dozen pixels (4K resolution), which effectively solves the problem of sudden changes in the corrected projection screen.
其次,在本申请中,还提出根据获取到的投影图像对应的光机图像的顶点坐标、有效投影区域的坐标以及预设动画算法,生成与光机图像和新光机图像关联的动画图像,实现了在使用了拟合的基础上再加上动画的处理过程,使得在将光机图像切换到计算后新光机图像之间使用动画做出渐变效果,这样使得动画图像中的各帧图像之间按照一定间隔进行投影,从而使得在将光机图像切换至新光机图像时,用户几乎感觉不到校正后的投影画面的突变,有效减小用户看到的投影画面的突变情况,从而提升了用户的观影体验。Secondly, in this application, it is also proposed to generate an animated image associated with the optical-mechanical image and the new optical-mechanical image according to the vertex coordinates of the optical-mechanical image corresponding to the acquired projection image, the coordinates of the effective projection area, and the preset animation algorithm, so as to realize In addition to the use of fitting and animation processing, animation is used to make a gradient effect between switching the optical-mechanical image to the calculated new optical-mechanical image, so that the frames of images in the animation image Projection is carried out at a certain interval, so that when the optical machine image is switched to the new optical machine image, the user can hardly feel the sudden change of the corrected projected picture, which effectively reduces the sudden change of the projected picture seen by the user, thus improving the user experience. viewing experience.
最后,在本申请还提出基于目标修正系数、第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标,使得可以使用目标修正系数对第二有效投影顶点的坐标进行修正,可以有效解决快捷梯形校正兼容AK校正后投影画面发生突变的问题。Finally, the application also proposes to determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the second effective projection vertex abscissa and the difference value of the second effective projection vertex abscissa, so that the target correction coefficient can be used to Correcting the coordinates of the vertices of the second effective projection can effectively solve the problem of sudden changes in the projection screen after the shortcut keystone correction is compatible with AK correction.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, so It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.
图1为本申请实施例提供的投影校正方法的流程示意图一;FIG. 1 is a first schematic flow diagram of a projection correction method provided by an embodiment of the present application;
图2为本申请实施例提供的一种投影校正页面示意图;FIG. 2 is a schematic diagram of a projection correction page provided by an embodiment of the present application;
图3为本申请实施例提供的使用快捷梯形校正功能调节投影画面时成像元件上光机图像变化过程的示意图;Fig. 3 is a schematic diagram of the image change process of the glazing machine of the imaging element when using the shortcut keystone correction function to adjust the projected picture provided by the embodiment of the present application;
图4为本申请实施例提供的光机图像对应的模拟成像元件外框的示意图;Fig. 4 is a schematic diagram of the outer frame of the analog imaging element corresponding to the optomechanical image provided by the embodiment of the present application;
图5为本申请实施例提供的一种函数关系示意图;FIG. 5 is a schematic diagram of a functional relationship provided by the embodiment of the present application;
图6为本申请实施例提供的一种投射图示意图;FIG. 6 is a schematic diagram of a projection diagram provided by an embodiment of the present application;
图7为本申请实施例提供的又一种函数关系示意图;FIG. 7 is a schematic diagram of another functional relationship provided by the embodiment of the present application;
图8为本申请实施例提供的另一种函数关系示意图;FIG. 8 is a schematic diagram of another functional relationship provided by the embodiment of the present application;
图9为本申请实施例提供的另一种投影关系示意图;FIG. 9 is a schematic diagram of another projection relationship provided by the embodiment of the present application;
图10为本申请实施例提供的光机图像顶点坐标的示意图;Fig. 10 is a schematic diagram of the vertex coordinates of the optomechanical image provided by the embodiment of the present application;
图11为本申请实施例提供的一种投影画面的校正示意图;FIG. 11 is a schematic diagram of correction of a projection screen provided by an embodiment of the present application;
图12为本申请实施例提供的全自动梯形校正算法下第一投影顶点的纵坐标和第二有效投影顶点横坐标的第一拟合函数的示意图;12 is a schematic diagram of the first fitting function of the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the fully automatic keystone correction algorithm provided by the embodiment of the present application;
图13为本申请实施例提供的快捷校正算法下第一投影顶点的纵坐标和第二有效投影顶点横坐标的第二拟合函数的示意图;13 is a schematic diagram of the second fitting function of the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the shortcut correction algorithm provided by the embodiment of the present application;
图14为本申请实施例提供的一种投影画面校正过程中光机图像的变化示意图。FIG. 14 is a schematic diagram of changes in an opto-mechanical image during the correction process of a projected picture provided by an embodiment of the present application.
具体实施方式detailed description
一方面,对本申请的相关背景技术进行简单说明:On the one hand, a brief description of the relevant background technology of this application:
当用户使用AK校正画面并正常使用投影仪过程中移动了投影仪时,导致墙上的投影画面由矩形画面变成了直角梯形画面,现有技术是用户只能使用“4点校正”进行手动逐点校正或者使用“AK”功能对“直角梯形画面”进行再次校正。When the user uses AK to calibrate the picture and moves the projector during normal use, the projected picture on the wall changes from a rectangular picture to a right-angled trapezoidal picture. Point correction or use the "AK" function to re-correct the "rectangular trapezoidal picture".
但是,第一、当用户使用“4点校正”手动调整了画面时,目前没有什么校正方案可以在原来图像上实现快速校正;第二、当用户使用“AK”校正时,得到的投影画面可能依然不是标准的矩形,导致用户的观影效果不佳。本方案可以在原来AK校正后的画面进行快速的“快捷梯形校正”,以实现将不标准的矩形画面上微调成矩形画面,并保证“微调成的矩形画面”无突变,整个调节过程顺滑,达到提高用户的体验感和观影效果的目的。However, first, when the user manually adjusts the picture using "4-point correction", there is currently no correction scheme that can achieve fast correction on the original image; second, when the user uses "AK" to correct, the resulting projected picture may It is still not a standard rectangle, resulting in poor viewing effect for users. This solution can perform fast "quick trapezoidal correction" on the original AK-corrected picture, so as to realize the fine-tuning of the non-standard rectangular picture into a rectangular picture, and ensure that the "fine-tuned rectangular picture" has no sudden change, and the whole adjustment process is smooth. , to achieve the purpose of improving the user's experience and viewing effect.
另一方面,对本申请所涉及的投影光机的投影原理进行简单说明:投影光机中可具有DMD(数字微镜器件),DMD是一种由多个高速数字式光反射开光组成的阵列,由许多小型铝制反射镜面构成的,镜片的多少由显示分辨率决定,一个小镜片对应一个像素,用于对投影画面进行成像。光源打出后将投射在DMD上,通过成像显示在投影墙面上,在对投影墙面上的投射画面进行校正时,可以通过调整DMD上的各像素的像素值,从而调整投射至墙面上的画面的形状。On the other hand, the projection principle of the projection light machine involved in the present application is briefly explained: the projection light machine may have a DMD (Digital Micromirror Device), and the DMD is an array composed of a plurality of high-speed digital light reflection switches. It is composed of many small aluminum reflective mirrors. The number of lenses is determined by the display resolution. One small lens corresponds to one pixel and is used to image the projection screen. After the light source is emitted, it will be projected on the DMD and displayed on the projection wall through imaging. When correcting the projection screen on the projection wall, the pixel value of each pixel on the DMD can be adjusted to adjust the projection on the wall. the shape of the screen.
接下来,将通过多个具体的实施例对本申请的方案进行详细说明。Next, the solution of the present application will be described in detail through multiple specific embodiments.
图1为本申请实施例提供的投影校正方法的流程示意图一;图2为本申请实施例提供的一种投影校正页面示意图。本方法的执行主体可以是投影光机中的控制器、处理器等设备,也可以是独立于投影光机之外的计算机、服务器等设备。如图1所示,该方法可包括:FIG. 1 is a first schematic flowchart of a projection correction method provided in an embodiment of the present application; FIG. 2 is a schematic diagram of a projection correction page provided in an embodiment of the present application. The subject of execution of the method may be a controller, a processor and other devices in the projection light machine, or may be a computer, a server and other devices independent of the projection light machine. As shown in Figure 1, the method may include:
S101、在梯形校正后的投影校正页面中,获取针对投影画面的第一顶点的第一调整操作,第一调整操作用于指示:将第一顶点沿着第一方向移动第一距离。S101. On the projection correction page after keystone correction, acquire a first adjustment operation for a first vertex of a projected image, where the first adjustment operation is used to indicate: move the first vertex along a first direction by a first distance.
可选地,“投影校正页面”是指用于对投影画面进行校正的页面,如图2所示,投影校正页面中可包括快捷校正控件、以及至少一个调节控件,其中,投影校正页面的背景可以为任意背景。Optionally, the "projection correction page" refers to a page used to correct the projection screen. As shown in FIG. 2, the projection correction page may include a shortcut correction control and at least one adjustment control, wherein the background of the projection correction page Can be any background.
可选地,用户可通过“投影校正页面”中的调节控件在投影校正页面中输入针对上述“投影画面”的第一顶点的第一调整操作,其中,第一顶点可以指的是投影画面中的指定点。Optionally, the user may input a first adjustment operation for the first vertex of the above-mentioned "projection picture" on the projection correction page through the adjustment control in the "projection correction page", wherein the first vertex may refer to the designated point.
示例性的,继续参照图2,其中调节控件可包括第一调节控件和第二调节控件,第一调节控件可用于调节“投影画面”中的点竖直向下移动,第二调节控件可用于调节“投影画面”中的点竖直向上移动。用户可通过投影光机的遥控器中的按钮,控制第一调节控件,以将“投影画面”中的第一顶点沿着第一方向移动第一距离,以图2中所示的投影画面为直角梯形为例,假设第一顶点为a1点,则可通过按钮控制第一调节控件,输入第一调整操作,以将a1点沿着竖直方向移动到a2点,其中,第一距离可用像素点的个数表征,例如:将a1点沿着竖直方向ad移动n个像素点到达a2点,也即,第一距离是a1a2。按压一次第一调节按钮,对应调整固定的步进值s,该步进值也可以理解为上述n个像素点。Exemplarily, continue to refer to FIG. 2 , wherein the adjustment controls may include a first adjustment control and a second adjustment control, the first adjustment control may be used to adjust the vertical downward movement of points in the "projection screen", and the second adjustment control may be used to Adjust the point in the "Projected Screen" to move vertically upwards. The user can control the first adjustment control through the button in the remote control of the projection light machine, so as to move the first vertex in the "projected picture" by the first distance along the first direction, taking the projected picture shown in Figure 2 as Take a right-angled trapezoid as an example, assuming that the first vertex is point a1, the first adjustment control can be controlled by a button, and the first adjustment operation can be input to move point a1 to point a2 along the vertical direction, where the first distance is available in pixels The number of points represents, for example, moving point a1 by n pixels along the vertical direction ad to reach point a2, that is, the first distance is a1a2. Pressing the first adjusting button once corresponds to adjusting a fixed step value s, which can also be understood as the above n pixel points.
S102、响应第一调整操作,获取投影画面对应光机图像的顶点坐标。其中,该光机图像可以理 解为输入投影光机的DMD中,用于投影出上述投影画面的DMD图像。S102. In response to the first adjustment operation, acquire the vertex coordinates of the optomechanical image corresponding to the projection screen. Wherein, the optical machine image can be understood as the DMD image input into the DMD of the projection optical machine for projecting the above-mentioned projection picture.
可选地,响应针对投影画面的第一顶点的第一调整操作,并获取第一调整操作后投影画面对应光机图像的顶点坐标。Optionally, in response to the first adjustment operation on the first vertex of the projected picture, and acquire the vertex coordinates of the corresponding optomechanical image of the projected picture after the first adjustment operation.
S103、依照光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框以及模拟成像元件外框的外框坐标;其中,模拟成像元件外框为预设显示比的矩形框。例如,投影画面的预设显示比为16:9,那么此处的模拟成像元件外框即为16:9的矩形外框。在本申请实施例中,模拟成像元件外框可以理解为假想DMD外框,成像元件外框可以理解为真实的DMD外框。S103. According to the vertex coordinates of the optomechanical image, determine the frame of the simulated imaging component corresponding to the optomechanical image and the frame coordinates of the frame of the simulated imaging component; wherein, the frame of the simulated imaging component is a rectangular frame with a preset display ratio. For example, if the preset display ratio of the projection screen is 16:9, then the frame of the analog imaging component here is a rectangular frame of 16:9. In the embodiment of the present application, the simulated imaging component frame may be understood as a virtual DMD frame, and the imaging component frame may be understood as a real DMD frame.
可以参照图4,可以清楚地获取到光机图像、光机图像对应的模拟成像元件外框所对应的区域。Referring to FIG. 4 , the optomechanical image and the area corresponding to the frame of the simulated imaging element corresponding to the optomechanical image can be clearly obtained.
可选地,图3为本申请实施例提供的使用快捷梯形校正功能调节投影画面时成像元件上光机图像变化过程的示意图,如图3所示,当用户使用快捷梯形校正功能调节投影画面时,光机图像上与投影画面第一顶点(例如图2中的a1点)存在映射关系的第一投影点(例如图4中的A点)的纵坐标Ay始终在成像元件外框左边界移动,第二投影点(例如图4中的B点)的横坐标Bx始终在成像元件外框上边界移动。Optionally, FIG. 3 is a schematic diagram of the image change process of the polisher of the imaging element when using the shortcut keystone correction function to adjust the projection screen provided by the embodiment of the present application. As shown in FIG. 3, when the user uses the shortcut keystone correction function to adjust the projection screen , the ordinate Ay of the first projected point (such as point A in Fig. 4) that has a mapping relationship with the first vertex of the projection screen (such as point a1 in Fig. 2) on the optomechanical image always moves on the left boundary of the imaging element outer frame , the abscissa Bx of the second projected point (for example, point B in FIG. 4 ) always moves on the upper boundary of the outer frame of the imaging element.
其中,通过快捷梯形校正功能调节投影画面的具体方式为:Among them, the specific way to adjust the projection screen through the shortcut keystone correction function is as follows:
第一步、获取针对投影画面中预设顶点的调整操作,确定该调整操作对应的累计步进值mstep;The first step is to obtain the adjustment operation for the preset vertex in the projection screen, and determine the cumulative step value mstep corresponding to the adjustment operation;
可选地,在投影仪的实际使用过程中,用户可以在任何页面(例如视频播放页面、音乐播放页面等等)下,通过操作快捷校正控件进入快捷校正模式,以对当前所显示的投影画面进行校正。Optionally, during the actual use of the projector, the user can enter the shortcut correction mode by operating the shortcut correction control on any page (such as a video playback page, a music playback page, etc.), so as to correct the currently displayed projection screen Make corrections.
上述调整操作可以是用户对投影仪的遥控器中第一调整控件或者第二调整控件输入的按压操作。以投影仪为左侧投影为例,参见图11中的右图所示,预设顶点为a点,最初的投影画面为abcd,用户可以通过按压第一调整控件将a顶点往下移动至a1,每按压一次第一调整控件,对应的累计步进值mstep增加固定的步进值s,初始的mstep为0。与之相反地,每按压一次第二调整控件,对应的累计步进值mstep减少固定的步进值s。The adjustment operation described above may be a user's press operation on the first adjustment control or the second adjustment control input in the remote controller of the projector. Take the left side projection of the projector as an example, as shown in the right figure in Figure 11, the preset vertex is point a, and the initial projection screen is abcd, the user can press the first adjustment control to move the a point down to a1 , each time the first adjustment control is pressed, the corresponding cumulative step value mstep increases by a fixed step value s, and the initial mstep is 0. On the contrary, each time the second adjustment control is pressed, the corresponding accumulated step value mstep is reduced by a fixed step value s.
或者,当投影仪为右侧投影时,上述预设顶点相应有所变化,从a点变为b点,本申请对此不作具体限定。Alternatively, when the projector is projecting on the right side, the preset vertex changes accordingly, from point a to point b, which is not specifically limited in the present application.
可以理解的是,当投影光机水平放置时,投射画面至与DMD呈任意水平夹角的墙面上时,投射画面的光图始终为直角梯形,当投影角度不变时,墙上的光图也始终不变,投射画面始终在光图范围内移动。It can be understood that when the projection light machine is placed horizontally, when the projected picture is projected onto the wall at any horizontal angle with the DMD, the light diagram of the projected picture is always a right-angled trapezoid. When the projection angle remains unchanged, the light on the wall The map is also always unchanged, and the projected picture always moves within the range of the light map.
第二步、依照上述调整操作对应的累计步进值mstep(即预设顶点的纵坐标a_y)和与预设显示比匹配的画面校正函数,更新上述投影画面对应的光机图像,得到目标图像。The second step is to update the optomechanical image corresponding to the above-mentioned projected image according to the cumulative step value mstep corresponding to the above-mentioned adjustment operation (that is, the vertical coordinate a_y of the preset vertex) and the image correction function matching the preset display ratio, and obtain the target image .
其中,每对预设顶点输入一次调整操作,以将预设顶点往下移动,其校正后的投影画面的变化过程可参见图11的左图所示,可以看到经过一次次的调整,投影画面从梯形一步步变换成预设显示比的矩形。采用这样的方式,可以实现对投影画面的快捷校正,快速规划出预设显示比的矩形画面,提高用户体验度。Among them, an adjustment operation is input for each pair of preset vertices to move the preset vertices downward. The change process of the corrected projection screen can be seen in the left figure of Figure 11. It can be seen that after repeated adjustments, the projection The screen is transformed step by step from a trapezoid to a rectangle with a preset display ratio. By adopting such a method, quick calibration of the projected picture can be realized, a rectangular picture with a preset display ratio can be quickly planned, and user experience can be improved.
具体实现中,上述第二步的具体实现方式为:In a specific implementation, the specific implementation of the second step above is as follows:
当投影设备水平放置,投射在与设备DMD成任意水平夹角的墙面上时,光图始终为直角梯形(由于投影设备的光源与DMD的下底边在同一水平面上),当投影角度不变时,墙上的光图也不变,画面是始终在光图范围内移动。通过向下调整梯形的最高点位置使投影画面成为矩形,此时DMD上图像d点下移Pn个像素点。假设DMD的长宽比为16:9,那么可设DMD长边为16,短边为9,
Figure PCTCN2022083560-appb-000001
When the projection device is placed horizontally and projected on the wall at any horizontal angle with the device DMD, the light diagram is always a right-angled trapezoid (because the light source of the projection device is on the same level as the bottom edge of the DMD), when the projection angle is different When changing, the light map on the wall also does not change, and the picture is always moving within the range of the light map. By adjusting the position of the highest point of the trapezoid downwards, the projected image becomes a rectangle. At this time, point d of the image on the DMD is moved down by Pn pixels. Assuming that the aspect ratio of the DMD is 16:9, then the long side of the DMD can be set to 16 and the short side to 9,
Figure PCTCN2022083560-appb-000001
仍以DMD的长宽比为16:9为例,图6为本申请实施例提供的一种投射图示意图。投射图说明:O为光源,平面P1为DMD,P2为假想正对墙面,P3为与投影光机具有一定倾角的真实墙面。d3a'b'h2为光图,当投影光机角度不变时,光图形状始终不改变,而初始投影画面可认为与光图d3a'b'h2重 叠,当对初始投影画面中预设点d3沿着d3h2调整至矩形图像时,此时墙壁的投影画面fa'b'h2恰好为矩形图像,此时,DMD的原始图像dabc对应变化为abce,也即,通过获取的d3f的移动距离,也即上述的目标距离,可以对应计算得到de的移动像素个数,也即得到上述的DMD上目标点的移动参数。假设DMD上原始图像的目标点d点下移Pn个像素点,则可根据de的移动像素个数与de距离之间的函数关系
Figure PCTCN2022083560-appb-000002
计算得到目标距离x,其中,x指的是de的距离,P n指的是de的移动像素个数,M指的是投影光机中DMD的物理分辨率,D指的是投影画面显示比例,在本实施例中,以DMD的物理分辨率可取为1080,投影画面显示比例为16:9为例,那么,对应的可根据公式
Figure PCTCN2022083560-appb-000003
需要说明的是,对于投影光机中DMD的物理分辨率和投影画面显示比例为其他数值时,本方案均适用。
Still taking the aspect ratio of the DMD as 16:9 as an example, FIG. 6 is a schematic diagram of a projection diagram provided by an embodiment of the present application. Description of the projection diagram: O is the light source, plane P1 is the DMD, P2 is the imaginary facing the wall, and P3 is the real wall with a certain inclination to the projection light machine. d3a'b'h2 is a light graph, when the angle of the projection light machine remains unchanged, the shape of the light graph does not change, and the initial projection image can be considered to overlap with the light image d3a'b'h2, when the preset point in the initial projection image When d3 is adjusted to a rectangular image along d3h2, the projected image fa'b'h2 on the wall is just a rectangular image at this time. At this time, the original image dabc of the DMD is correspondingly changed to abce, that is, through the acquired moving distance of d3f, That is, the above-mentioned target distance can be calculated correspondingly to obtain the number of moving pixels of de, that is, the above-mentioned moving parameters of the target point on the DMD can be obtained. Assuming that the target point d of the original image on the DMD moves down by Pn pixels, the functional relationship between the number of moving pixels of de and the distance of de can be
Figure PCTCN2022083560-appb-000002
Calculate the target distance x, where x refers to the distance of de, P n refers to the number of moving pixels of de, M refers to the physical resolution of the DMD in the projection light machine, and D refers to the display ratio of the projection screen , in this embodiment, take the physical resolution of the DMD as 1080, and the projection screen display ratio as 16:9 as an example, then, the corresponding can be according to the formula
Figure PCTCN2022083560-appb-000003
It should be noted that this solution is applicable when the physical resolution of the DMD in the projection light machine and the display ratio of the projection screen are other values.
1、证明:L ec∶L ab=L a′b′∶L h2d3=9-x∶9 1. Proof: L ec : Lab = L a′b : L h2d3 = 9-x: 9
由△d3h2O、△d′c′O、△dcO互为相似三角形,L e′h2=L a′b′、L cd=L ab易证明: Since △d3h2O, △d′c′O, △dcO are mutually similar triangles, it is easy to prove that L e′h2 =L a′b 、 L cd =Lab:
L ec∶L ab=L a′b′∶L h2d3=9-x∶9 L ec : Lab = L a'b ' : L h2d3 = 9-x: 9
2、求L fa′∶L a′d′ 2. Calculate L fa' : L a'd'
图7为本申请实施例提供的又一种函数关系示意图;图8为本申请实施例提供的另一种函数关系示意图。FIG. 7 is a schematic diagram of another functional relationship provided by the embodiment of the present application; FIG. 8 is a schematic diagram of another functional relationship provided by the embodiment of the present application.
设投射比(投射距离:投射画面宽度)为常数r,本实施例中,r可取16:9。则ct=8,to=16r,在⊿cto中由勾股定理得
Figure PCTCN2022083560-appb-000004
设L co为m。
Assume that the projection ratio (projection distance: projection screen width) is a constant r, and in this embodiment, r may be 16:9. Then ct=8, to=16r, in ⊿cto by the Pythagorean theorem
Figure PCTCN2022083560-appb-000004
Let L co be m.
在⊿cto中,根据投影关系易得∠a′d′f与∠bco互补,所以,可得到:
Figure PCTCN2022083560-appb-000005
In ⊿cto, according to the projection relationship, it is easy to get that ∠a′d′f and ∠bco are complementary, so we can get:
Figure PCTCN2022083560-appb-000005
根据投影关系易得△fd′e′与Δoce相似,根据相似关系得
Figure PCTCN2022083560-appb-000006
在Δfa′d′中
Figure PCTCN2022083560-appb-000007
L a′d′=16n、
Figure PCTCN2022083560-appb-000008
由余弦定理求得
Figure PCTCN2022083560-appb-000009
所以,可得:
According to the projection relationship, it is easy to get that △fd'e' is similar to Δoce, and according to the similarity relationship,
Figure PCTCN2022083560-appb-000006
in Δfa'd'
Figure PCTCN2022083560-appb-000007
L a'd' = 16n,
Figure PCTCN2022083560-appb-000008
From the law of cosines
Figure PCTCN2022083560-appb-000009
So, you can get:
Figure PCTCN2022083560-appb-000010
带入
Figure PCTCN2022083560-appb-000011
后得
Figure PCTCN2022083560-appb-000012
Figure PCTCN2022083560-appb-000010
bring in
Figure PCTCN2022083560-appb-000011
got later
Figure PCTCN2022083560-appb-000012
3、证明:L fa′∶L d3h2=常数K 3. Proof: L fa′ : L d3h2 = constant K
设L fa′∶L a′d′=R因为
Figure PCTCN2022083560-appb-000013
所以
Figure PCTCN2022083560-appb-000014
Let L fa' : L a'd' = R because
Figure PCTCN2022083560-appb-000013
so
Figure PCTCN2022083560-appb-000014
将L fa′和L a′d′带入表达式得: Put L fa' and L a'd' into the expression:
Figure PCTCN2022083560-appb-000015
Figure PCTCN2022083560-appb-000015
综上可得投射在墙上的光图的L fa′∶L d3h2=K,当投影光机的投射比固定时K只与DMD上移动的像素个数有关。 In summary, L fa' of the light map projected on the wall: L d3h2 = K, when the throw ratio of the projection light machine is fixed, K is only related to the number of pixels moved on the DMD.
4、求投射在墙上的直角梯形光图比例4. Find the ratio of the right-angled trapezoidal light map projected on the wall
当用户调整初始投影画面(直角梯形)为投影画面(矩形图像)时,可以得到DMD上唯一的x,带入K的表达式可以求出光图的长宽比L fa′∶L d3h2,再加上L a′b′∶L d3h2=(9-x)∶9,所以可以唯一确定直角梯形两条平行边与底边(L d3h2、L a′b′、L h2b′)的比例,也即上述 所说的光图比例。其中,L d3h2对应1,L a′b′对应K1,L h2b′对应K,光图比例也可指K、K1及1之间的比例关系,其中,
Figure PCTCN2022083560-appb-000016
When the user adjusts the initial projected picture (rectangular trapezoid) to the projected picture (rectangular image), the unique x on the DMD can be obtained, and the expression with K can be used to calculate the aspect ratio L fa′ : L d3h2 of the light map, and then Add L a'b' : L d3h2 = (9-x): 9, so the ratio of the two parallel sides of the right-angled trapezoid to the base (L d3h2 , L a'b' , L h2b' ) can be uniquely determined, and That is, the light map ratio mentioned above. Among them, L d3h2 corresponds to 1, L a'b' corresponds to K1, L h2b' corresponds to K, and the light map ratio can also refer to the proportional relationship between K, K1 and 1, where,
Figure PCTCN2022083560-appb-000016
5、在投影画面对应的光图中规划出与预设显示比(例如16:9)匹配的目标矩形5. Plan the target rectangle matching the preset display ratio (eg 16:9) in the light map corresponding to the projection screen
对于上述在投影画面对应的光图中确定预设显示比匹配的矩形图像,一种可实现的方式中,可以先确定光图与目标曲线的第一交点,也即,可以在光图中作出一目标曲线,目标曲线的斜率可以根据上述的预设显示比得到,以预设显示比为16:9为例,目标曲线的斜率则可以为9/16。For the above-mentioned predetermined display ratio matching rectangular image determined in the light map corresponding to the projected picture, in a feasible manner, the first intersection point between the light map and the target curve can be determined first, that is, it can be drawn in the light map A target curve, the slope of the target curve can be obtained according to the preset display ratio mentioned above. Taking the preset display ratio of 16:9 as an example, the slope of the target curve can be 9/16.
需要说明的是,对于计算机而言,上述作出目标曲线这一操作可以是通过程序实现的,程序中的参数可以包括光图数据、目标曲线的斜率等数据。It should be noted that, for a computer, the above-mentioned operation of making the target curve can be realized through a program, and the parameters in the program can include light map data, slope of the target curve and other data.
如图5所示,确定的光图可以为如图中的直角梯形d3-a’-b’-h2,作出的目标曲线可以为h2d5,其中,目标曲线上包括的直角梯形的指定非平行边也即指h2b’,指定平行边也即指d3h2,而第二交点也即指h2,通过第二交点以及预设斜率,则可以确定目标曲线的具体形状,那么,可进一步得到光图与目标曲线的第一交点可以指g点。As shown in Figure 5, the determined light diagram can be a right-angled trapezoid d3-a'-b'-h2 in the figure, and the target curve can be h2d5, wherein the specified non-parallel sides of the right-angled trapezoid included on the target curve That is to say h2b', the specified parallel side also refers to d3h2, and the second intersection point also refers to h2, through the second intersection point and the preset slope, the specific shape of the target curve can be determined, then, the light diagram and the target can be further obtained The first point of intersection of the curves may be referred to as point g.
进一步地、根据第一交点和第二交点,确定与预设显示比匹配的矩形图像,矩形图像的顶点包括第一交点和第二交点。Further, according to the first intersection point and the second intersection point, a rectangular image matching a preset display ratio is determined, and vertices of the rectangular image include the first intersection point and the second intersection point.
可选地,基于上述所确定的第一交点g,可以以g为起点,分别向直角梯形d3-a’-b’-h2的边d3h2和h2b’作垂线,分别得到如图5所示的交点f和m,基于得到的交点、以及上述的第一交点、第二交点,可以在投影画面的光图中确定预设显示比匹配的矩形图像f-g-m-h2。Optionally, based on the first intersection point g determined above, it is possible to take g as the starting point and draw perpendicular lines to the sides d3h2 and h2b' of the right-angled trapezoid d3-a'-b'-h2, respectively, as shown in Figure 5 Based on the obtained intersection points f and m, as well as the above-mentioned first intersection point and second intersection point, the rectangular image f-g-m-h2 matching the preset display ratio can be determined in the light diagram of the projection screen.
可选地,可以基于得到的光图的比例数据、上述目标曲线的曲线函数、以及如图5中直角梯形的指定非平行边d3a’对应的函数,则可以计算出上述第一交点g的坐标。Optionally, based on the ratio data of the obtained light map, the curve function of the above-mentioned target curve, and the function corresponding to the specified non-parallel side d3a' of the right-angled trapezoid in Figure 5, the coordinates of the above-mentioned first intersection point g can be calculated .
可基于如图5中所建立的坐标系,得到目标曲线h2d5的曲线函数方程:
Figure PCTCN2022083560-appb-000017
其中,目标曲线的斜率是根据预设显示比16:9确定的。而指定非平行边d3a’对应的函数方程则为:
Figure PCTCN2022083560-appb-000018
联立求解则可以得到第一交点
Figure PCTCN2022083560-appb-000019
Based on the coordinate system established in Figure 5, the curve function equation of the target curve h2d5 can be obtained:
Figure PCTCN2022083560-appb-000017
Wherein, the slope of the target curve is determined according to a preset display ratio of 16:9. And the function equation corresponding to the specified non-parallel side d3a' is:
Figure PCTCN2022083560-appb-000018
Simultaneous solution can get the first intersection point
Figure PCTCN2022083560-appb-000019
6、计算∠B6. Calculate ∠B
如图9所示,光源为O,第一光源曲线可以指Ob’,第二光源曲线可以指Ob”’,夹角则可以指∠B。As shown in Figure 9, the light source is O, the first light source curve can refer to Ob', the second light source curve can refer to Ob"', and the included angle can refer to ∠B.
∠B具体计算过程可如下:The specific calculation process of ∠B can be as follows:
在三角形Δb′Ho中L Hb′=8,L Ho=16r,
Figure PCTCN2022083560-appb-000020
可得
Figure PCTCN2022083560-appb-000021
Figure PCTCN2022083560-appb-000022
In the triangle Δb'Ho, L Hb' = 8, L Ho = 16r,
Figure PCTCN2022083560-appb-000020
Available
Figure PCTCN2022083560-appb-000021
Figure PCTCN2022083560-appb-000022
在Δd3h2o中可得
Figure PCTCN2022083560-appb-000023
Available in Δd3h2o
Figure PCTCN2022083560-appb-000023
在Δd′c′o中可得
Figure PCTCN2022083560-appb-000024
Available in Δd'c'o
Figure PCTCN2022083560-appb-000024
在Δb′h2o中可得
Figure PCTCN2022083560-appb-000025
Available in Δb'h2o
Figure PCTCN2022083560-appb-000025
在Δb′b″′o中L b′o=L c′o;L b′b″′=K-X_ideal,可得
Figure PCTCN2022083560-appb-000026
In Δb'b"'o, L b'o = L c'o ; L b'b"' = K-X_ideal, we can get
Figure PCTCN2022083560-appb-000026
在Δb′b″′o中可得
Figure PCTCN2022083560-appb-000027
∠B=cos -1(cos∠B)。
Available in Δb'b"'o
Figure PCTCN2022083560-appb-000027
∠B=cos -1 (cos∠B).
在Δb′Ho中可得
Figure PCTCN2022083560-appb-000028
Available in Δb'Ho
Figure PCTCN2022083560-appb-000028
7、计算图9中4点坐标a″b″cd″(即投影光机中新光机图像的有效投影区域)的四点坐标点d”:d”_x=0;d”_y=Py-Py*Y_ideal;点c:c_x=0;c_y=0;7, calculate the four point coordinate point d " of 4 point coordinates a " b " cd " (being the effective projection area of new light machine image in the projection light machine) among Fig. 9: d "_x=0; d "_y=Py-Py *Y_ideal; point c: c_x=0; c_y=0;
点a”:a”_y=0;
Figure PCTCN2022083560-appb-000029
point a'': a''_y=0;
Figure PCTCN2022083560-appb-000029
Figure PCTCN2022083560-appb-000030
Figure PCTCN2022083560-appb-000030
点b”:b”_y=Py;b”_x=a”_x。Point b": b"_y = Py; b"_x = a"_x.
其中,
Figure PCTCN2022083560-appb-000031
K1=(9-x)/9
in,
Figure PCTCN2022083560-appb-000031
K1=(9-x)/9
其中,Px,Py分别为点b的横坐标和纵坐标,由于投影光机中原始图像dabc的坐标是已知的,故Px,Py也为已知的。其中,Px,Py分别为点b的横坐标和纵坐标,由于投影光机中原始图像dabc的坐标是已知的,故Px,Py也为已知的。其中,Px和Py与投影光机中DMD的物理分辨率有关,具体地,Px为DMD物理分辨率的横向像素个数,Py为DMD物理分辨率的纵向像素个数。例如,DMD物理分辨率为(1920*1080),那么Px=1920,Py=1080。Among them, Px, Py are the abscissa and ordinate of point b respectively, since the coordinates of the original image dabc in the projection light machine are known, so Px, Py are also known. Among them, Px, Py are the abscissa and ordinate of point b respectively, since the coordinates of the original image dabc in the projection light machine are known, so Px, Py are also known. Wherein, Px and Py are related to the physical resolution of the DMD in the projection light engine, specifically, Px is the number of horizontal pixels of the physical resolution of the DMD, and Py is the number of vertical pixels of the physical resolution of the DMD. For example, DMD physical resolution is (1920*1080), then Px=1920, Py=1080.
基于上述描述,上述与预设显示比匹配的画面校正函数,则可以指代上述计算4点坐标a″b″cd″的公式。具体地,上述第二步的具体实现方式为:Based on the above description, the above-mentioned picture correction function matching the preset display ratio can refer to the above-mentioned formula for calculating the coordinates a″b″cd” of the four points. Specifically, the specific implementation of the second step above is:
将上述调整操作对应的累计步进值mstep作为DMD上图像d点下移的像素点个数,也即上述Pn=累计步进值mstep,相应地,在预设显示比为16:9时,DMD物理分辨率为1080,那么,x=(累计步进值mstep/1080)*9,这种情况下,就可以将已知的x带入上述4点坐标a″b″cd″的计算公式,计算出待输入光机的新图像的有效投影区域的四点坐标,进而基于该四点坐标得到目标图像。The accumulative step value mstep corresponding to the above-mentioned adjustment operation is used as the number of pixels to move down on the image d point on the DMD, that is, the above-mentioned Pn=accumulative step value mstep, correspondingly, when the preset display ratio is 16:9, DMD physical resolution is 1080, then, x=(cumulative step value mstep/1080)*9, in this case, the known x can be brought into the calculation formula of the above-mentioned 4-point coordinates a″b″cd″ , calculate the four-point coordinates of the effective projection area of the new image to be input into the optical machine, and then obtain the target image based on the four-point coordinates.
继续参照上述图4为本申请实施例提供的光机图像对应的模拟成像元件外框的示意图;但是,如图4所示,当用户对所显示的“初始投影画面”进行AK梯形校正、手动4点校正或者画面缩放后,得到的投影画面对应的光机图像位于“成像元件外框”的中央,而非靠近成像元件外框边界的,因此存在AK校正功能、手动4点校正、画面缩放与快捷梯形校正兼容的问题,为了可以在AK、手动4点校正或者画面缩放之后,继续兼容快捷梯形校正功能,提高投影画面校正的速度以及准确度。Continue to refer to the above-mentioned Fig. 4 for the schematic diagram of the analog imaging element frame corresponding to the optomechanical image provided by the embodiment of the present application; however, as shown in Fig. 4, when the user performs AK keystone correction and manual After 4-point correction or screen zooming, the optical-mechanical image corresponding to the projected screen obtained is located in the center of the "imaging element frame", rather than close to the boundary of the imaging element frame, so there are AK correction functions, manual 4-point correction, and image zooming Compatible with the shortcut keystone correction, in order to continue to be compatible with the shortcut keystone correction function after AK, manual 4-point correction or image scaling, to improve the speed and accuracy of projection screen correction.
本申请实施例可以获取当前时刻光机图像(即AK、手动4点校正或者画面缩放后投影画面对应的光机图像)的顶点坐标,并基于该光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标,以便于用户后续使用快捷梯形校正功能对投影画面进行调节时,光机图像可以在模拟成像元件外框上的边界移动。The embodiment of the present application can obtain the vertex coordinates of the opto-mechanical image at the current moment (that is, the opto-mechanical image corresponding to the AK, manual 4-point correction, or the screen zoomed projection screen), and based on the vertex coordinates of the opto-mechanical image, determine the corresponding The frame of the simulated imaging component and the coordinates of the frame of the frame of the simulated imaging component, so that when the user uses the shortcut keystone correction function to adjust the projection screen, the optomechanical image can move on the boundary of the frame of the simulated imaging component.
S104、基于第一距离、模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定用于校正投影画面的新光机图像。S104. Based on the first distance, the frame correction function associated with the frame coordinates of the frame of the simulated imaging element and the preset display scale, determine a new optomechanical image for correcting the projected frame.
其中,预设显示比例关联的画面校正函数,是指上述计算投影光机中新光机图像的有效投影区域)四点坐标的计算公式,但在执行步骤S104时,需要将模拟成像元件外框与图9中b点对应点的横坐标和纵坐标替换上述公式中的Px、Py,因此,在得到模拟成像元件外框的外框坐标之后,即可基于上述获取到的投影画面中的第一顶点沿着第一方向移动的“第一距离”、以及画面校正函数,确定用于校正投影画面的新光机图像,以实现了对投影画面的快捷梯形校正,同时还解决了梯形校正与快捷梯形校正兼容的问题。Wherein, the image correction function associated with the preset display ratio refers to the calculation formula for calculating the four-point coordinates of the effective projection area of the new optical machine image in the projection optical machine. The abscissa and ordinate of the point corresponding to point b in Fig. 9 replace Px and Py in the above formula. Therefore, after obtaining the outer frame coordinates of the outer frame of the simulated imaging element, the first one in the projected picture obtained above can be obtained. The "first distance" that the vertex moves along the first direction and the picture correction function determine the new optical-mechanical image used to correct the projected picture, so as to realize the fast trapezoidal correction of the projected picture, and also solve the trapezoidal correction and fast trapezoidal Correct compatibility issues.
S105、依照新光机图像进行投影,得到校正后的投影画面。S105. Perform projection according to the image of the Xinguang Machine to obtain a corrected projection image.
在一些实施例中,可以将新光机图像输入给投影光机,按照新光机图像的大小进行图像投影,得到“校正后的投影画面”,这样,一方面可以对梯形校正后的画面进行便捷校正,可有效的提高投影画面校正效率;另一方面,通过引入与预设显示比例关联的画面校正函数,可以提高投影画面校 正的准确度,提高用户的观影体验。In some embodiments, the new optical machine image can be input to the projection optical machine, and the image is projected according to the size of the new optical machine image to obtain the "corrected projection picture". In this way, on the one hand, the keystone corrected picture can be conveniently corrected , which can effectively improve the efficiency of projected picture correction; on the other hand, by introducing a picture correction function associated with a preset display ratio, the accuracy of projected picture correction can be improved, and the user's viewing experience can be improved.
参照图11,假设梯形校正后的投影画面为abcd对应的画面,在投影仪为左侧投时,第一顶点为a点,输入第一调整操作可以将a点往下移动调整为a1,执行上述步骤S102~步骤S105,可以将投影画面从abcd校正为A1B1C1d。相应地,用户可以继续输入第二调整操作、第三调整操作、第四调整操作等等,持续的将投影画面中的a点往下移动,每一次调整操作的输入,均可重复执行述步骤S102~步骤S105,校正后投影画面的变化过程可以参见图11的左图所示,直至将投影画面校正为与预设显示比匹配的标准矩形(例如16:9的标准矩形),采用这样的方式,可以在对投影画面进行梯形校正(AK或者手动梯形校正)后兼容便捷梯形校正方案,快速的将梯形校正后的画面快速调整为与预设显示比匹配的标准矩形。Referring to Figure 11, assuming that the projected picture after keystone correction is the picture corresponding to abcd, when the projector is projected on the left side, the first vertex is point a, inputting the first adjustment operation can move point a downward and adjust it to a1, execute The above step S102 to step S105 can correct the projected picture from abcd to A1B1C1d. Correspondingly, the user can continue to input the second adjustment operation, the third adjustment operation, the fourth adjustment operation, etc., and continuously move the point a in the projection screen downwards, and the above steps can be repeated for each adjustment operation input From S102 to step S105, the change process of the projected picture after correction can be referred to the left diagram of Figure 11 until the projected picture is corrected to a standard rectangle (such as a 16:9 standard rectangle) that matches the preset display ratio. It can be compatible with the convenient keystone correction scheme after performing keystone correction (AK or manual keystone correction) on the projected picture, and quickly adjust the keystone corrected picture to a standard rectangle that matches the preset display ratio.
可以理解为,对于光学变焦、画面缩放后的投影画面,也同样适用于本方案,具体地,依然可以获取对光学变焦、画面缩放后的投影画面的第一顶点的第一调整操作,根据该第一调整操作执行上述步骤S102~步骤S105,实现对画面的便捷校正。It can be understood that this solution is also applicable to the projected picture after optical zooming and zooming. Specifically, the first adjustment operation for the first vertex of the projected picture after optical zooming and zooming can still be obtained. According to the The first adjustment operation executes the above steps S102 to S105 to realize convenient correction of the screen.
综上所述,本申请实施例提供一种投影校正方法,该方法包括:在梯形校正后的投影校正页面中,获取针对投影画面的第一顶点的第一调整操作,第一调整操作用于指示:将第一顶点沿着第一方向移动第一距离;响应第一调整操作,获取投影画面对应光机图像的顶点坐标;依照光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标;其中,模拟成像元件外框为矩形框;基于第一距离、模拟成像元件外框的外框坐标和画面校正函数,确定用于校正投影画面的新光机图像;依照新光机图像进行投影,得到校正后的投影画面。在本方案中,通过获取梯形校正后的投影画面对应的光机图像的顶点坐标,并基于该光机图像的顶点坐标,进一步地确定该光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标,使得可以根据投影画面中的第一顶点沿着第一方向移动的第一距离、模拟成像元件外框的外框坐标以及画面校正函数,计算得到用于校正投影画面的新光机图像,以便于依照得到的新光机图像进行图像投影,这样,一方面可以对梯形校正后的画面进行便捷校正,可有效的提高投影画面校正效率;另一方面,通过引入与预设显示比例关联的画面校正函数,可以提高投影画面校正的准确度,提高用户的观影体验。To sum up, the embodiment of the present application provides a method for projection correction, the method includes: obtaining a first adjustment operation for the first vertex of the projection screen on the projection correction page after trapezoidal correction, the first adjustment operation is used to Instruction: move the first vertex along the first direction by a first distance; respond to the first adjustment operation, obtain the vertex coordinates of the projection screen corresponding to the opto-mechanical image; determine the analog imaging element corresponding to the opto-mechanical image according to the vertex coordinates of the opto-mechanical image Outer frame, and the outer frame coordinates of the outer frame of the simulated imaging element; wherein, the outer frame of the simulated imaging element is a rectangular frame; based on the first distance, the outer frame coordinates of the outer frame of the simulated imaging element and the picture correction function, determine the projection image used for correction The Xinguangji image; project according to the Xinguangji image to obtain the corrected projection screen. In this solution, by obtaining the vertex coordinates of the optical-mechanical image corresponding to the projection screen after trapezoidal correction, and based on the vertex coordinates of the optical-mechanical image, the outer frame of the analog imaging component corresponding to the optical-mechanical image and the analog imaging The outer frame coordinates of the outer frame of the component can be calculated according to the first distance that the first vertex in the projected picture moves along the first direction, the outer frame coordinates of the simulated imaging component outer frame, and the picture correction function. In order to project images according to the obtained Xinguangji image, on the one hand, the image after trapezoid correction can be corrected conveniently, which can effectively improve the correction efficiency of the projected picture; on the other hand, by introducing and preset The image correction function related to the display ratio can improve the accuracy of projection image correction and improve the user's viewing experience.
将通过如下实施例具体讲解,如何依照光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标。The following embodiments will be used to explain in detail how to determine the outer frame of the analog imaging element corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging element according to the vertex coordinates of the optomechanical image.
可选地,上述步骤S103中,依照光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标,可以包括:Optionally, in the above step S103, according to the vertex coordinates of the optomechanical image, determining the outer frame of the analog imaging component corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging component may include:
S1001、根据光机图像的顶点坐标,计算模拟成像元件外框的边长参数。S1001. According to the vertex coordinates of the optomechanical image, calculate the side length parameter of the frame of the analog imaging component.
其中,模拟成像元件外框的边长参数包括:模拟成像元件外框的高参数、模拟成像元件外框的宽参数。Wherein, the side length parameters of the simulated imaging component frame include: a height parameter of the simulated imaging component frame, and a width parameter of the simulated imaging component frame.
在本实施例中,可以根据光机图像的顶点坐标,计算模拟成像元件外框的边长参数。In this embodiment, the side length parameter of the frame of the simulated imaging device can be calculated according to the vertex coordinates of the optomechanical image.
可选地,上述步骤S1001中,根据光机图像的顶点坐标,计算模拟成像元件外框的边长参数,可以包括:Optionally, in the above step S1001, according to the vertex coordinates of the optomechanical image, calculating the side length parameter of the frame of the analog imaging component may include:
S1101、根据光机图像的顶点坐标,确定光机图像对应的外接矩形,光机图像为四边形、外接矩形为四边形匹配的矩形。S1101. Determine a circumscribing rectangle corresponding to the optomechanical image according to the vertex coordinates of the optomechanical image, where the optomechanical image is a quadrilateral and the circumscribing rectangle is a rectangle matching the quadrilateral.
当用户对初始投影画面进行梯形校正后,得到的投影画面对应的光机图像不是一个标准的直角梯形。After the user performs trapezoidal correction on the initial projected picture, the resulting optical-mechanical image corresponding to the projected picture is not a standard right-angled trapezoid.
可选地,可以采用如下方法对光机图像进行处理,以得到标准直角梯形的光机图像和模拟成像元件外框。Optionally, the following method can be used to process the optomechanical image to obtain a standard rectangular trapezoidal optomechanical image and simulate the outer frame of the imaging element.
首先,可以根据光机图像的顶点坐标,确定光机图像对应的外接矩形。例如,图10为本申请实施例提供的光机图像顶点坐标的示意图;如图10所示,光机图像的顶点分别为A、B、C和D,且光机图像的顶点坐标分别为A(A_x_raw,A_y_raw)、B(B_x_raw,B_y_raw)、C(C_x_raw,C_y_raw) 和D(D_x_raw,D_y_raw)。First, the circumscribed rectangle corresponding to the optomechanical image can be determined according to the vertex coordinates of the optomechanical image. For example, Fig. 10 is a schematic diagram of the vertex coordinates of the optomechanical image provided by the embodiment of the present application; (A_x_raw, A_y_raw), B(B_x_raw, B_y_raw), C(C_x_raw, C_y_raw) and D(D_x_raw, D_y_raw).
根据光机图像的顶点坐标,判断光机图像的顶点中最大横坐标、最小横坐标、最大纵坐标和最小横坐标。具体判断过程如下:According to the vertex coordinates of the optical-mechanical image, determine the maximum abscissa, the minimum abscissa, the maximum ordinate and the minimum abscissa in the vertex of the optical-mechanical image. The specific judgment process is as follows:
short x_min=A_x_raw<D_x_raw?A_x_raw:D_x_raw;short x_min=A_x_raw<D_x_raw? A_x_raw:D_x_raw;
short x_max=B_x_raw>C_x_raw?B_x_raw:C_x_raw;short x_max=B_x_raw>C_x_raw? B_x_raw: C_x_raw;
short y_min=A_y_raw<D_y_raw?A_y_raw:D_y_raw;short y_min=A_y_raw<D_y_raw? A_y_raw: D_y_raw;
short y_max=B_y_raw>C_y_raw?B_y_raw:C_y_raw;short y_max=B_y_raw>C_y_raw? B_y_raw: C_y_raw;
此时,即可根据光机图像的顶点中最大横坐标、最小横坐标、最大纵坐标和最小横坐标,确定光机图像对应的外接矩形的坐标。At this point, the coordinates of the circumscribed rectangle corresponding to the optomechanical image can be determined according to the maximum abscissa, minimum abscissa, maximum ordinate, and minimum abscissa of the vertices of the optomechanical image.
S1102、将外接矩形的高度参数确定为模拟成像元件外框的高度参数。S1102. Determine the height parameter of the circumscribed rectangle as the height parameter of the frame of the simulated imaging component.
可选地,以外接矩形的高作为“模拟成像元件外框”的高度参数,也即px_y=short(y_max-y_min)。Optionally, the height of the circumscribing rectangle is used as a height parameter of the "frame of the simulated imaging device", that is, px_y=short(y_max-y_min).
S1103、根据模拟成像元件外框的高度参数、以及预设显示比,计算模拟成像元件外框的宽度参数。S1103. According to the height parameter of the frame of the simulated imaging component and the preset display ratio, calculate the width parameter of the frame of the simulated imaging component.
通常,当投影画面为16:9的矩形画面时,用户在观赏投影画面时具有较好的视角效果。因此,本实施例中,以预设显示比为16:9为例,也即模拟成像元件外框中高度参数和宽度参数之间的比值符合标准的显示比。Generally, when the projected picture is a rectangular picture of 16:9, the user has a better viewing angle effect when viewing the projected picture. Therefore, in this embodiment, the preset display ratio is 16:9 as an example, that is, the ratio between the height parameter and the width parameter in the frame of the simulated imaging device complies with the standard display ratio.
也即,在确定了模拟成像元件外框的高度参数之后,即可以模拟成像元件外框的高度参数和预设显示比,计算得到模拟成像元件外框的宽度参数,也即,px_x=short((y_max-y_min)*16/9)。That is, after the height parameter of the frame of the simulated imaging element is determined, the height parameter and the preset display ratio of the frame of the simulated imaging element can be simulated, and the width parameter of the frame of the simulated imaging element can be calculated, that is, px_x=short( (y_max-y_min)*16/9).
S1002、根据模拟成像元件外框的边长参数,计算模拟成像元件外框的顶点坐标。S1002. Calculate the vertex coordinates of the frame of the simulated imaging device according to the side length parameter of the frame of the simulated imaging device.
在上述实施例的基础上,在得到模拟成像元件外框的高度参数px_y、宽度参数px_x之后,可以根据上述得到的“光机图像对应的外接矩形的坐标”、模拟成像元件外框的边长参数,进一步地计算得到模拟成像元件外框的顶点坐标。On the basis of the above-mentioned embodiments, after obtaining the height parameter px_y and the width parameter px_x of the outer frame of the simulated imaging element, the side length of the outer frame of the simulated imaging element can be obtained according to the above-mentioned "coordinates of the circumscribed rectangle corresponding to the optical-mechanical image" parameters, and further calculate the vertex coordinates of the frame of the simulated imaging component.
在本实施例中,为了确定计算得到的模拟成像元件外框的顶点坐标的唯一性,还可以根据光机图像的顶点坐标,确定模拟成像元件外框的延伸方向。In this embodiment, in order to determine the uniqueness of the calculated vertex coordinates of the simulated imaging component frame, the extension direction of the simulated imaging component frame can also be determined according to the vertex coordinates of the optomechanical image.
将通过如下实施例具体讲解,如何根据光机图像的顶点坐标,确定模拟成像元件外框的延伸方向。How to determine the extension direction of the outer frame of the analog imaging element according to the coordinates of the vertices of the optomechanical image will be specifically explained through the following embodiments.
可选地,光机图像为四边形,在上述步骤S103:依照光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标之前,本申请的方法还可包括:Optionally, the optomechanical image is a quadrilateral. Before the above step S103: according to the vertex coordinates of the optomechanical image, the outer frame of the simulated imaging component corresponding to the optomechanical image and the outer frame coordinates of the simulated imaging component are determined. Methods may also include:
S1301、获取四边形的指定边两顶点的纵坐标。S1301. Obtain the ordinates of the two vertices of the specified side of the quadrilateral.
其中,以图10为例,四边形的指定边两顶点分别是指示图10中所示的A点、B点,也即,A(A_x_raw,A_y_raw)、B(B_x_raw,B_y_raw)。该指定边可以理解为四边形的顶边。Wherein, taking FIG. 10 as an example, the two vertices of the designated side of the quadrilateral respectively indicate point A and point B shown in FIG. 10 , that is, A(A_x_raw, A_y_raw), B(B_x_raw, B_y_raw). The designated side can be understood as the top side of the quadrilateral.
S1302、根据指定边两顶点的纵坐标,确定模拟成像元件外框的延伸方向。S1302. Determine the extension direction of the frame of the analog imaging component according to the ordinates of the two vertices of the designated side.
在上述实施例的基础上,可以根据A点、B点的纵坐标,进一步地判断A点是否比B点低,也即,判断A_y_raw>=B_y_raw?主要包括以下两种情况,具体如下:On the basis of the above embodiments, it is possible to further determine whether point A is lower than point B according to the ordinates of point A and point B, that is, determine whether A_y_raw>=B_y_raw? It mainly includes the following two situations, as follows:
第一种、若A_y_raw>=B_y_raw,也即,A点比B点低,则可以确定模拟成像元件外框的延伸方向是沿着B点的方向,也即,模拟成像元件外框的左上点坐标A’(A’_x=x_min,A’_y=y_min)。The first type, if A_y_raw>=B_y_raw, that is, point A is lower than point B, then it can be determined that the extension direction of the frame of the analog imaging component is along the direction of point B, that is, the upper left point of the frame of the analog imaging component Coordinate A' (A'_x=x_min, A'_y=y_min).
第二种、若A_y_raw<B_y_raw,也即,A点比B点高,则模拟成像元件外框的延伸方向是沿着a点的方向,也即,模拟成像元件外框的左上点坐标A’(A’_x=x_max-px_x,A’_y=y_min),完成了依照光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标的处理过程。The second type, if A_y_raw<B_y_raw, that is, point A is higher than point B, then the extension direction of the frame of the simulated imaging component is along the direction of point a, that is, the coordinate A' of the upper left point of the frame of the simulated imaging component (A'_x=x_max-px_x, A'_y=y_min), according to the vertex coordinates of the optical-mechanical image, the process of determining the outer frame of the analog imaging element corresponding to the optical-mechanical image and the outer frame coordinates of the outer frame of the analog imaging element is completed process.
将通过如下实施例具体讲解,如何基于第一距离、模拟成像元件外框的外框坐标与预设的显示比例关联的画面校正函数,确定用于校正投影画面的新光机图像。The following embodiments will specifically explain how to determine a new opto-mechanical image for correcting the projected image based on the first distance, the image correction function associated with the frame coordinates of the frame of the simulated imaging element, and the preset display ratio.
可选地,在上述步骤S104:基于第一距离、模拟成像元件外框的外框坐标与预设的显示比例关联的画面校正函数,确定用于校正投影画面的新光机图像,包括:Optionally, in the above step S104: based on the first distance, the frame correction function associated with the frame coordinates of the frame of the simulated imaging component and the preset display scale, determine a new optomechanical image for correcting the projected frame, including:
S1401、获取第一顶点相对于初始投影画面中第一顶点对应初始顶点移动的第二距离,初始投影画面为梯形校正前的投影画面。S1401. Obtain a second distance that the first vertex moves relative to the corresponding initial vertex in the initial projection frame, where the initial projection frame is a projection frame before keystone correction.
可选地,根据光机图像中的第一投影顶点的纵坐标、光机图像的顶点与初始投影画面中顶点的拟合函数,计算得到投影画面中第一顶点相对于初始投影画面中第一顶点对应初始顶点移动的第二距离。Optionally, according to the ordinate of the first projected vertex in the optomechanical image, and the fitting function between the vertices of the optomechanical image and the vertices in the initial projected picture, the relationship between the first vertex in the projected picture and the first vertex in the initial projected picture is calculated. The vertex corresponds to the second distance moved by the initial vertex.
可选地,投影光机中光机图像的顶点坐标信息与投影画面中顶点坐标信息之间具有预设的一一对应关系,以图11所示,假设投影画面的第一顶点的坐标信息(纵坐标记为a_y)与投影光机中光机图像的第一投影点的坐标信息(纵坐标记为A_y)的对应关系为:A_y=f(a_y),上述在已知光机图像的第一投影点的坐标的前提下,也即A_y已知的前提下,只需要获得a_y=f(A_y)的函数,则可根据该函数,由第一投影顶点的坐标反算出第一顶顶点的纵坐标a_y。Optionally, there is a preset one-to-one correspondence between the vertex coordinate information of the optical machine image in the projection optical machine and the vertex coordinate information in the projection screen. As shown in FIG. 11 , it is assumed that the coordinate information of the first vertex of the projection screen ( The coordinate information of the coordinate information (marked as A_y) of the first projected point of the optical mechanical image in the projection optical machine and the vertical coordinate is: A_y=f(a_y), the above-mentioned first in the known optical mechanical image Under the premise of the coordinates of a projected point, that is, under the premise that A_y is known, only the function of a_y=f(A_y) needs to be obtained, and then the coordinates of the first projected vertex can be used to calculate the coordinates of the first vertex according to the function. Ordinate a_y.
由于所采用到的A_y=f(a_y)公式比较复杂,使用matlab反算出的函数a_y=f(A_y)更加复杂。于是选择采集足够多的数据后使用多项式拟合的方式获得a_y=f(A_y)的函数。假设投影画面的分辨率为(1920*1080),则默认将a_y(0,1080]带入公式A_y=f(a_y)可以获得足够多的数据,然后使用多项式拟合得到拟合曲线。将拟合函数使用到代码中,结果表明:前后a_y值相差只有几个像素点,画面几乎没有突变。Since the adopted A_y=f(a_y) formula is more complicated, the function a_y=f(A_y) calculated by matlab is more complicated. So choose to collect enough data and use polynomial fitting to obtain the function of a_y=f(A_y). Assuming that the resolution of the projection screen is (1920*1080), by default, a_y(0,1080] can be brought into the formula A_y=f(a_y) to obtain enough data, and then use polynomial fitting to obtain a fitting curve. Fitting The combined function is used in the code, and the results show that the difference between the front and rear a_y values is only a few pixels, and the picture has almost no sudden change.
其中,得到的a_y=f(A_y)的拟合函数可如下所示:a_y=(2*pow(10,-12)*pow(A_y,5)-2*pow(10,-9)*pow(A_y,4)+pow(10,-6)*pow(A_y,3)+pow(10,-4)*pow(A_y,2)+1.0091*(A_y)+0.9359)。Wherein, the obtained fitting function of a_y=f(A_y) can be shown as follows: a_y=(2*pow(10,-12)*pow(A_y,5)-2*pow(10,-9)*pow (A_y,4)+pow(10,-6)*pow(A_y,3)+pow(10,-4)*pow(A_y,2)+1.0091*(A_y)+0.9359).
此处,将光机图像的第一投影点的纵坐标代入上述a_y=f(A_y)的拟合函数,得到的a_y,即为投影画面中第一顶点相对于初始投影画面中第一顶点对应初始顶点移动的第二距离。该第二距离,可以理解为投影画面中第一顶点相对于初始投影画面中第一顶点对应初始顶点移动的步进值。Here, the ordinate of the first projected point of the optical-mechanical image is substituted into the above-mentioned fitting function of a_y=f(A_y), and the obtained a_y is the correspondence between the first vertex in the projected picture and the first vertex in the initial projected picture. The second distance to move the initial vertex. The second distance can be understood as a step value of the movement of the first vertex in the projection frame relative to the corresponding initial vertex in the initial projection frame.
或者,在一个实施例中,参见图10,可以看出模拟成像元件外框(即假想DMD外框)和成像元件外框(即真实DMD)外框之间在y轴方向(或者也可以理解为纵向)存在一定距离l1,因此为了减小误差,在计算第二距离时,可以将第一投影点的纵坐标-l1作为a_y=f(A_y)函数中的A_y,从而计算出第二距离。Or, in one embodiment, referring to FIG. 10 , it can be seen that the y-axis direction (or it can also be understood There is a certain distance l1 in the vertical direction), so in order to reduce the error, when calculating the second distance, the ordinate -l1 of the first projected point can be used as A_y in the a_y=f(A_y) function to calculate the second distance .
在本实施例中,当需要获取图11中所示的第一顶点a1相对于初始投影画面中第一顶点a1对应初始顶点a移动的第二距离。In this embodiment, when it is necessary to obtain the second distance that the first vertex a1 shown in FIG. 11 moves with respect to the initial vertex a corresponding to the first vertex a1 in the initial projection frame.
因此,可以根据光机图像中的第一投影顶点A1的纵坐标A1_y、以及上述a_y=f(A_y)的拟合函数,计算得到投影画面中第一顶点a1相对于初始投影画面中第一顶点对应初始顶点移动的第二距离aa1。Therefore, according to the ordinate A1_y of the first projected vertex A1 in the optomechanical image and the above-mentioned fitting function of a_y=f(A_y), the relative relationship between the first vertex a1 in the projected picture and the first vertex in the initial projected picture can be calculated. corresponds to the second distance aa1 of the movement of the initial vertex.
S1402、基于第一距离和第二距离确定移动总距离。S1402. Determine a total moving distance based on the first distance and the second distance.
可选地,可以根据第一距离a1a2和第二距离aa1,计算得到初始投影画面中第一顶点在校正过程中的移动总距离aa2。此处的移动总距离,可以理解为响应第一调整操作后,此时的投影画面中第一顶点相对于初始投影画面中第一顶点对应初始顶点移动的累计步进值。Optionally, according to the first distance a1a2 and the second distance aa1, the total moving distance aa2 of the first vertex in the initial projection frame during the correction process can be calculated. The total moving distance here can be understood as the accumulative step value of the movement of the first vertex in the projection picture relative to the corresponding initial vertex in the initial projection picture after responding to the first adjustment operation.
S1403、根据移动总距离、模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定新光机图像的有效投影区域的坐标。S1403. Determine the coordinates of the effective projection area of the new optical machine image according to the picture correction function associated with the total moving distance, the frame coordinates of the frame of the simulated imaging element, and the preset display scale.
其中,与预设显示比例关联的画面校正函数是指上述计算投影光机中新光机图像的有效投影区域)四点坐标的计算公式,此处,以预设显示比例为16:9为例,可将x=(移动总距离/1080)*9作为已知数,带入计算投影光机中新光机图像的有效投影区域)四点坐标的计算公式,从而计算出新光机图像的有效投影区域的坐标。Wherein, the picture correction function associated with the preset display ratio refers to the calculation formula for calculating the four-point coordinates of the effective projection area of the new light machine image in the projection light machine. Here, taking the preset display ratio of 16:9 as an example, X=(total moving distance/1080)*9 can be used as a known number, which can be brought into the calculation formula of calculating the four-point coordinates of the effective projection area of the new light machine image in the projection light machine, thereby calculating the effective projection area of the new light machine image coordinate of.
S1404、依照有效投影区域的坐标,更新投影画面对应光机图像,得到用于校正投影画面的新光机图像。S1404. According to the coordinates of the effective projection area, update the optomechanical image corresponding to the projected picture, and obtain a new optomechanical image for correcting the projected picture.
在一种可实现的方式中,可通过对有效投影区域中各像素的像素值进行对应调整,也即更新投影画面对应光机图像中各像素的像素值,以使得由原来的光机图像成像变换为由新光机图像成像, 以得到用于校正投影画面的新光机图像。In an achievable manner, the pixel values of each pixel in the effective projection area can be correspondingly adjusted, that is, the pixel values of each pixel in the corresponding opto-mechanical image of the projection screen can be updated, so that the image formed by the original opto-mechanical image It is transformed into imaging by the new optical machine image to obtain the new optical machine image for correcting the projected picture.
将通过如下实施例具体讲解,如何根据移动总距离、模拟成像元件外框的外框坐标和画面校正函数,确定新光机图像的有效投影区域的坐标。The following examples will be used to specifically explain how to determine the coordinates of the effective projection area of the new optical machine image according to the total moving distance, the frame coordinates of the frame of the simulated imaging element, and the screen correction function.
可选地,继续参考图11,梯形校正为全自动梯形校正,有效投影区域的区域形状为直角梯形,有效投影区域A2B2CD包括与投影画面中第一顶点存在映射关系的第一有效投影顶点A2,以及与第一有效投影顶点构成直角梯形斜边的第二有效投影顶点B2;第一有效投影顶点的坐标为A2(x1,d1),第二有效投影顶点的坐标为B2(x2,d2);在上述步骤S1403:根据移动总距离、模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定新光机图像的有效投影区域的坐标,包括:Optionally, continuing to refer to FIG. 11 , the trapezoidal correction is fully automatic trapezoidal correction, the area shape of the effective projection area is a right-angled trapezoid, and the effective projection area A2B2CD includes the first effective projection vertex A2 that has a mapping relationship with the first vertex in the projection screen, And the second effective projection vertex B2 that forms the hypotenuse of a right-angled trapezoid with the first effective projection vertex; the coordinates of the first effective projection vertex are A2 (x1, d1), and the coordinates of the second effective projection vertex are B2 (x2, d2); In the above step S1403: according to the picture correction function associated with the total moving distance, the outer frame coordinates of the simulated imaging component frame and the preset display ratio, determine the coordinates of the effective projection area of the new optical machine image, including:
S1601、获取通过全自动梯形校正算法与快捷校正算法计算第二有效投影顶点横坐标的差异函数;快捷校正算法与画面校正函数关联。S1601. Acquire a difference function for calculating the abscissa of the second effective projection vertex through the automatic trapezoidal correction algorithm and the shortcut correction algorithm; the shortcut correction algorithm is associated with the image correction function.
需要说明的是,当用户使用梯形校正后进入“快捷梯形校正模式”,会根据投影画面对应的光机图像的第一投影顶点的纵坐标A1_y值,计算出第二投影顶点的横坐标B2_x值,但是,因为“梯形校正”的计算方法和“快捷梯形校正”的计算方法不同,导致计算出的B2_x值会有一定的差值,所以直接根据移动总距离、模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定新光机图像的有效投影区域的坐标,会使得到的校正后的投影画面存在画面突变的问题。It should be noted that when the user enters the “Quick Keystone Correction Mode” after using keystone correction, the abscissa B2_x value of the second projected vertex will be calculated according to the ordinate A1_y value of the first projected vertex of the optical-mechanical image corresponding to the projected screen , but because the calculation method of "keystone correction" is different from the calculation method of "quick keystone correction", the calculated B2_x value will have a certain difference, so the outer frame of the outer frame of the simulated imaging component is directly based on the total moving distance The picture correction function associated with the coordinates and the preset display ratio determines the coordinates of the effective projection area of the Xinguangji image, which will cause the problem of sudden change in the corrected projection picture.
因此,在本实施例中,为了解决上述存在的画面突变问题,本申请提出可以通过多次实验拟合方式,获取通过全自动梯形校正算法与快捷校正算法计算第二有效投影顶点横坐标的差异函数ΔBx=f(Ay)。Therefore, in this embodiment, in order to solve the above-mentioned screen mutation problem, this application proposes that the difference between the abscissa of the second effective projection vertex calculated by the automatic trapezoidal correction algorithm and the shortcut correction algorithm can be obtained through multiple experimental fitting methods The function ΔBx=f(Ay).
S1602、获取光机图像中与第一顶点存在映射关系的第一投影顶点的坐标,第一投影顶点的坐标为A1(x0,y0)。S1602. Acquire coordinates of a first projected vertex in the optomechanical image that has a mapping relationship with the first vertex, where the coordinates of the first projected vertex are A1 (x0, y0).
S1603、基于第一投影顶点的纵坐标和差异函数,确定当前通过全自动梯形校正算法与快捷校正算法计算第二有效投影顶点横坐标的差异值。S1603. Based on the ordinate of the first projected vertex and the difference function, determine the difference value of the abscissa of the second effective projected vertex currently calculated by the automatic keystone correction algorithm and the shortcut correction algorithm.
可选地,可以基于光机图像中的第一投影顶点的纵坐标A1_y和差异函数ΔBx=f(Ay),计算得到第二有效投影顶点横坐标的差异值ΔB2_x。Optionally, based on the ordinate A1_y of the first projected vertex in the optomechanical image and the difference function ΔBx=f(Ay), the difference value ΔB2_x of the abscissa of the second effective projected vertex can be calculated.
S1604、根据移动总距离、模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定第二有效投影顶点横坐标的计算坐标。S1604. Determine the calculation coordinates of the abscissa of the second effective projection vertex according to the image correction function associated with the total moving distance, the frame coordinates of the frame of the simulated imaging element, and the preset display scale.
可选地,可以根据移动总距离、模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,进一步地计算得到第二有效投影顶点B2的横坐标的计算坐标,记作B2_cx。Optionally, the calculated coordinates of the abscissa of the second effective projection vertex B2 can be further calculated according to the picture correction function associated with the total moving distance, the frame coordinates of the frame of the simulated imaging element, and the preset display ratio, denoted as B2_cx .
S1605、依照第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。S1605. Determine the coordinates of the second effective projection vertex according to the calculated coordinates of the abscissa of the second effective projection vertex and the difference value between the abscissa of the second effective projection vertex.
在本实施例中,可以将第二有效投影顶点横坐标的计算坐标B2_c x和第二有效投影顶点横坐标的差异值ΔB2_x相加,计算得到第二有效投影顶点的坐标B2_x,即B2_x=B2_c x+ΔB2_x。In this embodiment, the calculated coordinate B2_cx of the abscissa of the second effective projection vertex and the difference value ΔB2_x of the abscissa of the second effective projection vertex can be added to calculate the coordinate B2_x of the second effective projection vertex, that is, B2_x=B2_c x+ΔB2_x.
图12为本申请实施例提供的全自动梯形校正算法下第一投影顶点的纵坐标和第二有效投影顶点横坐标的第一拟合函数的示意图,图13为本申请实施例提供的快捷校正算法下第一投影顶点的纵坐标和第二有效投影顶点横坐标的第二拟合函数的示意图,可选地,在上述步骤S1601:获取通过全自动梯形校正算法与快捷校正算法计算第二有效投影顶点横坐标的差异函数之前,该方法还包括:Figure 12 is a schematic diagram of the first fitting function of the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the fully automatic keystone correction algorithm provided by the embodiment of the present application, and Figure 13 is a quick correction provided by the embodiment of the present application A schematic diagram of the second fitting function of the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the algorithm. Optionally, in the above step S1601: obtain the second effective keystone correction algorithm and shortcut correction algorithm to calculate the second effective Before projecting the difference function of the abscissa of the vertices, the method also includes:
S1701、获取全自动梯形校正算法下第一投影顶点的纵坐标和第二有效投影顶点横坐标的第一拟合函数。S1701. Obtain the first fitting function of the ordinate of the first projection vertex and the abscissa of the second effective projection vertex under the automatic keystone correction algorithm.
在本实施例中,可以通过实验的方法获取若干台机器在与墙呈各个角度时的“AK”校正模式下多组(Ay、Bx)数据,使得可以拟合得到如图13所示的第一投影顶点的纵坐标和第二有效投影顶点横坐标的第一拟合函数B2_x=f1(A1_y)。In this embodiment, multiple sets of (Ay, Bx) data in the "AK" correction mode of several machines at various angles to the wall can be obtained through experiments, so that the first data shown in Figure 13 can be obtained by fitting. The first fitting function B2_x=f1(A1_y) of the ordinate of a projection vertex and the abscissa of a second effective projection vertex.
S1702、获取快捷校正算法下第一投影顶点的纵坐标和第二有效投影顶点横坐标的第二拟合函数。S1702. Obtain the second fitting function of the ordinate of the first projection vertex and the abscissa of the second effective projection vertex under the shortcut correction algorithm.
在本实施例中,并通过采用上述相同的实验的方法,采集若干台机器在与墙呈各个角度时的“快捷校正算法”校正模式下,得到如图14所示的第一投影顶点的纵坐标和第二有效投影顶点横坐标的第一拟合函数B2_x=f2(A1_y)。In this embodiment, and by adopting the above-mentioned same experimental method, several machines are collected at various angles to the wall in the "shortcut correction algorithm" correction mode, and the longitudinal direction of the first projected vertex as shown in Figure 14 is obtained. Coordinates and the first fitting function B2_x=f2(A1_y) of the abscissa of the second effective projection vertex.
S1703、基于第一拟合函数和第二拟合函数,得到计算第二有效投影顶点横坐标的差异函数。S1703. Based on the first fitting function and the second fitting function, obtain a difference function for calculating the abscissa of the second effective projection vertex.
在上述实施例的基础上,可以将第一拟合函数B2_x=f1(A1_y)和第二拟合函数B2_x=f2(A1_y)作差,即可得到第二有效投影顶点横坐标的差异函数ΔB2_x=f1(A1_y)-f2(A1_y)。On the basis of the above-mentioned embodiment, the first fitting function B2_x=f1(A1_y) and the second fitting function B2_x=f2(A1_y) can be made a difference to obtain the difference function ΔB2_x of the abscissa of the second effective projection vertex =f1(A1_y)-f2(A1_y).
例如,得到的B2_x=f1(A1_y)的拟合函数可如下所示:f1(A1_y)=-5E-11x 5+7E-08x 4-4E-05x 3+0.0066x 2-1.7351x+3837.9。 For example, the obtained fitting function of B2_x=f1(A1_y) may be as follows: f1(A1_y)=-5E-11x 5 +7E-08x 4 -4E-05x 3 +0.0066x 2 -1.7351x+3837.9.
得到的第二拟合函数B2_x=f2(A1_y)的拟合函数可如下所示:f2(A1_y)=-4E-0.6x 3-0.0002x 2-1.0825x+3834.3。 The obtained fitting function of the second fitting function B2_x=f2(A1_y) may be as follows: f2(A1_y)=-4E-0.6x 3 -0.0002x 2 -1.0825x+3834.3.
使得在进入“快捷梯形校正”模式时,根据A1_y计算出B2_cx和ΔB2_x,得到补偿后的第二有效投影顶点的坐标B2_x=B2_cx+ΔB2_x,并基于补偿后的第二有效投影顶点的坐标B2_x进行快捷梯形校正,以得到校正后的投影画面,这样,使得到的校正后的投影画面的突变减小了,并且只存在B、C点横向突变,A点和D点的突变一般在十几个像素(4K分辨率)之内,有效解决了校正后的投影画面存在突变的问题。When entering the "quick keystone correction" mode, calculate B2_cx and ΔB2_x according to A1_y, obtain the coordinates B2_x=B2_cx+ΔB2_x of the second effective projection vertex after compensation, and perform the calculation based on the coordinate B2_x of the second effective projection vertex after compensation Shortcut trapezoidal correction to obtain the corrected projection picture, in this way, the sudden change of the corrected projected picture is reduced, and there are only horizontal sudden changes at points B and C, and the sudden changes at points A and D are generally within a dozen Within the pixel (4K resolution), it effectively solves the problem of sudden changes in the corrected projection screen.
可选地,光机图像为四边形,在上述步骤S105:依照新光机图像进行投影,得到校正后的投影画面,包括:Optionally, the optical-mechanical image is a quadrilateral. In the above step S105: project according to the new optical-mechanical image to obtain a corrected projection image, including:
S2001、根据光机图像的顶点坐标、有效投影区域的坐标以及预设动画算法,生成与光机图像和新光机图像关联的动画图像。S2001. Generate an animation image associated with the optical-mechanical image and the new optical-mechanical image according to the vertex coordinates of the optical-mechanical image, the coordinates of the effective projection area, and a preset animation algorithm.
需要说明的是,上述提供的实施例,使用纯拟合的方法虽然可以减小了得到的校正后的投影画面的突变程度,但不能减小A点和D点的突变。It should be noted that, in the embodiments provided above, although the pure fitting method can reduce the degree of sudden change of the obtained corrected projection picture, it cannot reduce the sudden change of points A and D.
因此,在本申请中,提出根据上述获取到的投影图像对应的光机图像的顶点坐标、有效投影区域的坐标以及预设动画算法,生成与光机图像和新光机图像关联的动画图像,实现了在使用了拟合的基础上再加上动画的处理过程,使得在将光机图像切换到计算后新光机图像之间使用动画做出渐变效果,使得用户几乎感觉不到校正后的投影画面的突变,这样在用户调节投影画面时这样在用户调节画面时已经从光机图像切换到了“快捷校正”模式的画面了,在之后的调节不会再有突变。Therefore, in this application, it is proposed to generate an animated image associated with the optical-mechanical image and the new optical-mechanical image based on the vertex coordinates of the optical-mechanical image corresponding to the projection image obtained above, the coordinates of the effective projection area, and the preset animation algorithm, so as to realize In addition to the use of fitting and animation processing, the animation is used to make a gradient effect between switching the optical-mechanical image to the calculated new optical-mechanical image, so that the user can hardly feel the corrected projection screen In this way, when the user adjusts the projection screen, the user has already switched from the optical-mechanical image to the "quick correction" mode screen when the user adjusts the screen, and there will be no sudden change in subsequent adjustments.
S2002、依照动画图像进行投影,得到校正后的投影画面。S2002. Perform projection according to the animation image to obtain a corrected projection image.
在上述实施例的基础上,可以依照上述生成的动画图像进行投影,由于该动画图像是由多帧图像组成,这样使得动画图像中的各帧图像之间按照一定间隔进行投影,从而使得在将光机图像切换至新光机图像时,用户几乎感觉不到校正后的投影画面的突变,有效减小用户看到的投影画面的突变情况,从而提升了用户的观影体验。On the basis of the above-mentioned embodiments, projection can be performed according to the animation image generated above. Since the animation image is composed of multiple frame images, each frame image in the animation image is projected at a certain interval, so that in the future When the optical-mechanical image is switched to the new optical-mechanical image, the user can hardly feel the sudden change of the corrected projected picture, which effectively reduces the sudden change of the projected picture seen by the user, thereby improving the user's viewing experience.
将通过如下实施例具体讲解,如何依照第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。The following embodiments will be used to specifically explain how to determine the coordinates of the second effective projection vertex according to the difference between the calculated coordinates of the abscissa of the second effective projection vertex and the abscissa of the second effective projection vertex.
可选地,光机图像为四边形,在上述步骤S1605:依照第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标,包括:Optionally, the optomechanical image is a quadrilateral. In the above step S1605: according to the calculated coordinates of the abscissa of the second effective projection vertex and the difference value between the abscissa of the second effective projection vertex, determine the coordinates of the second effective projection vertex, including:
S2101、获取目标修正系数。S2101. Obtain a target correction coefficient.
值得说明的是,目标修正系数是根据光机图像的第二投影顶点的横坐标计算得到的,也就是说,在用户首次进入快捷便捷校正模式时,就已经预先得到了目标修正系数,在之后的调节中目标修正系数不会改变。It is worth noting that the target correction coefficient is calculated based on the abscissa of the second projected vertex of the optical-mechanical image, that is to say, when the user enters the quick and convenient correction mode for the first time, the target correction coefficient has been obtained in advance. The target correction factor will not change during the adjustment.
在本实施例中,可以通过如下计算方式获取到目标修正系数。In this embodiment, the target correction coefficient can be obtained through the following calculation method.
可选地,上述获取目标修正系数的步骤,包括:Optionally, the above step of obtaining the target correction coefficient includes:
S2201、依照第二距离、以及预设的光机图像的顶点与初始投影画面中顶点的映射计算公式,计算得到光机图像中第二投影顶点横坐标的计算坐标。S2201. Calculate the calculated coordinates of the abscissa of the second projected vertex in the optomechanical image according to the second distance and the preset calculation formula for mapping between the vertices of the optomechanical image and the vertices in the initial projection image.
可选地,可以根据上述图11中所示的初始投影画面中第一顶点a1对应初始顶点a移动的第二 距离aa1、以及上述提到的新光机图像的4点坐标的计算公式,计算得到光机图像中第二投影顶点横坐标的计算坐标B1_cx。Optionally, it can be calculated according to the calculation formula of the first vertex a1 corresponding to the second distance aa1 moved by the initial vertex a in the initial projection picture shown in FIG. 11 and the above-mentioned four-point coordinates of the new optical machine image Calculated coordinate B1_cx of the abscissa of the second projected vertex in the optomechanical image.
如下是新光机图像的4点坐标中a”的计算公式计算公式:The following is the calculation formula of a" in the 4-point coordinates of the Xinguang Machine image:
Figure PCTCN2022083560-appb-000032
Figure PCTCN2022083560-appb-000032
Figure PCTCN2022083560-appb-000033
Figure PCTCN2022083560-appb-000033
对于本实施例,类似于上述公式的中Px就是第二距离aa1,a”_x也就是第二投影顶点横坐标的计算坐标B1_cx,也即,上述公式的中Px是已知量,求a”_x的值,即可计算得到光机图像中第二投影顶点横坐标的计算坐标B1_cx。For this embodiment, Px in the above-mentioned formula is the second distance aa1, and a"_x is the calculated coordinate B1_cx of the abscissa of the second projected vertex, that is, Px in the above-mentioned formula is a known quantity, and a" The value of _x can be calculated to obtain the calculated coordinate B1_cx of the abscissa of the second projected vertex in the optical-mechanical image.
S2202、根据第二投影顶点横坐标的计算坐标、光机图像中第二投影顶点的实际横坐标、以及第二投影顶点横坐标的差异值,计算得到目标修正系数。S2202. Calculate the target correction coefficient according to the calculated coordinates of the abscissa of the second projected vertex, the actual abscissa of the second projected vertex in the optomechanical image, and the difference value of the abscissa of the second projected vertex.
其中,可以根据第二距离、以及预设的光机图像的顶点与初始投影画面中顶点的映射计算公式,计算得到初始投影画面对应的初始光机图像中第一初始投影顶点,然后,根据初始光机图像中第一初始投影顶点、以及校正后的投影画面对应的有效投影区域中第二有效投影顶点横坐标的差异函数,计算得到光机图像中第二投影顶点横坐标的差异值ΔB1_x。Wherein, the first initial projected vertex in the initial optical-mechanical image corresponding to the initial projected picture can be calculated according to the second distance and the preset mapping calculation formula between the vertex of the optical-mechanical image and the vertex in the initial projected picture, and then, according to the initial The difference function of the abscissa of the first initial projection vertex in the optomechanical image and the abscissa of the second effective projection vertex in the effective projection area corresponding to the corrected projection picture is calculated to obtain the difference value ΔB1_x of the abscissa of the second projection vertex in the optomechanical image.
在本实施例中,可以先将光机图像中第二投影顶点的实际横坐标B1_x和第二投影顶点横坐标的计算坐标B1_cx作差,计算得到光机图像中第二投影顶点的实际横坐标B1_x_raw和计算坐标B1_cx的偏差;然后,再计算“光机图像中第二投影顶点的实际横坐标B1_x和计算坐标B1_cx”的偏差与第二投影顶点横坐标的差异值ΔB1_x的比值,将该比值称为目标修正系数,也可记作:correct_factor=(B1_x_raw-B1_cx)/ΔB1_x。In this embodiment, the actual abscissa B1_x of the second projection vertex in the optical-mechanical image and the calculated coordinate B1_cx of the abscissa of the second projection vertex can be calculated to obtain the actual abscissa of the second projection vertex in the optical-mechanical image The deviation between B1_x_raw and the calculated coordinate B1_cx; then, calculate the ratio of the deviation of "the actual abscissa B1_x and the calculated coordinate B1_cx of the second projected vertex in the optical-mechanical image" to the difference value ΔB1_x of the second projected vertex's abscissa, and the ratio It is called the target correction factor, and can also be written as: correct_factor=(B1_x_raw-B1_cx)/ΔB1_x.
其中,correct_factor是目标修正系数。Among them, correct_factor is the target correction factor.
S2102、基于目标修正系数、第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。S2102. Determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
在本实施例中,为了完全消除得到的校正后的投影画面发生突变,还可以通过如下方式确定第二有效投影顶点的坐标。In this embodiment, in order to completely eliminate the abrupt change of the obtained corrected projection picture, the coordinates of the second valid projection vertex may also be determined in the following manner.
将通过如下实施例具体讲解,如何基于目标修正系数、第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。The following embodiments will specifically explain how to determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
可选地,上述基于目标修正系数、第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标,包括:Optionally, determining the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the second effective projection vertex abscissa and the difference value of the second effective projection vertex abscissa includes:
S2301、检测目标修正系数是否大于或者等于修正阈值。S2301. Detect whether the target correction coefficient is greater than or equal to a correction threshold.
其中,修正阈值是预设根据校正经验设定的一个阈值。Wherein, the correction threshold is a preset threshold set according to correction experience.
S2302、若是,则触发执行基于目标修正系数、第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。S2302. If yes, trigger the execution of determining the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
值得注意的是,如果光机图像是AK校正之后的图像,则计算出的目标修正系数是不会超过修 正阈值的,只有当用户使用手动方式校正投影画面幅度过大时,才会出现超过阈值的情况。It is worth noting that if the optical-mechanical image is the image after AK correction, the calculated target correction coefficient will not exceed the correction threshold. Only when the user manually corrects the projected screen with an excessively large amplitude will the threshold be exceeded. Case.
因此,在本申请中,提出若检测到上述计算得到的目标修正系数correct_factor大于或者等于修正阈值,则触发执行基于目标修正系数、第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,以进一步地确定第二有效投影顶点的坐标B2_x,使得可以使用目标修正系数对第二有效投影顶点的坐标进行修正,可以有效解决快捷梯形校正兼容AK后画面突变的问题。Therefore, in this application, it is proposed that if it is detected that the calculated target correction coefficient correct_factor is greater than or equal to the correction threshold, then triggering the execution of the calculation based on the target correction coefficient, the second effective projection vertex abscissa and the second effective projection vertex abscissa The difference value of the coordinates is used to further determine the coordinates B2_x of the second effective projection vertex, so that the coordinates of the second effective projection vertex can be corrected using the target correction coefficient, which can effectively solve the problem of screen mutation after the shortcut keystone correction is compatible with AK.
通过使用本实施例,当用户在进行AK校正后或者在手动微调AK画面后使用“快捷梯形校正”完全没有画面突变,有效解决了校正后的投影画面突变的问题。By using this embodiment, when the user performs AK correction or manually fine-tunes the AK picture and uses "quick keystone correction", there is no picture mutation at all, which effectively solves the problem of the projected picture change after correction.
当手动校正画面幅度过大,校正后的投影画面会有部分突变,用户手动调节幅度过大,DMD上的光机图像是随机的,为了能在光机图像上进行校正,这种程度的突变是不可避免的。When the range of the manual correction screen is too large, the corrected projection screen will have a partial mutation. If the user manually adjusts the range too large, the optical-mechanical image on the DMD is random. In order to correct the optical-mechanical image, this degree of mutation It is inevitable.
在另一种情况下,若检测目标修正系数小于修正阈值,则触发执行基于第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。In another case, if the detection target correction coefficient is less than the correction threshold, trigger execution based on the difference between the calculated coordinates of the abscissa of the second effective projection vertex and the abscissa of the second effective projection vertex, and determine the coordinates of the second effective projection vertex .
其中,在实施上述提供的实施例的过程中,通常可能出现以下现象:左侧投画面,当AK避障或者手动调节画面幅度过于靠右时,使用“快捷梯形校正”向右一直调整画面,光机图像中的A点一直沿着模拟成像元件外框左边缘向上移动的过程中,B点先沿着上边移动到右上点后保持不动,当A点沿着模拟成像元件外框的上边缘向右移动时,B点再向下移动。Among them, in the process of implementing the above-mentioned embodiments, the following phenomena may usually occur: when the screen is projected on the left, when the AK avoids obstacles or manually adjusts the screen range too far to the right, use "quick keystone correction" to adjust the screen to the right all the time, When point A in the optomechanical image moves upward along the left edge of the analog imaging component frame, point B first moves along the upper edge to the upper right point and then remains stationary. When point A moves along the upper edge of the analog imaging component frame, When the edge moves to the right, point B moves down again.
图14为本申请实施例提供的一种投影画面校正过程中光机图像的变化示意图。如图14所示,当使用AK避障或者手动调节画面幅度过大时,光机图像过于靠近右侧,导致计算出的模拟成像元件外框部分超出了真实DMD的物理边界。FIG. 14 is a schematic diagram of changes in an opto-mechanical image during the correction process of a projected picture provided by an embodiment of the present application. As shown in Figure 14, when AK is used for obstacle avoidance or the manual adjustment of the screen is too large, the optomechanical image is too close to the right side, causing the calculated frame of the simulated imaging component to exceed the physical boundary of the real DMD.
光机图像中的B点本应该在模拟成像元件外框的上边界向右移动到B'点后向下移动,但由于Bx超出了边界,所以B点会先不动,当计算出的Bx等于B'x后B点再向下移动。Point B in the optical-mechanical image should have moved down after the upper boundary of the simulated imaging element frame moved to the right to point B', but because Bx exceeds the boundary, point B will not move first, when the calculated Bx After equal to B'x, point B will move down again.
因此,本申请提出的解决办法:在Bx超出边界后的画面的比例都是失真的,需要限制Bx的值,当Bx超出边界时停止后面的计算,使用户不能继续向右调节画面,可以有效解决手动调节画面幅度过大后,使用快捷梯形校正画面异常的问题。Therefore, the solution proposed by this application: the ratio of the picture after Bx exceeds the boundary is all distorted, and the value of Bx needs to be limited, and when Bx exceeds the boundary, stop the calculation behind, so that the user cannot continue to adjust the picture to the right, which can be effective Solve the problem that the shortcut keystone correction screen is abnormal after manual adjustment of the screen range is too large.
下述对用以执行本申请所提供的投影校正方法的装置、电子设备及存储介质等进行说明,其具体的实现过程以及技术效果参见上述,下述不再赘述。The following describes the device, electronic equipment, and storage media for implementing the projection correction method provided by the present application. The specific implementation process and technical effects refer to the above, and will not be repeated below.
本申请实施例提供的一种投影校正装置实现的功能对应上述方法执行的步骤。该装置可以理解为上述的投影光机,或者服务器,或服务器的处理器,也可以理解为独立于上述服务器或处理器之外的在服务器控制下实现本申请功能的组件,可选地,该装置可包括:获取模块2500、响应模块2501、确定模块2502、投影模块2503。The function implemented by the projection correction device provided in the embodiment of the present application corresponds to the steps performed by the above method. The device can be understood as the above-mentioned projection light machine, or server, or the processor of the server, and can also be understood as a component that realizes the functions of this application under the control of the server independent of the above-mentioned server or processor. Optionally, the The device may include: an acquisition module 2500 , a response module 2501 , a determination module 2502 , and a projection module 2503 .
获取模块2500,用于在梯形校正后的投影校正页面中,获取针对投影画面的第一顶点的第一调整操作,第一调整操作用于指示:将第一顶点沿着第一方向移动第一距离;The obtaining module 2500 is configured to obtain a first adjustment operation for the first vertex of the projected picture on the projection correction page after keystone correction, the first adjustment operation is used to indicate: move the first vertex along the first direction by a first distance;
响应模块2501,用于响应第一调整操作,获取投影画面对应光机图像的顶点坐标;Response module 2501, configured to respond to the first adjustment operation and obtain the vertex coordinates of the corresponding optomechanical image of the projection screen;
确定模块2502,用于依照光机图像的顶点坐标,确定光机图像对应的模拟成像元件外框、以及模拟成像元件外框的外框坐标;其中,模拟成像元件外框为矩形框;基于第一距离、模拟成像元件外框的外框坐标和画面校正函数,确定用于校正投影画面的新光机图像;The determining module 2502 is used to determine the outer frame of the simulated imaging component corresponding to the optomechanical image and the outer frame coordinates of the simulated imaging component frame according to the vertex coordinates of the optomechanical image; wherein, the outer frame of the simulated imaging component is a rectangular frame; based on the first 1. distance, frame coordinates of the frame of the simulated imaging element and a picture correction function, to determine the new optical machine image used to correct the projected picture;
投影模块2503,用于依照新光机图像进行投影,得到校正后的投影画面。The projection module 2503 is configured to perform projection according to the new optical machine image to obtain a corrected projection picture.
可选地,确定模块2502,还用于:Optionally, the determination module 2502 is also used to:
根据光机图像的顶点坐标,计算模拟成像元件外框的边长参数;According to the vertex coordinates of the optical-mechanical image, calculate the side length parameter of the frame of the analog imaging component;
根据模拟成像元件外框的边长参数,计算模拟成像元件外框的顶点坐标。According to the side length parameter of the frame of the simulated imaging component, the vertex coordinates of the frame of the simulated imaging component are calculated.
可选地,确定模块2502,还用于:Optionally, the determination module 2502 is also used to:
根据光机图像的顶点坐标,确定光机图像对应的外接矩形,其中,光机图像为四边形、外接矩形为四边形匹配的矩形;According to the vertex coordinates of the optical-mechanical image, determine the circumscribing rectangle corresponding to the opto-mechanical image, wherein the opto-mechanical image is a quadrilateral, and the circumscribing rectangle is a rectangle matching the quadrilateral;
将外接矩形的高度参数确定为模拟成像元件外框的高度参数;Determining the height parameter of the circumscribed rectangle as the height parameter of the frame of the simulated imaging component;
根据模拟成像元件外框的高度参数、以及预设显示比,计算模拟成像元件外框的宽度参数。According to the height parameter of the frame of the simulated imaging component and the preset display ratio, the width parameter of the frame of the simulated imaging component is calculated.
可选地,光机图像为四边形,获取模块,还用于获取四边形的指定边两顶点的纵坐标;Optionally, the optomechanical image is a quadrilateral, and the acquisition module is also used to acquire the ordinates of the two vertices of the specified side of the quadrilateral;
确定模块,还用于根据指定边两顶点的纵坐标,确定模拟成像元件外框的延伸方向。The determination module is further configured to determine the extension direction of the frame of the analog imaging component according to the ordinates of the two vertices of the specified side.
可选地,确定模块2502,还用于:Optionally, the determination module 2502 is also used to:
获取第一顶点相对于初始投影画面中第一顶点对应初始顶点移动的第二距离,初始投影画面为梯形校正前的投影画面;Obtaining the second distance that the first vertex moves relative to the initial vertex corresponding to the first vertex in the initial projection picture, and the initial projection picture is the projection picture before trapezoidal correction;
基于第一距离和第二距离确定移动总距离;determining a total distance moved based on the first distance and the second distance;
根据移动总距离、模拟成像元件外框的外框坐标和画面校正函数,确定新光机图像的有效投影区域的坐标;Determine the coordinates of the effective projection area of the new optical machine image according to the total moving distance, the outer frame coordinates of the simulated imaging component outer frame and the picture correction function;
依照有效投影区域的坐标,更新投影画面对应光机图像,得到用于校正投影画面的新光机图像。According to the coordinates of the effective projection area, the optomechanical image corresponding to the projected picture is updated to obtain a new optomechanical image for correcting the projected picture.
可选地,梯形校正为全自动梯形校正,有效投影区域的区域形状为直角梯形,有效投影区域包括与第一顶点存在映射关系的第一有效投影顶点,以及与第一有效投影顶点构成直角梯形斜边的第二有效投影顶点;第一有效投影顶点的坐标为(x1,d1),第二有效投影顶点的坐标为(x2,d2);Optionally, the trapezoidal correction is fully automatic trapezoidal correction, the area shape of the effective projection area is a right-angled trapezoid, the effective projection area includes a first effective projection vertex that has a mapping relationship with the first vertex, and forms a right-angled trapezoid with the first effective projection vertex The second effective projection vertex of the hypotenuse; the coordinates of the first effective projection vertex are (x1, d1), and the coordinates of the second effective projection vertex are (x2, d2);
确定模块2502,还用于:The determining module 2502 is also used for:
获取通过全自动梯形校正算法与快捷校正算法计算第二有效投影顶点横坐标的差异函数;快捷校正算法与画面校正函数关联;Obtain the difference function of calculating the abscissa of the second effective projection vertex through the automatic keystone correction algorithm and the shortcut correction algorithm; the shortcut correction algorithm is associated with the picture correction function;
获取光机图像中与第一顶点存在映射关系的第一投影顶点的坐标,第一投影顶点的坐标为(x0,d0);Obtain the coordinates of the first projected vertex in the optical-mechanical image that has a mapping relationship with the first vertex, and the coordinates of the first projected vertex are (x0, d0);
基于第一投影顶点的纵坐标和差异函数,确定当前通过全自动梯形校正算法与快捷校正算法计算第二有效投影顶点横坐标的差异值;Based on the ordinate and the difference function of the first projected vertex, determine the difference value of the abscissa of the second effective projected vertex currently calculated by the fully automatic trapezoidal correction algorithm and the shortcut correction algorithm;
根据移动总距离、模拟成像元件外框的外框坐标和画面校正函数,确定第二有效投影顶点横坐标的计算坐标;Determine the calculated coordinates of the abscissa of the second effective projection vertex according to the total moving distance, the outer frame coordinates of the simulated imaging element outer frame and the picture correction function;
依照第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。The coordinates of the second effective projection vertex are determined according to the calculated coordinates of the abscissa of the second effective projection vertex and the difference value between the abscissa of the second effective projection vertex.
可选地,获取通过全自动梯形校正算法与快捷校正算法计算第二有效投影顶点横坐标的差异函数之前,获取模块2500,还用于:Optionally, before obtaining the difference function of calculating the abscissa of the second effective projection vertex through the automatic keystone correction algorithm and the shortcut correction algorithm, the obtaining module 2500 is also used for:
获取全自动梯形校正算法下第一投影顶点的纵坐标和第二有效投影顶点横坐标的第一拟合函数;获取快捷校正算法下第一投影顶点的纵坐标和第二有效投影顶点横坐标的第二拟合函数;基于第一拟合函数和第二拟合函数,得到计算第二有效投影顶点横坐标的差异函数。Obtain the first fitting function of the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the automatic keystone correction algorithm; obtain the ordinate of the first projected vertex and the abscissa of the second effective projected vertex under the shortcut correction algorithm A second fitting function: based on the first fitting function and the second fitting function, a difference function for calculating the abscissa of the second effective projection vertex is obtained.
可选地,光机图像为四边形,投影模块2503,还用于:Optionally, the optomechanical image is a quadrilateral, and the projection module 2503 is also used for:
根据光机图像的顶点坐标、有效投影区域的坐标以及预设动画算法,生成与光机图像和新光机图像关联的动画图像;According to the vertex coordinates of the optical-mechanical image, the coordinates of the effective projection area and the preset animation algorithm, an animation image associated with the optical-mechanical image and the new optical-mechanical image is generated;
依照动画图像进行投影,得到校正后的投影画面。Project according to the animation image to obtain the corrected projection screen.
可选地,获取模块2500,还用于获取目标修正系数;Optionally, the obtaining module 2500 is also used to obtain the target correction coefficient;
确定模块2502,还用于基于目标修正系数、第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。The determination module 2502 is further configured to determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
可选地,确定模块2502,还用于:Optionally, the determination module 2502 is also used to:
检测目标修正系数是否大于或者等于修正阈值;Detect whether the target correction coefficient is greater than or equal to the correction threshold;
若是,则触发执行基于目标修正系数、第二有效投影顶点横坐标的计算坐标和第二有效投影顶点横坐标的差异值,确定第二有效投影顶点的坐标。If so, trigger execution to determine the coordinates of the second effective projection vertex based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
可选地,获取模块2500,还用于:Optionally, acquire module 2500, also for:
依照第二距离、以及预设的光机图像的顶点与初始投影画面中顶点的映射计算公式,计算得到光机图像中第二投影顶点横坐标的计算坐标;According to the second distance and the preset calculation formula of mapping between the vertex of the optical-mechanical image and the vertex in the initial projection screen, the calculated coordinates of the abscissa of the second projected vertex in the optical-mechanical image are calculated;
根据第二投影顶点横坐标的计算坐标、光机图像中第二投影顶点的实际横坐标、以及第二投影顶点横坐标的差异值,计算得到目标修正系数。According to the calculated coordinates of the abscissa of the second projected vertex, the actual abscissa of the second projected vertex in the optomechanical image, and the difference value of the abscissa of the second projected vertex, the target correction coefficient is calculated.
可选地,获取模块2500,还用于:Optionally, acquire module 2500, also for:
根据光机图像中的第一投影顶点的纵坐标、预设的光机图像的顶点与初始投影画面中顶点的拟合函数,计算得到投影画面中第一顶点相对于初始投影画面中第一顶点对应初始顶点移动的第二距离。According to the ordinate of the first projection vertex in the optical-mechanical image, the fitting function between the preset vertex of the optical-mechanical image and the vertex in the initial projection image, calculate the first vertex in the projection image relative to the first vertex in the initial projection image The second distance that corresponds to the initial vertex movement.
上述装置用于执行前述实施例提供的方法,其实现原理和技术效果类似,在此不再赘述。The above-mentioned apparatus is used to execute the methods provided in the foregoing embodiments, and its implementation principles and technical effects are similar, and details are not repeated here.
以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,简称ASIC),或,一个或多个微处理器(digital singnal processor,简称DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,简称FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(Central Processing Unit,简称CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,简称SOC)的形式实现。The above modules may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), or, one or more microprocessors (digital singnal processor, DSP for short), or, one or more Field Programmable Gate Arrays (Field Programmable Gate Array, FPGA for short), etc. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, referred to as CPU) or other processors that can call program codes. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC for short).
上述模块可以经由有线连接或无线连接彼此连接或通信。有线连接可以包括金属线缆、光缆、混合线缆等,或其任意组合。无线连接可以包括通过LAN、WAN、蓝牙、ZigBee、或NFC等形式的连接,或其任意组合。两个或更多个模块可以组合为单个模块,并且任何一个模块可以分成两个或更多个单元。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考方法实施例中的对应过程,本申请中不再赘述。The above-mentioned modules may be connected or communicate with each other via a wired connection or a wireless connection. Wired connections may include metal cables, fiber optic cables, hybrid cables, etc., or any combination thereof. Wireless connections may include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, etc., or any combination thereof. Two or more modules can be combined into a single module, and any one module can be divided into two or more units. Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, which will not be repeated in this application.
需要说明的是,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,简称ASIC),或,一个或多个微处理器(Digital Singnal Processor,简称DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,简称FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(Central Processing Unit,简称CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上系统(System-on-a-chip,简称SOC)的形式实现。It should be noted that the above modules may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), or one or more micro Processor (Digital Singnal Processor, DSP for short), or one or more Field Programmable Gate Arrays (Field Programmable Gate Array, FPGA for short), etc. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, referred to as CPU) or other processors that can call program codes. For another example, these modules can be integrated together and implemented in the form of a System-on-a-chip (SOC for short).
本申请实施例提供一种电子设备,该装置可以集成于终端设备或者终端设备的芯片,该终端可以是具备数据处理功能的计算设备。An embodiment of the present application provides an electronic device, the apparatus may be integrated into a terminal device or a chip of the terminal device, and the terminal may be a computing device with a data processing function.
该装置包括:处理器2601、存储器2602。The device includes: a processor 2601 and a memory 2602 .
存储器2602用于存储程序,处理器2601调用存储器2602存储的程序,以执行上述方法实施例。具体实现方式和技术效果类似,这里不再赘述。The memory 2602 is used to store programs, and the processor 2601 invokes the programs stored in the memory 2602 to execute the foregoing method embodiments. The specific implementation manner and technical effect are similar, and will not be repeated here.
其中,存储器2602存储有程序代码,当程序代码被处理器2601执行时,使得处理器2601执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的投影校正方法中的各种步骤。Wherein, the memory 2602 stores program codes. When the program codes are executed by the processor 2601, the processor 2601 executes the projection correction method according to various exemplary embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification. various steps.
处理器2601可以是通用处理器,例如中央处理器(CPU)、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。The processor 2601 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
存储器2602作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。存储器可以包括至少一种类型的存储介质,例如可以包括闪存、硬盘、多媒体卡、卡型存储器、随机访问存储器(Random Access Memory,RAM)、静态随机访问存储器(Static Random Access Memory,SRAM)、可编程只读存储器(Programmable Read Only Memory,PROM)、只读存储器(Read Only Memory,ROM)、带电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性存储器、磁盘、光盘等等。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不 限于此。本申请实施例中的存储器2602还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。The memory 2602, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs and modules. The memory may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Magnetic Memory, Disk, discs and more. A memory is, but is not limited to, any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 2602 in the embodiment of the present application may also be a circuit or any other device capable of implementing a storage function, and is used for storing program instructions and/or data.
可选地,本申请还提供一种程序产品,例如计算机可读存储介质,包括程序,该程序在被处理器执行时用于执行上述方法实施例。Optionally, the present application further provides a program product, such as a computer-readable storage medium, including a program, and the program is used to execute the foregoing method embodiments when executed by a processor.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(英文:processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取存储器(英文:Random Access Memory,简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or a processor (English: processor) to execute the functions described in various embodiments of the present application. part of the method. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), magnetic disk or optical disc, etc. Various media that can store program code.

Claims (15)

  1. 一种投影校正方法,其特征在于,包括:A projection correction method, characterized in that it comprises:
    在梯形校正后的投影校正页面中,获取针对投影画面的第一顶点的第一调整操作,所述第一调整操作用于指示:将所述第一顶点沿着第一方向移动第一距离;On the projection correction page after keystone correction, a first adjustment operation for the first vertex of the projected picture is obtained, the first adjustment operation is used to indicate: move the first vertex along a first direction by a first distance;
    响应所述第一调整操作,获取所述投影画面对应光机图像的顶点坐标;Responding to the first adjustment operation, acquiring the vertex coordinates of the optomechanical image corresponding to the projection screen;
    依照所述光机图像的顶点坐标,确定所述光机图像对应的模拟成像元件外框、以及所述模拟成像元件外框的外框坐标;其中,所述模拟成像元件外框为矩形框;According to the vertex coordinates of the optomechanical image, determine the outer frame of the analog imaging element corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging element; wherein, the outer frame of the analog imaging element is a rectangular frame;
    基于所述第一距离、所述模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定用于校正所述投影画面的新光机图像;Determine a new optomechanical image for correcting the projected image based on the first distance, the frame coordinates of the frame of the simulated imaging element, and a frame correction function associated with a preset display scale;
    依照所述新光机图像进行投影,得到校正后的投影画面。The projection is performed according to the image of the new optical machine, and the corrected projection picture is obtained.
  2. 根据权利要求1所述的方法,其特征在于,所述依照所述光机图像的顶点坐标,确定所述光机图像对应的模拟成像元件外框、以及所述模拟成像元件外框的外框坐标,包括:The method according to claim 1, wherein, according to the vertex coordinates of the opto-mechanical image, the outer frame of the analog imaging component corresponding to the opto-mechanical image and the outer frame of the analog imaging component are determined coordinates, including:
    根据所述光机图像的顶点坐标,计算所述模拟成像元件外框的边长参数;According to the vertex coordinates of the optomechanical image, calculate the side length parameter of the frame of the analog imaging element;
    根据所述模拟成像元件外框的边长参数,计算所述模拟成像元件外框的顶点坐标。According to the side length parameter of the frame of the simulated imaging component, the vertex coordinates of the frame of the simulated imaging component are calculated.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述输入图像的顶点坐标,计算所述模拟成像元件外框的边长参数,包括:The method according to claim 2, wherein the calculation of the side length parameter of the frame of the simulated imaging element according to the vertex coordinates of the input image comprises:
    根据所述光机图像的顶点坐标,确定所述光机图像对应的外接矩形,其中,所述光机图像为四边形、所述外接矩形为所述四边形匹配的矩形;Determine a circumscribing rectangle corresponding to the optomechanical image according to the vertex coordinates of the optomechanical image, wherein the optomechanical image is a quadrilateral, and the circumscribing rectangle is a rectangle matching the quadrilateral;
    将所述外接矩形的高度参数确定为所述模拟成像元件外框的高度参数;determining the height parameter of the circumscribed rectangle as the height parameter of the frame of the simulated imaging element;
    根据所述模拟成像元件外框的高度参数、以及预设显示比,计算所述模拟成像元件外框的宽度参数。The width parameter of the analog imaging element frame is calculated according to the height parameter of the analog imaging element frame and the preset display ratio.
  4. 根据权利要求1所述的方法,其特征在于,所述光机图像为四边形,所述依照所述光机图像的顶点坐标,确定所述光机图像对应的模拟成像元件外框、以及所述模拟成像元件外框的外框坐标之前,还包括:The method according to claim 1, wherein the optomechanical image is a quadrilateral, and according to the vertex coordinates of the optomechanical image, the outer frame of the analog imaging element corresponding to the optomechanical image is determined, and the Before simulating the bounding box coordinates of the imaging component's bounding box, also include:
    获取所述四边形的指定边两顶点的纵坐标;Obtain the ordinates of the two vertices of the specified side of the quadrilateral;
    根据所述指定边两顶点的纵坐标,确定所述模拟成像元件外框的延伸方向。According to the vertical coordinates of the two vertices of the specified side, the extension direction of the frame of the analog imaging component is determined.
  5. 根据权利要求1所述的方法,其特征在于,所述基于所述第一距离、所述模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定用于校正所述投影画面的新光机图像,包括:The method according to claim 1, characterized in that, based on the first distance, the frame correction function associated with the frame coordinates of the frame of the simulated imaging element and the preset display ratio, it is determined to correct the Xinguang machine image of the projected screen, including:
    获取所述第一顶点相对于初始投影画面中所述第一顶点对应初始顶点移动的第二距离,所述初始投影画面为所述梯形校正前的投影画面;Obtaining a second distance of the first vertex moving relative to the initial vertex corresponding to the first vertex in the initial projection picture, the initial projection picture being the projection picture before the trapezoidal correction;
    基于所述第一距离和第二距离确定移动总距离;determining a total distance traveled based on the first distance and the second distance;
    根据所述移动总距离、所述模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定所述新光机图像的有效投影区域的坐标;Determine the coordinates of the effective projection area of the new optical machine image according to the picture correction function associated with the total moving distance, the frame coordinates of the frame of the simulated imaging element, and the preset display ratio;
    依照所述有效投影区域的坐标,更新所述投影画面对应光机图像,得到用于校正所述投影画面的新光机图像。According to the coordinates of the effective projection area, the optomechanical image corresponding to the projection picture is updated to obtain a new optomechanical image for correcting the projection picture.
  6. 根据权利要求5所述的方法,其特征在于,所述梯形校正为全自动梯形校正,所述有效投影区域的区域形状为直角梯形,所述有效投影区域包括与所述第一顶点存在映射关系的第一有效投影顶点,以及与所述第一有效投影顶点构成直角梯形斜边的第二有效投影顶点;所述第一有效投影顶点的坐标为(x1,d1),所述第二有效投影顶点的坐标为(x2,d2);The method according to claim 5, wherein the trapezoidal correction is fully automatic trapezoidal correction, the area shape of the effective projection area is a right-angled trapezoid, and the effective projection area includes a map that has a mapping relationship with the first vertex. The first effective projection vertex of , and the second effective projection vertex forming the hypotenuse of a right-angled trapezoid with the first effective projection vertex; the coordinates of the first effective projection vertex are (x1, d1), and the second effective projection The coordinates of the vertex are (x2, d2);
    所述根据所述移动总距离、所述模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定所述新光机图像的有效投影区域的坐标,包括:The determination of the coordinates of the effective projection area of the new optical machine image according to the picture correction function associated with the total moving distance, the frame coordinates of the frame of the simulated imaging element and the preset display ratio includes:
    获取通过全自动梯形校正算法与快捷校正算法计算所述第二有效投影顶点横坐标的差异函数;所述快捷校正算法与所述预设显示比例关联的画面校正函数关联;Obtaining the difference function of calculating the abscissa of the second effective projection vertex through the automatic trapezoidal correction algorithm and the shortcut correction algorithm; the shortcut correction algorithm is associated with the picture correction function associated with the preset display ratio;
    获取所述光机图像中与所述第一顶点存在映射关系的第一投影顶点的坐标,所述第一投影顶点 的坐标为(x0,d0);Obtain the coordinates of the first projected vertex in the optomechanical image that has a mapping relationship with the first vertex, and the coordinates of the first projected vertex are (x0, d0);
    基于所述第一投影顶点的纵坐标和所述差异函数,确定当前通过全自动梯形校正算法与快捷校正算法计算所述第二有效投影顶点横坐标的差异值;Based on the ordinate of the first projected vertex and the difference function, determine the difference value of the abscissa of the second effective projected vertex currently calculated by the fully automatic keystone correction algorithm and the shortcut correction algorithm;
    根据所述移动总距离、所述模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定所述第二有效投影顶点横坐标的计算坐标;Determine the calculated coordinates of the abscissa of the second effective projection vertex according to the total moving distance, the frame coordinates of the frame of the simulated imaging element, and a picture correction function associated with a preset display scale;
    依照所述第二有效投影顶点横坐标的计算坐标和所述第二有效投影顶点横坐标的差异值,确定所述第二有效投影顶点的坐标。The coordinates of the second effective projection vertex are determined according to the calculated coordinates of the abscissa of the second effective projection vertex and the difference value between the abscissa of the second effective projection vertex.
  7. 根据权利要求5所述的方法,其特征在于,所述获取通过全自动梯形校正算法与快捷校正算法计算所述第二有效投影顶点横坐标的差异函数之前,所述方法还包括:The method according to claim 5, characterized in that, before the acquisition of the difference function of calculating the abscissa of the second effective projected vertex through the automatic trapezoidal correction algorithm and the shortcut correction algorithm, the method further comprises:
    获取所述全自动梯形校正算法下所述第一投影顶点的纵坐标和所述第二有效投影顶点横坐标的第一拟合函数;Obtaining the first fitting function of the ordinate of the first projection vertex and the abscissa of the second effective projection vertex under the automatic keystone correction algorithm;
    获取所述快捷校正算法下所述第一投影顶点的纵坐标和所述第二有效投影顶点横坐标的第二拟合函数;Obtaining the second fitting function of the ordinate of the first projection vertex and the abscissa of the second effective projection vertex under the shortcut correction algorithm;
    基于所述第一拟合函数和所述第二拟合函数,得到计算所述第二有效投影顶点横坐标的差异函数。Based on the first fitting function and the second fitting function, a difference function for calculating the abscissa of the second effective projection vertex is obtained.
  8. 根据权利要求5所述的方法,其特征在于,所述光机图像为四边形,所述依照所述新光机图像进行投影,得到校正后的投影画面,包括:The method according to claim 5, wherein the optical-mechanical image is a quadrilateral, and the projection according to the new optical-mechanical image to obtain a corrected projection image includes:
    根据所述光机图像的顶点坐标、所述有效投影区域的坐标以及预设动画算法,生成与所述光机图像和所述新光机图像关联的动画图像;generating an animation image associated with the optomechanical image and the new optomechanical image according to the vertex coordinates of the optomechanical image, the coordinates of the effective projection area, and a preset animation algorithm;
    依照所述动画图像进行投影,得到校正后的投影画面。Projecting is performed according to the animation image to obtain a corrected projection picture.
  9. 根据权利要求7所述的方法,其特征在于,所述依照所述第二有效投影顶点横坐标的计算坐标和所述第二有效投影顶点横坐标的差异值,确定所述第二有效投影顶点的坐标,包括:The method according to claim 7, wherein the second effective projection vertex is determined according to the calculated coordinate of the second effective projection vertex abscissa and the difference value between the second effective projection vertex abscissa coordinates, including:
    获取目标修正系数;Obtain the target correction factor;
    基于所述目标修正系数、所述第二有效投影顶点横坐标的计算坐标和所述第二有效投影顶点横坐标的差异值,确定所述第二有效投影顶点的坐标。The coordinates of the second effective projection vertex are determined based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex.
  10. 根据权利要求9所述的方法,其特征在于,所述基于所述目标修正系数、所述第二有效投影顶点横坐标的计算坐标和所述第二有效投影顶点横坐标的差异值,确定所述第二有效投影顶点的坐标,包括:The method according to claim 9, characterized in that, based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex, determine the Describe the coordinates of the second effective projection vertex, including:
    检测所述目标修正系数是否大于或者等于修正阈值;Detecting whether the target correction coefficient is greater than or equal to a correction threshold;
    若是,则触发执行所述基于所述目标修正系数、所述第二有效投影顶点横坐标的计算坐标和所述第二有效投影顶点横坐标的差异值,确定所述第二有效投影顶点的坐标。If so, trigger the execution of the calculation based on the target correction coefficient, the calculated coordinates of the abscissa of the second effective projection vertex, and the difference value of the abscissa of the second effective projection vertex to determine the coordinates of the second effective projection vertex .
  11. 根据权利要求9所述的方法,其特征在于,所述获取目标修正系数,包括:The method according to claim 9, wherein said obtaining the target correction coefficient comprises:
    依照所述第二距离、以及预设的所述光机图像的顶点与所述初始投影画面中顶点的映射计算公式,计算得到所述光机图像中第二投影顶点横坐标的计算坐标;According to the second distance and the preset calculation formula of mapping between the vertex of the optical-mechanical image and the vertex in the initial projection picture, calculate the calculated coordinates of the abscissa of the second projected vertex in the optical-mechanical image;
    根据所述第二投影顶点横坐标的计算坐标、所述光机图像中第二投影顶点的实际横坐标、以及所述第二投影顶点横坐标的差异值,计算得到所述目标修正系数。The target correction coefficient is calculated according to the calculated coordinates of the abscissa of the second projected vertex, the actual abscissa of the second projected vertex in the optomechanical image, and a difference value of the abscissa of the second projected vertex.
  12. 根据权利要求5所述的方法,其特征在于,所述获取所述第一顶点相对于初始投影画面中所述第一顶点对应初始顶点移动的第二距离,包括:The method according to claim 5, wherein the obtaining the second distance of the first vertex relative to the initial vertex in the initial projection picture moves, comprising:
    根据所述光机图像中的所述第一投影顶点的纵坐标、所述光机图像的顶点与所述初始投影画面中顶点的拟合函数,计算得到所述投影画面中所述第一顶点相对于初始投影画面中所述第一顶点对应初始顶点移动的第二距离。According to the ordinate of the first projection vertex in the optical-mechanical image, the fitting function between the vertex of the optical-mechanical image and the vertex in the initial projection image, calculate the first vertex in the projection image Relative to the first vertex in the initial projection frame, the first vertex corresponds to a second distance moved by the initial vertex.
  13. 一种投影校正装置,其特征在于,所述装置包括:A projection correction device, characterized in that the device comprises:
    获取模块,用于在梯形校正后的投影校正页面中,获取针对投影画面的第一顶点的第一调整操作,所述第一调整操作用于指示:将所述第一顶点沿着第一方向移动第一距离;An acquisition module, configured to acquire a first adjustment operation for the first vertex of the projected image on the projection correction page after keystone correction, and the first adjustment operation is used to indicate: align the first vertex along the first direction move the first distance;
    响应模块,用于响应所述第一调整操作,获取所述投影画面对应光机图像的顶点坐标;A response module, configured to respond to the first adjustment operation and obtain the vertex coordinates of the optomechanical image corresponding to the projection screen;
    确定模块,用于依照所述光机图像的顶点坐标,确定所述光机图像对应的模拟成像元件外框、以及所述模拟成像元件外框的外框坐标;其中,所述模拟成像元件外框为矩形框;基于所述第一距离、所述模拟成像元件外框的外框坐标与预设显示比例关联的画面校正函数,确定用于校正所述投影画面的新光机图像;A determining module, configured to determine the outer frame of the analog imaging element corresponding to the optomechanical image and the outer frame coordinates of the outer frame of the analog imaging element according to the vertex coordinates of the optomechanical image; wherein, the outer frame of the analog imaging element The frame is a rectangular frame; based on the first distance, the frame coordinates of the frame of the simulated imaging element and a frame correction function associated with a preset display ratio, determine a new optical-mechanical image for correcting the projected frame;
    投影模块,用于依照所述新光机图像进行投影,得到校正后的投影画面。The projection module is configured to perform projection according to the new optical machine image to obtain a corrected projection picture.
  14. 一种电子设备,其特征在于,包括:处理器、存储介质和总线,所述存储介质存储有所述处理器可执行的程序指令,当电子设备运行时,所述处理器与所述存储介质之间通过总线通信,所述处理器执行所述程序指令,以执行时执行如权利要求1至12任一所述的方法的步骤。An electronic device, characterized in that it includes: a processor, a storage medium and a bus, the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate with each other through the bus, the processor executes the program instructions, so as to execute the steps of the method according to any one of claims 1 to 12 when executed.
  15. 一种计算机可读存储介质,其特征在于,所述存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行如权利要求1至12任一所述的方法的步骤。A computer-readable storage medium, wherein a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are executed.
PCT/CN2022/083560 2021-06-25 2022-03-29 Projection correction method and apparatus, device, and storage medium WO2022267595A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110712840.0A CN115529444A (en) 2021-06-25 2021-06-25 Projection correction method, apparatus, device and storage medium
CN202110712840.0 2021-06-25

Publications (1)

Publication Number Publication Date
WO2022267595A1 true WO2022267595A1 (en) 2022-12-29

Family

ID=84544015

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083560 WO2022267595A1 (en) 2021-06-25 2022-03-29 Projection correction method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115529444A (en)
WO (1) WO2022267595A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118052980A (en) * 2024-04-15 2024-05-17 杭州海康威视数字技术股份有限公司 Detection area analysis method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012129594A (en) * 2010-12-13 2012-07-05 Seiko Epson Corp Projector and method for screen shape correction of projector
CN103517018A (en) * 2012-06-19 2014-01-15 株式会社理光 Projector and trapezoidal distortion correction method
CN111083457A (en) * 2019-12-27 2020-04-28 成都极米科技股份有限公司 Method and device for correcting projection images of multiple light machines and projection instrument of multiple light machines
CN112584113A (en) * 2020-12-02 2021-03-30 深圳市当智科技有限公司 Wide-screen projection method and system based on mapping correction and readable storage medium
CN112804508A (en) * 2021-03-19 2021-05-14 深圳市火乐科技发展有限公司 Projector correction method, projector correction system, storage medium, and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012129594A (en) * 2010-12-13 2012-07-05 Seiko Epson Corp Projector and method for screen shape correction of projector
CN103517018A (en) * 2012-06-19 2014-01-15 株式会社理光 Projector and trapezoidal distortion correction method
CN111083457A (en) * 2019-12-27 2020-04-28 成都极米科技股份有限公司 Method and device for correcting projection images of multiple light machines and projection instrument of multiple light machines
CN112584113A (en) * 2020-12-02 2021-03-30 深圳市当智科技有限公司 Wide-screen projection method and system based on mapping correction and readable storage medium
CN112804508A (en) * 2021-03-19 2021-05-14 深圳市火乐科技发展有限公司 Projector correction method, projector correction system, storage medium, and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118052980A (en) * 2024-04-15 2024-05-17 杭州海康威视数字技术股份有限公司 Detection area analysis method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115529444A (en) 2022-12-27

Similar Documents

Publication Publication Date Title
US11402732B2 (en) Dynamic projection device, method and projector
CN103988115B (en) Optical image stabilization
CN102157011B (en) Method for carrying out dynamic texture acquisition and virtuality-reality fusion by using mobile shooting equipment
WO2021208933A1 (en) Image rectification method and apparatus for camera
WO2021238214A1 (en) Three-dimensional measurement system and method, and computer device
WO2019179168A1 (en) Projection distortion correction method, device and system, and storage medium
TWI244335B (en) Projector and compensation method for the tilt of projector
WO2020019548A1 (en) Glasses-free 3d display method and apparatus based on human eye tracking, and device and medium
CN102263919B (en) Position adjustment method, position adjustment amount calculation device, and projector
US20190058875A1 (en) Three-Dimensional Surveillance System, and Rapid Deployment Method for Same
WO2022267595A1 (en) Projection correction method and apparatus, device, and storage medium
WO2022012651A1 (en) Projection method, projection device and storage medium
JP2020078061A (en) Projection system and keystone correction method
TW202226825A (en) Automatic keystone correction method for projector system
US10154249B2 (en) System and method for capturing horizontal disparity stereo panorama
US9479747B2 (en) Guide image generation device and method using parameters
WO2013124901A1 (en) Optical-projection-type display apparatus, portable terminal, and program
CN108718404B (en) Image correction method and image correction system
WO2019047896A1 (en) Image processing method and device
CN104460011A (en) Stereo imaging apparatus and stereo image generating method
KR101082545B1 (en) Mobile communication terminal had a function of transformation for a picture
US20230020294A1 (en) Screen size adjustment method for lcd projectors
WO2022062604A1 (en) Projection screen adjusting method and apparatus, and projector, and storage medium
CN114339179B (en) Projection correction method, apparatus, storage medium and projection device
CN115728943A (en) VR projection system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22827100

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22827100

Country of ref document: EP

Kind code of ref document: A1