Author Topic: Infiray and their P2 Pro - discussion  (Read 161969 times)

0 Members and 4 Guests are viewing this topic.

Offline ksxx

  • Contributor
  • Posts: 30
  • Country: de
Re: Infiray and their P2 Pro - discussion
« Reply #325 on: January 18, 2024, 06:35:43 pm »
If you are on Windows (or maybe Linux - not tried yet) and know a little bit of how to work with Python files, you may check out my live P2Pro app for the PC. Live temperature maps and a chart history view for min/max/mean/center with several options. Outputs to a web browser.
https://github.com/ks00x/p2pro-live

 
The following users thanked this post: BTI, jdubs

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 505
  • Country: it
Re: Infiray and their P2 Pro - discussion
« Reply #326 on: January 23, 2024, 09:54:58 pm »
After reading a lot of reviews of this device (also here on the forum) i've tried to buy the camera... and i'm happy with it. I've read about a lot of problems with the app, but on my samsung a52s works flawlessy.
I was worried about the lack of fusion mode of this type of camera, but the resolution and sensitivity is so high that i not feel the need of it. The macro lens allow crazy detailed photos of really small things.
The only thing that i not like too much is the compression used for the photos. The realtime image is much more detailed. I would love to have the ability to choose the compression level, or eventually get uncompressed images.
I know that they made some crappy marketing, but the product seem quite good, and compared to the other ir cameras that i have, is waaay better. And it's incredible as it's so small.
I was unsure if get the uni-t 260/271 or this one, that must be almost the same thing... i wanted a portable device with the macro lens, and i not liked the "gun" format. I've seen the tooltop t5 and t7 cameras (that must have the same sensor), but for have the macro, i've had to buy 2 cameras (t5 macro and t7 normal fixed focus), they not have the lens option.
« Last Edit: January 24, 2024, 07:05:12 am by masterx81 »
 
The following users thanked this post: Cliff Matthews

Offline Fivefold

  • Newbie
  • Posts: 7
  • Country: at
Re: Infiray and their P2 Pro - discussion
« Reply #327 on: January 24, 2024, 11:49:13 am »
This won't be of help to you since you return(ed) it, but maybe for someone else.

I've had no issues with the Topdon app on my phone, up to the latest version (2.32.002.231102). Both making pictures as well as video works as expected. I have a P2 (without the Pro) but I don't think that's a relevant difference.

My phone is a Oneplus 3T running LineageOS 18.1.
 

Offline andyB2022

  • Regular Contributor
  • *
  • Posts: 105
  • Country: ro
Re: Infiray and their P2 Pro - discussion
« Reply #328 on: January 30, 2024, 02:52:59 pm »
The most annoying fact about the P2 Pro Play Store App is that I can't rotate the app interface, all saved photos are up side down which is really annoying. Any fix you guys found for this?

Also the iOS app, has the temperatures displayed with white text rather than red (difficult to see).
 

Offline ksxx

  • Contributor
  • Posts: 30
  • Country: de
Re: Infiray and their P2 Pro - discussion
« Reply #329 on: February 08, 2024, 02:44:20 pm »
As the author of the earlier post below I can report that the problem was my particular camera! I got a replacement part from the shop and the problem is now gone. Thanks to the folks from the ELESHOP in the Netherlands for their awesome customer support!

Pizza time! Here is an example of the odd low temperature readings with my P2Pro. The upper half of the image is the normal picture from the app and a line profile cutting the pizza in the center. The values in the graph have no physical meaning. The lower part shows the temperature data extracted from the raw data in the file. The line profile values are in deg C. I did measure with an infrared thermometer as a reference and the plastic wrap at the right side of the pizza was ~ -4C and the unwrapped part was ~ -12C. The temperature in the exposed pizza area is totally clipped to -30C. That is also what the native app shows in this area.
 

Offline gumush

  • Newbie
  • Posts: 1
  • Country: tr
Re: Infiray and their P2 Pro - discussion
« Reply #330 on: February 24, 2024, 05:13:17 pm »
@ksxx

Great work. It' will be great on all operating systems. But i have some problems on macos.

When i changed the file p2pro.py file

