Rev | Line | |
---|
[44] | 1 | /*!
|
---|
| 2 | * \file CvtColor.h
|
---|
| 3 | * \brief Image color conversion
|
---|
| 4 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 5 | * \date 2014/07/17
|
---|
| 6 | * \version 4.0
|
---|
| 7 | */
|
---|
| 8 |
|
---|
| 9 |
|
---|
| 10 | #ifndef CVTCOLOR_H
|
---|
| 11 | #define CVTCOLOR_H
|
---|
| 12 |
|
---|
| 13 | #include <IODevice.h>
|
---|
| 14 |
|
---|
| 15 | namespace flair
|
---|
| 16 | {
|
---|
| 17 | namespace core
|
---|
| 18 | {
|
---|
| 19 | class cvimage;
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | namespace flair
|
---|
| 24 | {
|
---|
| 25 | namespace filter
|
---|
| 26 | {
|
---|
| 27 | /*! \class CvtColor
|
---|
| 28 | *
|
---|
| 29 | * \brief Image color conversion
|
---|
| 30 | *
|
---|
| 31 | * The conversion is done using the DSP of the DM3730.
|
---|
| 32 | */
|
---|
| 33 | class CvtColor : public core::IODevice
|
---|
| 34 | {
|
---|
| 35 | public:
|
---|
| 36 | /*!
|
---|
| 37 | \enum Conversion_t
|
---|
| 38 | \brief Conversion formats
|
---|
| 39 | */
|
---|
| 40 | enum class Conversion_t {
|
---|
[47] | 41 | ToBGR,/*!< BGR 24 bits */
|
---|
| 42 | ToGray,/*!< gray 8 bits */
|
---|
[44] | 43 | } ;
|
---|
| 44 |
|
---|
| 45 | /*!
|
---|
| 46 | * \brief Constructor
|
---|
| 47 | *
|
---|
| 48 | * Construct an Ahrs.
|
---|
| 49 | *
|
---|
| 50 | * \param parent parent
|
---|
| 51 | * \param name name
|
---|
| 52 | * \param conversion conversion format
|
---|
| 53 | */
|
---|
| 54 | CvtColor(const core::IODevice* parent,std::string name,Conversion_t conversion);
|
---|
| 55 |
|
---|
| 56 | /*!
|
---|
| 57 | * \brief Destructor
|
---|
| 58 | *
|
---|
| 59 | */
|
---|
| 60 | ~CvtColor();
|
---|
| 61 |
|
---|
| 62 | /*!
|
---|
| 63 | * \brief Output image
|
---|
| 64 | *
|
---|
| 65 | * Output matrix is of the same size as declared in constructor. \n
|
---|
| 66 | * Its type depends of the conversion type.
|
---|
| 67 | *
|
---|
| 68 | * \return the output image
|
---|
| 69 | */
|
---|
| 70 | core::cvimage* Output(void);
|
---|
| 71 |
|
---|
| 72 | core::DataType const &GetOutputDataType() const;
|
---|
| 73 |
|
---|
| 74 | private:
|
---|
| 75 | /*!
|
---|
| 76 | * \brief Update using provided datas
|
---|
| 77 | *
|
---|
| 78 | * Reimplemented from IODevice.
|
---|
| 79 | *
|
---|
| 80 | * \param data data from the parent to process
|
---|
| 81 | */
|
---|
| 82 | void UpdateFrom(const core::io_data *data);
|
---|
| 83 |
|
---|
| 84 | core::cvimage *output;
|
---|
| 85 | Conversion_t conversion;
|
---|
| 86 | };
|
---|
| 87 | } // end namespace filter
|
---|
| 88 | } // end namespace flair
|
---|
| 89 | #endif // CVTCOLOR_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.