FindProjection

Generates a projection matrix that describes the perspective from which a camera views the scene.

This action requires that you choose at least four points in the scene. The points must be on the same plane, but cannot be on a straight line. For example, you can choose four points at ground level as long as the points are not in a line.

This action can be used in several ways:

Type: synchronous

Parameter Description Required
screenpoints0 A comma-separated list of at least four points made up of x- and y-coordinates. Yes
screenpoints1 A comma-separated list of at least four points made up of x- and y-coordinates. Use this parameter when you have multiple cameras covering the same scene from different perspectives. The points must represent the same physical locations as the points in screenpoints0, and must be provided in the same order. Required unless you set worldpoints
tiltedhorizon A Boolean value (default false) that specifies whether the horizon in projection0 can be tilted (not parallel to the screenpoints0 x-axis). No
worldpoints A comma-separated list of at least four points made up of x-, y-, and z-coordinates. The points must represent the same physical locations as the points in screenpoints0, and must be provided in the same order. Required unless you set screenpoints1

Example

The following example generates a single projection matrix using four points - the corners of a 3m x 3m square, at ground level.

/action=FindProjection&screenpoints0=997,782,1295,770,1256,609,997,615
                      &worldpoints=0,0,0,3,0,0,3,3,0,0,3,0

The screenpoints0 parameter provides the x- and y-coordinates of pixels in the scene image.

The worldpoints parameter provides arbitrary real-world 3D coordinates (each point has an x-, y-, and z-coordinate).

Response

A sample response appears below.

<autnresponse>
  <action>FINDPROJECTION</action>
  <response>SUCCESS</response>
  <responsedata>
    <projection0>
      12.0269 0.041904 -12020.4 -0.652671 -18.9201 15430.2 0 0 0 0 1 426.708
    </projection0>
  </responsedata>
</autnresponse>