Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get temperature value #96

Open
HedgeHao opened this issue Jul 31, 2023 · 0 comments
Open

How to get temperature value #96

HedgeHao opened this issue Jul 31, 2023 · 0 comments

Comments

@HedgeHao
Copy link

HedgeHao commented Jul 31, 2023

I have a FLIR purethermal 3 module. I can get the video frame using OpenCV VideoCap in c++. How can I convert this OpenCV Mat data to actual temperature value?

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/videoio/videoio.hpp>
#include <opencv2/highgui/highgui.hpp>

using namespace std;
using namespace cv;

int main()
{
    VideoCapture cap(0);
    if (!cap.isOpened())
    {
        cout << "Cannot open camera\n";
        return 1;
    }

    Mat frame;
    while (true)
    {
        bool ret = cap.read(frame);
        if (!ret)
        {
            cout << "Can't receive frame (stream end?). Exiting ...\n";
            break;
        }

        imshow("live", frame);
        if (waitKey(1) == 'q')
        {
            break;
        }
    }
    return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant