Description
Camera class.
#include <ChPhysCameraSensor.h>


Public Member Functions | |
| ChPhysCameraSensor (std::shared_ptr< chrono::ChBody > parent, float updateRate, chrono::ChFrame< double > offsetPose, unsigned int w, unsigned int h, CameraLensModelType lens_model=CameraLensModelType::PINHOLE, unsigned int supersample_factor=1, bool use_diffuse_reflect=false, bool use_denoiser=false, bool use_defocus_blur=false, bool use_vignetting=false, bool use_aggregator=false, bool use_noise=false, bool use_expsr_to_dv=false, Integrator integrator=Integrator::LEGACY, float gamma=1.0f, bool use_fog=false, bool use_motion_blur=false) | |
| Constructor for the phys camera class that defaults to a pinhole lens model. More... | |
| ~ChPhysCameraSensor () | |
| phys-camera class destructor | |
| void | SetRadialLensParameters (ChVector3f params) |
| Sets the parameters for a radial lens distortion model Parameters should be given for the forward model The backward distortion model will then be used and calculated from the forward parameters given. More... | |
| void | SetCtrlParameters (float aperture_num, float expsr_time, float ISO, float focal_length, float focus_dist) |
| Set camera control parameters. More... | |
| void | SetModelParameters (float sensor_width, float pixel_size, float max_scene_light_amount, ChVector3f rgb_QE_vec, PhysCameraGainParams gain_params, PhysCameraNoiseParams noise_params) |
| Set camera intrinsic model parameters. More... | |
| float | GetHFOV () const |
| returns the camera's horizontal field of view. More... | |
| CameraLensModelType | GetLensModelType () const |
| returns the lens model type used for rendering More... | |
| LensParams | GetLensParameters () const |
| returns the lens model parameters More... | |
| bool | GetUseGI () |
| returns if the cemera considers diffuse reflection More... | |
| bool | GetUseDenoiser () |
| returns if the cemera should use a denoiser More... | |
| Integrator | GetIntegrator () |
| Get the integrator algorithm type used for rendering. More... | |
| float | GetGamma () |
| returns the gamma correction value of this camera. More... | |
| unsigned int | GetSampleFactor () |
| Gets the number of samples per pixels in each direction used for super sampling. More... | |
| bool | GetUseFog () |
| returns if the cemera should use fog as dictated by the scene More... | |
| ChMatrix33< float > | GetCameraIntrinsicMatrix () |
| Get 3x3 Intrinsic Matrix. | |
| ChVector3f | GetCameraDistortionCoefficients () |
| Get the camera distortion coefficients. | |
| float | GetApertureNum () |
| Get the aperture number. More... | |
| float | GetExpsrTime () |
| Get the exposure time. More... | |
| float | GetISO () |
| Get the ISO gain. More... | |
| float | GetFocalLength () |
| Get the focal length. More... | |
| float | GetFocusDistance () |
| Get the focus distance. More... | |
| float | GetSensorWidth () |
| Get the sensor width. More... | |
| float | GetPixelSize () |
| Get the pixel size. More... | |
| float | GetMaxSceneLightAmount () |
| Get the maximum light amount in the scene. More... | |
| PhysCameraGainParams | GetGainParams () |
| Get all gain-related parameters in camera model. More... | |
| PhysCameraNoiseParams | GetNoiseParams () |
| Get noise model parameters in camera model. More... | |
| void | UpdateFilterParameters () |
| update filter parameters in ChOptixEngine.cpp | |
Public Member Functions inherited from chrono::sensor::ChOptixSensor | |
| ChOptixSensor (std::shared_ptr< ChBody > parent, float updateRate, ChFrame< double > offsetPose, unsigned int w, unsigned int h) | |
| Constructor for the base camera class that defaults to a pinhole lens model. More... | |
| PipelineType | GetPipelineType () |
| unsigned int | GetWidth () |
| unsigned int | GetHeight () |
| CUstream | GetCudaStream () |
Public Member Functions inherited from chrono::sensor::ChSensor | |
| ChSensor (std::shared_ptr< ChBody > parent, float updateRate, ChFrame< double > offsetPose) | |
| Constructor for the base sensor class. More... | |
| void | SetOffsetPose (ChFrame< double > pose) |
| Set the sensor's relative position and orientation. More... | |
| ChFrame< double > | GetOffsetPose () |
| Get the sensor's relative position and orientation. More... | |
| std::shared_ptr< ChBody > | GetParent () const |
| Get the object to which the sensor is attached. More... | |
| void | SetName (std::string name) |
| Set the sensor's name. More... | |
| std::string | GetName () const |
| Get the name of the sensor. More... | |
| float | GetUpdateRate () const |
| Get the sensor update rate (Hz). More... | |
| void | SetLag (float t) |
| Set the lag parameter. More... | |
| float | GetLag () const |
| Get the sensor lag (seconds). More... | |
| void | SetCollectionWindow (float t) |
| Set the collection window. More... | |
| float | GetCollectionWindow () const |
| Get the sensor data collection window (seconds). More... | |
| void | SetUpdateRate (float updateRate) |
| Set the sensor update rate (Hz). More... | |
| unsigned int | GetNumLaunches () |
| Get the number of times the sensor has been updated. More... | |
| void | IncrementNumLaunches () |
| Increments the count of number of updates. | |
| std::list< std::shared_ptr< ChFilter > > | GetFilterList () const |
| Get the sensor's list of filters. More... | |
| void | PushFilter (std::shared_ptr< ChFilter > filter) |
| Add a filter to the sensor. More... | |
| void | PushFilterFront (std::shared_ptr< ChFilter > filter) |
| Add a filter to the front of the list on a sensor. More... | |
| void | LockFilterList () |
| Gives ability to lock the filter list to prevent race conditions. More... | |
| template<class UserBufferType > | |
| UserBufferType | GetMostRecentBuffer () |
| Get the last filter in the list that matches the template type. More... | |
| template<> | |
| CH_SENSOR_API UserAccelBufferPtr | GetMostRecentBuffer () |
Additional Inherited Members | |
Protected Attributes inherited from chrono::sensor::ChOptixSensor | |
| PipelineType | m_pipeline_type |
| the type of pipeline for rendering | |
Protected Attributes inherited from chrono::sensor::ChSensor | |
| float | m_updateRate |
| sensor update rate | |
| float | m_lag |
| sensor lag from the time all scene information is available (sensor processing time) | |
| float | m_collection_window |
| time over which data is collected. More... | |
| float | m_timeLastUpdated |
| time since previous update | |
| std::shared_ptr< ChBody > | m_parent |
| object to which the sensor is attached | |
| ChFrame< double > | m_offsetPose |
| position and orientation of the sensor relative to its parent | |
| std::string | m_name |
| name of the sensor | |
| unsigned int | m_num_launches |
| number of times the sensor has been updated | |
| std::list< std::shared_ptr< ChFilter > > | m_filters |
| filter list for post-processing sensor data | |
| bool | m_filter_list_locked = false |
| gives ability to lock the filter list to prevent race conditions | |
Constructor & Destructor Documentation
◆ ChPhysCameraSensor()
| CH_SENSOR_API chrono::sensor::ChPhysCameraSensor::ChPhysCameraSensor | ( | std::shared_ptr< chrono::ChBody > | parent, |
| float | updateRate, | ||
| chrono::ChFrame< double > | offsetPose, | ||
| unsigned int | w, | ||
| unsigned int | h, | ||
| CameraLensModelType | lens_model = CameraLensModelType::PINHOLE, |
||
| unsigned int | supersample_factor = 1, |
||
| bool | use_diffuse_reflect = false, |
||
| bool | use_denoiser = false, |
||
| bool | use_defocus_blur = false, |
||
| bool | use_vignetting = false, |
||
| bool | use_aggregator = false, |
||
| bool | use_noise = false, |
||
| bool | use_expsr_to_dv = false, |
||
| Integrator | integrator = Integrator::LEGACY, |
||
| float | gamma = 1.0f, |
||
| bool | use_fog = false, |
||
| bool | use_motion_blur = false |
||
| ) |
Constructor for the phys camera class that defaults to a pinhole lens model.
- Parameters
-
parent A shared pointer to a body on which the sensor should be attached. updateRate The desired update rate of the sensor in Hz. offsetPose The desired relative position and orientation of the sensor on the body. w The width of the image the camera should generate. h The height of the image the camera should generate. lens_model A enum specifying the desired lens model. sensor_width equivalent width of the image sensor to calculate hHOV, [mm] pixel_size length of a pixel to calculate depth of field, [mm] supersample_factor The number of rays that should be sampled per pixel for antialiasing. use_diffuse_reflect whether to consider diffuse reflection in rendering. If false, only consider specular reflection. use_denoiser whether to use OptiX denoiser for diffuse reflection or area light. use_defocus_blur whether to use defocus blur effect use_vignetting whether to use vignetting effect use_aggregator whether to aggregate illumination irradiance over exposure time and pixel area use_expsr_to_dv whether to convert exposure domain to digital value domain integrator The type of integrator algorithm to use for rendering. gamma correction of the image, 1 for linear color space, 2.2 for sRGB use_fog whether to use fog on this camera use_motion_blur whether to use motion blur effect
Member Function Documentation
◆ GetApertureNum()
|
inline |
Get the aperture number.
- Returns
- the aperture number, [1/1]
◆ GetExpsrTime()
|
inline |
Get the exposure time.
- Returns
- the exposure time, [sec]
◆ GetFocalLength()
|
inline |
Get the focal length.
- Returns
- the focal length, [m]
◆ GetFocusDistance()
|
inline |
Get the focus distance.
- Returns
- the focus distance, [m]
◆ GetGainParams()
|
inline |
Get all gain-related parameters in camera model.
- Returns
- all gain-related parameters in camera model, [1/1]
◆ GetGamma()
|
inline |
returns the gamma correction value of this camera.
1 means no correction and the image is in linear color space. Useful for other ML applications 2.2 means the image is in sRGB color space. Useful for display
- Returns
- Gamma value of the image
◆ GetHFOV()
|
inline |
returns the camera's horizontal field of view.
Vertical field of view is determined by the image aspect ratio and the lens model
- Returns
- The horizontal field of view of the camera lens, [rad]
◆ GetIntegrator()
|
inline |
Get the integrator algorithm type used for rendering.
- Returns
- the integrator algorithm type used for rendering
◆ GetISO()
|
inline |
Get the ISO gain.
- Returns
- the ISO, [1/1]
◆ GetLensModelType()
|
inline |
returns the lens model type used for rendering
- Returns
- An enum specifying which lens model is being used. (0: PINHOLE, 1: FOV, 2: Radial)
◆ GetLensParameters()
|
inline |
returns the lens model parameters
- Returns
- LensParams struct of lens parameters. Will default to zeros for any terms not used. These are coverted for the inverse model
◆ GetMaxSceneLightAmount()
|
inline |
Get the maximum light amount in the scene.
- Returns
- the maximum light amount in the scene, [W]
◆ GetNoiseParams()
|
inline |
Get noise model parameters in camera model.
- Returns
- noise model parameters in camera model, [1/1]
◆ GetPixelSize()
|
inline |
Get the pixel size.
- Returns
- the pixel size, [m]
◆ GetSampleFactor()
|
inline |
Gets the number of samples per pixels in each direction used for super sampling.
- Returns
- the number of samples per pixel
◆ GetSensorWidth()
|
inline |
Get the sensor width.
- Returns
- the sensor width, [m]
◆ GetUseDenoiser()
|
inline |
returns if the cemera should use a denoiser
- Returns
- True if it does use a denoiser
◆ GetUseFog()
|
inline |
returns if the cemera should use fog as dictated by the scene
- Returns
- True if it does request
◆ GetUseGI()
|
inline |
returns if the cemera considers diffuse reflection
- Returns
- True if it does consider
◆ SetCtrlParameters()
| void chrono::sensor::ChPhysCameraSensor::SetCtrlParameters | ( | float | aperture_num, |
| float | expsr_time, | ||
| float | ISO, | ||
| float | focal_length, | ||
| float | focus_dist | ||
| ) |
Set camera control parameters.
- Parameters
-
aperture_num F-number (or aperture number) = focal_length / aperture_diameter, [1/1] expsr_time exposure time, [sec] ISO ISO exposure gain, [1/1] focal_length focal length, [m] focus_dist focus distance, [m]
◆ SetModelParameters()
| void chrono::sensor::ChPhysCameraSensor::SetModelParameters | ( | float | sensor_width, |
| float | pixel_size, | ||
| float | max_scene_light_amount, | ||
| ChVector3f | rgb_QE_vec, | ||
| PhysCameraGainParams | gain_params, | ||
| PhysCameraNoiseParams | noise_params | ||
| ) |
Set camera intrinsic model parameters.
- Parameters
-
sensor_width equivalent width of the image sensor, [m] pixel_size length of a pixel, [m] max_scene_light_amount maximum light amount in the scene, consider distance-diminishing effect [lux = lumen/m^2] rgb_QE_vec vector of RGB quantum efficiencies, [1/1] gain_params all gain-related parameters in camera model, [1/1] noise_params noise model parameters in camera model
◆ SetRadialLensParameters()
| void chrono::sensor::ChPhysCameraSensor::SetRadialLensParameters | ( | ChVector3f | params | ) |
Sets the parameters for a radial lens distortion model Parameters should be given for the forward model The backward distortion model will then be used and calculated from the forward parameters given.
- Parameters
-
params the set of 3 radial parameters (k1, k2, k3)
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_sensor/sensors/ChPhysCameraSensor.h
- /builds/uwsbel/chrono/src/chrono_sensor/sensors/ChPhysCameraSensor.cpp
Public Member Functions inherited from