NVIDIA DeepStream SDK API Reference

7.0 Release
NVWarp360.h
Go to the documentation of this file.
1 
13 
17 #ifndef __NVWARP360_H__
18 #define __NVWARP360_H__
19 
20 #include <cuda_runtime.h>
21 #include <stdint.h>
22 
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #if defined(_WIN32) || defined(_WIN64)
29  #define NVWARPAPI __stdcall
30 #else /* !_WINxx */
31  #define NVWARPAPI
32 #endif /* _WINxx */
33 
43 
45 typedef enum nvwarpResult
46 {
60  NVWARP_ERR_MAX = 0x7fffffff
61 } nvWarpResult;
62 
63 // These are not used directly by the API.
64 typedef enum nvwarpSurface_t
65 {
74 
76  NVSURF_UNKNOWN = ((1 << NVSURF_BITS) - 1),
77  NVSURF_MASK = ((1 << NVSURF_BITS) - 1),
78  NVSURF_MAX = 0x7fffffff
80 
82 typedef enum nvwarpType_t
83 {
102  NVWARP_NONE = 0xffffffff
103 } nvwarpType_t;
104 
105 
106 
107 
122 
123 
126 struct nvwarpParams_t;
128 
129 
133 
134 
136 typedef struct nvwarpParams_t
137 {
138  // Warp type selector
140 
141  // Source specification
142  uint32_t srcWidth;
143  uint32_t srcHeight;
144  float srcX0;
145  float srcY0;
146  float srcFocalLen;
147  float srcRadius;
148 
149  float dist[5];
150 
151  // Destination specification
152  uint32_t dstWidth;
153  uint32_t dstHeight;
154 
155  // View specification
156  float rotAngles[3];
157  char rotAxes[4];
158 
164  float topAngle;
165  float bottomAngle;
166 
167  void* userData;
168 
169  // Warp controls
170  float control[4];
171 
172 #ifdef __cplusplus
173  nvwarpParams_t() { nvwarpInitParams(this); }
176 #endif // __cplusplus
177 
178 } nvwarpParams_t;
179 
180 
199 nvwarpResult NVWARPAPI nvwarpComputeParamsSrcFocalLength(nvwarpParams_t *params, float angle, float radius);
200 
211 
222 
233 nvwarpResult NVWARPAPI nvwarpComputeBoxAxialAngleRange(const nvwarpParams_t *params, const float srcBoundingBox[4], float minMaxXY[4]);
234 
235 
236 
244 
245 
247 struct nvwarpObject;
248 
250 typedef struct nvwarpObject *nvwarpHandle;
251 
256 
260 
261 
274 uint32_t NVWARPAPI nvwarpVersion();
275 
279 #define NVWARP_VERSION_MAJOR(version) (((v) >> 24) & 0xff)
280 
284 #define NVWARP_VERSION_MINOR(version) (((v) >> 16) & 0xff)
285 
289 #define NVWARP_VERSION_REVISION(version) (((v) >> 8) & 0xff)
290 
295 
296 
304 
305 
306  // Set the Warp Object from the Parameter Block //
307 
313 
320 void NVWARPAPI nvwarpGetParams(const nvwarpHandle han, nvwarpParams_t *params);
321 
322 
323  // Warp Type //
324 
331 
336 
337 
338  // CUDA Block Size //
339 
343 void NVWARPAPI nvwarpSetBlock(nvwarpHandle han, dim3 dim_block);
344 
348 void NVWARPAPI nvwarpGetBlock(const nvwarpHandle han, dim3 *dim_block);
349 
350 
351  // Pixel Phase //
352 
357 void NVWARPAPI nvwarpSetPixelPhase(nvwarpHandle han, uint32_t phase);
358 
363 uint32_t NVWARPAPI nvwarpGetPixelPhase(const nvwarpHandle han);
364 
365 
366  // Source Dimensions //
367 
372 void NVWARPAPI nvwarpSetSrcWidthHeight(nvwarpHandle han, uint32_t w, uint32_t h);
373 
377 void NVWARPAPI nvwarpGetSrcWidthHeight(const nvwarpHandle han, uint32_t wh[2]);
378 
379 
380  // Source focal length //
381 
389 void NVWARPAPI nvwarpSetSrcFocalLengths(nvwarpHandle han, float fl, float fy);
390 
415 nvwarpResult NVWARPAPI nvwarpComputeSrcFocalLength(nvwarpHandle han, nvwarpType_t warpType, float radius, float angle, float dist[5]);
416 
422 float NVWARPAPI nvwarpGetSrcFocalLength(const nvwarpHandle han, float *fy);
423 
424 
425  // Source Principal Point //
426 
435 void NVWARPAPI nvwarpSetSrcPrincipalPoint(nvwarpHandle han, const float xy[2], uint32_t relToCenter);
436 
442 void NVWARPAPI nvwarpGetSrcPrincipalPoint(const nvwarpHandle han, float xy[2], uint32_t relToCenter);
443 
444 
445  // Source Fisheye Radius //
446 
451 void NVWARPAPI nvwarpSetSrcRadius(nvwarpHandle han, float r);
452 
456 float NVWARPAPI nvwarpGetSrcRadius(const nvwarpHandle han);
457 
458 
459  // Distortion //
460 
467 void NVWARPAPI nvwarpSetDistortion(nvwarpHandle han, const float d[5]);
468 
473 void NVWARPAPI nvwarpGetDistortion(const nvwarpHandle han, float d[5]);
474 
475 
476  // Rotation //
477 
485 void NVWARPAPI nvwarpSetRotation(nvwarpHandle han, const float R[9]);
486 
502 void NVWARPAPI nvwarpSetEulerRotation(nvwarpHandle han, const float *angles, const char *axes);
503 
507 void NVWARPAPI nvwarpGetRotation(const nvwarpHandle han, float R[9]);
508 
509 
510  // Destination dimensions //
511 
516 void NVWARPAPI nvwarpSetDstWidthHeight(nvwarpHandle han, uint32_t w, uint32_t h);
517 
521 void NVWARPAPI nvwarpGetDstWidthHeight(const nvwarpHandle han, uint32_t wh[2]);
522 
523 
524  // Destination focal length //
525 
537 void NVWARPAPI nvwarpSetDstFocalLengths(nvwarpHandle han, float fl, float fy);
538 
548 void NVWARPAPI nvwarpComputeDstFocalLength(nvwarpHandle han, float topAngle, float bottomAngle, uint32_t dstWidth, uint32_t dstHeight);
549 
550 
563 nvwarpResult NVWARPAPI nvwarpComputeDstFocalLengths(nvwarpHandle han, float topAxialAngle, float botAxialAngle, float leftAxialAngle, float rightAxialAngle,
564  uint32_t dstWidth, uint32_t dstHeight);
565 
571 float NVWARPAPI nvwarpGetDstFocalLength(const nvwarpHandle han, float *fy);
572 
573 
574  // Destination Principal Point //
575 
584 void NVWARPAPI nvwarpSetDstPrincipalPoint(nvwarpHandle han, const float xy[2], uint32_t relToCenter);
585 
591 void NVWARPAPI nvwarpGetDstPrincipalPoint(const nvwarpHandle han, float xy[2], uint32_t relToCenter);
592 
593 
594  // Control Parameters //
595 
602 void NVWARPAPI nvwarpSetControl(nvwarpHandle han, uint32_t index, float control);
603 
609 float NVWARPAPI nvwarpGetControl(const nvwarpHandle han, uint32_t index);
610 
611 
612  // User Data Pointer //
613 
617 void NVWARPAPI nvwarpSetUserData(nvwarpHandle han, void *userData);
618 
623 
624 
625 
633 
634 
635  // Warp Images //
636 
643 nvwarpResult NVWARPAPI nvwarpWarpSurface(const nvwarpHandle han, cudaStream_t stream, cudaTextureObject_t srcTex, cudaSurfaceObject_t dstSurface);
644 
652 nvwarpResult NVWARPAPI nvwarpWarpBuffer(const nvwarpHandle han, cudaStream_t stream, cudaTextureObject_t srcTex, void *dstAddr, size_t dstRowBytes);
653 
654 
655  // Warp Coordinates Between Source and Destination //
656 
669 nvwarpResult NVWARPAPI nvwarpWarpCoordinates(const nvwarpHandle han, uint32_t numPts, const float *inPtsXY, float *outPtsXY);
670 
682 nvwarpResult NVWARPAPI nvwarpInverseWarpCoordinates(const nvwarpHandle han, uint32_t numPts, const float *inPtsXY, float *outPtsXY);
683 
684 
685  // Ray <--> Coordinate Conversion //
686 
715 nvwarpResult NVWARPAPI nvwarpSrcToRay(const nvwarpHandle han, uint32_t numPts, const float *pts2D, float *rays3D);
716 
725 nvwarpResult NVWARPAPI nvwarpDstToRay(const nvwarpHandle han, uint32_t numPts, const float *pts2D, float *rays3D);
726 
735 nvwarpResult NVWARPAPI nvwarpSrcFromRay(const nvwarpHandle han, uint32_t numRays, const float *rays3D, float *pts2D);
736 
745 nvwarpResult NVWARPAPI nvwarpDstFromRay(const nvwarpHandle han, uint32_t numRays, const float *rays3D, float *pts2D);
746 
747 
748  // Angle <--> Coordinate Conversion //
749 
758 nvwarpResult NVWARPAPI nvwarpComputeSrcAngularFromPixelCoordinates(const nvwarpHandle han, uint32_t numPts, const float *pts2D, float *ang2D);
759 
768 nvwarpResult NVWARPAPI nvwarpComputeSrcPixelFromAngularCoordinates(const nvwarpHandle han, uint32_t numPts, const float *ang2D, float *pts2D);
769 
778 nvwarpResult NVWARPAPI nvwarpComputeDstAngularFromPixelCoordinates(const nvwarpHandle han, uint32_t numPts, const float *pts2D, float *ang2D);
779 
788 nvwarpResult NVWARPAPI nvwarpComputeDstPixelFromAngularCoordinates(const nvwarpHandle han, uint32_t numPts, const float *ang2D, float *pts2D);
789 
790 
791  // Miscellaneous //
792 
798 void NVWARPAPI nvwarpConvertTransformBetweenYUpandYDown(const float fr[9], float to[9]);
799 
800 
801 
809 
810 
811 
813 typedef struct nvwarpYUVRGBParams_t
814 {
815  uint32_t width;
816  uint32_t height;
817  uint32_t cLocation;
818  float ry,
819  rcb,
820  rcr,
821  gy,
822  gcb,
823  gcr,
824  by,
825  bcb,
826  bcr;
827  float yOffset,
830 
831 
839 void NVWARPAPI nvwarpComputeYCbCr2RgbMatrix(nvwarpYUVRGBParams_t *p, uint32_t matrix_coefficients, uint32_t video_full_range_flag, uint32_t bit_depth, uint32_t normalized_input, uint32_t normalized_output);
840 
841 
850 nvwarpResult NVWARPAPI nvwarpConvertYUVNV12ToRGBA(cudaStream_t stream, const nvwarpYUVRGBParams_t *params, const void *yuv, size_t yuvRowBytes, void *dst, size_t dstRowBytes);
851 
852 
853 
864 
865 
866 
882  const nvwarpYUVRGBParams_t *yuvParams, const void *yuvBuffer, size_t yuvRowBytes,
883  void *rgbBuffer, size_t rgbRowBytes, cudaTextureObject_t rgbTex,
884  uint32_t numWarps, const nvwarpParams_t *paramArray, void **dstBuffers, const size_t *dstRowBytes);
885 
886 
887 #ifdef __cplusplus
888 }
889 #endif // __cplusplus
890 
891 
892 #endif /* __NVWARP360_H__ */
nvwarpGetSrcRadius
float NVWARPAPI nvwarpGetSrcRadius(const nvwarpHandle han)
Get the source fisheye clipping radius.
nvwarpYUVRGBParams_t::width
uint32_t width
The width of the Y and RGB channels (chroma has half the width, but is interleaved in NV12).
Definition: NVWarp360.h:815
nvwarpComputeBoxAxialAngleRange
nvwarpResult NVWARPAPI nvwarpComputeBoxAxialAngleRange(const nvwarpParams_t *params, const float srcBoundingBox[4], float minMaxXY[4])
Compute the angular limits on the source bounding box along the primary axes going through the center...
nvwarpResult
nvwarpResult
Error code enumerations for NVWarp360.
Definition: NVWarp360.h:45
NVWARP_PERSPECTIVE_PERSPECTIVE
@ NVWARP_PERSPECTIVE_PERSPECTIVE
Perspective to perspective.
Definition: NVWarp360.h:101
NVWARP_ERR_DOMAIN
@ NVWARP_ERR_DOMAIN
The coordinates are outside of the domain.
Definition: NVWarp360.h:50
nvwarpSetUserData
void NVWARPAPI nvwarpSetUserData(nvwarpHandle han, void *userData)
Set the user data pointer.
nvwarpGetUserData
void *NVWARPAPI nvwarpGetUserData(nvwarpHandle han)
Get the current value of the user data pointer.
NVWARP_ERR_CUDA_LAUNCH
@ NVWARP_ERR_CUDA_LAUNCH
CUDA was not able to launch the specified kernel.
Definition: NVWarp360.h:55
NVWARP_EQUIRECT_PERSPECTIVE
@ NVWARP_EQUIRECT_PERSPECTIVE
Equirectangular to perspective.
Definition: NVWarp360.h:88
NVWARP_SUCCESS
@ NVWARP_SUCCESS
The operation was successful.
Definition: NVWarp360.h:47
NVWARP_ERR_GENERAL
@ NVWARP_ERR_GENERAL
An otherwise unspecified failure has occurred.
Definition: NVWarp360.h:48
nvwarpGetSrcWidthHeight
void NVWARPAPI nvwarpGetSrcWidthHeight(const nvwarpHandle han, uint32_t wh[2])
Get the source image dimensions.
nvwarpGetWarpType
nvwarpType_t NVWARPAPI nvwarpGetWarpType(const nvwarpHandle han)
Get the type of the warp.
NVWARPAPI
#define NVWARPAPI
export tag
Definition: NVWarp360.h:31
nvwarpDstToRay
nvwarpResult NVWARPAPI nvwarpDstToRay(const nvwarpHandle han, uint32_t numPts, const float *pts2D, float *rays3D)
Convert destination coordinates into normalized rays.
NVWARP_EQUIRECT_FISHEYE
@ NVWARP_EQUIRECT_FISHEYE
Equirectangular to fisheye.
Definition: NVWarp360.h:86
nvwarpParams_t::srcY0
float srcY0
Source center of projection Y; frequently (srcHeight - 1) * 0.5, but srcHeight * ....
Definition: NVWarp360.h:145
NVWARP_ERR_APPROXIMATE
@ NVWARP_ERR_APPROXIMATE
An accurate calculation is not available; approximation returned.
Definition: NVWarp360.h:59
nvwarpSetParams
nvwarpResult NVWARPAPI nvwarpSetParams(nvwarpHandle han, const nvwarpParams_t *params)
Set parameters for a warp.
nvwarpParams_t::srcHeight
uint32_t srcHeight
The height of the source image.
Definition: NVWarp360.h:143
nvwarpParams_t::topAngle
float topAngle
Top angle of view. (default +pi/2)
Definition: NVWarp360.h:164
nvwarpGetSrcFocalLength
float NVWARPAPI nvwarpGetSrcFocalLength(const nvwarpHandle han, float *fy)
Get one or both source focal lengths.
nvwarpSetSrcPrincipalPoint
void NVWARPAPI nvwarpSetSrcPrincipalPoint(nvwarpHandle han, const float xy[2], uint32_t relToCenter)
Specify the principal point of the source image.
nvwarpSurface_t
nvwarpSurface_t
Definition: NVWarp360.h:64
nvwarpYUVRGBParams_t::gy
float gy
Coefficients for G with respect to Y, including normalization scaling.
Definition: NVWarp360.h:821
nvwarpSetDstWidthHeight
void NVWARPAPI nvwarpSetDstWidthHeight(nvwarpHandle han, uint32_t w, uint32_t h)
Set the destination width and height.
nvwarpWarpBuffer
nvwarpResult NVWARPAPI nvwarpWarpBuffer(const nvwarpHandle han, cudaStream_t stream, cudaTextureObject_t srcTex, void *dstAddr, size_t dstRowBytes)
Warp an image texture to a buffer.
nvwarpComputeDstAngularFromPixelCoordinates
nvwarpResult NVWARPAPI nvwarpComputeDstAngularFromPixelCoordinates(const nvwarpHandle han, uint32_t numPts, const float *pts2D, float *ang2D)
Compute the angular coordinates {longitude, latitude} of for the given points in the destination.
nvwarpSetEulerRotation
void NVWARPAPI nvwarpSetEulerRotation(nvwarpHandle han, const float *angles, const char *axes)
Specify the view rotation, using a list of angles and their respective axes of rotation.
nvwarpYUVRGBParams_t::rcb
float rcb
Coefficients for R with respect to Cb, including normalization scaling.
Definition: NVWarp360.h:819
nvwarpYUVRGBParams_t
Parameters for YUV:420:NV12 --> RGBA conversion.
Definition: NVWarp360.h:813
nvwarpParams_t::srcFocalLen
float srcFocalLen
Source focal length.
Definition: NVWarp360.h:146
nvwarpSetBlock
void NVWARPAPI nvwarpSetBlock(nvwarpHandle han, dim3 dim_block)
Set the CUDA block size.
NVWARP_FISHEYE_EQUIRECT
@ NVWARP_FISHEYE_EQUIRECT
Fisheye to equirectangular.
Definition: NVWarp360.h:93
NVWARP_EQUIRECT_CYLINDER
@ NVWARP_EQUIRECT_CYLINDER
Equirectangular to cylindrical.
Definition: NVWarp360.h:84
NVWARP_PERSPECTIVE_EQUIRECT
@ NVWARP_PERSPECTIVE_EQUIRECT
Perspective to equirectangular.
Definition: NVWarp360.h:99
nvwarpParams_t::userData
void * userData
Pointer supplied by the user. (default NULL)
Definition: NVWarp360.h:167
nvwarpComputeDstPixelFromAngularCoordinates
nvwarpResult NVWARPAPI nvwarpComputeDstPixelFromAngularCoordinates(const nvwarpHandle han, uint32_t numPts, const float *ang2D, float *pts2D)
Compute the pixel coordinates for the given angular coordinates {longitude, latitude} in the destinat...
nvwarpSetDistortion
void NVWARPAPI nvwarpSetDistortion(nvwarpHandle han, const float d[5])
Set the distortion coefficients.
nvwarpParams_t::dstWidth
uint32_t dstWidth
The width of the destination.
Definition: NVWarp360.h:152
nvwarpSetRotation
void NVWARPAPI nvwarpSetRotation(nvwarpHandle han, const float R[9])
Specify the rotation.
nvwarpWarpSurface
nvwarpResult NVWARPAPI nvwarpWarpSurface(const nvwarpHandle han, cudaStream_t stream, cudaTextureObject_t srcTex, cudaSurfaceObject_t dstSurface)
Warp an image texture to a surface.
nvwarpParams_t::srcWidth
uint32_t srcWidth
The width of the source image.
Definition: NVWarp360.h:142
nvwarpParams_t::control
float control[4]
Projection-specific controls.
Definition: NVWarp360.h:170
NVWARP_FISHEYE_PANINI
@ NVWARP_FISHEYE_PANINI
Fisheye to Panini.
Definition: NVWarp360.h:95
nvwarpYUVRGBParams_t::ry
float ry
Coefficients for R with respect to Y, including normalization scaling.
Definition: NVWarp360.h:818
NVSURF_STEREOGRAPHIC
@ NVSURF_STEREOGRAPHIC
Generalized Stereographic. Normal stereographic has control[0] = 1.
Definition: NVWarp360.h:73
NVWARP_EQUIRECT_STEREOGRAPHIC
@ NVWARP_EQUIRECT_STEREOGRAPHIC
Equirectangular to generalized stereographic.
Definition: NVWarp360.h:90
nvwarpParams_t::rotAngles
float rotAngles[3]
Rotation angles in radians, corresponding to the list of rotation axes below..
Definition: NVWarp360.h:156
NVSURF_ROTCYLINDER
@ NVSURF_ROTCYLINDER
Cylindrical, panned vertically, with horizontal axis.
Definition: NVWarp360.h:70
nvwarpYUVRGBParams_t::yOffset
float yOffset
Offset of luma, typically 16.
Definition: NVWarp360.h:827
nvwarpParams_t
struct nvwarpParams_t nvwarpParams_t
Parameter structure.
Definition: NVWarp360.h:127
nvwarpParams_t::srcX0
float srcX0
Source center of projection X; frequently (srcWidth - 1) * 0.5, but srcWidth * .5 for wraparounds (eq...
Definition: NVWarp360.h:144
nvwarpYUVRGBParams_t::bcr
float bcr
Coefficients for B with respect to Cr, including normalization scaling.
Definition: NVWarp360.h:826
nvwarpParams_t::srcRadius
float srcRadius
Source circular clipping radius. (default 0 means no clipping) (unimplemented).
Definition: NVWarp360.h:147
nvwarpParams_t::dstHeight
uint32_t dstHeight
The height of the destination.
Definition: NVWarp360.h:153
nvwarpGetDistortion
void NVWARPAPI nvwarpGetDistortion(const nvwarpHandle han, float d[5])
Get the distortion coefficients.
NVWARP_ERR_PARAMETER
@ NVWARP_ERR_PARAMETER
A parameter has an invalid value.
Definition: NVWarp360.h:52
NVWARP_ERR_MISSING_PARAMETERS
@ NVWARP_ERR_MISSING_PARAMETERS
Some required parameters have not been specified.
Definition: NVWarp360.h:51
nvwarpSetWarpType
nvwarpResult NVWARPAPI nvwarpSetWarpType(nvwarpHandle han, nvwarpType_t type)
Set the warp type.
nvwarpSetSrcRadius
void NVWARPAPI nvwarpSetSrcRadius(nvwarpHandle han, float r)
set the source fisheye clipping radius.
NVWARP_FISHEYE_FISHEYE
@ NVWARP_FISHEYE_FISHEYE
Fisheye to fisheye.
Definition: NVWarp360.h:94
nvwarpYUVRGBParams_t
struct nvwarpYUVRGBParams_t nvwarpYUVRGBParams_t
Parameters for YUV:420:NV12 --> RGBA conversion.
NVSURF_CYLINDER
@ NVSURF_CYLINDER
Cylindrical, panned horizontally with vertical axis.
Definition: NVWarp360.h:69
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: nvbufsurftransform.h:34
nvwarpSetSrcFocalLengths
void NVWARPAPI nvwarpSetSrcFocalLengths(nvwarpHandle han, float fl, float fy)
Set the source focal length.
NVWARP_FISHEYE_CYLINDER
@ NVWARP_FISHEYE_CYLINDER
Fisheye to horizontally panned cylinder.
Definition: NVWarp360.h:92
nvwarpGetSrcPrincipalPoint
void NVWARPAPI nvwarpGetSrcPrincipalPoint(const nvwarpHandle han, float xy[2], uint32_t relToCenter)
Get the source principal point.
nvwarpYUVRGBParams_t::cOffset
float cOffset
Offset of chroma, typically 128.
Definition: NVWarp360.h:828
nvwarpSetDstPrincipalPoint
void NVWARPAPI nvwarpSetDstPrincipalPoint(nvwarpHandle han, const float xy[2], uint32_t relToCenter)
Set the destination principal point.
nvwarpType_t
nvwarpType_t
Warp type enumeration.
Definition: NVWarp360.h:82
nvwarpGetRotation
void NVWARPAPI nvwarpGetRotation(const nvwarpHandle han, float R[9])
Get the rotation matrix.
NVWARP_NONE
@ NVWARP_NONE
This makes it 32 bits.
Definition: NVWarp360.h:102
nvwarpYUVRGBParams_t::bcb
float bcb
Coefficients for B with respect to Cb, including normalization scaling.
Definition: NVWarp360.h:825
NVSURF_PERSPECTIVE
@ NVSURF_PERSPECTIVE
Perspective, projective, rectilinear.
Definition: NVWarp360.h:66
nvwarpGetDstFocalLength
float NVWARPAPI nvwarpGetDstFocalLength(const nvwarpHandle han, float *fy)
Get one or both destination focal lengths.
nvwarpConvertYUVNV12ToRGBA
nvwarpResult NVWARPAPI nvwarpConvertYUVNV12ToRGBA(cudaStream_t stream, const nvwarpYUVRGBParams_t *params, const void *yuv, size_t yuvRowBytes, void *dst, size_t dstRowBytes)
Perform YUV 4:2:0 NV12 --> RGBA conversion.
NVWARP_ERR_CUDA_NO_KERNEL
@ NVWARP_ERR_CUDA_NO_KERNEL
No suitable CUDA kernel image has been found for this GPU.
Definition: NVWarp360.h:57
NVWARP_PERSPECTIVE_PANINI
@ NVWARP_PERSPECTIVE_PANINI
Perspective to Panini.
Definition: NVWarp360.h:100
nvwarpSetPixelPhase
void NVWARPAPI nvwarpSetPixelPhase(nvwarpHandle han, uint32_t phase)
Set the pixel phase.
nvwarpDestroyInstance
void NVWARPAPI nvwarpDestroyInstance(nvwarpHandle han)
Destructor for a Warp360 object.
nvwarpYUVRGBParams_t::by
float by
Coefficients for B with respect to Y, including normalization scaling.
Definition: NVWarp360.h:824
nvwarpErrorStringFromCode
const char *NVWARPAPI nvwarpErrorStringFromCode(nvwarpResult err)
Get the error string corresponding to the given result code.
nvwarpCreateInstance
nvwarpResult NVWARPAPI nvwarpCreateInstance(nvwarpHandle *han)
Constructor for a new instance of a Warp360 object.
NVSURF_MAX
@ NVSURF_MAX
This makes it 32 bits.
Definition: NVWarp360.h:78
nvwarpGetPixelPhase
uint32_t NVWARPAPI nvwarpGetPixelPhase(const nvwarpHandle han)
Get the pixel phase.
NVWARP_EQUIRECT_ROTCYLINDER
@ NVWARP_EQUIRECT_ROTCYLINDER
Equirectangular to vertical cylindrical.
Definition: NVWarp360.h:91
NVSURF_PUSHBROOM
@ NVSURF_PUSHBROOM
Simulated pushbroom. Control[0] typically in (0, 1].
Definition: NVWarp360.h:71
nvwarpParams_t::bottomAngle
float bottomAngle
Bottom angle of view. (default -pi/2)
Definition: NVWarp360.h:165
nvwarpYUVRGBParams_t::height
uint32_t height
The height of the Y and RGB channels (chroma has half the height, so this must be even).
Definition: NVWarp360.h:816
nvwarpComputeSrcPixelFromAngularCoordinates
nvwarpResult NVWARPAPI nvwarpComputeSrcPixelFromAngularCoordinates(const nvwarpHandle han, uint32_t numPts, const float *ang2D, float *pts2D)
Compute the pixel coordinates for the given angular coordinates {longitude, latitude} in the source.
NVWARP_EQUIRECT_EQUIRECT
@ NVWARP_EQUIRECT_EQUIRECT
Equirectangular to equirectangular.
Definition: NVWarp360.h:85
nvwarpMultiWarp360
nvwarpResult NVWARPAPI nvwarpMultiWarp360(cudaStream_t stream, const nvwarpYUVRGBParams_t *yuvParams, const void *yuvBuffer, size_t yuvRowBytes, void *rgbBuffer, size_t rgbRowBytes, cudaTextureObject_t rgbTex, uint32_t numWarps, const nvwarpParams_t *paramArray, void **dstBuffers, const size_t *dstRowBytes)
Perform an optional YUV:420:NV12 --> RGBA conversion, followed by a suite of warps from that conversi...
nvwarpInverseWarpCoordinates
nvwarpResult NVWARPAPI nvwarpInverseWarpCoordinates(const nvwarpHandle han, uint32_t numPts, const float *inPtsXY, float *outPtsXY)
Transform coordinates from the destination space to the source space.
NVSURF_BITS
@ NVSURF_BITS
The width of the field used for each image type.
Definition: NVWarp360.h:75
nvwarpComputeParamsSrcFocalLength
nvwarpResult NVWARPAPI nvwarpComputeParamsSrcFocalLength(nvwarpParams_t *params, float angle, float radius)
Compute and set the srcFocalLen given the warp type and srcDist distortion coefficients,...
NVWARP_ERR_UNIMPLEMENTED
@ NVWARP_ERR_UNIMPLEMENTED
The requested feature has not yet been implemented.
Definition: NVWarp360.h:49
nvwarpHandle
struct nvwarpObject * nvwarpHandle
Opaque definition of a pointer to the Warp360 state.
Definition: NVWarp360.h:250
nvwarpGetDstPrincipalPoint
void NVWARPAPI nvwarpGetDstPrincipalPoint(const nvwarpHandle han, float xy[2], uint32_t relToCenter)
Get the destination principal point.
nvwarpYUVRGBParams_t::gcr
float gcr
Coefficients for G with respect to Cr, including normalization scaling.
Definition: NVWarp360.h:823
nvwarpVersion
uint32_t NVWARPAPI nvwarpVersion()
Get the version number, encoded as (major_version * 16777216u + minor * 65536u + revision * 256u).
nvwarpComputeSrcFocalLength
nvwarpResult NVWARPAPI nvwarpComputeSrcFocalLength(nvwarpHandle han, nvwarpType_t warpType, float radius, float angle, float dist[5])
Compute the source focal length, primarily from a radius and corresponding angle (e....
nvwarpYUVRGBParams_t::gcb
float gcb
Coefficients for G with respect to Cb, including normalization scaling.
Definition: NVWarp360.h:822
NVSURF_MASK
@ NVSURF_MASK
The NVWARP_360 mask (currently 0xFF).
Definition: NVWarp360.h:77
nvwarpSetSrcWidthHeight
void NVWARPAPI nvwarpSetSrcWidthHeight(nvwarpHandle han, uint32_t w, uint32_t h)
Set the source dimensions.
nvwarpSetControl
void NVWARPAPI nvwarpSetControl(nvwarpHandle han, uint32_t index, float control)
Set a control parameter.
nvwarpSetDstFocalLengths
void NVWARPAPI nvwarpSetDstFocalLengths(nvwarpHandle han, float fl, float fy)
Set the destination focal length.
nvwarpConvertTransformBetweenYUpandYDown
void NVWARPAPI nvwarpConvertTransformBetweenYUpandYDown(const float fr[9], float to[9])
Invert the sense of the Y- and Z-axes in the specified transformation, keeping the X axis pointing in...
nvwarpWarpCoordinates
nvwarpResult NVWARPAPI nvwarpWarpCoordinates(const nvwarpHandle han, uint32_t numPts, const float *inPtsXY, float *outPtsXY)
Transform coordinates from the input space to the output space.
nvwarpGetControl
float NVWARPAPI nvwarpGetControl(const nvwarpHandle han, uint32_t index)
Get the value for the control parameters.
NVWARP_FISHEYE_PUSHBROOM
@ NVWARP_FISHEYE_PUSHBROOM
Fisheye to pushbroom.
Definition: NVWarp360.h:97
nvwarpSrcToRay
nvwarpResult NVWARPAPI nvwarpSrcToRay(const nvwarpHandle han, uint32_t numPts, const float *pts2D, float *rays3D)
Convert source coordinates into normalized rays.
nvwarpComputeParamsOutputResolution
nvwarpResult NVWARPAPI nvwarpComputeParamsOutputResolution(nvwarpParams_t *params, float aspectRatio)
Compute the output resolution that matches the source focal length and desired aspect ratio.
nvwarpParams_t::rotAxes
char rotAxes[4]
3 rotation axes: upper case 'X', 'Y', and 'Z' are rotation about the positive X, Y and Z axes,...
Definition: NVWarp360.h:157
nvwarpComputeDstFocalLength
void NVWARPAPI nvwarpComputeDstFocalLength(nvwarpHandle han, float topAngle, float bottomAngle, uint32_t dstWidth, uint32_t dstHeight)
From the vertical view angles, this sets the identical destination focal lengths, plus width and heig...
NVWARP_ERR_INITIALIZATION
@ NVWARP_ERR_INITIALIZATION
Initialization has not completed successfully.
Definition: NVWarp360.h:53
NVWARP_ERR_MAX
@ NVWARP_ERR_MAX
This makes it 32 bits.
Definition: NVWarp360.h:60
nvwarpInitParams
void NVWARPAPI nvwarpInitParams(nvwarpParams_t *params)
Initialize nvwarpParams_t to defaults or NaN if a particular parameter must be supplied.
nvwarpSrcFromRay
nvwarpResult NVWARPAPI nvwarpSrcFromRay(const nvwarpHandle han, uint32_t numRays, const float *rays3D, float *pts2D)
Convert rays into source coordinates.
nvwarpGetParams
void NVWARPAPI nvwarpGetParams(const nvwarpHandle han, nvwarpParams_t *params)
Get the current values of the warp parameters.
NVSURF_FISHEYE
@ NVSURF_FISHEYE
Fisheye, equidistant.
Definition: NVWarp360.h:67
NVWARP_EQUIRECT_PUSHBROOM
@ NVWARP_EQUIRECT_PUSHBROOM
Equirectangular to pushbroom.
Definition: NVWarp360.h:89
nvwarpGetDstWidthHeight
void NVWARPAPI nvwarpGetDstWidthHeight(const nvwarpHandle han, uint32_t wh[2])
Get the destination width and height.
nvwarpGetBlock
void NVWARPAPI nvwarpGetBlock(const nvwarpHandle han, dim3 *dim_block)
Get the current value of the CUDA block size.
NVWARP_FISHEYE_ROTCYLINDER
@ NVWARP_FISHEYE_ROTCYLINDER
Fisheye to vertically panned radial cylinder.
Definition: NVWarp360.h:98
nvwarpComputeYCbCr2RgbMatrix
void NVWARPAPI nvwarpComputeYCbCr2RgbMatrix(nvwarpYUVRGBParams_t *p, uint32_t matrix_coefficients, uint32_t video_full_range_flag, uint32_t bit_depth, uint32_t normalized_input, uint32_t normalized_output)
General method to compute all values except for {width, height, cLocation}.
nvwarpDstFromRay
nvwarpResult NVWARPAPI nvwarpDstFromRay(const nvwarpHandle han, uint32_t numRays, const float *rays3D, float *pts2D)
Convert rays into destination coordinates.
NVWARP_ERR_CUDA_DRIVER
@ NVWARP_ERR_CUDA_DRIVER
CUDA driver version is insufficient for CUDA runtime version.
Definition: NVWarp360.h:56
nvwarpParams_t::dist
float dist[5]
Distortion, typically for the source. (default {0,0,0,0} means no distortion).
Definition: NVWarp360.h:149
NVSURF_PANINI
@ NVSURF_PANINI
Panini. Control[0] typically in (0, 1].
Definition: NVWarp360.h:72
NVWARP_EQUIRECT_PANINI
@ NVWARP_EQUIRECT_PANINI
Equirectangular to Panini.
Definition: NVWarp360.h:87
nvwarpComputeDstFocalLengths
nvwarpResult NVWARPAPI nvwarpComputeDstFocalLengths(nvwarpHandle han, float topAxialAngle, float botAxialAngle, float leftAxialAngle, float rightAxialAngle, uint32_t dstWidth, uint32_t dstHeight)
From the vertical and horizontal axial view angles, this sets the anisotropic destination focal lengt...
nvwarpComputeSrcAngularFromPixelCoordinates
nvwarpResult NVWARPAPI nvwarpComputeSrcAngularFromPixelCoordinates(const nvwarpHandle han, uint32_t numPts, const float *pts2D, float *ang2D)
Compute the angular coordinates {longitude, latitude} of for the given points in the source.
nvwarpParams_t::type
nvwarpType_t type
The type of the warp.
Definition: NVWarp360.h:139
NVWARP_ERR_CUDA
@ NVWARP_ERR_CUDA
An otherwise unspecified error has been reported by the CUDA runtime.
Definition: NVWarp360.h:58
NVWARP_ERR_CUDA_MEMORY
@ NVWARP_ERR_CUDA_MEMORY
There is not enough CUDA memory for the operation specified.
Definition: NVWarp360.h:54
nvwarpYUVRGBParams_t::rcr
float rcr
Coefficients for R with respect to Cr, including normalization scaling.
Definition: NVWarp360.h:820
NVSURF_UNKNOWN
@ NVSURF_UNKNOWN
Unknown (currently 255).
Definition: NVWarp360.h:76
nvwarpComputeParamsAxialAngleRange
nvwarpResult NVWARPAPI nvwarpComputeParamsAxialAngleRange(const nvwarpParams_t *params, float minMaxXY[4])
Compute the angular limits on the source image along the primary axes going through the center of pro...
NVWARP_FISHEYE_PERSPECTIVE
@ NVWARP_FISHEYE_PERSPECTIVE
Fisheye to perspective.
Definition: NVWarp360.h:96
nvWarpResult
enum nvwarpResult nvWarpResult
Error code enumerations for NVWarp360.
nvwarpYUVRGBParams_t::cLocation
uint32_t cLocation
0 for chroma sampled cosited horizontally with luma; 1 for chroma sampled halfway between luma sample...
Definition: NVWarp360.h:817
nvwarpParams_t
Parameter structure.
Definition: NVWarp360.h:136
NVSURF_EQUIRECT
@ NVSURF_EQUIRECT
Equirectangular spherical.
Definition: NVWarp360.h:68