WO2022205814A1 - Target coordinate determination method and apparatus - Google Patents

Target coordinate determination method and apparatus Download PDF

Info

Publication number
WO2022205814A1
WO2022205814A1 PCT/CN2021/120719 CN2021120719W WO2022205814A1 WO 2022205814 A1 WO2022205814 A1 WO 2022205814A1 CN 2021120719 W CN2021120719 W CN 2021120719W WO 2022205814 A1 WO2022205814 A1 WO 2022205814A1
Authority
WO
WIPO (PCT)
Prior art keywords
predetermined position
projection
coordinates
target
reference point
Prior art date
Application number
PCT/CN2021/120719
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 WO2022205814A1 publication Critical patent/WO2022205814A1/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
    • 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, and in particular, to a method and device for determining target coordinates.
  • the digital keystone correction function is often used to partially display and partially hide the original full-screen content to achieve the effect of a square picture in the physical world.
  • the user can still perform the optical zoom operation.
  • the original keystone adjusted rectangle will gradually become a trapezoid after optical zooming.
  • the embodiments of the present application provide a method and device for determining target coordinates, so as to at least solve the technical problem that, due to the existence of a side projection angle, performing optical zooming after keystone correction will cause the rectangle that has been adjusted by keystone correction to become trapezoid again. .
  • a method for determining target coordinates including: determining a first distance between a first predetermined position of a first projection area and an equivalent optical zoom reference point, wherein according to the initial optical zoom The reference point and the first mapping relationship determine an equivalent optical zoom reference point, the first projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is a preset in the projection plane for zooming the projection image
  • the reference point for processing determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; determine the ratio of the first distance to the second distance, and determine the equivalent optical zoom reference point and the first distance according to the ratio.
  • the position of the target point between the two predetermined positions; the second mapping relationship is determined according to the position of the target point and the first predetermined position; the target coordinates are obtained according to the coordinates of the second predetermined position and the second mapping relationship, wherein the target coordinates are the projection device Projection coordinates to set when projecting.
  • the first mapping relationship is determined in the following manner: acquiring the second predetermined position coordinates corresponding to the second projection area, where the second projection area is a projection image that has been keystone-corrected in the third projection area; acquiring the third projection area The corresponding third predetermined position coordinates, wherein, the third projection area is the largest projection screen; determine the first homography transformation matrix according to the third predetermined position coordinates and the second predetermined position coordinates, and use the first homography transformation matrix as the first homography transformation matrix. a mapping relationship.
  • determining the equivalent optical zoom reference point according to the initial optical zoom reference point and the first mapping relationship includes: determining the initial coordinates corresponding to the initial optical zoom reference point; performing a homography on the initial coordinates based on the first homography transformation matrix to obtain the equivalent optical scaling reference point.
  • the method before determining the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, the method further includes: acquiring a fourth predetermined position coordinate corresponding to the fourth projection area, wherein the fourth projection The area is the projection image after scaling of the third projection area; the first predetermined position is determined according to the fourth predetermined position coordinate and the first homography transformation matrix.
  • determining the second mapping relationship according to the position of the target point and the first predetermined position including: determining the target coordinates at the position of the target point and the first coordinates at the first predetermined position; according to the target coordinates and the first coordinates Obtain the second homography transformation matrix; use the second homography transformation matrix as the second mapping relationship.
  • obtaining the target coordinates according to the second predetermined position coordinates and the second mapping relationship includes: performing a matrix multiplication operation on the second predetermined position coordinates and the second homography transformation matrix to obtain the target coordinates.
  • determining the position of the target point between the equivalent optical zooming reference point and the second predetermined position according to the ratio includes: determining the target connecting line between the equivalent optical zooming reference point and the second predetermined position; determining according to the ratio The position of the target point on the target line.
  • determining the ratio of the first distance to the second distance includes: from the determined The largest ratio is selected from the plurality of ratios, and the position of the target point on the target connection line is determined based on the largest ratio.
  • determining the position of the target point on the target connection line based on the maximum ratio includes: multiplying the maximum ratio by the second distance to obtain a third distance; taking the equivalent scaling center as the center of the circle, and drawing the third distance as the radius. Circle, determine the circular motion trajectory; determine the intersection of the circular motion trajectory and the target line; take the coordinates corresponding to the intersection as the position of the target point.
  • an apparatus for determining target coordinates including: a first determination module configured to determine the first predetermined position of the first projection area and the first predetermined position of the first projection area and the equivalent optical zoom reference point.
  • a distance wherein the equivalent optical zoom reference point is determined according to the initial optical zoom reference point and the first mapping relationship, the first projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is preset in the projection plane a predetermined reference point for zooming the projection image; a second determination module for determining a second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; a third determination module for using In determining the ratio of the first distance and the second distance, the position of the target point between the equivalent optical zoom reference point and the second predetermined position is determined according to the ratio; the fourth determination module is used for determining the position of the target point according to the first predetermined position, to determine the second mapping relationship; and a fifth determining module, configured to obtain target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection.
  • a non-volatile storage medium is also provided, where the non-volatile storage medium includes a stored program, wherein when the program runs, the device where the non-volatile storage medium is located is controlled to execute any arbitrary program.
  • a method of determining the coordinates of a target is also provided, where the non-volatile storage medium includes a stored program, wherein when the program runs, the device where the non-volatile storage medium is located is controlled to execute any arbitrary program.
  • a processor is also provided, and the processor is configured to run a program, wherein, when the program runs, any method for determining target coordinates is executed.
  • the method of determining the projection area based on the equivalent optical zoom reference point is adopted, and the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point is determined, wherein according to the initial optical zoom
  • the zooming reference point and the first mapping relationship determine an equivalent optical zooming reference point, and the first projection area is the projected image after zooming in the second projection area; determining the distance between the second predetermined position of the second projection area and the equivalent optical zooming reference point the second distance; determine the ratio of the first distance to the second distance, and determine the position of the target point between the equivalent optical zoom reference point and the second predetermined position according to the ratio; determine the position of the target point according to the position of the target point and the first predetermined position Two mapping relationships; the target coordinates are obtained according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection, which achieves the maximum projection area based on the before and after scaling and the trapezoidal correction before and after scaling.
  • 1 is a schematic diagram of the coordinate position in an optional projection space of the present application.
  • FIG. 2 is a schematic diagram of a projection area in an optional physical world of the application
  • FIG. 3 is a schematic flowchart of a method for determining target coordinates according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of coordinate positions in an optional projection space of the present application.
  • FIG. 5 is a schematic diagram of the movement trajectory of the corresponding projection image during the optical zooming process of an optional typical optical zoom lens according to an embodiment of the present application;
  • FIG. 6 is a schematic diagram of a corresponding relationship between an optional optical zoom position and a screen zoom ratio according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of coordinate positions in another optional projection space of the present application.
  • FIG. 8 is a schematic structural diagram of an apparatus for determining target coordinates according to an embodiment of the present application.
  • an embodiment of a method for determining target coordinates is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer-executable instructions, and, Although a logical order is shown in the flowcharts, in some cases steps shown or described may be performed in an order different from that herein.
  • FIG. 1 is a schematic diagram of coordinate positions in an optional projection space of the present application.
  • the projection space is a virtual projection screen of a projection device.
  • the virtual projection screen can be the projection device in the physical space.
  • the fitting picture corresponding to the actual projected picture is shown in Figure 1, where area A is the coordinate area of the complete picture before optical zooming, and area C is adjusted to ensure that the picture is square in the physical world under a certain side projection angle Keystone correction coordinate area value, area B is the complete screen area after optical zooming to a certain position, area D is the corresponding keystone correction coordinate area after optical zooming and zooming in area C, FIG.
  • FIG. 2 is an optional A schematic diagram of the projection area in the physical world, as shown in Figure 2, the corresponding projection areas Cw and Dw of area C and area D in the physical space, where area C has been adjusted to a square screen before zooming, and after zooming by optical zoom , due to the existence of the projection angle, the same pixel area is imaged at different distances with inconsistent sizes, resulting in the area Dw is no longer a rectangle after scaling. That is, due to the existence of a side projection angle, optical zooming after keystone correction will cause the rectangle that has been adjusted by keystone correction to become a trapezoid again.
  • FIG. 3 shows a method for determining target coordinates according to an embodiment of the present application. As shown in FIG. 3 , the method includes the following steps:
  • Step S102 determining the first distance between the first predetermined position of the first projection area and the equivalent optical zooming reference point, wherein the equivalent optical zooming reference point is determined according to the initial optical zooming reference point and the first mapping relationship, and the first projection The area is the zoomed projection image of the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image;
  • Step S104 determining the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point
  • Step S106 determining the ratio of the first distance to the second distance, and determining the position of the target point between the equivalent optical zoom reference point and the second predetermined position according to the ratio;
  • Step S108 determining a second mapping relationship according to the position of the target point and the first predetermined position
  • Step S110 obtaining target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection.
  • the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point is determined. It should be noted that the determination is based on the initial optical zoom reference point and the first mapping relationship, etc.
  • the first projection area is the zoomed projection image of the second projection area
  • the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image; then determine the second The second distance between the second predetermined position of the projection area and the equivalent optical zoom reference point; then, the ratio of the first distance to the second distance is determined, and the distance between the equivalent optical zoom reference point and the second predetermined position is determined according to the ratio.
  • the technical effect of determining the projection coordinates is based on the maximum projection area before and after scaling and the maximum projection area after keystone correction before and after scaling, and then solves the problem that due to the existence of a side projection angle, optical scaling after keystone correction will cause The technical problem that the rectangle that has been adjusted by keystone correction will become a trapezoid.
  • FIG. 4 is a schematic diagram of the coordinate position in an optional projection space of the present application.
  • A is the coordinate area of the complete picture before optical zooming
  • area C is the keystone correction coordinate area value adjusted to ensure that the picture is square in the physical world under a certain side projection angle
  • area B is the area after the optical zoom is zoomed to a certain position
  • the complete screen area of area, area D is the corresponding keystone correction coordinate area of area C after optical zooming and zooming, where point o is the initial optical zooming reference point, and point o1 is the equivalent optical zooming reference point.
  • FIG. 5 shows the movement trajectory of an optional typical optical zoom lens corresponding to the projection image during the optical zooming process according to the embodiment of the present application.
  • the optical zoom center ie, the optical zoom reference point
  • the optical zoom center is the center of the optical zoom. It can be anywhere within the frame, or even outside the frame, depending on the specific optical design.
  • FIG. 6 is a schematic diagram of an optional corresponding relationship between the optical zoom position and the screen zoom ratio according to an embodiment of the present application.
  • the fitted curves include but are not limited to the linear relationship shown in the figure, as shown in Figure 4.
  • the above-mentioned projection area may be the actual projection area of the projection device in the physical space, or may be the virtual projection area of the projection device itself corresponding to the actual projection area of the physical space
  • the first mapping may be determined in the following manner: Relation: Obtain the second predetermined position coordinates corresponding to the second projection area, where the second projection area is a projection image that has been keystone-corrected in the third projection area; obtain the third predetermined position coordinates corresponding to the third projection area, where the first The three projection areas are the largest projection images; the first homography transformation matrix is determined according to the third predetermined position coordinates and the second predetermined position coordinates, and the first homography transformation matrix is used as the first mapping relationship.
  • the equivalent optical zoom reference point may be determined according to the initial optical zoom reference point and the first mapping relationship, and specifically, the initial coordinates corresponding to the initial optical zoom reference point are determined; based on the first homography
  • the transformation matrix performs homography transformation on the initial coordinates to obtain the equivalent optical scaling reference point.
  • the coordinates of the fourth predetermined position corresponding to the fourth projection area can be obtained.
  • the area is the projection image after scaling of the third projection area, and finally, the first predetermined position is determined according to the fourth predetermined position coordinates and the first homography transformation matrix.
  • the second mapping relationship may be determined according to the position of the target point and the first predetermined position, specifically, the target coordinates at the position of the target point and the first coordinates at the first predetermined position are determined; and according to A second homography transformation matrix is obtained from the target coordinates and the first coordinates, and then the second homography transformation matrix is used as the second mapping relationship.
  • the target coordinates can be obtained according to the second predetermined position coordinates and the second mapping relationship. Specifically, matrix multiplication is performed on the second predetermined position coordinates and the second homography transformation matrix to obtain the target coordinates.
  • the position of the target point between the equivalent optical zoom reference point and the second predetermined position can be determined according to the ratio, and specifically, the target connection line between the equivalent optical zoom reference point and the second predetermined position is determined; The ratio determines the position of the target point on the target line.
  • first predetermined position is the upper left corner position in the first projection area
  • second predetermined position corresponds to the upper left corner position in the second projection area.
  • first predetermined positions and second predetermined positions for example, the upper left corner position, the lower left corner position, the upper right corner position and the lower right corner position of the first projection area, and, for example, the upper left corner position of the second projection area , the lower left corner position, the lower right corner position and the lower right corner position. Therefore, when determining the ratio of the first distance to the second distance, the maximum ratio can be selected from the determined multiple ratios, and the maximum ratio can be determined on the target connection line based on the maximum ratio. The location of the target point.
  • the position of the target point on the target connection line may be determined based on the maximum ratio. Specifically, the maximum ratio is multiplied by the second distance to obtain the third distance.
  • the equivalent scaling center is the center of the circle, and the third distance is the center of the circle.
  • FIG. 7 is a schematic diagram of another optional coordinate position in the projection space of the present application. Now, the relevant embodiments of the present application will be described with reference to FIG. 7 , as shown in FIG. 7 . As shown, the homography transformation matrix H1 (the first mapping relationship) from the region A (the third projection region) to the region C (the second projection region) can be calculated.
  • H1 the first mapping relationship
  • the region C (the second projection region) is for the purpose of The keystone correction coordinate area adjusted to ensure that the screen is square in the physical world under a certain side projection angle
  • the specific calculation process can be as follows: determine the coordinates of the four corner points of the area C (second projection area), and the area A ( The coordinates of the four corners of the third projection area), and then use the direct linear transformation method Direct Linear Transformation (DLT for short) to solve to obtain the homography transformation matrix H1, after obtaining the homography transformation matrix H1, the initial optical transformation can be The coordinates of point o of the scaling reference point are obtained, and the coordinates of point o1 of the equivalent optical scaling reference point are obtained by performing homography transformation based on the homography transformation matrix H1.
  • DLT Direct Linear Transformation
  • Position that is, o1-G*max Ratio to get g1 point (as shown by the small circle in the figure), in the same way, e1 point (o1-E*max Ratio), f1 point (o1-F*max Ratio), h1 Point (o1-H*max Ratio);
  • H2 second mapping relationship
  • the coordinates of the four points to the initial trapezoidal correction four-point coordinate value* H2 (second predetermined position coordinates * second mapping relationship
  • the new four-point coordinates obtained are the target coordinates.
  • the initial trapezoidal correction four-point coordinate value is the C area (EFGH, the second projection area) The coordinate values corresponding to the four corner points.
  • FIG. 8 is an apparatus for determining target coordinates according to an embodiment of the present application. As shown in FIG. 8 , the apparatus includes:
  • the first determination module 40 is configured to determine the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, wherein the equivalent optical zoom reference is determined according to the initial optical zoom reference point and the first mapping relationship point, the first projection area is the zoomed projection image of the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image;
  • the second determination module 42 is configured to determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point;
  • the third determination module 44 is configured to determine the ratio of the first distance to the second distance, and determine the position of the target point between the equivalent optical zoom reference point and the second predetermined position according to the ratio;
  • the fourth determination module 46 is used to determine the second mapping relationship according to the position of the target point and the first predetermined position
  • the fifth determination module 48 is configured to obtain target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection.
  • a first determination module 40 is configured to determine a first distance between a first predetermined position of the first projection area and an equivalent optical zoom reference point, wherein the first optical zoom reference point and the first The mapping relationship determines an equivalent optical zoom reference point, the first projection area is the zoomed projection image of the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image;
  • the second determination module 42 is used to determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point;
  • the third determination module 44 is used to determine the ratio of the first distance to the second distance, The position of the target point between the equivalent optical zoom reference point and the second predetermined position is determined according to the ratio;
  • the fourth determination module 46 is configured to determine the second mapping relationship according to the position of the target point and the first predetermined position;
  • the fifth determination The module 48 is used to obtain the target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when
  • the maximum projection area that has been passed determines the technical effect of the projection coordinates, and then solves the technical problem that due to the existence of a side projection angle, optical zooming after keystone correction will cause the rectangle that has been adjusted by keystone correction to become a trapezoid.
  • a non-volatile storage medium is also provided, where the non-volatile storage medium includes a stored program, wherein when the program runs, the device where the non-volatile storage medium is located is controlled to execute any arbitrary program.
  • a method of determining the coordinates of a target is also provided, where the non-volatile storage medium includes a stored program, wherein when the program runs, the device where the non-volatile storage medium is located is controlled to execute any arbitrary program.
  • the above-mentioned storage medium is used to store program instructions for executing the following functions, and realize the following functions: determining the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, wherein, according to the initial optical zoom reference The point and the first mapping relationship determine an equivalent optical zoom reference point, the first projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is a preset in the projection plane for zooming the projection image determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; determine the ratio of the first distance to the second distance, and determine the equivalent optical zoom reference point and the second The position of the target point between the predetermined positions; the second mapping relationship is determined according to the position of the target point and the first predetermined position; the target coordinates are obtained according to the coordinates of the second predetermined position and the second mapping relationship, wherein the target coordinates are performed by the projection device. Projection coordinates to set when projecting.
  • a processor is also provided, and the processor is configured to run a program, wherein, when the program runs, any method for determining target coordinates is executed.
  • the above-mentioned processor is used to call the program instructions in the memory, and realize the following function: determine the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, wherein, according to the initial optical zoom reference point and The first mapping relationship determines an equivalent optical zoom reference point, the first projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is a preset reference in the projection plane for zooming the projection image point; determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; determine the ratio of the first distance to the second distance, and determine the equivalent optical zoom reference point and the second predetermined position according to the ratio According to the position of the target point and the first predetermined position, the second mapping relationship is determined; the target coordinates are obtained according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are when the projection device projects Set projected coordinates.
  • the disclosed technical content can be implemented in other ways.
  • the device embodiments described above are only illustrative, for example, the division of the units may be a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of units or modules, and may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes .

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)
  • Image Processing (AREA)

Abstract

The present application discloses a target coordinate determination method and apparatus. The method comprises: determining a first distance between a first predetermined position of a first projection area and an equivalent optical zooming reference point, wherein the first projection area is a zoomed projection picture of a second projection area; determining a second distance between a second predetermined position of the second projection picture and the equivalent optical zooming reference point; determining a ratio between the first distance and the second distance, and determining a position of a target point between the equivalent optical zooming reference point and the second predetermined position according to the ratio; determining a second mapping relationship according to the position of the target point and the first predetermined position; and obtain a target coordinate according to the coordinate of the second predetermined position and the second mapping relationship, wherein the target coordinate is a projection coordinate set when the projection apparatus performs projection. The present application solves the technical problem that, due to the existence of a projection angle, optical zooming after keystone correction causes a keystone-corrected rectangle to revert to a trapezoid.

Description

确定目标坐标的方法及装置Method and device for determining target coordinates 技术领域technical field
本申请涉及投影领域,具体而言,涉及一种确定目标坐标的方法及装置。The present application relates to the field of projection, and in particular, to a method and device for determining target coordinates.
背景技术Background technique
为了保证在侧投显示、避障显示等使用场景实现投影画面方正的效果,会经常用到数码梯形校正功能,将原本的全画面内容部分显示,部分隐藏达到在物理世界中画面方正的效果。对于带光学变焦的机器,调整完梯形校正之后,用户还可以进行光学缩放操作,但是由于此时存在侧投角度,原本梯形校正调整好的矩形在经过光学缩放之后,会逐渐变成梯形。In order to ensure that the projected picture is square in the side projection display, obstacle avoidance display and other usage scenarios, the digital keystone correction function is often used to partially display and partially hide the original full-screen content to achieve the effect of a square picture in the physical world. For machines with optical zoom, after adjusting the keystone correction, the user can still perform the optical zoom operation. However, due to the side projection angle at this time, the original keystone adjusted rectangle will gradually become a trapezoid after optical zooming.
针对上述的问题,目前尚未提出有效的解决方案。For the above problems, no effective solution has been proposed yet.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种确定目标坐标的方法及装置,以至少解决由于存在侧投角度,在梯形校正后进行光学缩放会造成原本已梯形校正调整好的矩形又会变成梯形的技术问题。The embodiments of the present application provide a method and device for determining target coordinates, so as to at least solve the technical problem that, due to the existence of a side projection angle, performing optical zooming after keystone correction will cause the rectangle that has been adjusted by keystone correction to become trapezoid again. .
根据本申请实施例的一个方面,提供了一种确定目标坐标的方法,包括:确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面,光学缩放参考点为在投影平面中预先设定的用于对投影画面进行变焦处理的参考点;确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;根据目标点的位置与第一预定位置,确定第二映射关系;根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标。According to an aspect of the embodiments of the present application, a method for determining target coordinates is provided, including: determining a first distance between a first predetermined position of a first projection area and an equivalent optical zoom reference point, wherein according to the initial optical zoom The reference point and the first mapping relationship determine an equivalent optical zoom reference point, the first projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is a preset in the projection plane for zooming the projection image The reference point for processing; determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; determine the ratio of the first distance to the second distance, and determine the equivalent optical zoom reference point and the first distance according to the ratio. The position of the target point between the two predetermined positions; the second mapping relationship is determined according to the position of the target point and the first predetermined position; the target coordinates are obtained according to the coordinates of the second predetermined position and the second mapping relationship, wherein the target coordinates are the projection device Projection coordinates to set when projecting.
可选地,通过以下方式确定第一映射关系:获取第二投影区域对应的第二预定位置坐标,其中,第二投影区域为第三投影区域进行梯形校正过的投影画面;获取第三投影区域对应的第三预定位置坐标,其中,第三投影区域为最大投影画面;根据第三预定位置坐标与第二预定位置坐标确定第一单应性变换矩阵,将第一单应性变换矩阵作为第一映射关系。Optionally, the first mapping relationship is determined in the following manner: acquiring the second predetermined position coordinates corresponding to the second projection area, where the second projection area is a projection image that has been keystone-corrected in the third projection area; acquiring the third projection area The corresponding third predetermined position coordinates, wherein, the third projection area is the largest projection screen; determine the first homography transformation matrix according to the third predetermined position coordinates and the second predetermined position coordinates, and use the first homography transformation matrix as the first homography transformation matrix. a mapping relationship.
可选地,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,包括:确定初始光学缩放参考点对应的初始坐标;基于第一单应性变换矩阵对初始坐标进行单应性变换,得到等效光学缩放参考点。Optionally, determining the equivalent optical zoom reference point according to the initial optical zoom reference point and the first mapping relationship includes: determining the initial coordinates corresponding to the initial optical zoom reference point; performing a homography on the initial coordinates based on the first homography transformation matrix to obtain the equivalent optical scaling reference point.
可选地,确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离之前,方法还包括:获取第四投影区域对应的第四预定位置坐标,其中,第四投影区域为第三投影区域缩放后的投影画面;根据第四预定位置坐标与第一单应性变换矩阵确定第一预定位置。Optionally, before determining the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, the method further includes: acquiring a fourth predetermined position coordinate corresponding to the fourth projection area, wherein the fourth projection The area is the projection image after scaling of the third projection area; the first predetermined position is determined according to the fourth predetermined position coordinate and the first homography transformation matrix.
可选地,根据目标点的位置与第一预定位置,确定第二映射关系,包括:确定目标点的位置处的目标坐标及第一预定位置处的第一坐标;根据目标坐标与第一坐标得到第二单应性变换矩阵;将第二单应性变换矩阵作为第二映射关系。Optionally, determining the second mapping relationship according to the position of the target point and the first predetermined position, including: determining the target coordinates at the position of the target point and the first coordinates at the first predetermined position; according to the target coordinates and the first coordinates Obtain the second homography transformation matrix; use the second homography transformation matrix as the second mapping relationship.
可选地,根据第二预定位置坐标与第二映射关系得到目标坐标,包括:对第二预定位置坐标与第二单应性变换矩阵进行矩阵乘法运算,得到目标坐标。Optionally, obtaining the target coordinates according to the second predetermined position coordinates and the second mapping relationship includes: performing a matrix multiplication operation on the second predetermined position coordinates and the second homography transformation matrix to obtain the target coordinates.
可选地,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置,包括:确定等效光学缩放参考点与第二预定位置之间的目标连线;根据比值确定在目标连线上的目标点的位置。Optionally, determining the position of the target point between the equivalent optical zooming reference point and the second predetermined position according to the ratio includes: determining the target connecting line between the equivalent optical zooming reference point and the second predetermined position; determining according to the ratio The position of the target point on the target line.
可选地,第一预定位置与第二预定位置是一一对应的,且第一预定位置与第二预定位置均有多个,确定第一距离与第二距离的比值,包括:从确定的多个比值中选择最大比值,基于最大比值确定在目标连线上的目标点的位置。Optionally, there is a one-to-one correspondence between the first predetermined position and the second predetermined position, and there are multiple first predetermined positions and second predetermined positions, and determining the ratio of the first distance to the second distance includes: from the determined The largest ratio is selected from the plurality of ratios, and the position of the target point on the target connection line is determined based on the largest ratio.
可选地,基于最大比值确定在目标连线上的目标点的位置,包括:将最大比值乘以第二距离,得到第三距离;以等效缩放中心为圆心,以第三距离为半径画圆,确定圆形运动轨迹;确定圆形运动轨迹与目标连线的交点;将交点对应的坐标作为目标点的位置。Optionally, determining the position of the target point on the target connection line based on the maximum ratio includes: multiplying the maximum ratio by the second distance to obtain a third distance; taking the equivalent scaling center as the center of the circle, and drawing the third distance as the radius. Circle, determine the circular motion trajectory; determine the intersection of the circular motion trajectory and the target line; take the coordinates corresponding to the intersection as the position of the target point.
根据本申请实施例的另一方面,还提供了一种确定目标坐标的装置,包括:第一确定模块,用于确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面,光学缩放参考点为在投影平面中预先设定的用于对投影画面进行变焦处理的参考点;第二确定模块,用于确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;第三确定模块,用于确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;第四确定模块,用于根据目标点的位置与第一预定位置,确定第二映射关系;第五确定模块,用于根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标。According to another aspect of the embodiments of the present application, an apparatus for determining target coordinates is further provided, including: a first determination module configured to determine the first predetermined position of the first projection area and the first predetermined position of the first projection area and the equivalent optical zoom reference point. A distance, wherein the equivalent optical zoom reference point is determined according to the initial optical zoom reference point and the first mapping relationship, the first projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is preset in the projection plane a predetermined reference point for zooming the projection image; a second determination module for determining a second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; a third determination module for using In determining the ratio of the first distance and the second distance, the position of the target point between the equivalent optical zoom reference point and the second predetermined position is determined according to the ratio; the fourth determination module is used for determining the position of the target point according to the first predetermined position, to determine the second mapping relationship; and a fifth determining module, configured to obtain target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection.
根据本申请实施例的另一方面,还提供了一种非易失性存储介质,非易失性存储介质包括存储的程序,其中,在程序运行时控制非易失性存储介质所在设备执行任意一种确定目标坐标的方法。According to another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, where the non-volatile storage medium includes a stored program, wherein when the program runs, the device where the non-volatile storage medium is located is controlled to execute any arbitrary program. A method of determining the coordinates of a target.
根据本申请实施例的另一方面,还提供了一种处理器,处理器用于运行程序,其中,程序运行时执行任意一种确定目标坐标的方法。According to another aspect of the embodiments of the present application, a processor is also provided, and the processor is configured to run a program, wherein, when the program runs, any method for determining target coordinates is executed.
在本申请实施例中,采用基于等效光学缩放参考点确定投影区域的方式,通过确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面;确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;根据目标点的位置与第一预定位置,确定第二映射关系;根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标,达到了基于缩放前后的最大投影区域以及缩放前后的梯形校正过的最大投影区域,确定投影坐标的技术效果,进而解决了由于存在侧投角度,在梯形校正后进行光学缩放会造成原本已梯形校正调整好的矩形又会变成梯形的技术问题。In the embodiment of the present application, the method of determining the projection area based on the equivalent optical zoom reference point is adopted, and the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point is determined, wherein according to the initial optical zoom The zooming reference point and the first mapping relationship determine an equivalent optical zooming reference point, and the first projection area is the projected image after zooming in the second projection area; determining the distance between the second predetermined position of the second projection area and the equivalent optical zooming reference point the second distance; determine the ratio of the first distance to the second distance, and determine the position of the target point between the equivalent optical zoom reference point and the second predetermined position according to the ratio; determine the position of the target point according to the position of the target point and the first predetermined position Two mapping relationships; the target coordinates are obtained according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection, which achieves the maximum projection area based on the before and after scaling and the trapezoidal correction before and after scaling. to determine the technical effect of the projection coordinates, thereby solving the technical problem that optical zooming after keystone correction will cause the rectangle that has been adjusted by keystone correction to become trapezoid again due to the existence of a side projection angle.
附图说明Description of drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:
图1是本申请一种可选的投影空间中坐标位置示意图;1 is a schematic diagram of the coordinate position in an optional projection space of the present application;
图2为本申请一种可选的物理世界中投影区域示意图;2 is a schematic diagram of a projection area in an optional physical world of the application;
图3是根据本申请实施例的确定目标坐标的方法的流程示意图;3 is a schematic flowchart of a method for determining target coordinates according to an embodiment of the present application;
图4是本申请一种可选的投影空间中坐标位置示意图;FIG. 4 is a schematic diagram of coordinate positions in an optional projection space of the present application;
图5是本申请实施例一种可选的典型的带光学变焦镜头在光学变焦过程中,对应投影画面的移动轨迹示意图;FIG. 5 is a schematic diagram of the movement trajectory of the corresponding projection image during the optical zooming process of an optional typical optical zoom lens according to an embodiment of the present application;
图6是本申请实施例一种可选的光学变焦位置与画面缩放比例的对应关系示意图;6 is a schematic diagram of a corresponding relationship between an optional optical zoom position and a screen zoom ratio according to an embodiment of the present application;
图7是本申请另一种可选的投影空间中坐标位置示意图;FIG. 7 is a schematic diagram of coordinate positions in another optional projection space of the present application;
图8是根据本申请实施例的确定目标坐标的装置的结构示意图。FIG. 8 is a schematic structural diagram of an apparatus for determining target coordinates according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only The embodiments are part of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of the present application.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
根据本申请实施例,提供了一种确定目标坐标的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present application, an embodiment of a method for determining target coordinates is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer-executable instructions, and, Although a logical order is shown in the flowcharts, in some cases steps shown or described may be performed in an order different from that herein.
为了本领域技术人员更好地理解本申请的相关实施例,现将光学缩放导致的梯形问题加以说明:For those skilled in the art to better understand the relevant embodiments of the present application, the trapezoidal problem caused by optical zooming will now be described:
图1是本申请一种可选的投影空间中坐标位置示意图,需要说明的是,该投影空间为投影装置的虚拟投影画面,可以理解的是,该虚拟投影画面可以为投影装置在物理空间的实际投影画面对应的拟合画面,如图1所示,其中区域A为光学缩放前完整画面坐标区域,区域C为为了保证在某个侧投角度下,保证物理世界中画面方正而调整出的梯形校正坐标区域值,区域B为光学变焦缩放到某个位置后的完整画面区域,区域D为区域C在进行光学变焦缩放后的对应梯形校正坐标区域,图2为本申请一种可选的物理世界中投影区域示意图,如图2所示,区域C、区域D在物理空间中对应的投影区域Cw、Dw,其中,区域C在缩放前已经调整为一个方正画面,而经过光学变焦缩放之后,由于存在投射角度,同样的像素区域在不同距离成像大小不一致的原因,造成缩放之后区域Dw不再是一个矩形。即,由于存在侧投角度,在梯形校正后进行光学缩放会造成原本已梯形校正调整好的矩形又会变成梯形。1 is a schematic diagram of coordinate positions in an optional projection space of the present application. It should be noted that the projection space is a virtual projection screen of a projection device. It can be understood that the virtual projection screen can be the projection device in the physical space. The fitting picture corresponding to the actual projected picture is shown in Figure 1, where area A is the coordinate area of the complete picture before optical zooming, and area C is adjusted to ensure that the picture is square in the physical world under a certain side projection angle Keystone correction coordinate area value, area B is the complete screen area after optical zooming to a certain position, area D is the corresponding keystone correction coordinate area after optical zooming and zooming in area C, FIG. 2 is an optional A schematic diagram of the projection area in the physical world, as shown in Figure 2, the corresponding projection areas Cw and Dw of area C and area D in the physical space, where area C has been adjusted to a square screen before zooming, and after zooming by optical zoom , due to the existence of the projection angle, the same pixel area is imaged at different distances with inconsistent sizes, resulting in the area Dw is no longer a rectangle after scaling. That is, due to the existence of a side projection angle, optical zooming after keystone correction will cause the rectangle that has been adjusted by keystone correction to become a trapezoid again.
因此,本申请提出了一种确定目标坐标的方法,图3是根据本申请实施例的确定目标坐标的方法,如图3所示,该方法包括如下步骤:Therefore, the present application proposes a method for determining target coordinates. FIG. 3 shows a method for determining target coordinates according to an embodiment of the present application. As shown in FIG. 3 , the method includes the following steps:
步骤S102,确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面,光学缩放参考点为在投影平面中预先设定的用于对投影画面进行变焦处理的参考点;Step S102, determining the first distance between the first predetermined position of the first projection area and the equivalent optical zooming reference point, wherein the equivalent optical zooming reference point is determined according to the initial optical zooming reference point and the first mapping relationship, and the first projection The area is the zoomed projection image of the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image;
步骤S104,确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;Step S104, determining the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point;
步骤S106,确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;Step S106, determining the ratio of the first distance to the second distance, and determining the position of the target point between the equivalent optical zoom reference point and the second predetermined position according to the ratio;
步骤S108,根据目标点的位置与第一预定位置,确定第二映射关系;Step S108, determining a second mapping relationship according to the position of the target point and the first predetermined position;
步骤S110,根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标。Step S110, obtaining target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection.
该确定目标坐标的方法中,通过确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,需要说明的是,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面,光学缩放参考点为在投影平面中预先设定的用于对投影画面进行变焦处理的参考点;再确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;然后,确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;再根据目标点的位置与第一预定位置,确定第二映射关系;最后根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标,达到了基于缩放前后的最大投影区域以及缩放前后的梯形校正过的最大投影区域,确定投影坐标的技术效果,进而解决了由于存在侧投角度,在梯形校正后进行光学缩放会造成原本已梯形校正调整好的矩形又会变成梯形的技术问题。In the method for determining target coordinates, the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point is determined. It should be noted that the determination is based on the initial optical zoom reference point and the first mapping relationship, etc. The first projection area is the zoomed projection image of the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image; then determine the second The second distance between the second predetermined position of the projection area and the equivalent optical zoom reference point; then, the ratio of the first distance to the second distance is determined, and the distance between the equivalent optical zoom reference point and the second predetermined position is determined according to the ratio. the position of the target point; then determine the second mapping relationship according to the position of the target point and the first predetermined position; finally obtain the target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are set when the projection device performs projection The technical effect of determining the projection coordinates is based on the maximum projection area before and after scaling and the maximum projection area after keystone correction before and after scaling, and then solves the problem that due to the existence of a side projection angle, optical scaling after keystone correction will cause The technical problem that the rectangle that has been adjusted by keystone correction will become a trapezoid.
需要说明的是,在模拟得到虚拟投影画面之后,可根据缩放的比例确定缩放前后区域的坐标范围,图4是本申请一种可选的投影空间中坐标位置示意图,如图4所示,区域A为光学缩放前完整画面坐标区域,区域C为为了保证在某个侧投角度下,保证物理世界中画面方正而调整出的梯形校正坐标区域值,区域B为光学变焦缩放到某个位置后的完整画面区域,区域D为区域C在进行光学变焦缩放后的对应梯形校正坐标区域,其中,o点为初始光学缩放参考点,o1点为等效光学缩放参考点。It should be noted that after the virtual projection screen is obtained by simulation, the coordinate range of the area before and after the zoom can be determined according to the zoom ratio. FIG. 4 is a schematic diagram of the coordinate position in an optional projection space of the present application. As shown in FIG. A is the coordinate area of the complete picture before optical zooming, area C is the keystone correction coordinate area value adjusted to ensure that the picture is square in the physical world under a certain side projection angle, and area B is the area after the optical zoom is zoomed to a certain position The complete screen area of area, area D is the corresponding keystone correction coordinate area of area C after optical zooming and zooming, where point o is the initial optical zooming reference point, and point o1 is the equivalent optical zooming reference point.
图5是本申请实施例一种可选的典型的带光学变焦镜头在光学变焦过程中,对应投影画面的移动轨迹,需要说明的是,图示的光学缩放中心(即,光学缩放参考点)可以在画面内任意位置,甚至可以在画面外,其可以根据具体的光学设计而定。FIG. 5 shows the movement trajectory of an optional typical optical zoom lens corresponding to the projection image during the optical zooming process according to the embodiment of the present application. It should be noted that the optical zoom center (ie, the optical zoom reference point) shown in the figure is the center of the optical zoom. It can be anywhere within the frame, or even outside the frame, depending on the specific optical design.
图6是本申请实施例一种可选的光学变焦位置与画面缩放比例的对应关系示意图, 光学变焦位置移动后,画面四点相对于光学缩放中心(光学缩放参考点,简称光心)的缩放比例是按同样的比例进行线性缩放的,则可以统一用如下图所示的线性关系r=kb+c来表示,其中r代表在当前变焦位置b情况下,画面当前某个角点(左上、右上、左下、右下四个角点)到光心距离与最大画面下对应顶点到光心的距离oT1的比值;比如在最大投射比位置b2(此时画面右上角点为T2),则此时r=oT2/oT1,其中oT1为上图中光学中心o到T1角点的距离,oT2为上图中光学中心o到T2角点的距离,k,c为曲线参数,b为当前变焦位置。需要说明的是,若四个角点到光学缩放中心的距离变化关系不一致,则需要分别拟合四条曲线来表征画面位置,同时拟合曲线包括但不限于图示的线性关系,图4示出的缩放前后区域A与区域B分别对应图6中的光学变焦位置b1和b3,则可以得到区域A与区域B各自对应的距离比为r1=kb1+c与r3=kb2+c;然后分别计算光学缩放参考点o到初始最大画面(投射比最小时,即对应画面最大区域,需要说明的是,图示为缩放前区域A刚好为最大画面区域的情况,缩放前画面非最大画面时同样以最大画面为参考)的对应角点的比例下对应坐标,比如r1此时长度比为1,则左上角点长度为r1*oA得到左上角为A点,同样可以得到缩放前画面B、C、D点,而缩放后比例为r3,则左上角长度oa=r3*oA得到a点,类似按照比例可得b、c、d点。由此,可分别得到缩放前面画面区域A(矩形ABCD)与缩放后画面区域B(矩形abcd),可以理解的,对于画面是放大的情况,处理方式类似,只是相当于画面从区域B变成了区域A)。6 is a schematic diagram of an optional corresponding relationship between the optical zoom position and the screen zoom ratio according to an embodiment of the present application. After the optical zoom position is moved, the zoom of four points on the screen relative to the optical zoom center (optical zoom reference point, optical center for short) is zoomed The scale is linearly scaled according to the same ratio, which can be expressed by the linear relationship r=kb+c as shown in the figure below, where r represents the current corner of the screen (upper left, The ratio between the distance from the upper right, lower left, and lower right four corners) to the optical center and the distance oT1 from the corresponding vertex under the largest screen to the optical center; for example, at the position b2 of the maximum throw ratio (the point in the upper right corner of the screen is T2 at this time), then this When r=oT2/oT1, where oT1 is the distance from the optical center o to the corner of T1 in the above figure, oT2 is the distance from the optical center o to the corner of T2 in the above figure, k, c are the curve parameters, and b is the current zoom position . It should be noted that if the distance relationship between the four corner points and the optical zoom center is inconsistent, it is necessary to fit four curves to characterize the screen position, and the fitted curves include but are not limited to the linear relationship shown in the figure, as shown in Figure 4. The area A and area B before and after zooming correspond to the optical zoom positions b1 and b3 in Fig. 6, respectively, then the corresponding distance ratios of area A and area B can be obtained as r1=kb1+c and r3=kb2+c; then calculate respectively Optical zoom reference point o to the initial maximum screen (when the projection ratio is the smallest, it corresponds to the largest area of the screen. It should be noted that the figure shows the case where the area A before zooming is just the largest screen area. When the screen before zooming is not the largest screen, the same The corresponding coordinates under the ratio of the corresponding corner points of the largest picture as a reference), for example, when the length ratio of r1 is 1, the length of the upper left corner point is r1*oA, so that the upper left corner is point A, and the pictures B, C, and C before scaling can also be obtained. Point D, and the scaled ratio is r3, then the length of the upper left corner oa=r3*oA to get point a, similar to points b, c, and d according to the scale. As a result, the zoomed image area A (rectangle ABCD) and the zoomed image area B (rectangle abcd) can be obtained respectively. It can be understood that for the case where the image is enlarged, the processing method is similar, but it is equivalent to changing the image from area B to area B. area A).
需要说明的是,上述投影区域可以为投影装置在物理空间的实际投影区域,也可以为投影装置自身虚拟的与物理空间的实际投影区域相对应的投影区域,并可以通过以下方式确定第一映射关系:获取第二投影区域对应的第二预定位置坐标,其中,第二投影区域为第三投影区域进行梯形校正过的投影画面;获取第三投影区域对应的第三预定位置坐标,其中,第三投影区域为最大投影画面;根据第三预定位置坐标与第二预定位置坐标确定第一单应性变换矩阵,将第一单应性变换矩阵作为第一映射关系。It should be noted that the above-mentioned projection area may be the actual projection area of the projection device in the physical space, or may be the virtual projection area of the projection device itself corresponding to the actual projection area of the physical space, and the first mapping may be determined in the following manner: Relation: Obtain the second predetermined position coordinates corresponding to the second projection area, where the second projection area is a projection image that has been keystone-corrected in the third projection area; obtain the third predetermined position coordinates corresponding to the third projection area, where the first The three projection areas are the largest projection images; the first homography transformation matrix is determined according to the third predetermined position coordinates and the second predetermined position coordinates, and the first homography transformation matrix is used as the first mapping relationship.
本申请一些可选的实施例中,可根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,具体地,确定初始光学缩放参考点对应的初始坐标;基于第一单应性变换矩阵对初始坐标进行单应性变换,得到等效光学缩放参考点。In some optional embodiments of the present application, the equivalent optical zoom reference point may be determined according to the initial optical zoom reference point and the first mapping relationship, and specifically, the initial coordinates corresponding to the initial optical zoom reference point are determined; based on the first homography The transformation matrix performs homography transformation on the initial coordinates to obtain the equivalent optical scaling reference point.
可以理解的,确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离之前,可获取第四投影区域对应的第四预定位置坐标,需要说明的是,第四投影区域为第三投影区域缩放后的投影画面,最后,根据第四预定位置坐标与第一单应性变换矩阵确定第一预定位置。It can be understood that before determining the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, the coordinates of the fourth predetermined position corresponding to the fourth projection area can be obtained. The area is the projection image after scaling of the third projection area, and finally, the first predetermined position is determined according to the fourth predetermined position coordinates and the first homography transformation matrix.
本申请一些实施例中,可根据目标点的位置与第一预定位置,确定第二映射关系,具体地,确定目标点的位置处的目标坐标及第一预定位置处的第一坐标;并根据目标 坐标与第一坐标得到第二单应性变换矩阵,然后将第二单应性变换矩阵作为第二映射关系。In some embodiments of the present application, the second mapping relationship may be determined according to the position of the target point and the first predetermined position, specifically, the target coordinates at the position of the target point and the first coordinates at the first predetermined position are determined; and according to A second homography transformation matrix is obtained from the target coordinates and the first coordinates, and then the second homography transformation matrix is used as the second mapping relationship.
本申请一些实施例中,可以根据第二预定位置坐标与第二映射关系得到目标坐标,具体地,对第二预定位置坐标与第二单应性变换矩阵进行矩阵乘法运算,得到目标坐标。In some embodiments of the present application, the target coordinates can be obtained according to the second predetermined position coordinates and the second mapping relationship. Specifically, matrix multiplication is performed on the second predetermined position coordinates and the second homography transformation matrix to obtain the target coordinates.
可以理解的,可根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置,具体地,确定等效光学缩放参考点与第二预定位置之间的目标连线;根据比值确定在目标连线上的目标点的位置。It can be understood that the position of the target point between the equivalent optical zoom reference point and the second predetermined position can be determined according to the ratio, and specifically, the target connection line between the equivalent optical zoom reference point and the second predetermined position is determined; The ratio determines the position of the target point on the target line.
需要说明的是,第一预定位置与第二预定位置是一一对应的,例如,第一预定位置为第一投影区域中的左上角位置,则对应第二投影区域中的左上角位置,显而易见的,第一预定位置与第二预定位置均有多个,例如,第一投影区域的左上角位置、左下角位置、右上角位置以及右下角位置,又例如,第二投影区域的左上角位置、左下角位置、右下角位置以及右下角位置,因此,确定第一距离与第二距离的比值时,可从确定的多个比值中选择最大比值,并基于最大比值确定在目标连线上的目标点的位置。It should be noted that there is a one-to-one correspondence between the first predetermined position and the second predetermined position. For example, if the first predetermined position is the upper left corner position in the first projection area, it corresponds to the upper left corner position in the second projection area. Obviously , there are multiple first predetermined positions and second predetermined positions, for example, the upper left corner position, the lower left corner position, the upper right corner position and the lower right corner position of the first projection area, and, for example, the upper left corner position of the second projection area , the lower left corner position, the lower right corner position and the lower right corner position. Therefore, when determining the ratio of the first distance to the second distance, the maximum ratio can be selected from the determined multiple ratios, and the maximum ratio can be determined on the target connection line based on the maximum ratio. The location of the target point.
本申请一些实施例中,可基于最大比值确定在目标连线上的目标点的位置,具体地,将最大比值乘以第二距离,得到第三距离,以等效缩放中心为圆心,以第三距离为半径画圆,确定圆形运动轨迹,确定圆形运动轨迹与目标连线的交点,将交点对应的坐标作为目标点的位置。In some embodiments of the present application, the position of the target point on the target connection line may be determined based on the maximum ratio. Specifically, the maximum ratio is multiplied by the second distance to obtain the third distance. The equivalent scaling center is the center of the circle, and the third distance is the center of the circle. Draw a circle with three distances as the radius, determine the circular motion trajectory, determine the intersection point between the circular motion trajectory and the target line, and take the coordinates corresponding to the intersection point as the position of the target point.
为了便于本领域技术人员更好地理解本申请相关实施例,图7是本申请另一种可选的投影空间中坐标位置示意图,现结合图7对本申请相关实施例进行说明,如图7所示,可计算区域A(第三投影区域)到区域C(第二投影区域)的单应性变换矩阵H1(第一映射关系),需要说明的是,区域C(第二投影区域)为为了保证在某个侧投角度下,保证物理世界中画面方正而调整出的梯形校正坐标区域,具体的计算过程可以为,确定区域C(第二投影区域)的四个角点坐标,区域A(第三投影区域)的四个角点坐标,然后采用直接线性变换法Direct Linear Transformation(简称DLT)进行求解,得到单应性变换矩阵H1,在得到单应性变换矩阵H1后,可以将初始光学缩放参考点的o点的坐标,基于该单应性变换矩阵H1进行单应性变换得到等效光学缩放参考点的o1点的坐标。In order to facilitate those skilled in the art to better understand the relevant embodiments of the present application, FIG. 7 is a schematic diagram of another optional coordinate position in the projection space of the present application. Now, the relevant embodiments of the present application will be described with reference to FIG. 7 , as shown in FIG. 7 . As shown, the homography transformation matrix H1 (the first mapping relationship) from the region A (the third projection region) to the region C (the second projection region) can be calculated. It should be noted that the region C (the second projection region) is for the purpose of The keystone correction coordinate area adjusted to ensure that the screen is square in the physical world under a certain side projection angle, the specific calculation process can be as follows: determine the coordinates of the four corner points of the area C (second projection area), and the area A ( The coordinates of the four corners of the third projection area), and then use the direct linear transformation method Direct Linear Transformation (DLT for short) to solve to obtain the homography transformation matrix H1, after obtaining the homography transformation matrix H1, the initial optical transformation can be The coordinates of point o of the scaling reference point are obtained, and the coordinates of point o1 of the equivalent optical scaling reference point are obtained by performing homography transformation based on the homography transformation matrix H1.
进一步地,将区域B(abcd、第四投影区域)的四点坐标按照上一步的求得的单应性变换矩阵H1(第一映射关系)进行单应性变换得到的四个新坐标点,即区域D(efgh、第一投影区域)的四点坐标;然后连接等效光学缩放参考点o1到区域C(EFGH、第二 投影区域)四个点,并计算线段o1-e与o1-E比值:o1-e/o1-E,类似地,分别计算o1-f/o1-F、o1-g/o1-G、o1-h/o1-H得到四个比值,优选地,取四个比值中的最大值,假设此时最大比值为o1-g/o1-G,记为max Ratio;则进一步地根据上一步骤得出的max Ratio分别计算在o1到区域C四个角点上的相交位置,即o1-G*max Ratio得到g1点(如图中小圆环所示),同理,可以得到e1点(o1-E*max Ratio)、f1点(o1-F*max Ratio)、h1点(o1-H*max Ratio);接下来,计算efgh四点到e1f1g1h1四点的单应变换矩阵H2(第二映射关系),最终调整后四点坐标值为初始梯形校正四点坐标值*H2(第二预定位置坐标*第二映射关系),得到的新四点坐标即为目标坐标,容易注意到的是,该初始梯形校正四点坐标值为C区域(EFGH、第二投影区域)四个角点对应的坐标值。Further, four new coordinate points obtained by performing homography transformation on the four-point coordinates of the region B (abcd, the fourth projection region) according to the homography transformation matrix H1 (first mapping relationship) obtained in the previous step, That is, the four-point coordinates of the area D (efgh, the first projection area); then connect the equivalent optical zoom reference point o1 to the four points of the area C (EFGH, the second projection area), and calculate the line segments o1-e and o1-E Ratio: o1-e/o1-E, similarly, calculate o1-f/o1-F, o1-g/o1-G, o1-h/o1-H to obtain four ratios, preferably, take four ratios The maximum value in , assuming that the maximum ratio is o1-g/o1-G at this time, denoted as max Ratio; then further calculate the intersection between o1 and the four corners of area C according to the max Ratio obtained in the previous step. Position, that is, o1-G*max Ratio to get g1 point (as shown by the small circle in the figure), in the same way, e1 point (o1-E*max Ratio), f1 point (o1-F*max Ratio), h1 Point (o1-H*max Ratio); Next, calculate the homography transformation matrix H2 (second mapping relationship) from the four points of efgh to the four points of e1f1g1h1, and finally adjust the coordinates of the four points to the initial trapezoidal correction four-point coordinate value* H2 (second predetermined position coordinates * second mapping relationship), the new four-point coordinates obtained are the target coordinates. It is easy to notice that the initial trapezoidal correction four-point coordinate value is the C area (EFGH, the second projection area) The coordinate values corresponding to the four corner points.
图8是根据本申请实施例的确定目标坐标的装置,如图8所示,该装置包括:FIG. 8 is an apparatus for determining target coordinates according to an embodiment of the present application. As shown in FIG. 8 , the apparatus includes:
第一确定模块40,用于确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面,光学缩放参考点为在投影平面中预先设定的用于对投影画面进行变焦处理的参考点;The first determination module 40 is configured to determine the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, wherein the equivalent optical zoom reference is determined according to the initial optical zoom reference point and the first mapping relationship point, the first projection area is the zoomed projection image of the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image;
第二确定模块42,用于确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;The second determination module 42 is configured to determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point;
第三确定模块44,用于确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;The third determination module 44 is configured to determine the ratio of the first distance to the second distance, and determine the position of the target point between the equivalent optical zoom reference point and the second predetermined position according to the ratio;
第四确定模块46,用于根据目标点的位置与第一预定位置,确定第二映射关系;The fourth determination module 46 is used to determine the second mapping relationship according to the position of the target point and the first predetermined position;
第五确定模块48,用于根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标。The fifth determination module 48 is configured to obtain target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection.
该确定目标坐标的装置中,第一确定模块40,用于确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面,光学缩放参考点为在投影平面中预先设定的用于对投影画面进行变焦处理的参考点;第二确定模块42,用于确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;第三确定模块44,用于确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;第四确定模块46,用于根据目标点的位置与第一预定位置,确定第二映射关系;第五确定模块48,用于根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标,达到了基于缩放前后的最大投影区域以及缩放前后的梯形校正过的最大投影区域,确定投影坐标的技术效果,进而解决了由于存在侧投角度,在梯形校 正后进行光学缩放会造成原本已梯形校正调整好的矩形又会变成梯形的技术问题。In the apparatus for determining target coordinates, a first determination module 40 is configured to determine a first distance between a first predetermined position of the first projection area and an equivalent optical zoom reference point, wherein the first optical zoom reference point and the first The mapping relationship determines an equivalent optical zoom reference point, the first projection area is the zoomed projection image of the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image; The second determination module 42 is used to determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; the third determination module 44 is used to determine the ratio of the first distance to the second distance, The position of the target point between the equivalent optical zoom reference point and the second predetermined position is determined according to the ratio; the fourth determination module 46 is configured to determine the second mapping relationship according to the position of the target point and the first predetermined position; the fifth determination The module 48 is used to obtain the target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are the projection coordinates set when the projection device performs projection, which achieves the maximum projection area based on the before and after scaling and the trapezoidal correction before and after scaling. The maximum projection area that has been passed, determines the technical effect of the projection coordinates, and then solves the technical problem that due to the existence of a side projection angle, optical zooming after keystone correction will cause the rectangle that has been adjusted by keystone correction to become a trapezoid.
根据本申请实施例的另一方面,还提供了一种非易失性存储介质,非易失性存储介质包括存储的程序,其中,在程序运行时控制非易失性存储介质所在设备执行任意一种确定目标坐标的方法。According to another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, where the non-volatile storage medium includes a stored program, wherein when the program runs, the device where the non-volatile storage medium is located is controlled to execute any arbitrary program. A method of determining the coordinates of a target.
具体地,上述存储介质用于存储执行以下功能的程序指令,实现以下功能:确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面,光学缩放参考点为在投影平面中预先设定的用于对投影画面进行变焦处理的参考点;确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;根据目标点的位置与第一预定位置,确定第二映射关系;根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标。Specifically, the above-mentioned storage medium is used to store program instructions for executing the following functions, and realize the following functions: determining the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, wherein, according to the initial optical zoom reference The point and the first mapping relationship determine an equivalent optical zoom reference point, the first projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is a preset in the projection plane for zooming the projection image determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; determine the ratio of the first distance to the second distance, and determine the equivalent optical zoom reference point and the second The position of the target point between the predetermined positions; the second mapping relationship is determined according to the position of the target point and the first predetermined position; the target coordinates are obtained according to the coordinates of the second predetermined position and the second mapping relationship, wherein the target coordinates are performed by the projection device. Projection coordinates to set when projecting.
根据本申请实施例的另一方面,还提供了一种处理器,处理器用于运行程序,其中,程序运行时执行任意一种确定目标坐标的方法。According to another aspect of the embodiments of the present application, a processor is also provided, and the processor is configured to run a program, wherein, when the program runs, any method for determining target coordinates is executed.
具体地,上述处理器用于调用存储器中的程序指令,实现以下功能:确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定等效光学缩放参考点,第一投影区域为第二投影区域缩放后的投影画面,光学缩放参考点为在投影平面中预先设定的用于对投影画面进行变焦处理的参考点;确定第二投影区域的第二预定位置处与等效光学缩放参考点的第二距离;确定第一距离与第二距离的比值,根据比值确定等效光学缩放参考点与第二预定位置之间的目标点的位置;根据目标点的位置与第一预定位置,确定第二映射关系;根据第二预定位置坐标与第二映射关系得到目标坐标,其中,目标坐标为投影装置进行投影时设置的投影坐标。Specifically, the above-mentioned processor is used to call the program instructions in the memory, and realize the following function: determine the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, wherein, according to the initial optical zoom reference point and The first mapping relationship determines an equivalent optical zoom reference point, the first projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is a preset reference in the projection plane for zooming the projection image point; determine the second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point; determine the ratio of the first distance to the second distance, and determine the equivalent optical zoom reference point and the second predetermined position according to the ratio According to the position of the target point and the first predetermined position, the second mapping relationship is determined; the target coordinates are obtained according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are when the projection device projects Set projected coordinates.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模 块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are only illustrative, for example, the division of the units may be a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of units or modules, and may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes .
以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above are only the preferred embodiments of the present application. It should be pointed out that for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can also be made. It should be regarded as the protection scope of this application.

Claims (12)

  1. 一种确定目标坐标的方法,其特征在于,包括:A method for determining target coordinates, comprising:
    确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定所述等效光学缩放参考点,所述第一投影区域为第二投影区域缩放后的投影画面,所述光学缩放参考点为在所述投影平面中预先设定的用于对所述投影画面进行变焦处理的参考点;determining a first distance between a first predetermined position of the first projection area and an equivalent optical zoom reference point, wherein the equivalent optical zoom reference point is determined according to an initial optical zoom reference point and a first mapping relationship, and the first The projection area is the projection image after zooming in the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for performing zoom processing on the projection image;
    确定所述第二投影区域的第二预定位置处与所述等效光学缩放参考点的第二距离;determining a second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point;
    确定所述第一距离与所述第二距离的比值,根据所述比值确定所述等效光学缩放参考点与第二预定位置之间的目标点的位置;determining a ratio of the first distance to the second distance, and determining a position of a target point between the equivalent optical zoom reference point and a second predetermined position according to the ratio;
    根据所述目标点的位置与所述第一预定位置,确定第二映射关系;determining a second mapping relationship according to the position of the target point and the first predetermined position;
    根据所述第二预定位置坐标与所述第二映射关系得到目标坐标,其中,所述目标坐标为投影装置进行投影时设置的投影坐标。Target coordinates are obtained according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are projection coordinates set when the projection device performs projection.
  2. 根据权利要求1所述的方法,其特征在于,通过以下方式确定所述第一映射关系:The method according to claim 1, wherein the first mapping relationship is determined in the following manner:
    获取第二投影区域对应的第二预定位置坐标,其中,所述第二投影区域为第三投影区域进行梯形校正过的投影画面;acquiring a second predetermined position coordinate corresponding to a second projection area, wherein the second projection area is a projection image obtained by performing keystone correction in the third projection area;
    获取所述第三投影区域对应的第三预定位置坐标,其中,所述第三投影区域为最大投影画面;acquiring a third predetermined position coordinate corresponding to the third projection area, wherein the third projection area is the largest projection image;
    根据所述第三预定位置坐标与所述第二预定位置坐标确定第一单应性变换矩阵,将所述第一单应性变换矩阵作为所述第一映射关系。A first homography transformation matrix is determined according to the third predetermined position coordinates and the second predetermined position coordinates, and the first homography transformation matrix is used as the first mapping relationship.
  3. 根据权利要求2所述的方法,其特征在于,根据初始光学缩放参考点与第一映射关系确定所述等效光学缩放参考点,包括:The method according to claim 2, wherein determining the equivalent optical zoom reference point according to the initial optical zoom reference point and the first mapping relationship comprises:
    确定所述初始光学缩放参考点对应的初始坐标;determining the initial coordinates corresponding to the initial optical zoom reference point;
    基于所述第一单应性变换矩阵对所述初始坐标进行单应性变换,得到所述等效光学缩放参考点。Perform homography transformation on the initial coordinates based on the first homography transformation matrix to obtain the equivalent optical scaling reference point.
  4. 根据权利要求3所述的方法,其特征在于,确定第一投影区域的第一预定位置处与所述等效光学缩放参考点的第一距离之前,所述方法还包括:The method according to claim 3, wherein before determining the first distance between the first predetermined position of the first projection area and the equivalent optical zoom reference point, the method further comprises:
    获取第四投影区域对应的第四预定位置坐标,其中,所述第四投影区域为所述第三投影区域缩放后的投影画面;acquiring a fourth predetermined position coordinate corresponding to a fourth projection area, wherein the fourth projection area is a scaled projection image of the third projection area;
    根据所述第四预定位置坐标与所述第一单应性变换矩阵确定所述第一预定位置。The first predetermined position is determined according to the fourth predetermined position coordinates and the first homography transformation matrix.
  5. 根据权利要求1所述的方法,其特征在于,根据所述目标点的位置与所述第一预定位置,确定第二映射关系,包括:The method according to claim 1, wherein determining the second mapping relationship according to the position of the target point and the first predetermined position, comprising:
    确定所述目标点的位置处的目标坐标及所述第一预定位置处的第一坐标;determining the target coordinates at the position of the target point and the first coordinates at the first predetermined position;
    根据所述目标坐标与所述第一坐标得到第二单应性变换矩阵;Obtain a second homography transformation matrix according to the target coordinates and the first coordinates;
    将所述第二单应性变换矩阵作为所述第二映射关系。The second homography transformation matrix is used as the second mapping relationship.
  6. 根据权利要求5所述的方法,其特征在于,根据所述第二预定位置坐标与所述第二映射关系得到目标坐标,包括:The method according to claim 5, wherein obtaining target coordinates according to the second predetermined position coordinates and the second mapping relationship comprises:
    对所述第二预定位置坐标与所述第二单应性变换矩阵进行矩阵乘法运算,得到所述目标坐标。Perform matrix multiplication operation on the second predetermined position coordinates and the second homography transformation matrix to obtain the target coordinates.
  7. 根据权利要求1所述的方法,其特征在于,根据所述比值确定所述等效光学缩放参考点与第二预定位置之间的目标点的位置,包括:The method according to claim 1, wherein determining the position of the target point between the equivalent optical zoom reference point and the second predetermined position according to the ratio comprises:
    确定所述等效光学缩放参考点与所述第二预定位置之间的目标连线;determining a target connection line between the equivalent optical zoom reference point and the second predetermined position;
    根据所述比值确定在所述目标连线上的目标点的位置。The position of the target point on the target line is determined according to the ratio.
  8. 根据权利要求7所述的方法,其特征在于,所述第一预定位置与所述第二预定位置是一一对应的,且所述第一预定位置与所述第二预定位置均有多个,确定所述第一距离与所述第二距离的比值,包括:The method according to claim 7, wherein there is a one-to-one correspondence between the first predetermined position and the second predetermined position, and both the first predetermined position and the second predetermined position have a plurality of , determine the ratio of the first distance to the second distance, including:
    从确定的多个比值中选择最大比值,基于所述最大比值确定在所述目标连线上的目标点的位置。A maximum ratio is selected from the determined plurality of ratios, and the position of the target point on the target link is determined based on the maximum ratio.
  9. 根据权利要求8所述的方法,其特征在于,基于所述最大比值确定在目标连线上的目标点的位置,包括:The method according to claim 8, wherein determining the position of the target point on the target connection line based on the maximum ratio comprises:
    将所述最大比值乘以所述第二距离,得到第三距离;multiplying the maximum ratio by the second distance to obtain a third distance;
    以所述等效缩放中心为圆心,以所述第三距离为半径画圆,确定圆形运动轨迹;Draw a circle with the equivalent zoom center as the center and the third distance as the radius to determine a circular motion trajectory;
    确定所述圆形运动轨迹与所述目标连线的交点;Determine the intersection of the circular motion trajectory and the target line;
    将所述交点对应的坐标作为所述目标点的位置。The coordinates corresponding to the intersection point are used as the position of the target point.
  10. 一种确定目标坐标的装置,其特征在于,包括:A device for determining target coordinates, comprising:
    第一确定模块,用于确定第一投影区域的第一预定位置处与等效光学缩放参考点的第一距离,其中,根据初始光学缩放参考点与第一映射关系确定所述等效光学缩放参考点,所述第一投影区域为第二投影区域缩放后的投影画面,所述光学缩放参考点为在所述投影平面中预先设定的用于对所述投影画面进行变焦处理的参考点;a first determination module, configured to determine a first distance between the first predetermined position of the first projection area and an equivalent optical zoom reference point, wherein the equivalent optical zoom is determined according to the initial optical zoom reference point and the first mapping relationship A reference point, the first projection area is the projection image scaled by the second projection area, and the optical zoom reference point is a preset reference point in the projection plane for zooming the projection image ;
    第二确定模块,用于确定所述第二投影区域的第二预定位置处与所述等效光学缩放参考点的第二距离;a second determining module, configured to determine a second distance between the second predetermined position of the second projection area and the equivalent optical zoom reference point;
    第三确定模块,用于确定所述第一距离与所述第二距离的比值,根据所述比值确定所述等效光学缩放参考点与第二预定位置之间的目标点的位置;a third determining module, configured to determine the ratio of the first distance to the second distance, and determine the position of the target point between the equivalent optical zoom reference point and the second predetermined position according to the ratio;
    第四确定模块,用于根据所述目标点的位置与所述第一预定位置,确定第二映射关系;a fourth determining module, configured to determine a second mapping relationship according to the position of the target point and the first predetermined position;
    第五确定模块,用于根据所述第二预定位置坐标与所述第二映射关系得到目标坐标,其中,所述目标坐标为投影装置进行投影时设置的投影坐标。The fifth determination module is configured to obtain target coordinates according to the second predetermined position coordinates and the second mapping relationship, wherein the target coordinates are projection coordinates set when the projection device performs projection.
  11. 一种非易失性存储介质,其特征在于,所述非易失性存储介质包括存储的程序,其中,在所述程序运行时控制所述非易失性存储介质所在设备执行权利要求1至9中任意一项所述确定目标坐标的方法。A non-volatile storage medium, characterized in that the non-volatile storage medium includes a stored program, wherein when the program runs, the device where the non-volatile storage medium is located is controlled to execute claims 1 to 1. The method for determining target coordinates according to any one of 9.
  12. 一种处理器,其特征在于,所述处理器用于运行程序,其中,所述程序运行时执行权利要求1至9中任意一项所述确定目标坐标的方法。A processor, characterized in that the processor is used to run a program, wherein when the program runs, the method for determining target coordinates according to any one of claims 1 to 9 is executed.
PCT/CN2021/120719 2021-03-31 2021-09-26 Target coordinate determination method and apparatus WO2022205814A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110352772.1 2021-03-31
CN202110352772.1A CN115150598B (en) 2021-03-31 2021-03-31 Method and device for determining target coordinates

Publications (1)

Publication Number Publication Date
WO2022205814A1 true WO2022205814A1 (en) 2022-10-06

Family

ID=83405634

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/120719 WO2022205814A1 (en) 2021-03-31 2021-09-26 Target coordinate determination method and apparatus

Country Status (2)

Country Link
CN (1) CN115150598B (en)
WO (1) WO2022205814A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329761A (en) * 2008-07-25 2008-12-24 北京中星微电子有限公司 Method and apparatus for regulating keystone distortion of a projecting equipment
CN101577801A (en) * 2008-05-09 2009-11-11 三洋电机株式会社 Projection type video display device
US20110157232A1 (en) * 2009-12-28 2011-06-30 Canon Kabushiki Kaisha Projection-type display apparatus and geometric distortion correcting method for correcting geometric distortion
CN108924521A (en) * 2018-05-31 2018-11-30 晨星半导体股份有限公司 The trapezoidal distortion correction method and equipment of optical projection system
CN110290364A (en) * 2019-06-04 2019-09-27 成都极米科技股份有限公司 Electrodeless Zooming method, device and readable storage medium storing program for executing under side throwing mode

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5353596B2 (en) * 2009-09-18 2013-11-27 セイコーエプソン株式会社 Projection display device and keystone correction method
CN108632585B (en) * 2017-03-24 2021-03-09 中兴通讯股份有限公司 Image correction method and device, storage medium and projection equipment
CN110996083A (en) * 2019-12-19 2020-04-10 成都极米科技股份有限公司 Trapezoidal correction method and device, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577801A (en) * 2008-05-09 2009-11-11 三洋电机株式会社 Projection type video display device
CN101329761A (en) * 2008-07-25 2008-12-24 北京中星微电子有限公司 Method and apparatus for regulating keystone distortion of a projecting equipment
US20110157232A1 (en) * 2009-12-28 2011-06-30 Canon Kabushiki Kaisha Projection-type display apparatus and geometric distortion correcting method for correcting geometric distortion
CN108924521A (en) * 2018-05-31 2018-11-30 晨星半导体股份有限公司 The trapezoidal distortion correction method and equipment of optical projection system
CN110290364A (en) * 2019-06-04 2019-09-27 成都极米科技股份有限公司 Electrodeless Zooming method, device and readable storage medium storing program for executing under side throwing mode

