![]()  | 
  
    Jetson Inference
    
   DNN Vision Library 
   | 
 
CUDA utilities and image processing kernels. More...
Modules | |
| Color Mapping | |
| Defines various colormaps and color mapping functions.  | |
| Color Conversion | |
| Colorspace conversion functions for various YUV formats, RGB, BGR, Bayer, and grayscale.  | |
| Cropping | |
| Crop an image to the specified region of interest (ROI).  | |
| Drawing | |
| Drawing basic 2D shapes using CUDA.  | |
| Error Checking | |
| Error checking and logging macros.  | |
| Fonts | |
| TTF font rasterization and image overlay rendering using CUDA.  | |
| Memory Management | |
| Allocation of CUDA mapped zero-copy memory.  | |
| Normalization | |
| Normalize the pixel intensities of an image between two ranges.  | |
| Overlay | |
| Overlay images and vector shapes onto other images.  | |
| Pixel Filtering | |
| CUDA device functions for sampling pixels with bilinear filtering.  | |
| Point Cloud | |
| 3D point cloud processing and visualization.  | |
| Resize | |
| Rescale an image to a different resolution.  | |
| Warping | |
| Various image warps and matrix transforms.  | |
Functions | |
| __device__ __host__ int | iDivUp (int a, int b) | 
| If a / b has a remainder, round up.  More... | |
CUDA utilities and image processing kernels.
      
  | 
  inline | 
If a / b has a remainder, round up.
This function is commonly using when launching CUDA kernels, to compute a grid size inclusive of the entire dataset if it's dimensions aren't evenly divisible by the block size.
For example:
const dim3 blockDim(8,8); const dim3 gridDim(iDivUp(imgWidth,blockDim.x), iDivUp(imgHeight,blockDim.y));
Then inside the CUDA kernel, there is typically a check that thread index is in-bounds.
Without the use of iDivUp(), if the data dimensions weren't evenly divisible by the block size, parts of the data wouldn't be covered by the grid and not processed.