Description
Functions | |
void | chrono::sensor::cuda_camera_noise_const_normal (unsigned char *bufPtr, int width, int height, float mean, float stdev, curandState_t *rng, CUstream &stream) |
Kernel for applying uniform Gaussian noise to an image. More... | |
void | chrono::sensor::cuda_camera_noise_pixel_dependent (unsigned char *bufPtr, int width, int height, float gain, float sigma_read, float sigma_adc, curandState_t *rng, CUstream &stream) |
Kernel for applying pixel dependent Gaussian noise to an image. More... | |
__global__ void | chrono::sensor::init_random_states (unsigned int seed, curandState_t *rng_states, int n_generators) |
Device function for initialing random values for cuRAND. More... | |
void | chrono::sensor::init_cuda_rng (unsigned int seed, curandState_t *rng_states, int n_generators) |
Host function for initialing random values for cuRAND. More... | |
void | chrono::sensor::cuda_grayscale (void *bufRGBA, void *bufOut, int width, int height, CUstream &stream) |
RGB 8 bpp image of uchar to greyscale image conversion. More... | |
void | chrono::sensor::cuda_image_alias (void *bufIn, void *bufOut, int w_out, int h_out, int factor, int pix_size, CUstream &stream) |
An antialiasing helper function that reduces image quality by performing mean reduction of image. More... | |
void | chrono::sensor::cuda_image_alias_float (void *bufIn, void *bufOut, int w_out, int h_out, int factor, int pix_size, CUstream &stream) |
An antialiasing helper function that reduces image quality by performing mean reduction of image. More... | |
void | chrono::sensor::cuda_image_gauss_blur_char (void *buf, int w, int h, int c, int factor, CUstream &stream) |
An image blurring function that reduces performs Gaussian blur. More... | |
void | chrono::sensor::cuda_image_half4_to_uchar4 (void *bufIn, void *bufOut, int w, int h, CUstream &stream) |
Conversion from half4 to uchar4. More... | |
void | chrono::sensor::cuda_lidar_clip (float *buf, int width, int height, float threshold, float default_dist, CUstream &stream) |
Function for reduction of data when multiple samples are used per beam. More... | |
void | chrono::sensor::cuda_lidar_noise_normal (float *bufPtr, int width, int height, float stdev_range, float stdev_v_angle, float stdev_h_angle, float stdev_intensity, curandState_t *rng, CUstream &stream) |
Function for applying Gaussian noise to raw ground truth lidar data. More... | |
void | chrono::sensor::cuda_lidar_mean_reduce (void *bufIn, void *bufOut, int width, int height, int radius, CUstream &stream) |
Function for reduction of data when multiple samples are used per beam. More... | |
void | chrono::sensor::cuda_lidar_strong_reduce (void *bufIn, void *bufOut, int width, int height, int radius, CUstream &stream) |
Function for reduction of data when multiple samples are used per beam. More... | |
void | chrono::sensor::cuda_lidar_first_reduce (void *bufIn, void *bufOut, int width, int height, int radius, CUstream &stream) |
Function for reduction of data when multiple samples are used per beam. More... | |
void | chrono::sensor::cuda_lidar_dual_reduce (void *bufIn, void *bufOut, int width, int height, int radius, CUstream &stream) |
Function for reduction of data when multiple samples are used per beam. More... | |
void | chrono::sensor::preprocess_RGBA8_to_FLOAT3 (void *bufIn, void *bufOut, int h, int w) |
Function that converts uchar RGBA8 image to float3 image. More... | |
void | chrono::sensor::preprocess_RGBA8_to_FLOAT4 (void *bufIn, void *bufOut, int num_entries) |
Function that converts uchar RGBA8 image to float4 image. More... | |
void | chrono::sensor::postprocess_FLOAT4_to_RGBA8 (void *bufIn, void *bufOut, int num_entries) |
Function that converts float4 image to uchar RGBA8 image. More... | |
void | chrono::sensor::preprocess_RGBA8_to_FLOAT4_CHW (void *bufIn, void *bufOut, int c, int h, int w) |
Function that converts uchar RGBA8 image to float4 image with channels first. More... | |
void | chrono::sensor::preprocess_normalize_float (void *bufIn, float add, float mult, int c, int h, int w) |
Function that normalized input data in float format. More... | |
void | chrono::sensor::postprocess_FLOAT4_to_RGBA8_CHW (void *bufIn, void *bufOut, int c, int h, int w) |
Function that converts float4 image to uchar RGBA8 image with channels first. More... | |
void | chrono::sensor::cuda_pointcloud_from_depth (void *bufDI, void *bufOut, int width, int height, float hfov, float max_v_angle, float min_v_angle, CUstream &stream) |
Converts depth data to point cloud data for a lidar. More... | |
void | chrono::sensor::cuda_pointcloud_from_depth_dual_return (void *bufDI, void *bufOut, int width, int height, float hfov, float max_v_angle, float min_v_angle, CUstream &stream) |
Converts depth data to point cloud data for a lidar when the mode is dual return. More... | |
Function Documentation
◆ cuda_camera_noise_const_normal()
void chrono::sensor::cuda_camera_noise_const_normal | ( | unsigned char * | bufPtr, |
int | width, | ||
int | height, | ||
float | mean, | ||
float | stdev, | ||
curandState_t * | rng, | ||
CUstream & | stream | ||
) |
Kernel for applying uniform Gaussian noise to an image.
- Parameters
-
bufPtr A uchar (values 0-255) pointer to device memory where the image is stored. Memory assumed to be row major and contiguous. (Flat array representing image). width The width of the image in pixels. height The height of the image in pixels. mean The mean of the Gaussian distribution to be sampled. stdev The standard deviation of the distribution to be sampled. rng The states to be randomly generated stream The cuda stream for the kernel launch
◆ cuda_camera_noise_pixel_dependent()
void chrono::sensor::cuda_camera_noise_pixel_dependent | ( | unsigned char * | bufPtr, |
int | width, | ||
int | height, | ||
float | gain, | ||
float | sigma_read, | ||
float | sigma_adc, | ||
curandState_t * | rng, | ||
CUstream & | stream | ||
) |
Kernel for applying pixel dependent Gaussian noise to an image.
- Parameters
-
bufPtr A uchar (values 0-255) pointer to device memory where the image is stored. Memory assumed to be row major and contiguous. (Flat array representing image). width The width of the image in pixels. height The height of the image in pixels. gain The linear coefficient of correlation between pixel intensity and noise variance sigma_read The standard deviation of multiplicative noise to be sampled. sigma_adc The standard deviation of additive noise to be sampled. rng The states to be randomly generated stream The cuda stream for the kernel launch
◆ cuda_grayscale()
void chrono::sensor::cuda_grayscale | ( | void * | bufRGBA, |
void * | bufOut, | ||
int | width, | ||
int | height, | ||
CUstream & | stream | ||
) |
RGB 8 bpp image of uchar to greyscale image conversion.
- Parameters
-
bufRGBA The input buffer of RGBA data in uchar format (8 bpp) bufOut A pointer to the output buffer where greyscale data will be held (8 bpp) width The width of the image height The height of the image stream The cuda stream for the kernel
◆ cuda_image_alias()
void chrono::sensor::cuda_image_alias | ( | void * | bufIn, |
void * | bufOut, | ||
int | w_out, | ||
int | h_out, | ||
int | factor, | ||
int | pix_size, | ||
CUstream & | stream | ||
) |
An antialiasing helper function that reduces image quality by performing mean reduction of image.
- Parameters
-
bufIn A device pointer to the image image. bufOut A device pointer to the ouput image. w_out The output image width. h_out The output image height. factor The reduction factor per dimension. pix_size Size of a pixel (number of channels). stream cuda stream for computation
◆ cuda_image_alias_float()
void chrono::sensor::cuda_image_alias_float | ( | void * | bufIn, |
void * | bufOut, | ||
int | w_out, | ||
int | h_out, | ||
int | factor, | ||
int | pix_size, | ||
CUstream & | stream | ||
) |
An antialiasing helper function that reduces image quality by performing mean reduction of image.
- Parameters
-
bufIn A device pointer to the image image. bufOut A device pointer to the ouput image. w_out The output image width. h_out The output image height. factor The reduction factor per dimension. pix_size Size of a pixel (number of channels). stream cuda stream for computation
◆ cuda_image_gauss_blur_char()
void chrono::sensor::cuda_image_gauss_blur_char | ( | void * | buf, |
int | w, | ||
int | h, | ||
int | c, | ||
int | factor, | ||
CUstream & | stream | ||
) |
An image blurring function that reduces performs Gaussian blur.
- Parameters
-
buf w h c factor stream cuda stream for computation
◆ cuda_image_half4_to_uchar4()
void chrono::sensor::cuda_image_half4_to_uchar4 | ( | void * | bufIn, |
void * | bufOut, | ||
int | w, | ||
int | h, | ||
CUstream & | stream | ||
) |
Conversion from half4 to uchar4.
- Parameters
-
bufIn A device pointer to the image image. bufOut A device pointer to the ouput image. w The output image width. h The output image height. stream cuda stream for computation
◆ cuda_lidar_clip()
void chrono::sensor::cuda_lidar_clip | ( | float * | buf, |
int | width, | ||
int | height, | ||
float | threshold, | ||
float | default_dist, | ||
CUstream & | stream | ||
) |
Function for reduction of data when multiple samples are used per beam.
The performs a mean average of the data with the sample radius.
- Parameters
-
buf Input/output device pointer to raw lidar data. Computation will be done in-place width Width of the input data height Height of the inpute data threshold Intensity threshold for removing points default_dist Default distance to use when removing points stream The cuda stream used for processing the kernel
◆ cuda_lidar_dual_reduce()
void chrono::sensor::cuda_lidar_dual_reduce | ( | void * | bufIn, |
void * | bufOut, | ||
int | width, | ||
int | height, | ||
int | radius, | ||
CUstream & | stream | ||
) |
Function for reduction of data when multiple samples are used per beam.
The calculates the strongest and first return the data structure is [[strongest, first], [strongest, first], [strongest, first]....]
- Parameters
-
bufIn Input device pointed to raw lidar data. bufOut Outout device pointer for processed lidar data. width Width of the input data. height Height of the inpute data. radius Radius in samples of the beam to be reduced. stream Cuda stream for launching the kernel
◆ cuda_lidar_first_reduce()
void chrono::sensor::cuda_lidar_first_reduce | ( | void * | bufIn, |
void * | bufOut, | ||
int | width, | ||
int | height, | ||
int | radius, | ||
CUstream & | stream | ||
) |
Function for reduction of data when multiple samples are used per beam.
The calculates the first return within the sample radius of the beam.
- Parameters
-
bufIn Input device pointed to raw lidar data. bufOut Outout device pointer for processed lidar data. width Width of the input data. height Height of the inpute data. radius Radius in samples of the beam to be reduced. stream Cuda stream for launching the kernel
◆ cuda_lidar_mean_reduce()
void chrono::sensor::cuda_lidar_mean_reduce | ( | void * | bufIn, |
void * | bufOut, | ||
int | width, | ||
int | height, | ||
int | radius, | ||
CUstream & | stream | ||
) |
Function for reduction of data when multiple samples are used per beam.
The performs a mean average of the data with the sample radius.
- Parameters
-
bufIn Input device pointed to raw lidar data. bufOut Outout device pointer for processed lidar data. width Width of the input data. height Height of the inpute data. radius Radius in samples of the beam to be reduced. stream Cuda stream for launching the kernel
◆ cuda_lidar_noise_normal()
void chrono::sensor::cuda_lidar_noise_normal | ( | float * | bufPtr, |
int | width, | ||
int | height, | ||
float | stdev_range, | ||
float | stdev_v_angle, | ||
float | stdev_h_angle, | ||
float | stdev_intensity, | ||
curandState_t * | rng, | ||
CUstream & | stream | ||
) |
Function for applying Gaussian noise to raw ground truth lidar data.
Independent for range, intensity, and angles
- Parameters
-
bufPtr Device pointer to depth/intensity lidar data. width Width of lidar data buffer. height Height of lidar data buffer. stdev_range Standard deviation for lidar range. stdev_v_angle Standard deviation of noise for vertical angle measurement stdev_h_angle Standard deviation of noise for horizontal angle measurement. stdev_intensity Standard deviation of noise for vertical angle measurement. rng The state to be randomly generated stream The cuda stream for the kernel launch
◆ cuda_lidar_strong_reduce()
void chrono::sensor::cuda_lidar_strong_reduce | ( | void * | bufIn, |
void * | bufOut, | ||
int | width, | ||
int | height, | ||
int | radius, | ||
CUstream & | stream | ||
) |
Function for reduction of data when multiple samples are used per beam.
The calculates the strongest return within the sample radius of the beam.
- Parameters
-
bufIn Input device pointed to raw lidar data. bufOut Outout device pointer for processed lidar data. width Width of the input data. height Height of the inpute data. radius Radius in samples of the beam to be reduced. stream Cuda stream for launching the kernel
◆ cuda_pointcloud_from_depth()
void chrono::sensor::cuda_pointcloud_from_depth | ( | void * | bufDI, |
void * | bufOut, | ||
int | width, | ||
int | height, | ||
float | hfov, | ||
float | max_v_angle, | ||
float | min_v_angle, | ||
CUstream & | stream | ||
) |
Converts depth data to point cloud data for a lidar.
- Parameters
-
bufDI A device pointer to depth/intensity data from a lidar. bufOut A device pointer to when the point cloud data will be stored. width The width of the lidar data. height The height of the lidar data. hfov The horizontal field of view of the lidar. max_v_angle The maximun vertical fov angle of the lidar min_v_angle The minimum vertical fov angle for the lidar stream The cuda stream for the kernel
◆ cuda_pointcloud_from_depth_dual_return()
void chrono::sensor::cuda_pointcloud_from_depth_dual_return | ( | void * | bufDI, |
void * | bufOut, | ||
int | width, | ||
int | height, | ||
float | hfov, | ||
float | max_v_angle, | ||
float | min_v_angle, | ||
CUstream & | stream | ||
) |
Converts depth data to point cloud data for a lidar when the mode is dual return.
- Parameters
-
bufDI A device pointer to depth/intensity data from a lidar. bufOut A device pointer to when the point cloud data will be stored. width The width of the lidar data. height The height of the lidar data. hfov The horizontal field of view of the lidar. max_v_angle The maximun vertical fov angle of the lidar min_v_angle The minimum vertical fov angle for the lidar stream The cuda stream for the kernel
◆ init_cuda_rng()
void chrono::sensor::init_cuda_rng | ( | unsigned int | seed, |
curandState_t * | rng_states, | ||
int | n_generators | ||
) |
Host function for initialing random values for cuRAND.
- Parameters
-
seed Random number generator seed. rng_states The states to be randomly generated. n_generators The number of random value generators we need.
◆ init_random_states()
__global__ void chrono::sensor::init_random_states | ( | unsigned int | seed, |
curandState_t * | rng_states, | ||
int | n_generators | ||
) |
Device function for initialing random values for cuRAND.
- Parameters
-
seed Random number generator seed. rng_states The states to be randomly generated. n_generators The number of random value generators we need.
◆ postprocess_FLOAT4_to_RGBA8()
void chrono::sensor::postprocess_FLOAT4_to_RGBA8 | ( | void * | bufIn, |
void * | bufOut, | ||
int | num_entries | ||
) |
Function that converts float4 image to uchar RGBA8 image.
- Parameters
-
bufIn Input device pointer in float format. bufOut Output device pointer in uchar format. num_entries The number of entries in the image (c*h*w).
◆ postprocess_FLOAT4_to_RGBA8_CHW()
void chrono::sensor::postprocess_FLOAT4_to_RGBA8_CHW | ( | void * | bufIn, |
void * | bufOut, | ||
int | c, | ||
int | h, | ||
int | w | ||
) |
Function that converts float4 image to uchar RGBA8 image with channels first.
- Parameters
-
bufIn Input device pointer in float format. bufOut Output device pointer in uchar format. c Number of channels in the image. h Height of the image. w Width of the image.
◆ preprocess_normalize_float()
void chrono::sensor::preprocess_normalize_float | ( | void * | bufIn, |
float | add, | ||
float | mult, | ||
int | c, | ||
int | h, | ||
int | w | ||
) |
Function that normalized input data in float format.
- Parameters
-
bufIn Input device pointer in float format. add mult c Number of channels in the image. h Height of the image. w Width of the image.
◆ preprocess_RGBA8_to_FLOAT3()
void chrono::sensor::preprocess_RGBA8_to_FLOAT3 | ( | void * | bufIn, |
void * | bufOut, | ||
int | h, | ||
int | w | ||
) |
Function that converts uchar RGBA8 image to float3 image.
- Parameters
-
bufIn Input device pointer in uchar format. bufOut Output device pointer in float format. h The height of the image. w The width of the image.
◆ preprocess_RGBA8_to_FLOAT4()
void chrono::sensor::preprocess_RGBA8_to_FLOAT4 | ( | void * | bufIn, |
void * | bufOut, | ||
int | num_entries | ||
) |
Function that converts uchar RGBA8 image to float4 image.
- Parameters
-
bufIn Input device pointer in uchar format. bufOut Output device pointer in float format. num_entries The number of entries in the image (c*h*w).
◆ preprocess_RGBA8_to_FLOAT4_CHW()
void chrono::sensor::preprocess_RGBA8_to_FLOAT4_CHW | ( | void * | bufIn, |
void * | bufOut, | ||
int | c, | ||
int | h, | ||
int | w | ||
) |
Function that converts uchar RGBA8 image to float4 image with channels first.
- Parameters
-
bufIn Input device pointer in uchar format. bufOut Output device pointer in float format. c Number of channels in the image. h Height of the image. w Width of the image.