def __init__(self,cam_id) -> None:
    'module to read out the Infiray P2Pro camera'
    if sys.platform == 'win32': cam_id = int(cam_id)
    cam_id = int(cam_id)
    self.cap = cv2.VideoCapture(cam_id)         
    self.cap.set(cv2.CAP_PROP_CONVERT_RGB, 0) # do not create rgb data!
It look like find the camera.

ValueError: cannot reshape array of size 5760 into shape (2,192,256,2)

It looks like find the resolution of the camera but it returned error.

Python 3.12

 

Offline LiftedTrace

  • Regular Contributor
  • *
  • Posts: 95
  • Country: us
Re: Infiray and their P2 Pro - discussion
« Reply #331 on: March 03, 2024, 04:13:31 pm »
Ive been wanting to get a thermal camera for some time now and after seeing posts on the interwebs pointing to github projects and eevblog forums about the TC001 working on linux, I thought to myself...."I have linux.......I want a TC001......Win Win", so I just got one.

I fear maybe Topdon got wind of these little projects because my brand new one doesnt seem to work with any of the options provided here. Even trying to access it with ffmpeg results in errors. Trying the latest python raw dump example results in an error message saying this is not a capture device.

Anyone know if Topdon pulled the plug on this open source project and implemented something in the camera firmware to block access to the device?

Edit:
Seems I was in error. My laptop lists /dev/video0 (my webcam) when nothing is connected when issuing 'v4l2-ctl --list-devices'.
Connecting the TC001 then shows /dev/video1 and /dev/media0. I assumed since /dev/video0 was already present, that my TC001 would be /dev/video1. I was wrong.
Using /dev/video0 along with @aurel commands from https://www.eevblog.com/forum/thermal-imaging/infiray-and-their-p2-pro-discussion/msg4665403/#msg4665403 I was able to get mine working.

Now that I know it works, I can have some fun.

Thanks to everyone in this forums.
« Last Edit: March 03, 2024, 05:08:34 pm by LiftedTrace »
 

Offline Hundleton1

  • Contributor
  • Posts: 28
  • Country: gb
  • Also known as Ian
Re: Infiray and their P2 Pro - discussion
« Reply #332 on: March 18, 2024, 11:48:28 pm »
It seems there is interest in using the P2 Pro as a USB camera on PC and interpreting the content of the video stream, so I will share the experiments I made after receiving mine.

Basically I played with ffmpeg to extract raw data from the video stream.

The main finding is that the USB UVC device is exporting 2 video streams
- a 256x192 yuyv422 stream that contains a grayscale 8 bits normalized video that is directly exploitable (the 8 bits luminance channel is the temperature data and both chrominance channels are fixed values to give a colorless/grayscale result)
- a 256x384 yuyv422 stream that contains an exact copy of the previous stream in the upper half of the image and a greenish picture in the bottom half. This greenish picture is actually the raw non-normalized sensor values that are actually encoded in gray16le format (just 16 bits per pixel, in one grayscale channel, little-endian).

Examples playing with those video streams on a linux box:

Code: [Select]
# First of, find the device corresponding to your IR camera
v4l2-ctl --list-devices

Code: [Select]
# Check that the normalized stream works fine
ffplay -input_format yuyv422 -video_size 256x192 -i /dev/video4



Code: [Select]
# Look a the combined streams
ffplay -input_format yuyv422 -video_size 256x384 -i /dev/video4



Code: [Select]
# Use ffmpeg to grab the combined stream, crop to keep only the bottom half
# then pipe the raw data to ffplay and reinterpret it as gray16le.
# The resulting picture will be almost uniform gray due to the low range of
# the raw values in the 16 bits dynamic range.
# The raw values in a 0°C to 100°C environment ranges around 19000 to 24000
# (in a 0 to 65535 dynamic range).
ffmpeg -input_format yuyv422 -video_size 256x384 -i /dev/video4 -vf 'crop=h=(ih/2):y=(ih/2)' -pix_fmt yuyv422 -f rawvideo - | ffplay -pixel_format gray16le -video_size 256x192 -f rawvideo -i -