Also Published As

Publication number Publication date
CN115150598B (en) 2023-05-12
CN115150598A (en) 2022-10-04

Similar Documents

Publication Publication Date Title
JP7291244B2 (en) Projector Keystone Correction Method, Apparatus, System and Readable Storage Medium
CN110099266B (en) Projector picture correction method and device and projector
WO2021031781A1 (en) Method and device for calibrating projection image and projection device
US8398246B2 (en) Real-time projection management
CN110636273A (en) Method and device for adjusting projection picture, readable storage medium and projector
EP3930319A1 (en) Ultra-short-focus image-screen alignment method and apparatus, ultra-short-focus projection device, and medium
WO2021208486A1 (en) Camera coordinate transformation method, terminal, and storage medium
CN111083456A (en) Projection correction method, projection correction device, projector and readable storage medium
CN110570367A (en) Fisheye image correction method, electronic device and storage medium
WO2022161240A1 (en) Photographing method and apparatus, electronic device, and medium
CN114727081A (en) Projector projection correction method and device and projector
WO2021035485A1 (en) Shooting anti-shake method and apparatus, terminal and storage medium
CN112017133A (en) Image display method and device and electronic equipment
CN114640833A (en) Projection picture adjusting method and device, electronic equipment and storage medium
WO2022205814A1 (en) Target coordinate determination method and apparatus
WO2024037415A1 (en) Screen mirroring content display method and apparatus, device and storage medium
CN115174878B (en) Projection picture correction method, apparatus and storage medium
WO2022205813A1 (en) Method and apparatus for determining display area of projection picture, and projector
WO2022062604A1 (en) Projection screen adjusting method and apparatus, and projector, and storage medium
TW202004323A (en) Keystone correction method and device
Xu et al. Real-time keystone correction for hand-held projectors with an RGBD camera
CN113573033A (en) Method for adjusting picture size of LCD projector
WO2022205811A1 (en) Projection display method and apparatus, and projection device
CN115174879B (en) Projection screen correction method, apparatus, computer device and storage medium
JP2002260003A (en) Video display device

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: 21934451

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: 21934451

Country of ref document: EP

Kind code of ref document: A1