Output filter that converts rgb images to their grayscale luminance. More...
#include <Transport/LuminanceOfilt.H>
Public Member Functions | |
LuminanceOfilt (OptionManager &mgr, const std::string &descrName="RGB-to-luminance output filter", const std::string &tagName="LuminanceOfilt") | |
Constructor. | |
virtual | ~LuminanceOfilt () |
Destructor. | |
Protected Member Functions | |
virtual void | filterFrame (FrameOstream &dest, const GenericFrame &frame, const std::string &shortname, const FrameInfo &auxinfo) |
Convert frame to grayscale luminance and pass on to dest. |
Output filter that converts rgb images to their grayscale luminance.
Definition at line 44 of file LuminanceOfilt.H.
LuminanceOfilt::LuminanceOfilt | ( | OptionManager & | mgr, | |
const std::string & | descrName = "RGB-to-luminance output filter" , |
|||
const std::string & | tagName = "LuminanceOfilt" | |||
) |
Constructor.
Definition at line 50 of file LuminanceOfilt.C.
LuminanceOfilt::~LuminanceOfilt | ( | ) | [virtual] |
Destructor.
Definition at line 58 of file LuminanceOfilt.C.
void LuminanceOfilt::filterFrame | ( | FrameOstream & | dest, | |
const GenericFrame & | frame, | |||
const std::string & | shortname, | |||
const FrameInfo & | auxinfo | |||
) | [protected, virtual] |
Convert frame to grayscale luminance and pass on to dest.
Implements FrameOfilt.
Definition at line 62 of file LuminanceOfilt.C.
References GenericFrame::asRgbF32(), GenericFrame::asVideo(), GenericFrame::floatFlags(), GenericFrame::frameSpec(), GenericFrameSpec::getDescription(), VideoFrame::getMode(), GenericFrame::GRAY_F32, GenericFrame::GRAY_U8, lum, GenericFrame::nativeType(), GenericFrame::NONE, GenericFrame::RGB_F32, GenericFrame::RGB_U8, and FrameOstream::writeFrame().