Code: [Select]
# To make the resulting raw stream more useful, you can add a normalization filter
# followed by a pseudocolor filter with typical IR camera colors
ffmpeg -input_format yuyv422 -video_size 256x384 -i /dev/video4 -vf 'crop=h=(ih/2):y=(ih/2)' -pix_fmt yuyv422 -f rawvideo - | ffplay -pixel_format gray16le -video_size 256x192 -f rawvideo -i - -vf 'normalize=smoothing=10, format=pix_fmts=rgb48, pseudocolor=p=inferno'



Code: [Select]
# You can then play with pretty much infinitely long ffmpeg command lines
# For example, you can upscale the video stream, display the min and max raw
# values in the top left corner and add a time graph of the min and max values
# at the bottom
ffmpeg -input_format yuyv422 -video_size 256x384 -i /dev/video4 -vf 'crop=h=(ih/2):y=(ih/2)' -pix_fmt yuyv422 -f rawvideo - | ffplay -pixel_format gray16le -video_size 256x192 -f rawvideo -i - -vf 'signalstats, split [main][secondary]; [main] normalize=smoothing=10, format=pix_fmts=rgb48, pseudocolor=p=inferno, scale=w=2*iw:h=2*ih, drawtext=x=3:y=3:borderw=1:bordercolor=white:fontfile=FreeSerif.ttf:text=MIN\\: %{metadata\\:lavfi.signalstats.YMIN}    MAX\\: %{metadata\\:lavfi.signalstats.YMAX} [thermal]; [secondary] drawgraph=m1=lavfi.signalstats.YMIN:fg1=0xFFFF9040:m2=lavfi.signalstats.YMAX:fg2=0xFF0000FF:bg=0x303030:min=18500:max=24500:slide=scroll:size=512x64 [graph]; [thermal][graph] vstack'



So the raw data from the sensor are very easily accessible. The only missing part is the conversion from raw values to actual temperatures. I don't know if some kind of calibration needs to be applied or if the raw values can be converted directly to temperatures with a simple fixed (linear ?) equation.
In my quick tests I derived the following equation to convert raw to °C but this is only a rough guesstimate: f(x) = (x - 19295) / 51.2857


Hi sorry to drag up an old post however trying the P2Pro software on an RPI4 and while I can get the bw thermal, the bw and green to come up I cant get the inferno color pallet option to work with your command, it just errors out for me.

This just does not work and I get Option P not found, error initiating filter pseudocolour

# To make the resulting raw stream more useful, you can add a normalization filter
# followed by a pseudocolor filter with typical IR camera colors
ffmpeg -input_format yuyv422 -video_size 256x384 -i /dev/video4 -vf 'crop=h=(ih/2):y=(ih/2)' -pix_fmt yuyv422 -f rawvideo - | ffplay -pixel_format gray16le -video_size 256x192 -f rawvideo -i - -vf 'normalize=smoothing=10, format=pix_fmts=rgb48, pseudocolor=p=inferno'

Any help would be amasing.

A little bit Mad here and there.
 

Offline smile

  • Regular Contributor
  • *
  • Posts: 219
Re: Infiray and their P2 Pro - discussion
« Reply #333 on: April 11, 2024, 03:10:09 pm »
P2Pro app on Android v1.1.3.240316 as all others since release have this bug where if you place marker to show temperature then open the same image with P2Pro app edit mode, the temperature for new placed marker will be 2x lower

Original 40C
Opened for editing 24C




Furthermore how come clicking edit in the P2Pro app deletes all markers, and shows image without any. is this bad joke. Infiray does not fix there reported multiple times problems, or is it just me?

 

Offline ksxx

  • Contributor
  • Posts: 30
  • Country: de
Re: Infiray and their P2 Pro - discussion
« Reply #334 on: April 11, 2024, 03:18:10 pm »
P2Pro app on Android v1.1.3.240316 as all others since release have this bug where if you place marker to show temperature then open the same image with P2Pro app edit mode, the temperature for new placed marker will be 2x lower

yes that is true, but I think the real errors are not as easy as a factor of 2. It is a complete mess. I made a small web app to analyze the images of the P2pro without such errors by reading the raw temperature data from the jpeg files. You may try it out here:
https://p2proviewer.streamlit.app/
https://github.com/ks00x/p2proviewer

 

Offline smile

  • Regular Contributor
  • *
  • Posts: 219
Re: Infiray and their P2 Pro - discussion
« Reply #335 on: April 11, 2024, 08:07:50 pm »
Wow this is well known problem, if you made an app to fix this somewhat. Yes the temperature error is non linear, usually around x2. If you contacted Xinfiray what did they reply to you? Why they do not fix this?

Clicking edit in the P2Pro app deletes all markers, and shows image without any. is this bad joke. Infiray does not fix there reported multiple times problems. I used CAT S62 Pro the FLIR app is way way better, but framerate is a joke, unusable for electronics repair, not to mention non existing close-up.
« Last Edit: April 11, 2024, 08:15:10 pm by smile »
 

Offline Jane

  • Frequent Contributor
  • **
  • Posts: 400
Re: Infiray and their P2 Pro - discussion
« Reply #336 on: April 27, 2024, 02:54:43 pm »
Anyone here uses this camera for electronics reparing?
Experience?
 

Offline czullo

  • Newbie
  • Posts: 6
  • Country: pl
Re: Infiray and their P2 Pro - discussion
« Reply #337 on: June 23, 2024, 10:30:10 am »
If I buy the lightning version and connect it with a lightning-usb-C adapter to an android phone, will it work?
 

Offline mrk

  • Newbie
  • Posts: 6
  • Country: de
Re: Infiray and their P2 Pro - discussion
« Reply #338 on: August 26, 2024, 05:33:29 am »
There's a open source demo app for uvc cameras on GitHub(not by me) https://github.com/Peter-St/Android-UVC-Camera. Seems to work with the P2 pro, but needs a lot of polishing
 

Online gamerpaddy

  • Regular Contributor
  • *
  • Posts: 65
  • Country: de
Re: Infiray and their P2 Pro - discussion
« Reply #339 on: August 27, 2024, 11:37:12 am »
Quote
Anyone here uses this camera for electronics reparing?
Experience?

Yes i mounted mine above the workbench and use it on a windows PC
3d printed a holder for it to mount it on my ring light which i can pull down to get closer to what im doing.

with it it takes me seconds to find shorted mlcc, it paid for itself several times now.

much better than a handheld imager thats allways out of reach or ran out of battery.


Offline Jane

  • Frequent Contributor
  • **
  • Posts: 400
Re: Infiray and their P2 Pro - discussion
« Reply #340 on: August 28, 2024, 07:04:17 am »
Nice, can you please send a picture of holder you use?
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 2060
  • Country: us
    • netstuff
Re: Infiray and their P2 Pro - discussion
« Reply #341 on: November 23, 2024, 03:22:39 am »
trying the new p2 pro (by the alternate (?) company name 'thermal master') and while I can see the dual stacked image in linux 'cheese' webcam viewer, I cant find a single linux app (python or otherwise) that will build and run and show the decoded image.

is there anything that runs on linux?

I tried 5 things that were on github. nothing works.  wtf?

about to return this camera.  my usbc port on my phone seems flakey for data and I dont want to DEPEND on a phone for this cam to work.  I dont have windows or mac, just linux.

Offline IwuzBornanerd

  • Frequent Contributor
  • **
  • Posts: 321
  • Country: us
Re: Infiray and their P2 Pro - discussion
« Reply #342 on: November 23, 2024, 10:51:55 pm »
trying the new p2 pro (by the alternate (?) company name 'thermal master') ...

is there anything that runs on linux?

I tried 5 things that were on github. nothing works.  wtf?

...I dont have windows or mac, just linux.

Is this program by @G28 one of the ones you tried?:
https://www.eevblog.com/forum/thermal-imaging/rasbpi-and-topdon-tc001-%28guinea-pig%29-tester-requested/
« Last Edit: November 24, 2024, 07:02:27 am by IwuzBornanerd »
I am not opposed to exercise, unless it is an exercise in futility.
 

Offline FraserTopic starter

  • Super Contributor
  • ***
  • Posts: 13480
  • Country: gb
Re: Infiray and their P2 Pro - discussion
« Reply #343 on: November 24, 2024, 12:56:09 pm »
Infiray have apparently continued their development of their thermal imaging cores. We have already seen ‘V2” versions of their camera dongles and there is now the release of the Tiny2  imaging core. The Infiray P2 and P2 pro use the Tiny1 imaging core and I have not seen references to a P2 V2 or P2 Pro V2 so it appeared that the P2 series were not updated when other dongle cameras were. The V2 versions of other dongle cameras were incompatible with 3rd party software that had been created for the V1 cameras so the authors had to make some changes for V2 compatibility.

Now to Thermal Master and their P2 series……

I can make no comment on whether Thermal Master are part of the IRAY/Infiray spiders web of companies but I can advise that a representative of Thermal Master insists that they are an independent company and not rebranded Infiray. I have yet to research Thermal Master and their obvious links to IRAY/Infiray but that is for another day. I was surprised to see a new dongle camera called the P2 coming from Thermal Master and they have even sent one to me for testing. The P2 Pro is also available from them but that looks like a rebranded Infiray product. That said, it may either use the new Tiny2 core or a Tiny1 core with changes to the USB identity that confused software created for the Infiray P2 series. I can state that my Thermal Master P2 unit has a completely different USB ID to my Infiray P2 Pro. There is also the possibility that the Tiny2 core is the new “V2” technology that we have already seen used in other Infiray dongle cameras.

Infiray, as a company, appear to be in a period of reorganisation/restructuring and it is challenging to work out exactly what is happening with regard to changes in their product offerings. I suspect that they are providing hardware and software to companies like Thermal Master, but they may be using revised core versions and/or modified USB identities to distance the product from Infiray and IRAY.

Fraser
« Last Edit: November 24, 2024, 01:32:36 pm by Fraser »
If I have helped you please consider a donation : https://gofund.me/c86b0a2c
 
The following users thanked this post: globoy

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 2060
  • Country: us
    • netstuff
Re: Infiray and their P2 Pro - discussion
« Reply #344 on: November 25, 2024, 02:38:01 pm »
I did try that (not on a pi, but desktop linux) and it would not build.

I can try on a pi, I guess.  that would be better, in some ways.  maybe its even possible to make a 'tablet' appliance using this camera and an rpi with tft display.

I didnt spend a lot of time trying to get that to build, but now that I know there's a tiny1 vs tiny2 core or api, I understand why nothing works with this, as of right now.

I do see 2 stacked images when I view the camera on linux with 'cheese' (webcam viewer that is simple enough for uvc video).  so I dont think the stream is encrypted.  the 2 stacks just have to be overlaid.

but a worry is that if the usb connection breaks (it already broke on my phone side!) then you are kind of out of luck.  I'd much rather not depend on fragile usbc for a $250+ camera.  maybe that's just me...

Offline schlafli

  • Contributor
  • Posts: 38
  • Country: gb
Re: Infiray and their P2 Pro - discussion
« Reply #345 on: December 05, 2024, 02:54:57 pm »
@linux-works

If you're still looking to getting it working on linux, I have a simple python script to show a video feed from the camera.



You can set the colour map, use the cursor to see the temperature at that point, and normalise the image between an upper and lower bound (manual span).

You need python3, python-tk, numpy and opencv.

You need to play with `thermal_camera_index` variable on line 82.


« Last Edit: December 05, 2024, 03:29:00 pm by schlafli »
 

Offline Turbo_slug

  • Contributor
  • Posts: 12
  • Country: ca
Re: Infiray and their P2 Pro - discussion
« Reply #346 on: December 05, 2024, 06:57:22 pm »
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?

Has anyone figured out a way to edit these parameters in the dongle's firmware?  I have an ht203u, and i also happened to have the hikmicro app installed, so it automatically tried to update the firmware.  Now I'm left with a camera that has a different usb VID and PID than stock.  This caused the HTI HT203u app to not work properly with the dongle, as it now displays the wrong frame format from the ht203u.  However, i have confirmed with USB UVC software that the video streams still works.

« Last Edit: December 05, 2024, 06:59:53 pm by Turbo_slug »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf