Header for Oriented Bounding Box (OBB) rendering functions.
Provides GPU-accelerated rendering of rotated bounding boxes with support for:
Definition in file 9.0/sources/libs/nvll_osd/cuda/drawOBB.h.
Go to the source code of this file.
Functions | |
| void | drawOBB_border_cuda_unit_alpha (uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, cudaStream_t stream, unsigned int r, unsigned int g, unsigned int b, int border_width) |
| Draw OBB border with unit alpha (opaque, fast path) More... | |
| void | drawOBB_border_cuda (uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, cudaStream_t stream, unsigned int r, unsigned int g, unsigned int b, float alpha, int border_width) |
| Draw OBB border with alpha blending. More... | |
| void | drawOBB_fill_cuda_unit_alpha (uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, unsigned int r, unsigned int g, unsigned int b, cudaStream_t stream) |
| Fill OBB with solid color (unit alpha, fast path) More... | |
| void | drawOBB_fill_cuda (uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, unsigned int r, unsigned int g, unsigned int b, float alpha, cudaStream_t stream) |
| Fill OBB with alpha blending. More... | |
| void | drawOBB_combined_cuda_unit_alpha (uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, cudaStream_t stream, unsigned int border_r, unsigned int border_g, unsigned int border_b, int border_width, unsigned int fill_r, unsigned int fill_g, unsigned int fill_b, bool is_filled) |
| Draw OBB with both fill and border (unit alpha, fast path) More... | |
| void | drawOBB_combined_cuda (uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, cudaStream_t stream, unsigned int border_r, unsigned int border_g, unsigned int border_b, float border_alpha, int border_width, unsigned int fill_r, unsigned int fill_g, unsigned int fill_b, float fill_alpha, bool is_filled) |
| Draw OBB with both fill and border (with alpha blending) More... | |
| void drawOBB_border_cuda | ( | uint8_t * | image, |
| int | width, | ||
| int | height, | ||
| int | pitch, | ||
| float | center_x, | ||
| float | center_y, | ||
| float | obb_width, | ||
| float | obb_height, | ||
| float | angle_rad, | ||
| cudaStream_t | stream, | ||
| unsigned int | r, | ||
| unsigned int | g, | ||
| unsigned int | b, | ||
| float | alpha, | ||
| int | border_width | ||
| ) |
Draw OBB border with alpha blending.
Renders the border of a rotated bounding box with alpha blending. Slower than unit alpha variant due to read-modify-write operations.
| image | Pointer to RGBA image buffer (GPU memory) |
| width | Image width in pixels |
| height | Image height in pixels |
| pitch | Image pitch in bytes (stride) |
| center_x | OBB center X coordinate |
| center_y | OBB center Y coordinate |
| obb_width | OBB width (before rotation) |
| obb_height | OBB height (before rotation) |
| angle_rad | Rotation angle in radians |
| stream | CUDA stream for async execution |
| r | Red component (0-255) |
| g | Green component (0-255) |
| b | Blue component (0-255) |
| alpha | Alpha value (0.0-1.0) |
| border_width | Border thickness in pixels |
| void drawOBB_border_cuda_unit_alpha | ( | uint8_t * | image, |
| int | width, | ||
| int | height, | ||
| int | pitch, | ||
| float | center_x, | ||
| float | center_y, | ||
| float | obb_width, | ||
| float | obb_height, | ||
| float | angle_rad, | ||
| cudaStream_t | stream, | ||
| unsigned int | r, | ||
| unsigned int | g, | ||
| unsigned int | b, | ||
| int | border_width | ||
| ) |
Draw OBB border with unit alpha (opaque, fast path)
Renders the border of a rotated bounding box without alpha blending. This is the fastest variant as it doesn't require reading background pixels.
| image | Pointer to RGBA image buffer (GPU memory) |
| width | Image width in pixels |
| height | Image height in pixels |
| pitch | Image pitch in bytes (stride) |
| center_x | OBB center X coordinate |
| center_y | OBB center Y coordinate |
| obb_width | OBB width (before rotation) |
| obb_height | OBB height (before rotation) |
| angle_rad | Rotation angle in radians |
| stream | CUDA stream for async execution |
| r | Red component (0-255) |
| g | Green component (0-255) |
| b | Blue component (0-255) |
| border_width | Border thickness in pixels |
| void drawOBB_combined_cuda | ( | uint8_t * | image, |
| int | width, | ||
| int | height, | ||
| int | pitch, | ||
| float | center_x, | ||
| float | center_y, | ||
| float | obb_width, | ||
| float | obb_height, | ||
| float | angle_rad, | ||
| cudaStream_t | stream, | ||
| unsigned int | border_r, | ||
| unsigned int | border_g, | ||
| unsigned int | border_b, | ||
| float | border_alpha, | ||
| int | border_width, | ||
| unsigned int | fill_r, | ||
| unsigned int | fill_g, | ||
| unsigned int | fill_b, | ||
| float | fill_alpha, | ||
| bool | is_filled | ||
| ) |
Draw OBB with both fill and border (with alpha blending)
Renders both fill and border with independent alpha values. Most flexible but slowest variant.
| image | Pointer to RGBA image buffer (GPU memory) |
| width | Image width in pixels |
| height | Image height in pixels |
| pitch | Image pitch in bytes (stride) |
| center_x | OBB center X coordinate |
| center_y | OBB center Y coordinate |
| obb_width | OBB width (before rotation) |
| obb_height | OBB height (before rotation) |
| angle_rad | Rotation angle in radians |
| stream | CUDA stream for async execution |
| border_r | Border red component (0-255) |
| border_g | Border green component (0-255) |
| border_b | Border blue component (0-255) |
| border_alpha | Border alpha value (0.0-1.0) |
| border_width | Border thickness in pixels |
| fill_r | Fill red component (0-255) |
| fill_g | Fill green component (0-255) |
| fill_b | Fill blue component (0-255) |
| fill_alpha | Fill alpha value (0.0-1.0) |
| is_filled | Whether to render fill (true) or border only (false) |
| void drawOBB_combined_cuda_unit_alpha | ( | uint8_t * | image, |
| int | width, | ||
| int | height, | ||
| int | pitch, | ||
| float | center_x, | ||
| float | center_y, | ||
| float | obb_width, | ||
| float | obb_height, | ||
| float | angle_rad, | ||
| cudaStream_t | stream, | ||
| unsigned int | border_r, | ||
| unsigned int | border_g, | ||
| unsigned int | border_b, | ||
| int | border_width, | ||
| unsigned int | fill_r, | ||
| unsigned int | fill_g, | ||
| unsigned int | fill_b, | ||
| bool | is_filled | ||
| ) |
Draw OBB with both fill and border (unit alpha, fast path)
Renders both fill and border in a single pass without alpha blending. Most efficient for opaque OBBs.
| image | Pointer to RGBA image buffer (GPU memory) |
| width | Image width in pixels |
| height | Image height in pixels |
| pitch | Image pitch in bytes (stride) |
| center_x | OBB center X coordinate |
| center_y | OBB center Y coordinate |
| obb_width | OBB width (before rotation) |
| obb_height | OBB height (before rotation) |
| angle_rad | Rotation angle in radians |
| stream | CUDA stream for async execution |
| border_r | Border red component (0-255) |
| border_g | Border green component (0-255) |
| border_b | Border blue component (0-255) |
| border_width | Border thickness in pixels |
| fill_r | Fill red component (0-255) |
| fill_g | Fill green component (0-255) |
| fill_b | Fill blue component (0-255) |
| is_filled | Whether to render fill (true) or border only (false) |
| void drawOBB_fill_cuda | ( | uint8_t * | image, |
| int | width, | ||
| int | height, | ||
| int | pitch, | ||
| float | center_x, | ||
| float | center_y, | ||
| float | obb_width, | ||
| float | obb_height, | ||
| float | angle_rad, | ||
| unsigned int | r, | ||
| unsigned int | g, | ||
| unsigned int | b, | ||
| float | alpha, | ||
| cudaStream_t | stream | ||
| ) |
Fill OBB with alpha blending.
Fills the interior of a rotated bounding box with alpha blending.
| image | Pointer to RGBA image buffer (GPU memory) |
| width | Image width in pixels |
| height | Image height in pixels |
| pitch | Image pitch in bytes (stride) |
| center_x | OBB center X coordinate |
| center_y | OBB center Y coordinate |
| obb_width | OBB width (before rotation) |
| obb_height | OBB height (before rotation) |
| angle_rad | Rotation angle in radians |
| r | Red component (0-255) |
| g | Green component (0-255) |
| b | Blue component (0-255) |
| alpha | Alpha value (0.0-1.0) |
| stream | CUDA stream for async execution |
| void drawOBB_fill_cuda_unit_alpha | ( | uint8_t * | image, |
| int | width, | ||
| int | height, | ||
| int | pitch, | ||
| float | center_x, | ||
| float | center_y, | ||
| float | obb_width, | ||
| float | obb_height, | ||
| float | angle_rad, | ||
| unsigned int | r, | ||
| unsigned int | g, | ||
| unsigned int | b, | ||
| cudaStream_t | stream | ||
| ) |
Fill OBB with solid color (unit alpha, fast path)
Fills the interior of a rotated bounding box without alpha blending.
| image | Pointer to RGBA image buffer (GPU memory) |
| width | Image width in pixels |
| height | Image height in pixels |
| pitch | Image pitch in bytes (stride) |
| center_x | OBB center X coordinate |
| center_y | OBB center Y coordinate |
| obb_width | OBB width (before rotation) |
| obb_height | OBB height (before rotation) |
| angle_rad | Rotation angle in radians |
| r | Red component (0-255) |
| g | Green component (0-255) |
| b | Blue component (0-255) |
| stream | CUDA stream for async execution |