flirReader.hpp 1.3 KB
Newer Older
1 2 3 4 5
#ifndef OPENPOSE_PRODUCER_FLIR_READER_HPP
#define OPENPOSE_PRODUCER_FLIR_READER_HPP

#include <openpose/core/common.hpp>
#include <openpose/producer/producer.hpp>
6
#include <openpose/producer/spinnakerWrapper.hpp>
7 8 9 10

namespace op
{
    /**
11
     * FlirReader is an abstract class to extract frames from a FLIR stereo-camera system. Its interface imitates the
12 13 14 15 16 17 18
     * cv::VideoCapture class, so it can be used quite similarly to the cv::VideoCapture class. Thus,
     * it is quite similar to VideoReader and WebcamReader.
     */
    class OP_API FlirReader : public Producer
    {
    public:
        /**
19
         * Constructor of FlirReader. It opens all the available FLIR cameras
20
         */
21
        explicit FlirReader(const std::string& cameraParametersPath);
22 23 24 25 26 27 28

        ~FlirReader();

        std::vector<cv::Mat> getCameraMatrices();

        std::string getFrameName();

29
        bool isOpened() const;
30 31 32 33 34 35 36 37

        void release();

        double get(const int capProperty);

        void set(const int capProperty, const double value);

    private:
38
        SpinnakerWrapper mSpinnakerWrapper;
39 40 41 42 43 44 45 46 47 48 49 50
        Point<int> mResolution;
        long long mFrameNameCounter;

        cv::Mat getRawFrame();

        std::vector<cv::Mat> getRawFrames();

        DELETE_COPY(FlirReader);
    };
}

#endif // OPENPOSE_PRODUCER_FLIR_READER_HPP