OpenThermal / libseek-thermal

SEEK thermal compact camera driver supporting the thermal Compact, thermal CompactXR and and thermal CompactPRO
MIT License
286 stars 99 forks source link

Manipulate colormap, contrast, brightness & window position #47

Open rsend opened 4 years ago

rsend commented 4 years ago

I created this so I can change the appearance of the output window on-the-fly. The colormap, brightness & contrast can be cycled through manually and the window position & size can be moved with the arrow or +/- keys (the arrows might need some work - I don't know how to make key scancode access generic).

rsend commented 4 years ago

I know this isn't very good code, but figured other people might find the functionality useful. I'm a hardware engineer (I don't code) and I needed this functionality, so I tried my best to add it. I'll see what I can do, but I'd be happy to take suggestions (particularly for the window moving and key code scanning).

Bostwickenator commented 4 years ago

I know this isn't very good code, but figured other people might find the functionality useful. I'm a hardware engineer (I don't code) and I needed this functionality, so I tried my best to add it. I'll see what I can do, but I'd be happy to take suggestions (particularly for the window moving and key code scanning).

Hey, don't feel bad! Practicing is the best way to learn this stuff. My comments on the syntax don't detract from the functionality. In particular I think the fixed range mode is particularly useful and something we don't have. How about opening a narrower pull request just adding that functionality via command line parameters. I think there is an OpenCV function which does this a little more safely. https://docs.opencv.org/2.4/modules/core/doc/basic_structures.html#void%20Mat::convertTo(OutputArray%20m,%20int%20rtype,%20double%20alpha,%20double%20beta)%20const