Find-Homography

group NVCV_C_ALGORITHM_FIND_HOMOGRAPHY

Unnamed Group

NVCVStatus cvcudaFindHomographySubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorHandle srcPts, NVCVTensorHandle dstPts, NVCVTensorHandle models)

Executes the Find-Homography operation on the given cuda stream.

Limitations:

Input: Data Layout: [NW] Channel count: [1]

Data Type

Allowed

8bit Unsigned

No

8bit Signed

No

16bit Unsigned

No

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

Yes

64bit Float

No

Output: Data Layout: [NHW] Channel count: [1]

Data Type

Allowed

8bit Unsigned

No

8bit Signed

No

16bit Unsigned

No

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

Yes

64bit Float

No

Input/Output dependency

 Property      |  Input == Output
-------------- | -------------
 Data Layout   | No
 Data Type     | Yes
 Batches (N)   | Yes
 Channels      | No

Parameters:
  • dstPts[in] Input tensor, dstPts[i, j] is the set of coordinates for the destination image where i ranges from 0 to batch-1, j ranges from 4 to number of coordinates per image, and the data type being float2 for (x=x, y=y)

    • Number of coordinates must be >= 4

    • Must have data type 2F32 or F32

    • Must have rank 2 or 3

  • out[out] Output tensor, models[i, j, k] is the output model tensor which maps the src points to dst points in image i, where i ranges from 0 to batch-1, j ranges from 0 to 2 and k ranges from 0 to 2, and the data type being F32.

    • Must have data type F32

    • Must have rank 3

  • handle[in] Handle to the operator.

    • Must not be NULL.

  • stream[in] Handle to a valid CUDA stream.

  • srcPts[in] Input tensor, srcPts[i, j] is the set of coordinates for the source image where i ranges from 0 to batch-1, j ranges from 4 to number of coordinates per image, and the data type being float2 for (x=x, y=y)

    • Number of coordinates must be >= 4

    • Must have data type 2F32 or F32

    • Must have rank 2 or 3

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.

  • NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus cvcudaFindHomographyVarShapeSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorBatchHandle srcPts, NVCVTensorBatchHandle dstPts, NVCVTensorBatchHandle models)

Executes the FindHomography operation on a batch of images.

Apart from input and output image batches, all parameters are the same as cvcudaFindHomographySubmit.

Parameters:
  • srcPts[in] batch of coordinates in the source image.

  • dstPts[out] batch of coordinates in the destination image.

  • models[in] model tensor batch.

Functions

NVCVStatus cvcudaFindHomographyCreate(NVCVOperatorHandle *handle, int batchSize, int maxNumPoints)

Constructs an instance of the Find-Homography operator.

Parameters:
  • handle[out] Where the image instance handle will be written to.

    • Must not be NULL.

  • batchSize[in] number of samples in the batch

  • numPoints[in] maximum number of coordinates that in the batch

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null.

  • NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.

  • NVCV_SUCCESS – Operation executed successfully.