Products > Thermal Imaging

Infiray and their P2 Pro - discussion

<< < (54/58) > >>

ksxx:
I did some more testing and at least was able to get an image out of the APP3 data that looks the same as the original image. This image does not change when you edit it in phone app and save it, so I assume it is the temp data. The temperature scaling is unclear to me and I found no scaling factors in the exif metadata.
It looks like the original app is unclear about the scaling as well! The extreme case is when you edit an image recorded with the high T range (550C max). Then the edited image shows a temperature more than twice as low as temp show during recording... I found substantial differences also for images recorded in the high res/low T mode.


python test code:

--- Code: ---from PIL import Image
import numpy as np
import matplotlib.pyplot as plt

# The APP3 block is 294912 bytes in size
# This corresponds to 6bytes/pixel for a sensor size of 256*192
# 256*192 = 49152 = 0xC000
# 294912/256/6 = 192
# 65532*4 + 32784 = 294912


im = Image.open("cold.JPG")

# concatenate APP3 chunks of data. It is 6Bytes of data per pixel...
# played around with the code given here: https://exiftool.org/forum/index.php?topic=11401.msg61816#msg61816
a = im.applist[2][1]
print(len(im.applist[2][1]))
for i in range(3, 7):
    a += im.applist[i][1]
print(len(a))
# create image from bytes
# https://pillow.readthedocs.io/en/stable/handbook/concepts.html#concept-modes
# this setting at least gives an image that looks like the original thermal image. Details unclear..
img = Image.frombytes('I;16B', (256, 192), a)


'''
Exif Info:
FactStatusGain:
large range : 1
low range : 0
'''

# what scaling to apply??? There seems to be no scaling factors in the exif that change with the min max range of the thermal image -> Absolute scaling
temps = np.array(img,dtype=np.float32)

print(temps.min(),temps.max())

# still need to apply formula to image to convert raw sensor values to temps

#np.savetxt('temps.csv', temps, delimiter=',')

#plt.imshow(temps.astype(np.uint), cmap="inferno")
plt.imshow(temps, cmap="inferno")
plt.show()


--- End code ---

EuT:

--- Quote from: blubb on January 08, 2023, 12:33:29 am ---Hi everyone,

I noticed that my P2 pro starts to flicker after a couple of minutes of run time. After I plug it in, it works ok at first. But then I get a 1-2 brighter frames every few seconds. The bright frames have all pixel values increased by about ~10-20 (8-bit greyscale). This continues until I unplug and restart the camera. Same behavior on Win10/11 with VLC capture and on Android with InfirayGo. The problem is visible directly in live viewer and occurs with and without the macro lens.

Anyone else with this problem?

--- End quote ---

I have the same flickering effect on my TS2+ camera. The temperature jumps 2-3 times/s randomly for about 0.1-0.3 C synchronously over all frame.
It is not noticeable when looking at the scene with T range of 10-20 C but is very unpleasant at range of 2 C when I analyze small T changes of the target.
Anybody has similar issue with Infiray cameras?

Link to AVI file showing this flickering of TS2+ camera:
https://drive.google.com/file/d/1zjP1IvHav-HJ3hCshbGf20eOVbXfPgED/view?usp=sharing

T range in this video is 1.5C for full color scale.
Video captured in IRCAM Thermal Viewer

kristjana:
Has anyone been able to alter the gain mode of the camera and still come up with accurate temperature measures? We have it working in high gain mode with [x/16 - 273] but switching to low gain mode gives us completely different numbers

Pinörkel:
Hello,
I got myself a P2 Pro a few days ago and had some time playing with it connected to a windows PC. Here are some of my findings and issues:
The P2 Pro is usually installed as a simple USB video device, which can be accessed via any software that can handle a webcam. In this mode, the cam shows a YUY2 formatted 256x192 gray-scale image and, if you can configure the software to use the second possible frame format (256x384) the lower half of the frame contains the raw data. Just like the one of @PaulDamian, my P2 Pro Hardware has the VID: 0BDA and the PID: 5830, which means that most of the usual Tiny1C drivers cannot be installed, because they expect a PID of 5840. That said, my P2 Pro does not work with any of the usual PCXthermDemo-based windows tools. Most of them are able to detect the camera, but as soon as they try to trigger advanced functionality like the gain mode or any shutter related functionality, they just crash instantaneously. This is most likely because the PID 5830 P2 Pro with the default usbvideo driver does not seem to be capable of executing the respective usb commands. Forcing one of the Tiny1C drivers to be installed for the P2 Pro can be done, but then the P2 Pro does no longer work in webcam mode and also cannot be detected by any PCXthermDemo-based windows tools. This is most likely because they expect a device PID of 5840 in this case.

The only tool that worked out of the box but offered no advanced calibration and shutter features in its trial version was the IRCAM Thermal Viewer which can be found in the Microsoft app store.

After analyzing the P2 Pro app, which works with my camera, I discovered that it most likely accesses the camera by using the libuvc and libusb-1.0 libraries. So I put together a little c++ program to access the camera, but it did not work until I replaced the default usbvideo driver in windows with a libusbK driver using the Zadig tool. This also killed the ability of the cam to be used as a webcam, but after replacing the driver, I was able to get images via libuvc, extract the lower RAW data part of the image and convert the contained 14 bit data by normalizing the image, rescaling it to 8 bit and doing some sharpening, resizing and color mapping. It is worth mentioning that the obtained image looked good, but not as sharp as the P2 Pro's own gray-scale image in the upper part of the frame, which seemed to be sharper and produced better contrasts in darker areas.

Until now, I have found no way to change the sensor range, activate the sensor protection or activate a NUC function on my P2 Pro (does it even have shutter control?). The latter would be especially useful, since the P2 Pro has a pronounced noise pattern, which becomes very visible in the image when rotating the camera. I also discovered a seemingly sensor temperature dependent blotch in the lower left corner of the images of my P2 Pro that seems like there is kind of a spec on the sensor or the internal lens (see attached images). It is very subtle when starting the camera in a cold state, but gets more and more pronounced as the camera temperature is rising after a few minutes. I am pretty sure this blotch was not there during the first two days of use and it is also visible in the RAW data portion of the images(the green part with the inadequate YUY2 conversion). Has anybody else spotted something like that on their P2 Pro? Or maybe it is a sensor defect and I should get my P2 Pro replaced?

smile:
I would like to report a bug on app version 1.0.9.230213

This is latest version available today 2023-11-01.



This bug when editing taken images in P2 pro editor, the dots and rectangles used to measure temperature show incorrect temperature.

I attach image demonstrating this bug.



Image 1698859252119 is original image, max temperature is 105.5C

Image 1698861648444 is same image edited, max temperature is 80.5C

 

This is 20C less then first image for same image.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod