DriveWorks SDK Reference

| 0.6.67 Release

Rectifier

Detailed Description

Defines the rectifier module.

Typedefs

typedef struct dwRectifierObject * dwRectifierHandle_t
 A pointer to the handle representing a rectifier. More...
 

Functions

DW_API_PUBLIC dwStatus dwRectifier_getCUDAStream (cudaStream_t *stream, dwRectifierHandle_t obj)
 Gets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwRectifier_getHomography (dwMatrix3f *homography, dwRectifierHandle_t obj)
 Gets the homography matrix used. More...
 
DW_API_PUBLIC dwStatus dwRectifier_initialize (dwRectifierHandle_t *obj, dwCalibratedCameraHandle_t cameraIn, dwCalibratedCameraHandle_t cameraOut, dwContextHandle_t ctx)
 Initializes a rectifier based on an input and output camera model and a homography. More...
 
DW_API_PUBLIC dwStatus dwRectifier_release (dwRectifierHandle_t *obj)
 Releases the rectifier module. More...
 
DW_API_PUBLIC dwStatus dwRectifier_reset (dwRectifierHandle_t obj)
 Resets the rectifier module. More...
 
DW_API_PUBLIC dwStatus dwRectifier_setCUDAStream (cudaStream_t stream, dwRectifierHandle_t obj)
 Sets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwRectifier_setHomography (const dwMatrix3f *homography, dwRectifierHandle_t obj)
 Sets the homography matrix used. More...
 
DW_API_PUBLIC dwStatus dwRectifier_warp (dwImageCUDA *outputImage, const dwImageCUDA *inputImage, dwRectifierHandle_t obj)
 Warps the image from the input camera model to the model of the output camera. More...
 

Typedef Documentation

◆ dwRectifierHandle_t

typedef struct dwRectifierObject* dwRectifierHandle_t

A pointer to the handle representing a rectifier.

This object allows you to rectify an image acquired in one camera model by projecting it into another camera model.

Definition at line 61 of file Rectifier.h.

Function Documentation

◆ dwRectifier_getCUDAStream()

DW_API_PUBLIC dwStatus dwRectifier_getCUDAStream ( cudaStream_t *  stream,
dwRectifierHandle_t  obj 
)

Gets the CUDA stream used.

Parameters
[in]streamUses this CUDA stream.
[in]objA pointer to the rectifier handle that is updated. Initialization must not have changed.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwRectifier_getHomography()

DW_API_PUBLIC dwStatus dwRectifier_getHomography ( dwMatrix3f homography,
dwRectifierHandle_t  obj 
)

Gets the homography matrix used.

Parameters
[in]homographyThe homography transformation matrix.
[in]objA pointer to the rectifier handle that is updated. Initialization must not have changed.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwRectifier_initialize()

DW_API_PUBLIC dwStatus dwRectifier_initialize ( dwRectifierHandle_t obj,
dwCalibratedCameraHandle_t  cameraIn,
dwCalibratedCameraHandle_t  cameraOut,
dwContextHandle_t  ctx 
)

Initializes a rectifier based on an input and output camera model and a homography.

In particular, the rectifier implements Ray2Pixel_cameraOut( H * Pixel2Ray_cameraIn(Image) ). Per default, the homography is set to identity.

Parameters
[out]objA pointer to the rectifier handle for the created module.
[in]cameraInModel of the input camera.
[in]cameraOutModel of the output camera.
[in]ctxSpecifies the handler to the context to create the rectifier.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwRectifier_release()

DW_API_PUBLIC dwStatus dwRectifier_release ( dwRectifierHandle_t obj)

Releases the rectifier module.

Parameters
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
Note
This method renders the handle unusable.

◆ dwRectifier_reset()

DW_API_PUBLIC dwStatus dwRectifier_reset ( dwRectifierHandle_t  obj)

Resets the rectifier module.

Parameters
[in]objSpecifies the rectifier to reset.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwRectifier_setCUDAStream()

DW_API_PUBLIC dwStatus dwRectifier_setCUDAStream ( cudaStream_t  stream,
dwRectifierHandle_t  obj 
)

Sets the CUDA stream used.

Parameters
[in]streamThe CUDA stream to use.
[in]objA pointer to the rectifier handle that is updated. Initialization must not have changed.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwRectifier_setHomography()

DW_API_PUBLIC dwStatus dwRectifier_setHomography ( const dwMatrix3f homography,
dwRectifierHandle_t  obj 
)

Sets the homography matrix used.

Parameters
[in]homographyThe new homography transformation matrix.
[in]objA pointer to the rectifier handle that is updated. Initialization must not have changed.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwRectifier_warp()

DW_API_PUBLIC dwStatus dwRectifier_warp ( dwImageCUDA outputImage,
const dwImageCUDA inputImage,
dwRectifierHandle_t  obj 
)

Warps the image from the input camera model to the model of the output camera.

Parameters
[out]outputImagePointer to the output image.
[in]inputImagePointer to the input image.
[in]objA pointer to the rectifier handle that performs the warping.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS