Agrarsense
Public Member Functions | List of all members
ASemanticSegmentationCamera Class Reference

#include <SemanticSegmentationCamera.h>

Inheritance diagram for ASemanticSegmentationCamera:
Inheritance graph
[legend]
Collaboration diagram for ASemanticSegmentationCamera:
Collaboration graph
[legend]

Public Member Functions

 ASemanticSegmentationCamera (const FObjectInitializer &ObjectInitializer)
 
void Init (FCameraBaseParameters parameters, bool SimulateSensor=true) override
 
virtual ESensorTypes GetSensorType () const override
 
- Public Member Functions inherited from ACamera
 ACamera (const FObjectInitializer &ObjectInitializer)
 
virtual void Init (FCameraBaseParameters parameters, bool SimulateSensor=true)
 
virtual ESensorTypes GetSensorType () const override
 
void ChangeCameraParameters (FCameraBaseParameters newParameters)
 
FCameraBaseParameters GetCameraParameters ()
 
void AddPostProcessingMaterial (const FString &Path, float Weight=1.0f)
 
void RemovePostProcessingMaterial (UMaterial *Material)
 
USceneCaptureComponent2D * GetCaptureComponent2D () const
 
UTextureRenderTarget2D * GetCaptureRenderTarget2D () const
 
void AddWidgetToWindow (UWidget *WidgetToAdd)
 
void RemoveWidgetFromWindow (UWidget *WidgetToRemove)
 
void SetShadowRendering (bool RenderShadows)
 
void SetTemporalAA (bool SetTemporal)
 
void ResizeCamera (int Width=1280, int Height=720)
 
void SaveCurrentFrameToDisk ()
 
int GetCameraWidth () const
 
int GetCameraHeight () const
 
virtual FString GetParametersAsString () const override
 
- Public Member Functions inherited from ASensor
 ASensor (const FObjectInitializer &ObjectInitializer)
 
FString ExportToJsonFile (const FString &FileName)
 
virtual ESensorTypes GetSensorType () const
 
FString GetSensorIdentifier () const
 
void SetSensorIdentifier (const FString newIdentifier)
 
FString GetSensorName () const
 
virtual FString GetParametersAsString () const
 
void SetSensorName (const FString newName)
 
virtual FString GetTopicName ()
 
UTopic * GetROSTopic () const
 
void SetSimulateSensor (bool SimulateSensor)
 
bool CanSimulateSensor () const
 
ASensorModelGetSensorModel () const
 
void SetSensorModel (ASensorModel *NewSensorModel)
 
bool IsROSConnected () const
 
UROSIntegrationGameInstance * GetROSGameInstance () const
 
virtual FString GetActorID_Implementation () const override
 
virtual FString GetActorName_Implementation () const override
 
virtual FString GetActorInformation_Implementation () const override
 
virtual void SetActorName_Implementation (const FString &NewActorName) override
 
virtual void SetActorIDAndName_Implementation (const FString &NewActorName, const FString &NewID) override
 
- Public Member Functions inherited from IActorInformation
FString GetActorID () const
 
FString GetActorName () const
 
FString GetActorInformation () const
 
void SetActorName (const FString &NewActorName)
 
void SetActorIDAndName (const FString &NewActorName, const FString &NewID)
 

Additional Inherited Members

- Static Public Member Functions inherited from ASensor
static void HideComponentForAllCameras (UPrimitiveComponent *PrimitiveComponent)
 
static TMap< FString, FColor > GetSemanticColors ()
 
static TArray< TWeakObjectPtr< UPrimitiveComponent > > GetComponentsToHide ()
 
- Static Public Member Functions inherited from IActorInformation
static void SetAndValidateActorIDAndName (FString &ActorName, FString &ActorID, TWeakObjectPtr< AActor > Actor)
 
static bool DestroyActorByID (const FString &ID)
 
static AActor * GetActorByID (const FString &ID)
 
template<typename T >
static TArray< T * > GetActorsWithInterface ()
 
static void PrintAllIds ()
 
- Public Attributes inherited from ACamera
TEnumAsByte< ETextureRenderTargetFormat > TextureFormat = ETextureRenderTargetFormat::RTF_RGBA8
 
FCameraDelegate_OnWindowClosed OnCameraWindowClosed
 
FCameraDelegate_OnWindowResized OnCameraWindowResized
 
- Public Attributes inherited from ASensor
FSensorDestroy OnSensorDestroy
 
FString AttachedToComponent
 
FName AttachedToBone
 
- Protected Member Functions inherited from ACamera
virtual void BeginPlay () override
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 
virtual void PreActorTick (UWorld *World, ELevelTick TickType, float DeltaSeconds)
 
virtual void EndOfFrame (UWorld *World, ELevelTick TickType, float DeltaSeconds)
 
virtual void EndOfFrameParellel (float DeltaTime)
 
virtual void AddProcessingToFrameBuffer (TArray< FColor > &buffer)
 
virtual void SendImageDataToROS (const TArray< FColor > &FrameBuffer, int32 Width, int32 Height)
 
void HidePrimitiveComponent (UPrimitiveComponent *PrimitiveComponent)
 
void SaveImageToDisk (const TArray< FColor > FrameBuffer, int32 Width, int32 Height)
 
void SaveCameraMetaDataToDisk (const FString &ImageName)
 
void CreateLogFile () override
 
- Protected Member Functions inherited from ASensor
virtual void BeginPlay () override
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 
virtual void CreateROSTopic ()
 
virtual void DestroyROSTopic ()
 
virtual void CreateDataSavePath ()
 
bool IsLogFileCreated ()
 
virtual void CreateLogFile ()
 
void WriteToLogFile (const FString &Message)
 
- Static Protected Member Functions inherited from ASensor
template<typename InStructType >
static FString StructToString (const InStructType &InStruct)
 
- Protected Attributes inherited from ACamera
bool UseParallelLateTick = true
 
FDelegateHandle OnPreTickDelegate
 
FDelegateHandle OnPostTickDelegate
 
FString CameraName = "Camera "
 
FString FilePrefix = "Data/Camera_"
 
UTextureRenderTarget2D * CaptureRenderTarget = nullptr
 
USceneCaptureComponent2D * CaptureComponent2D = nullptr
 
UTexture2D * CaptureFrameTexture
 
TSharedPtr< FUnrealWindowUnrealWindow
 
FTickEntry TickEntry
 
TWeakObjectPtr< UMaterialInstanceDynamic > IceMaterialInstance
 
TWeakObjectPtr< UMaterial > PhysicLensDistortion
 
- Protected Attributes inherited from ASensor
UTopic * ROSTopic = nullptr
 
bool SendDataToROS = true
 
ULogFileLogFile = nullptr
 
FString FileSavePath
 
UROSIntegrationGameInstance * ROSInstance = nullptr
 
- Static Protected Attributes inherited from ASensor
static FPrimitiveAdded OnPrimitiveAdded
 
static const FName NiagaraPointsInt = "User.PointCount"
 
static const FName NiagaraHitPoints = "User.HitPoints"
 
static const FName NiagaraHitColors = "User.HitColors"
 
static const FName NiagaraPointsFloat = "User.Test"
 

Detailed Description

Class for Semantic Segmentation Camera.

See also
ACamera

Definition at line 17 of file SemanticSegmentationCamera.h.

Constructor & Destructor Documentation

◆ ASemanticSegmentationCamera()

ASemanticSegmentationCamera::ASemanticSegmentationCamera ( const FObjectInitializer &  ObjectInitializer)

Definition at line 8 of file SemanticSegmentationCamera.cpp.

8 : Super(ObjectInitializer)
9{
10 PrimaryActorTick.bCanEverTick = false;
11}

Member Function Documentation

◆ GetSensorType()

virtual ESensorTypes ASemanticSegmentationCamera::GetSensorType ( ) const
inlineoverridevirtual

Get type of the sensor

Returns
Sensor's type

Reimplemented from ACamera.

Definition at line 31 of file SemanticSegmentationCamera.h.

References SemanticSegmentationCamera.

◆ Init()

void ASemanticSegmentationCamera::Init ( FCameraBaseParameters  parameters,
bool  SimulateSensor = true 
)
overridevirtual

Initialize new Camera sensor

Parameters
FCameraBaseParametersCameraParameters struct

Reimplemented from ACamera.

Definition at line 13 of file SemanticSegmentationCamera.cpp.

14{
15 // Defined in Camera.h
16 CameraName = "SemanticSegmentationCamera ";
17 FilePrefix = "Data/SemanticSegmentationCamera_";
18
19 AddPostProcessingMaterial("/Game/Agrarsense/Materials/PostProcessingMaterials/GTMaterial.GTMaterial");
20 Super::Init(parameters, SimulateSensor);
21
22 // This camera doesn't need to render shadows
23 SetShadowRendering(false);
24}
void AddPostProcessingMaterial(const FString &Path, float Weight=1.0f)
Definition: Camera.cpp:55
FString FilePrefix
Definition: Camera.h:264
void SetShadowRendering(bool RenderShadows)
Definition: Camera.cpp:730
FString CameraName
Definition: Camera.h:262

References ACamera::AddPostProcessingMaterial(), ACamera::CameraName, ACamera::FilePrefix, and ACamera::SetShadowRendering().

Referenced by USensorFactory::SpawnSegmentationCamera().


The documentation for this class was generated from the following files: