23 #ifndef __HOMOGRAPHY_NET_H__ 24 #define __HOMOGRAPHY_NET_H__ 30 #if NV_TENSORRT_MAJOR >= 5 37 #define HAS_HOMOGRAPHY_NET 44 #define HOMOGRAPHY_NET_DEFAULT_INPUT "input_0" 50 #define HOMOGRAPHY_NET_DEFAULT_OUTPUT "output_0" 84 bool allowGPUFallback=
true );
113 bool FindDisplacement(
float* imageA,
float* imageB, uint32_t width, uint32_t height,
float displacement[8] );
119 bool FindHomography(
float* imageA,
float* imageB, uint32_t width, uint32_t height,
float H[3][3] );
125 bool FindHomography(
float* imageA,
float* imageB, uint32_t width, uint32_t height,
float H[3][3],
float H_inv[3][3] );
137 bool ComputeHomography(
const float displacement[8],
float H[3][3],
float H_inv[3][3] );
Sequences collected from webcam (320x240 input)
Definition: homographyNet.h:67
precisionType
Enumeration for indicating the desired precision that the network should run in, if available in hard...
Definition: tensorNet.h:79
GPU (if multiple GPUs are present, a specific GPU can be selected with cudaSetDevice() ...
Definition: tensorNet.h:108
#define HOMOGRAPHY_NET_DEFAULT_INPUT
Name of default input blob for homographyNet ONNX models.
Definition: homographyNet.h:44
Custom model from user.
Definition: homographyNet.h:65
#define HOMOGRAPHY_NET_DEFAULT_OUTPUT
Name of default output blob for homographyNet ONNX models.
Definition: homographyNet.h:50
deviceType
Enumeration for indicating the desired device that the network should run on, if available in hardwar...
Definition: tensorNet.h:106
Homography estimation networks with TensorRT support.
Definition: homographyNet.h:57
The fastest detected precision should be use (i.e.
Definition: tensorNet.h:82
NetworkType
Network choice enumeration.
Definition: homographyNet.h:63
bool FindDisplacement(float *imageA, float *imageB, uint32_t width, uint32_t height, float displacement[8])
Find the displacement from imageA to imageB.
bool ComputeHomography(const float displacement[8], float H[3][3])
Given the displacement from FindDisplacement(), compute the homography.
static homographyNet * Create(NetworkType networkType=WEBCAM_320, uint32_t maxBatchSize=1, precisionType precision=TYPE_FASTEST, deviceType device=DEVICE_GPU, bool allowGPUFallback=true)
Load a new network instance.
virtual ~homographyNet()
Destroy.
bool FindHomography(float *imageA, float *imageB, uint32_t width, uint32_t height, float H[3][3])
Find the homography that warps imageA to imageB.
Abstract class for loading a tensor network with TensorRT.
Definition: tensorNet.h:188
static NetworkType NetworkTypeFromStr(const char *model_name)
Parse a string to one of the built-in pretrained models.
Synthetically-warped COCO (128x128 input)
Definition: homographyNet.h:66