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
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.
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.
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).
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.
@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
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.
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:
# First of, find the device corresponding to your IR camera
v4l2-ctl --list-devices
# Check that the normalized stream works fine
ffplay -input_format yuyv422 -video_size 256x192 -i /dev/video4
# Look a the combined streams
ffplay -input_format yuyv422 -video_size 256x384 -i /dev/video4
# 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 -
# 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'
# 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.
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?
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
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.
Anyone here uses this camera for electronics reparing?
Experience?