cosmac / LePi

LePi is a lightweight library for FLIR Lepton (2, 2.5 and 3) and Raspberry pi.
MIT License
27 stars 10 forks source link

resize the PlayerThread window #5

Open aahmed23 opened 6 years ago

aahmed23 commented 6 years ago

hello, when I run the Player or PlayerThread app, the window display is small, is there any way I can resize it to something bigger?

cosmac commented 6 years ago

Hello aahmed23, the widow size is the original image resolution (80x60 or 160x120 based on the Lepton version). You can display an bigger image by upscaling the IR image. You can do that by replacing this line https://github.com/cosmac/LePi/blob/master/app/PlayerThread/PlayerThread.cpp#L66 with:

cv::Mat img_scaled;
double scale_factor {2.0};
cv::resize(img, img_scaled, cv::Size(), scale_factor, scale_factor);
cv::imshow("Lepton", img_upscaled);