Provides methods for using a CUDA device as the computation unit of the LFR.
Inherits Rx::Net::NativeInterfaceWrapper< Rx::LFR::CCudaCompute, Rx::LFR::Net::Interfaces::ECudaCompute >.
Public Member Functions | |
CudaCompute () | |
Default constructor. More... | |
CudaCompute (Rx::LFR::CCudaCompute &xNative) | |
Constructor that wraps the given native instance. Disposing does NOT destroy the native instance. More... | |
~CudaCompute () | |
Destructor. More... | |
void | ApplyCalibration (Calibration^ xCalib, bool bUploadGrayImg) |
Applies the given calibration to the algorithms. This must be done every time the calibration changes. More... | |
void | ApplyRayImage (Rx::LFR::Net::RayImage^ xRayImage) |
Applies the given ray image. More... | |
void | Compute_Depth3D () |
Calculates the depth 3D image. More... | |
void | Compute_DepthColorCode (ESpace eSpace) |
Calculates the colored depth map image. More... | |
void | Compute_DepthMap (ESpace eSpace) |
Calculates the depth map image. This image can be filled to produce a complete filled depth map. More... | |
void | Compute_DepthRay () |
Estimates the depth of the current raw image and creates the ray depth image. More... | |
void | Compute_Grid () |
Calculates the grid image. This is the raw or the gray image with an overlay that shows the current grid calibration. More... | |
void | Compute_GridDataImage () |
Pre-Process a ray image with a minimal set of preprocessing parameters. More... | |
void | Compute_Histogram (EImage eImgID, RX_OUT array< unsigned >^%xHistogram, RX_OUT unsigned% uChannels) |
Calculates the histogram of the image with the given image ID and stores the histogram data in the given array. The number of calculated channels is returned in uChannels. More... | |
void | Compute_ImageMinMax (EImage eImgID, unsigned uChannel, RX_OUT float% fMin, RX_OUT float% fMax) |
Calculates the minimum and the maximum value in the given image. More... | |
void | Compute_Multiview () |
Calculates the multi view image. More... | |
void | Compute_PreProcess () |
Pre-Process a ray image. This can apply denoise, brightness and sharpness adjustments. More... | |
void | Compute_RefocusBasic () |
Focus image to a plane perpendicular to the optical axis, i.e. parallel to the image plane. More... | |
void | Compute_TotalFocus (ESpace eSpace) |
Focus on a depth surface. More... | |
Rx::Net::ImageFormat^ | CreateFocusImageFormat (Rx::Net::ImageFormat^ xRawFormat, bool bForceLandscape) |
Creates the image format of the refocus and the total focus image. This considers the Focus_ImageDivisor parameter. More... | |
CudaDevice^ | GetCudaDevice () |
Gets the CUDA device that has been set by calling SetCudaDevice. Throws an exception if not set yet. More... | |
virtual System::Object^ | GetInterface (Interfaces::ECudaCompute eInterface) override |
Gets the interface of the CUDA compute class determined by the Interfaces::CudaCompute enum. More... | |
IParameters< Rx::LFR::Net::Params::ECudaCompute >^ | GetParams () |
Gets the parameters access interface. More... | |
void | ReinitializeDepthDB () |
Reinitializes the depth database. More... | |
void | RemoveComputationFilterMask () |
Removes the computation filter mask set by SetComputationFilterMask. More... | |
void | ResizeImage (Rx::Net::Image^ xTrgImg, Rx::Net::Image^ xSrcImg, int iDivisor) |
Resize the given source image and store the result in the given target image using the given divisor. More... | |
void | SetComputationFilterMask (Rx::Net::Image^ xImage) |
Sets the computation filter mask image. More... | |
void | SetComputationFilterMask (System::String^ sFilename) |
Sets the computation filter mask image. More... | |
void | SetCudaDevice (CudaDevice^ xCudaDevice) |
Sets the CUDA device that allocates the memory required for the operations and that runs the algorithms. More... | |
void | UploadRawImage (Rx::Net::Image^ xSrcImg) |
Uploads the given image as the new raw image of all computations. More... | |
|
inline |
Default constructor.
|
inline |
Constructor that wraps the given native instance. Disposing does NOT destroy the native instance.
xNative | [in] The native instance to wrap by this class. |
|
inline |
Destructor.
|
inline |
Applies the given calibration to the algorithms. This must be done every time the calibration changes.
xCalib | [in] The calibration. |
bUploadGrayImg | True to upload the gray image of the calibration to CUDA. False to use the current gray image even if it is invalid. |
|
inline |
Applies the given ray image.
This uploads the raw and the gray image to the CUDA device and applies the calibration and the parameters from the meta data to the CUDA algorithms.
xRayImage | The ray image. |
|
inline |
Calculates the depth 3D image.
This creates a RGBA float image which maps each pixel in the view camera to a 3D position in object space. The R channel is the X coordinate, the G channel is the Y coordinate and the B channel is the Z coordinate. The Z coordinate is relative to the global coordinate system which typically coincides with the light field camera sensor. All coordinate values are given in millimeters. The A channel is the Z coordinate in virtual depths.
Result image:
Required images:
Influencing parameters:
|
inline |
Calculates the colored depth map image.
Result image:
Required images:
Influencing parameters:
eSpace | The space. This is LF::ESpace::View_Virtual or LF::ESpace::View_Object_Pinhole. |
|
inline |
Calculates the depth map image. This image can be filled to produce a complete filled depth map.
Result image:
Required images:
Influencing parameters:
eSpace | The space. This is LF::ESpace::View_Virtual or LF::ESpace::View_Object_Pinhole. |
|
inline |
Estimates the depth of the current raw image and creates the ray depth image.
Result image:
Required images:
Influencing parameters:
|
inline |
Calculates the grid image. This is the raw or the gray image with an overlay that shows the current grid calibration.
Result image:
Required images:
Influencing parameters:
|
inline |
Pre-Process a ray image with a minimal set of preprocessing parameters.
Result image:
Required images:
Influencing parameters:
|
inline |
Calculates the histogram of the image with the given image ID and stores the histogram data in the given array. The number of calculated channels is returned in uChannels.
eImgID | The image ID. |
xHistogram | [out] The histogram. |
uChannels | [out] The number of channels. |
|
inline |
Calculates the minimum and the maximum value in the given image.
eImgID | The image ID. The image must be of type float. |
uChannel | The channel of each pixel that is used to get the values. |
fMin | [out] The minimum. |
fMax | [out] The maximum. |
|
inline |
Calculates the multi view image.
Result image:
Required images:
Influencing parameters:
|
inline |
Pre-Process a ray image. This can apply denoise, brightness and sharpness adjustments.
Result image:
Required images:
Influencing parameters:
|
inline |
Focus image to a plane perpendicular to the optical axis, i.e. parallel to the image plane.
This focuses to a plane perpendicular to the optical axis. You can change the relative focal plane. A relative focus value of zero refocuses to the plane furthest away from the viewer and a value of 1 would focus to a plane that passes through the object side focal point of the recording lens.
Result image:
Required images:
Influencing parameters:
|
inline |
Focus on a depth surface.
In principle, each pixel of the result image can be focused individually. This function makes this property available by focusing the ray image to the depth surface given in the internal depth image related to the given space.
Result image:
Required images:
Influencing parameters:
eSpace | The space. This is LF::ESpace::View_Virtual or LF::ESpace::View_Object_Pinhole. |
|
inline |
Creates the image format of the refocus and the total focus image. This considers the Focus_ImageDivisor parameter.
xRawFormat | The raw image format. |
bForceLandscape | True to force landscape. Otherwise the calibration is used. |
|
inline |
Gets the CUDA device that has been set by calling SetCudaDevice. Throws an exception if not set yet.
|
inlineoverridevirtual |
Gets the interface of the CUDA compute class determined by the Interfaces::CudaCompute enum.
eInterface | The interface enum. |
Reimplemented from Rx::Net::NativeInterfaceWrapper< Rx::LFR::CCudaCompute, Rx::LFR::Net::Interfaces::ECudaCompute >.
|
inline |
Gets the parameters access interface.
|
inline |
Reinitializes the depth database.
This can be useful when calling Compute_DepthMap after changing the ray depth image manually.
|
inline |
Removes the computation filter mask set by SetComputationFilterMask.
|
inline |
Resize the given source image and store the result in the given target image using the given divisor.
xTrgImg | [in] The target image. This must not be a moniker. It's created inside. |
xSrcImg | [in] The source image. |
iDivisor | The divisor. A value of 2 means that the target image is half the source size. |
|
inline |
Sets the computation filter mask image.
This image is used to reduce the number of lenses used for depth estimation.
It must have the same dimension as the raw image and a pixel type of Rx::InteropNet::Runtime28::EPixelType::Lum and a data type of Rx::InteropNet::Runtime28::EDataType::UByte. Otherwise the image is converted.
Each lens of the raw image has a lens center that can be rounded to a pixel. If this pixel has the value 255 in the filter mask image, the corresponding lens is used. If this pixel has another value, the lens is not used.
xImage | [in] The computation filter mask image. |
|
inline |
Sets the computation filter mask image.
This image is used to reduce the number of lenses used for depth estimation.
It must have the same dimension as the raw image and a pixel type of Rx::InteropNet::Runtime28::EPixelType::Lum and a data type of Rx::InteropNet::Runtime28::EDataType::UByte. Otherwise the image is converted.
Each lens of the raw image has a lens center that can be rounded to a pixel. If this pixel has the value 255 in the filter mask image, the corresponding lens is used. If this pixel has another value, the lens is not used.
sFilename | [in] The complete image file path. |
|
inline |
Sets the CUDA device that allocates the memory required for the operations and that runs the algorithms.
xCudaDevice | [in] The CUDA device. |
|
inline |
Uploads the given image as the new raw image of all computations.
xSrcImg | [in] The source image. |