产生动态视觉事件的传感器 更多...
#include <DVSCamera.h>
Public 成员函数 | |
ADVSCamera (const FObjectInitializer &ObjectInitializer) | |
void | Set (const FActorDescription &ActorDescription) override |
![]() | |
bool | AddPostProcessingMaterial (const FString &Path) |
Load the UMaterialInstanceDynamic at the given Path and append it to the list of shaders with Weight. | |
void | AddShader (const FSensorShader &Shader) |
Add a post-processing shader. | |
AShaderBasedSensor (const FObjectInitializer &ObjectInitializer) | |
void | Set (const FActorDescription &ActorDescription) override |
void | SetFloatShaderParameter (uint8_t ShaderIndex, const FName &ParameterName, float Value) |
![]() | |
bool | ArePostProcessingEffectsEnabled () const |
ASceneCaptureSensor (const FObjectInitializer &ObjectInitializer) | |
void | Enable16BitFormat (bool Enable=false) |
void | EnablePostProcessingEffects (bool Enable=true) |
void | EnqueueRenderSceneImmediate () |
Immediate enqueues render commands of the scene at the current time. | |
float | GetAperture () const |
int | GetBladeCount () const |
float | GetBloomIntensity () const |
USceneCaptureComponent2D * | GetCaptureComponent2D () |
UTextureRenderTarget2D * | GetCaptureRenderTarget () |
float | GetChromAberrIntensity () const |
float | GetChromAberrOffset () const |
float | GetDepthBlurAmount () const |
float | GetDepthBlurRadius () const |
float | GetDepthOfFieldMinFstop () const |
float | GetExposureCalibrationConstant () const |
float | GetExposureCompensation () const |
float | GetExposureMaxBrightness () const |
EAutoExposureMethod | GetExposureMethod () const |
float | GetExposureMinBrightness () const |
float | GetExposureSpeedDown () const |
float | GetExposureSpeedUp () const |
float | GetFilmBlackClip () const |
float | GetFilmShoulder () const |
float | GetFilmSlope () const |
float | GetFilmToe () const |
float | GetFilmWhiteClip () const |
float | GetFocalDistance () const |
float | GetFOVAngle () const |
uint32 | GetImageHeight () const |
uint32 | GetImageWidth () const |
float | GetISO () const |
float | GetLensFlareIntensity () const |
float | GetMotionBlurIntensity () const |
float | GetMotionBlurMaxDistortion () const |
float | GetMotionBlurMinObjectScreenSize () const |
float | GetShutterSpeed () const |
float | GetTargetGamma () const |
float | GetWhiteTemp () const |
float | GetWhiteTint () const |
bool | Is16BitFormatEnabled () const |
bool | ReadPixels (TArray< FColor > &BitMap) const |
Use for debugging purposes only. | |
void | SaveCaptureToDisk (const FString &FilePath) const |
Use for debugging purposes only. | |
void | SetAperture (float Aperture) |
void | SetBladeCount (int Count) |
void | SetBloomIntensity (float Intensity) |
void | SetChromAberrIntensity (float Intensity) |
void | SetChromAberrOffset (float ChromAberrOffset) |
void | SetDepthBlurAmount (float Amount) |
void | SetDepthBlurRadius (float Radius) |
void | SetDepthOfFieldMinFstop (float MinFstop) |
void | SetExposureCalibrationConstant (float Constant) |
void | SetExposureCompensation (float Compensation) |
void | SetExposureMaxBrightness (float Brightness) |
void | SetExposureMethod (EAutoExposureMethod Method) |
void | SetExposureMinBrightness (float Brightness) |
void | SetExposureSpeedDown (float Speed) |
void | SetExposureSpeedUp (float Speed) |
void | SetFilmBlackClip (float BlackClip) |
void | SetFilmShoulder (float Shoulder) |
void | SetFilmSlope (float Slope) |
void | SetFilmToe (float Toe) |
void | SetFilmWhiteClip (float WhiteClip) |
void | SetFocalDistance (float Distance) |
void | SetFOVAngle (float FOVAngle) |
void | SetImageSize (uint32 Width, uint32 Height) |
void | SetISO (float ISO) |
void | SetLensFlareIntensity (float Intensity) |
void | SetMotionBlurIntensity (float Intensity) |
void | SetMotionBlurMaxDistortion (float MaxDistortion) |
void | SetMotionBlurMinObjectScreenSize (float ScreenSize) |
void | SetShutterSpeed (float Speed) |
void | SetTargetGamma (float InTargetGamma) |
void | SetWhiteTemp (float Temp) |
void | SetWhiteTint (float Tint) |
void | WaitForRenderThreadToFinish () |
Blocks until the render thread has finished all it's tasks. | |
![]() | |
ASensor (const FObjectInitializer &ObjectInitializer) | |
boost::optional< FActorAttribute > | GetAttribute (const FString Name) |
const UCarlaEpisode & | GetEpisode () const |
URandomEngine * | GetRandomEngine () |
int32 | GetSeed () const |
auto | GetToken () const |
Return the token that allows subscribing to this sensor's stream. | |
bool | IsStreamReady () |
FDataStream | MoveDataStream () |
virtual void | OnFirstClientConnected () |
virtual void | OnLastClientDisconnected () |
void | PostPhysTickInternal (UWorld *World, ELevelTick TickType, float DeltaSeconds) |
void | SetDataStream (FDataStream InStream) |
Replace the FDataStream associated with this sensor. | |
void | SetEpisode (const UCarlaEpisode &InEpisode) |
void | SetSeed (int32 InSeed) |
void | Tick (const float DeltaTime) final |
静态 Public 成员函数 | |
static FActorDefinition | GetSensorDefinition () |
Protected 成员函数 | |
void | ImageToGray (const TArray< FColor > &image) |
void | ImageToLogGray (const TArray< FColor > &image) |
virtual void | PostPhysTick (UWorld *World, ELevelTick TickType, float DeltaTime) override |
ADVSCamera::DVSEventArray | Simulation (float DeltaTime) |
![]() | |
void | SetUpSceneCaptureComponent (USceneCaptureComponent2D &SceneCapture) override |
![]() | |
virtual void | BeginPlay () override |
void | CaptureSceneExtended () |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
virtual void | PrePhysTick (float DeltaSeconds) override |
virtual void | SendGBufferTextures (FGBufferRequest &GBuffer) |
template<typename T > | |
void | SendGBufferTexturesInternal (T &Self, FGBufferRequest &GBufferData) |
![]() | |
void | EndPlay (EEndPlayReason::Type EndPlayReason) override |
template<typename SensorT > | |
FAsyncDataStream | GetDataStream (const SensorT &Self) |
Return the FDataStream associated with this sensor. | |
void | PostActorCreated () override |
Private 类型 | |
using | DVSEventArray = std::vector<::carla::sensor::data::DVSEvent> |
Private 属性 | |
dvs::Config | config |
动态时间传感器的仿真配置 | |
std::int64_t | current_time |
以纳秒为单位的当前时间 | |
TArray< double > | last_event_timestamp |
包含以秒为单位的最新事件时间的图像 | |
TArray< float > | last_image |
包含最新(当前)图像和先前图像的图像 | |
TArray< float > | prev_image |
TArray< float > | ref_values |
包含触发事件最新参考值的图像 | |
额外继承的成员函数 | ||
![]() | ||
struct { | ||
FCameraGBufferUint8 CustomDepth | ||
FCameraGBufferUint8 CustomStencil | ||
FCameraGBufferUint8 GBufferA | ||
FCameraGBufferUint8 GBufferB | ||
FCameraGBufferUint8 GBufferC | ||
FCameraGBufferUint8 GBufferD | ||
FCameraGBufferUint8 GBufferE | ||
FCameraGBufferUint8 GBufferF | ||
FCameraGBufferUint8 SceneColor | ||
FCameraGBufferUint8 SceneDepth | ||
FCameraGBufferUint8 SceneStencil | ||
FCameraGBufferUint8 SSAO | ||
FCameraGBufferUint8 Velocity | ||
} | CameraGBuffers | |
![]() | ||
bool | bEnable16BitFormat = false | |
Whether to change render target format to PF_A16B16G16R16, offering 16bit / channel | ||
bool | bEnablePostProcessingEffects = true | |
Whether to render the post-processing effects present in the scene. | ||
USceneCaptureComponent2D_CARLA * | CaptureComponent2D = nullptr | |
Scene capture component. | ||
UTextureRenderTarget2D * | CaptureRenderTarget = nullptr | |
Render target necessary for scene capture. | ||
uint32 | ImageHeight = 600u | |
Image height in pixels. | ||
uint32 | ImageWidth = 800u | |
Image width in pixels. | ||
float | TargetGamma = 2.4f | |
![]() | ||
bool | bIsActive = false | |
URandomEngine * | RandomEngine = nullptr | |
Random Engine used to provide noise for sensor output. | ||
int32 | Seed = 123456789 | |
Seed of the pseudo-random engine. | ||
产生动态视觉事件的传感器
在文件 DVSCamera.h 第 51 行定义.
|
private |
在文件 DVSCamera.h 第 54 行定义.
ADVSCamera::ADVSCamera | ( | const FObjectInitializer & | ObjectInitializer | ) |
|
static |
|
protected |
合理性检查
保存 HxW 个元素
将图像转化为灰度原始图像值
在文件 DVSCamera.cpp 第 214 行定义.
引用了 FColorToGrayScaleFloat() , 以及 last_image.
被这些函数引用 PostPhysTick().
|
protected |
合理性检查
保存 HxW 个元素
将图像转化为灰度原始图像值
在文件 DVSCamera.cpp 第 231 行定义.
引用了 config, FColorToGrayScaleFloat(), last_image , 以及 dvs::Config::log_eps.
被这些函数引用 PostPhysTick().
|
overrideprotectedvirtual |
在当前时刻,场景的立刻入队渲染命令。
读取图像
将图像转换为灰度图
动态视觉传感器仿真器
发送事件
重载 ASceneCaptureSensor .
在文件 DVSCamera.cpp 第 134 行定义.
引用了 ASceneCaptureSensor::CaptureRenderTarget, config, carla::BufferView::CreateFrom(), ASceneCaptureSensor::EnqueueRenderSceneImmediate(), carla::streaming::detail::token_type::get_stream_id(), ASensor::GetAttribute(), ASensor::GetDataStream(), carla::ros2::ROS2::GetInstance(), FDataStreamTmpl< T >::GetSensorType(), ASensor::GetToken(), ImageToGray(), ImageToLogGray(), PostPhysTick(), ASceneCaptureSensor::ReadPixels(), carla::sensor::CompositeSerializer< Items >::Serialize(), Simulation(), ASensor::Stream, dvs::Config::use_log , 以及 ASceneCaptureSensor::WaitForRenderThreadToFinish().
被这些函数引用 PostPhysTick().
|
overridevirtual |
重载 ASensor .
在文件 DVSCamera.cpp 第 93 行定义.
引用了 dvs::Config::Cm, config, dvs::Config::Cp, dvs::Config::log_eps, dvs::Config::refractory_period_ns, UActorBlueprintFunctionLibrary::RetrieveActorAttributeToBool(), UActorBlueprintFunctionLibrary::RetrieveActorAttributeToFloat(), UActorBlueprintFunctionLibrary::RetrieveActorAttributeToInt(), dvs::Config::sigma_Cm, dvs::Config::sigma_Cp, dvs::Config::use_log , 以及 FActorDescription::Variations.
|
protected |
事件数组
合理性检查
检查初始化
设置第一个渲染的图像
将数组大小调整为给定的元素数量。新元素将被归零。
重置当前时间
以纳秒表示的时间增量
沿着图像大小循环
取消事件,因为距离上次事件的时间 小于 不应期refractory_period_ns
更新当前时间
在文件 DVSCamera.cpp 第 250 行定义.
引用了 dvs::Config::Cm, config, dvs::Config::Cp, current_time, ASensor::GetEpisode(), ASceneCaptureSensor::GetImageHeight(), ASceneCaptureSensor::GetImageWidth(), URandomEngine::GetNormalDistribution(), last_event_timestamp, last_image, dvs::nanosecToSecTrunc(), prev_image, ASensor::RandomEngine, ref_values, dvs::Config::refractory_period_ns, dvs::secToNanosec(), dvs::Config::sigma_Cm , 以及 dvs::Config::sigma_Cp.
被这些函数引用 PostPhysTick().
|
private |
动态时间传感器的仿真配置
在文件 DVSCamera.h 第 81 行定义.
被这些函数引用 ImageToLogGray(), PostPhysTick(), Set() , 以及 Simulation().
|
private |
|
private |
|
private |
包含最新(当前)图像和先前图像的图像
在文件 DVSCamera.h 第 69 行定义.
被这些函数引用 ImageToGray(), ImageToLogGray() , 以及 Simulation().
|
private |
在文件 DVSCamera.h 第 69 行定义.
被这些函数引用 Simulation().
|
private |