ibaiGorordo / pyKinectAzure

Python library to run Kinect Azure DK SDK functions
MIT License
454 stars 113 forks source link

IR camera inquiry #91

Closed DOG-j closed 1 year ago

DOG-j commented 1 year ago

It was nice to be able to use all the examples.

When using an IR camera, the contrast is not good as shown in the picture below. What is the problem? image

This phenomenon is the same in all lighting conditions and in all environments.

Thanks

jonas-hurst commented 1 year ago

The reason for this phenomenon is that pixel values in IR capture are relatively small, yet 16bit arrays are used which have a max value of 65,535. As pixel values are so small, most things appear black.

You must choose a minimum and maximum pixel value range, then stretch all pixel values (e.g. linearly) to fully cover the color depth space you want to use.

For example: Min-Max range is 100-5000. If you want to work with 8-bit color depth, stretch it to 0-255. If you want to work with 16-bit color depth, stretch it to 0-65,535

ibaiGorordo commented 1 year ago

Yeah, this is an old issue I have. I haven't been able to draw the IR image to be similar to the visualizer yet.

In theory, it uses these limits (0-1000) as the range: https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/2feb3425259bf803749065bb6d628c6c180f8e77/tools/k4aviewer/k4astaticimageproperties.h#L88-L102

And with this function to limit the range: https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/2feb3425259bf803749065bb6d628c6c180f8e77/tools/k4aviewer/k4adepthpixelcolorizer.h#L87

DOG-j commented 1 year ago

Hi, thank you for replying this issue.

And I wanna ask exampleRecording.py code is working?

2023년 2월 10일 (금) 오후 4:46, Ibai Gorordo @.***>님이 작성:

Yeah, this is an old issue I have. I haven't been able to draw the IR image to be similar to the visualizer yet.

In theory, it uses these limits (0-1000) as the range: https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/2feb3425259bf803749065bb6d628c6c180f8e77/tools/k4aviewer/k4astaticimageproperties.h#L88-L102

And with this function to limit the range: https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/2feb3425259bf803749065bb6d628c6c180f8e77/tools/k4aviewer/k4adepthpixelcolorizer.h#L87

— Reply to this email directly, view it on GitHub https://github.com/ibaiGorordo/pyKinectAzure/issues/91#issuecomment-1425335454, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVTJGK4HT4FYLBU2HJLOJ3WWXW6TANCNFSM6AAAAAAUGLCSQU . You are receiving this because you authored the thread.Message ID: @.***>

ibaiGorordo commented 1 year ago

The recording is working well for me. There was an issue with the playback, but it should be fine now. If not, please create a new issue with some more info about what issues you are having.

DOG-j commented 1 year ago

Awesome, thanks!

2023년 2월 17일 (금) 오후 1:41, Ibai Gorordo @.***>님이 작성:

Closed #91 https://github.com/ibaiGorordo/pyKinectAzure/issues/91 as completed.

— Reply to this email directly, view it on GitHub https://github.com/ibaiGorordo/pyKinectAzure/issues/91#event-8543440429, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVTJGPK4HR4NCQZRCV776LWX36OXANCNFSM6AAAAAAUGLCSQU . You are receiving this because you authored the thread.Message ID: @.***>