Class BayerDemosaicOp
Defined in File bayer_demosaic.hpp
Base Type
public holoscan::Operator
(Class Operator)
-
class BayerDemosaicOp : public holoscan::Operator
Operator class to demosaic the input video stream.
Named inputs:
receiver:
nvidia::gxf::Tensor
ornvidia::gxf::VideoBuffer
The input video frame to process. If the input is a VideoBuffer it must be an 8-bit unsigned grayscale video (nvidia::gxf::VideoFormat::GXF_VIDEO_FORMAT_GRAY). The video buffer may be in either host or device memory (a host->device copy is performed if needed). If a video buffer is not found, the input port message is searched for a tensor with the name specified by
in_tensor_name
. This must be a device tensor in either 8-bit or 16-bit unsigned integer format.
Named outputs:
transmitter:
nvidia::gxf::Tensor
The output video frame after demosaicing. This will be a 3-channel RGB image if
alpha_value
is true, otherwise it will be a 4-channel RGBA image. The data type will be either 8-bit or 16-bit unsigned integer (matching the bit depth of the input). The name of the tensor that is output is controlled byout_tensor_name
.
Public Functions
- HOLOSCAN_OPERATOR_FORWARD_ARGS (BayerDemosaicOp) BayerDemosaicOp()=default
-
virtual void setup(OperatorSpec &spec) override
Define the operator specification.
- Parameters
spec – The reference to the operator specification.
-
virtual void initialize() override
Initialize the operator.
This function is called when the fragment is initialized by Executor::initialize_fragment().
-
virtual void compute(InputContext &op_input, OutputContext &op_output, ExecutionContext &context) override
Implement the compute method.
This method is called by the runtime multiple times. The runtime calls this method until the operator is stopped.
- Parameters
op_input – The input context of the operator.
op_output – The output context of the operator.
context – The execution context of the operator.
-
virtual void stop() override
Implement the shutdown logic of the operator.
This method is called multiple times over the lifecycle of the operator according to the order defined in the lifecycle, and used for heavy deinitialization tasks such as deallocation of all resources previously assigned in start.