RPi/SBC/Topdon TC001/clone Tester request (Thermal Camera Redux v0.9.3) Github - Page 1
Forum section: electronics / general

author: G28
author_rank: Regular Contributor
timestamp: November 13, 2023, 07:03:28 am
content: UPDATE:Thermal-Camera-Redux reported working on:Topdon TC001Topdon TS001InfiRay P2 ProMaAnt Super IR Cam2024-01-27: Version 0.9.3 modifications have been pushed to github to optionally build with dynamic border layout.2024-01-25: Version 0.9.2 modifications have been pushed to github to optionally lock out camera's colormap auto-ranging.2024-01-18: Version 0.9.1 modifications have been pushed to github for weak and single threaded/single core hardware."Thermal Camera Redux" is being posted to Github.All future updates will be available there free, for personal, non-commercial use.No Microsoft, Apple or similar app stores required.Vive la Open Source !!!https://github.com/92es/Thermal-Camera-ReduxUPDATE:The Python script has been abandoned in favor of a port to C/C++ for optimization and threading concerns.I have been modifying Les Wright's PyThermalCamera python script on Debian 11 and would like to know if there are any RaspPi/Topdon TC001 users out there that would like to test the potential RasbPi bug fixes and new features.I think I may have fixed the Fullscreen transitioning issues in addition to the following additional mods.- Added Fahrenheit temp displays and toggle key to switch between F and C- Floating MIN/MAX temps no longer get written off screen past the display edges.- Floating MIN/MAX temps don't overwrite HUD menu text (but the target dots will to retain X,Y location).- Added MIN/MAX temp labels.- Added Frames Per Second display to HUD menu.- Added ability to cycle backwards in addition to forwards through the color maps for quicker access.- Added some speed optimizations in the animation loop.- Added ability to have more scale modes based on your display size. Note: larger scales require more CPU cycles.- Added Fullscreen to cycling scale modes when max scale is exceeded.- Scaling in Fullscreen mode automatically transitions to scaled resize windows when appropriate.- Added window manager borders for additional move/resize, show/hide controls.- Added some toggle keys.- Some various visual changes to enhance readability.- Fixed some minor issues.If anyone is interested in testing the modded script, please let me know through PM or post in this thread.NOTE:Min temp does not overwrite HUD text, but the blue dot in the upper left corner is free to float over the HUD menu according to its target location.NOTE:If the HUD menu is turned off, the text moves close to the dot but does not get written off the top of the screen. It slides slightly lower than the dot to stay in view on screen.Thanks much to Les Wright for doing the heavy lifting on the Python script. I have been looking for a thermal camera solution that doesn't tie me to a smart phone app and a lot of $$$.

author: G28
author_rank: Regular Contributor
timestamp: November 15, 2023, 06:22:37 am
content: After making yesterday's post, I realized there were some intermittent bugs in the calculation of the Min/Max/Avg temps and respective screen locations. You can see the Min temp is higher than the crosshair temp in the original picture.Fixing those bugs in Python is resources prohibitive, so I ported the code to C/C++ to get more optimizations. The C++ OpenCV libraries are multi-threaded versus the single threaded Python library. Processor utilization has gone down and frame rates are native for the Topcon TC001 (even with the bug fixes).Here are both of the frames (top=image, bottom=thermal). The C++ library has twice as many color maps plus the initial map so @ 23 in total.Will be adding some more features with the extra headroom and possibly some frame manipulations (image rotate/flips, single/dual frame display, frame swap, etc.).The thermal frame appears to have its merit.Python is now in the rear view mirror.

author: G28
author_rank: Regular Contributor
timestamp: November 17, 2023, 06:29:44 am
content: Another update.Added a few extra display formats (see picts below) as well as a handful of interpolation methods.Scaled fonts to grow/shrink with image scaling.Added ability to disable all graphical overlays.Added another thread to parallel thermal data harvesting and image preparation.Added hot key to reset all configurations to default.Did some prerf profiling and optimizations from the perf results.Will probably add a user defaults config file.Will be adding data logging over time for graphed analysis.Found some v4l2 APIs that should allow application control of the camera's following User Controls.Does anyone know what APIs control emissivity settings of the TC001 ?Any other feature ideas ?Tracking temp with mouse or arrow keys to move center crosshair temp ?Code:User Controls:brightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=0contrast 0x00980901 (int) : min=0 max=100 step=1 default=50 value=50saturation 0x00980902 (int) : min=0 max=100 step=1 default=64 value=64hue 0x00980903 (int) : min=-180 max=180 step=1 default=0 value=0white_balance_automatic 0x0098090c (bool) : default=1 value=1gamma 0x00980910 (int) : min=100 max=500 step=1 default=300 value=300power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=10: Disabled1: 50 Hz2: 60 Hzwhite_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=10 default=4600 value=4600 flags=inactivesharpness 0x0098091b (int) : min=0 max=100 step=1 default=50 value=50backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=0 value=0Single Image Frame:Single Thermal Frame:Dual Horizontal Image / Thermal Frames:Dual Vertical Image / Thermal Frames:

author: G28
author_rank: Regular Contributor
timestamp: November 17, 2023, 09:51:11 am
content: And another update.Here is a feature to monitor/log multiple user locations of interest at once (in addition to the existing monitoring points).Add more monitoring points by clicking on the display.This could be useful when doing bench work with the camera on a fixed stand and fixed work piece.

author: G28
author_rank: Regular Contributor
timestamp: November 20, 2023, 05:57:50 am
content: Not much more to add other than some more threading and rendering profiling optimizations.High/Low alarm snapshots and recordings will probably go in next.Time to put it to good use.

author: G28
author_rank: Regular Contributor
timestamp: November 21, 2023, 06:58:14 am
content: Today's new feature.Added optional colormap scale (right side of the screen) and controls to lock/unlock colormap auto-ranging.

author: G28
author_rank: Regular Contributor
timestamp: November 22, 2023, 09:58:14 am
content: Added movable horizontal and vertical temperature rulers.

author: ZigmundRat
author_rank: Regular Contributor
timestamp: November 23, 2023, 05:15:11 pm
content: Thanks for sharing this and posting the updates. Following with some interest

author: G28
author_rank: Regular Contributor
timestamp: December 02, 2023, 06:33:51 pm
content: AddedPortrait and Landscapevideo rotations in 90 degree increments to all of the scaling and layout formats to compensate for the camera orientation (USB port location top/bottom/left/right) and cable management.Window height/width ratios and graphics overlays adjust accordingly to current rotation.Added 5 user defined color maps in addition to all of the OpenCV C++ stock color maps.Added realtime crosshair temp tracking indicator ">" to the color map gradient bar along with a few distributed temps along the gradient scale for reference.Portrait Rotations:Landscape Rotations:

author: G28
author_rank: Regular Contributor
timestamp: December 02, 2023, 06:53:11 pm
content: FWIW, the "Twilight" color map does a great job of literally illuminating uninsulated walls.

author: G28
author_rank: Regular Contributor
timestamp: December 02, 2023, 08:35:56 pm
content: After using the camera, taking snapshots and videos, I still routinely have questions afterwards about the captured data.Since static images can't answer those questions (what is the temp gradient over there, what would it look like with a different colormap or interpolation method, etc.), it appears post processing analysis would address those questions.Should be able to take stills and videos of the raw data frames and then offline, play them back through the app doing everything to the captured stills/streams as if they were live from the camera, recreating the exact thermal environment that existed when the stills/streams were captured. It will allow one to recreate almost anything one forgot to do when it was live.This offline post processing will facilitate examination of temps anywhere on the screen, switching between C/F, application of any color map, threshold, onscreen display, layout formats, scaling/fullscreen, interpolation method, blur setting, contrast setting, take composited snapshots, composited recordings with varied configurations, etc.This feature is probably more important for documentation than pre-composited stills and videos.

author: G28
author_rank: Regular Contributor
timestamp: December 02, 2023, 11:09:52 pm
content: Quote from: ZigmundRat on November 23, 2023, 05:15:11 pmIf you have a Topdon TC001 or equivalent, you are welcome to try the app on Linux.

author: G28
author_rank: Regular Contributor
timestamp: December 04, 2023, 06:07:13 am
content: Offline post processing of raw stills is up and running.Offline post processing of looped raw video clips will be next.Can now go back and pull data not captured in the .png snapshots.

author: Amish Technician
author_rank: Contributor
timestamp: December 05, 2023, 07:04:48 pm
content: I'm also following with some interest, thanks for posting.I have a Topdon TC001 and various RaspPi's and I'm interested in giving this a try. Where can I find it, is it on github or somewhere like that?

author: G28
author_rank: Regular Contributor
timestamp: December 06, 2023, 03:19:26 am
content: - Both offline raw still and video post processing is working, but the raw video could use some stream compression.- Updated temp marker locations to be centered in the scaled/interpolated pixels vs the North West corner.- Added left mouse button drag functionality to position the horizontal and vertical temp rulers.- In honor of James Doohan locking himself into the pattern buffer in an infinite loop, I added "Freeze Frame" functionality to the live video camera feeds and offline raw video playback. This allows one to change configuration options on the frozen frame (live or playback), analyze and take snapshots.

author: G28
author_rank: Regular Contributor
timestamp: December 06, 2023, 03:47:22 am
content: Quote from: Amish Technician on December 05, 2023, 07:04:48 pmPM Sent

author: G28
author_rank: Regular Contributor
timestamp: December 07, 2023, 03:42:28 am
content: Increased the number of colormaps to 37Adding default startup configurations.Added initial pass of optional Histogram Equalization filtering for monochrome colormaps.Somewhat underwhelming but may have some utility.

author: ZigmundRat
author_rank: Regular Contributor
timestamp: December 07, 2023, 02:40:53 pm
content: Don’t have one yet, but it’s on my short listStill following, I just don’t have the time or space at the moment (still settling in after moving house). Any suggestions for what the minimum platform would be? There are many rPi versions now.

author: G28
author_rank: Regular Contributor
timestamp: December 07, 2023, 06:52:43 pm
content: Quote from: ZigmundRat on December 07, 2023, 02:40:53 pmI am using it on a Debian 11 PC with a 14' USB cable and tripod. No reason why you can't use a Linux PC/Laptop (or Linux VM Guest). Sooner or later I will try it on a ProxMox Linux guest.I don't have a RasbPi, but we may have a RasbPi guinea pig tester providing that feedback soon.It is built with OpenCV 4.5.1 (latest version is 4.8.0) and some of the features require minimum versions of OpenCV such as the Histogram Equalization API.I will probably be adding 2D and maybe 3D plots soon if I can find/decide on a descent plotting library. More features tend to require more CPU cycles.Could also dump the data in a suitable format for use with MATLAB/GNU Octave plotting.Octave Example Plots:P.S.FWIW, the Topdon USA site had the TC001 for $195 a couple of weeks ago, but they appear to have jumped back to $230.

author: ZigmundRat
author_rank: Regular Contributor
timestamp: December 08, 2023, 12:13:27 am
content: Fair enough. I have plenty of laptops available. It would be neat if it were possible to get this running on a pico in some fashion. It will be interesting to see if it will run on a Pi 4, probably no problem on a Pi 5 but I don't have one yet. My goal is just to have something self-contained that doesn't need to be plugged in.

author: G28
author_rank: Regular Contributor
timestamp: December 08, 2023, 02:03:09 am
content: Quote from: ZigmundRat on December 08, 2023, 12:13:27 amYou would still need a reasonable display.

author: G28
author_rank: Regular Contributor
timestamp: December 08, 2023, 02:12:17 am
content: Added an enhanced mode to the horizontal and vertical rulers.In addition to displaying 7 vertical and horizontal temps that can be dragged around the screen, a hairline average temp reference horizontal and vertical (black) line has been added.In addition to that reference (black) line, another plot (white) line is added representing all of the temps (256 + 192) for the current row and column, on, above or below the average temp reference line. This reference line is drawn centered under the'+'temp markers in the ruler.This allows one to visually see relative spikes and dips relative to the average baseline along both rulers as they move around the screen.

author: ZigmundRat
author_rank: Regular Contributor
timestamp: December 08, 2023, 03:31:35 am
content: The standard LCD display for the pi 3/4 is 800x480 (with HDMI an option). How does that resolution fit with the application? I’m afraid I’m not familiar with the original Python app either.With the LCD, it’s under 10W with a pi3. I’m not sure how much the TC001 consumes, but I think this portable operation should be possible. A reasonably sized LiPo battery should provide 2 hours or more of continuous operation.

author: G28
author_rank: Regular Contributor
timestamp: December 08, 2023, 04:37:45 am
content: Quote from: ZigmundRat on December 08, 2023, 03:31:35 amYa killing me !!! Back to building a ship in a bottle.I rebuilt with a max screen resolution of 800 x 480 and get a max scale factor of 2X.Here is native resolution @ 1X scale.Here is 2X scale with and without the onscreen display.This one has some random user defined temp locations added.The ruler's display with 7 x 7 temps would have to be paired down by at least half, maybe 4 x 4 temps or 3 x 3 temps.The software could be configured to conditionally compile out features for paired down use cases.Double wide and double high layout displays would have to be done in 1X scaling to fit 800x480.I am running @ 2560x1600 and get up to 8X scale with that resolution.Fonts could be scaled smaller, but you may need to get out your spectacles.

author: G28
author_rank: Regular Contributor
timestamp: December 08, 2023, 09:35:00 pm
content: Quote from: ZigmundRatI spent a little time fine tuning the font and marker scaling for 1X and 2X scale. Need to get a smaller resolution monitor to test on, but it looks like the 7 x 7 rulers will work on both resolutions.The images have the one of the new ruler modes. The pictured mode shows current row temp plots relative to Min/Avg/Max temps.Ruler modes now have:- Single moveable temp- 7 x 7 movable temps- 7 x 7 movable temps with Horizontal (current row) Min/AvgMax temp plots- 7 x 7 movable temps with Vertical (current column) Min/AvgMax temp plots- 7 x 7 movable temps with both Horizontal and Vertical (current row and column) Min/AvgMax temp plots1X Scale:2X Scale:

author: ZigmundRat
author_rank: Regular Contributor
timestamp: December 09, 2023, 06:09:09 am
content: That looks reasonable to me. Nice that the temp plots are movable. Do they toggle on/off as well?I really need to get one of these to play with. I'd like to check for cold spots/heat leaks in the house, not to mention all the other typical uses. I'll go stuff one in my amazon cart.I know you transitioned from Python to C/C++. What's the build environment? Basic configure/makefile stuff or under VSCode or ... ?

author: G28
author_rank: Regular Contributor
timestamp: December 09, 2023, 07:30:59 am
content: Quote from: ZigmundRat on December 09, 2023, 06:09:09 amI made some more refinements. The horizontal ruler only has horizontal temps, the vertical ruler on has vertical temps. Can pretty much do any configuration. I am entertaining feature requests. So far, I am adding what I would use.There are 3 "onscreen" display modes (not to be confused with scaling and layout modes).- Menu + Graphics + Video- Graphics + Video- Video onlyYou can also adjust the "Threshold" setting until the Min/Max temps appear or disappear. This was one of the base options in the Python script.Right now the 'o' key starts and cycles through all of the ruler configurations. The right mouse button kicks it out of ruler mode and back into user defined temp location mode. The app currently works in those 2 mutually exclusive modes because of the shared left mouse button usage.I hate making Makefiles and cmake is overkill. Right now the code is contained in a single ".cpp" file. The single g++ line has a CFLAGS and a DEFAULT_FLAGS line broken out to define default startup configuration options and specific platform flags. All is in a single bash script.It was built on OpenCV 4.5.1. Latest version is 4.8.0. Some of the OpenCV APIs require minimum versions.It also requires the pthread library.I experimented with CUDA optimizations, but NVIDIA CUDA is not required for the build and was removed from the build script.Here is the build script:Code:#!/bin/bash# Build Thermal Camera Reduxrm ./redux# Change build flags based on your hardwareCFLAGS='-mavx2 -msse4.2 -msse4.1 -malign-double -march=skylake'# Setup default startup configuration options# ROTATION options: 0, 90, 180, 270# USE_CELSIUS options: 0, 1# DEFAULT_COLORMAP options: 0 - 36# 800x480 is a max of 2X scale#DEFAULT_FLAGS='-DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=800 -DDISPLAY_HEIGHT=480 -DUSE_CELSIUS=0'DEFAULT_FLAGS='-DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=2560 -DDISPLAY_HEIGHT=1600 -DUSE_CELSIUS=0'g++ -Wall -O3 ${DEFAULT_FLAGS} ${CFLAGS} -I/usr/include/opencv4 tc001.cpp -o redux -lpthread `pkg-config --cflags --libs opencv4`Here are the usage and keybinding statement:Code:Thermal Camera Redux:Ported and updated C/C++ app based on Les Wright's 21 June 2023 Python apphttps://youtube.com/leslaboratoryA multi-threaded C/C++ app to read, parse, display thermal data from the Topdon TC001 Thermal cameraRewritten with additional functionality, bug fixes, optimizations and offline post processingBuilt with display 2560x1600, max:default scale 8:4, rotation 0, default Fahrenheit, 37 colormaps, JetCamera Usage:./redux n (where 'n' is the number of the desired video camera)Offline Usage:./redux -f input.raw (where input.raw is a raw dump file from ./redux)Key Bindings:a z: [In|De]crease Blurs x: Relative Min/Max temp display threshold delta from Avg tempd c: Change interpolated window scale [camera native to fullscreen]f v: [In|De]crease Contrastg b: Cycle [for|back]wards through interpolation methodsj m: Cycle [for|back]wards through Colorapsw : Cycle through single/dual[horizontal/vertical] indow layoutsG : Toggle between fullscreen and current scaled window sizer : Toggle ecording (both .avi and offline .raw)R : Reset defaultsp : Snashot (both .png and offline .raw)h : Cycle through overlayed screen datat : Toggle between Celsius and Fahrenheity : Toggle Historgram filter (for gray scales)8 : Rotate display 0, 90, 180, 270 degrees (Portrait and Landscape)e : Toggle Freeze Frame on/offo : Displays and cycles through 5 temp ruler modes: Keypad Up/Down/Left/Right/Center(5) moves rulers: Left mouse adds user temps or moves rulers: Right mouse removes user temps and disables ruler mode? : Misc stdout help informationq : Quitmain(2868): Opening cameara /dev/video0Here are some snapshots of the horizontal ruler. It is obvious the hottest part of the flatscreen's electronics is on the right side.

author: G28
author_rank: Regular Contributor
timestamp: December 09, 2023, 10:34:36 pm
content: Les's original Python script has a user adjustable threshold delta (in degrees Celsius) from the average screen temperature which determines if the Min/Max temps are shown or not.I incorporated this user adjustable +/- threshold relative to the average temp into the ruler plots.The delta now also represents the current F/C unit selection.- If the row or column temp is within +/- threshold degrees from average, the temp plot will be white.- If the row/column temp is greater than threshold degrees, the plot will turn green.- If the row/column temp is less than threshold degrees, the line plot will turn red.This gives another visual queue to the relative selected row or column temp plots and is adjustable from [0-N] degrees C/F.

author: Amish Technician
author_rank: Contributor
timestamp: December 10, 2023, 07:07:57 pm
content: Working very well on pi4 4GBMy modified build script:Code:#!/bin/bash# Build Thermal Camera Reduxrm ./redux# Change build flags based on your hardwareCFLAGS='-mcpu=cortex-a72 -ftree-vectorize -O3 -pipe -fomit-frame-pointer'# Setup default startup configuration options# ROTATION options: 0, 90, 180, 270# USE_CELSIUS options: 0, 1# DEFAULT_COLORMAP options: 0 - 36DEFAULT_FLAGS='-DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=1920 -DDISPLAY_HEIGHT=1080 -DUSE_CELSIUS=1'g++ -Wall -O3 ${DEFAULT_FLAGS} ${CFLAGS} -I/usr/include/opencv4 tc001.cpp -o redux -lpthread `pkg-config --cflags --libs opencv4`./reduxExcellent work

author: G28
author_rank: Regular Contributor
timestamp: December 10, 2023, 07:46:58 pm
content: AT,Thank you for testing on the RaspPi. Glad to hear it works on the Pi4.Just sent you an update with the latest changes.The new plotting rulers may take some more CPU cycles and there maybe some thread load balancing to be had to keep the FPS up.

author: RO
author_rank: Contributor
timestamp: December 12, 2023, 11:46:47 am
content: I have picked up one of those Victor 256 usb dongle imagers which works perfectly with the Topdon TC001 app, and have a Pi Zero 2W available, and could eventually free up a Pi4B, wouldn't mind testing if it will work with you app/script. The Victor imager seems equivalent, not sure if there might be a different protocol.Am a bit busy though so might take me a while to produce adequate feedback if it requires a lot of configuration.

author: G28
author_rank: Regular Contributor
timestamp: December 13, 2023, 04:27:26 am
content: Quote from: RO on December 12, 2023, 11:46:47 amYou are more than welcome to test and provide feedback. It appears there are a lot of clones of this device so the software may work on many of them.Amish Technician has been generously testing and providing valuable feedback on a Pi4 and may be trying it on a Pi Zero 2 if/when he has time.I am not familiar with the Pi models so don't have any idea how it will do on a Pi Zero 2.Setup is pretty easy if you have the libraries installed, but someone will have to come up with the compile flags for the Pi Zero 2.AT is reporting @ 50% CPU usage @ 5X scale for the double wide display (2560 x 960) with both rulers active (18 temps) for the current version on the Pi4 if that is of any hint. Compared to the Python script, that is pretty good considering the additional functionality. The Python script was single threaded and would peg out the thread on my i7-9700 just calculating the temps correctly.Scaling and interpolation are CPU intensive. Dragging is also CPU intensive, but it can run in jump-scroll mode (point and click). Keeping that in mind, the features can be scalable (or avoided) based on the platform's processing power.Just figured out how to add configurable transparencies at AT's request so the OSD menus now show the video underneath.Also made some optimizations over the last few days to speed up dragging and renders for weaker processors.PM me if you want to figure out the Pi Zero 2 flags, or you can use the existing Pi4 flags if you free up your Pi4 or want to run it on a PC.New Translucent OSD:Other updates from AT's feedback:- Added loss of camera connection recovery functionality. If connection is lost, app goes into FreezeFrame mode displaying the last frame and an error message until connections are corrected.- Reworked font and widget scaling so they plateau at given scaling levels.- Added average temp indicator '-' to the color map gradient scale on right. I use it more than the avg temp in the OSD.- Color coded average temp indicator '-' and crosshair temp indicator '>' on the gradient scale the same as the ruler plots using the configurable Threshold delta.

author: G28
author_rank: Regular Contributor
timestamp: December 16, 2023, 02:39:47 am
content: Added optional translucent OSD keyboard and mouse usage help today.Note: Video Blur is set in this image capture.

author: G28
author_rank: Regular Contributor
timestamp: December 17, 2023, 07:51:17 pm
content: Latest updates include significant performance optimizations in FreezeFrame and Offline modes. This should enhance usability on weaker hardware.Thanks to Amish Tech for testing on the RasbPi platforms and making valuable recommendations.The following image shows automatic FreezeFrame mode when live camera communications are lost (e.g. cable disconnections). Once errors are addressed, live feeds can resume by exiting FreezeFrame mode.Note: Video Blur is set to 68 in this image capture.When using live mode on weaker hardware, FreezeFrame mode can be manually entered which frees up significant resources for analyzing the captured frame with any of the app's more computationally intensive features.

author: G28
author_rank: Regular Contributor
timestamp: December 30, 2023, 12:12:04 pm
content: Another minor update:Made some refinements to the horizontal and vertical rulers as well as more thread balancing and optimizations to run better on SBC's.

author: 5U4GB
author_rank: Super Contributor
timestamp: December 30, 2023, 01:06:21 pm
content: Is it Pi-specific or would it also work on alternatives like an Odroid? I've got a TC001 that I usually use with the app via a U-adaptor for the USB-C port but it'd be nice to have an alternative way of driving it if they ever discontinue the app or the vendor goes away.

author: G28
author_rank: Regular Contributor
timestamp: December 30, 2023, 08:52:47 pm
content: Quote from: 5U4GB on December 30, 2023, 01:06:21 pmI am running the code on Debian 11 and Amish Technician is testing in various Rasb Pi models.The app uses C/C++, pthreads and the opencv 4.51 library.If your platform is Linux based, it should probably work.

author: Amish Technician
author_rank: Contributor
timestamp: January 01, 2024, 02:33:33 am
content: UPDATED:https://www.eevblog.com/forum/thermal-imaging/rasbpi-and-topdon-tc001-(guinea-pig)-tester-requested/25/#msg5270445So far I have Thermal Camera Redux working on the following Pis with the 2023-12-05 release of Raspberry Pi OS desktop 64-bit (Debian 12 bookworm):RPi 2 Model B v1.2 BCM2837 ARMv8-A (64/32-bit) 4× Cortex-A53 900 MHz CFLAGS='-mcpu=cortex-a53 -pipe -fomit-frame-pointer'RPi 3 Model B v1.2 BCM2837B0 ARMv8-A (64/32-bit) 4× Cortex-A53 1.4 GHz CFLAGS='-mcpu=cortex-a53 -pipe -fomit-frame-pointer'RPi Zero 2 W BCM2710A1 ARMv8-A (64/32-bit) 4× Cortex-A53 1 GHz CFLAGS='-mcpu=cortex-a53 -pipe -fomit-frame-pointer'RPi 4 BCM2711 ARMv8-A (64/32-bit) 4× Cortex-A72 1.8 GHz CFLAGS='-mcpu=cortex-a72 -pipe -fomit-frame-pointer'RPi 5 BCM2712 ARMv8.2-A (64/32-bit) 4× Cortex-A76 2.4 GHz CFLAGS='-mcpu=cortex-a76 -pipe -fomit-frame-pointer'Performance is very good on the pi4 at x4 scale, x5 slightly reduces the frame rate. It's especially good on pi5 up to x5, and still keeps the responsiveness and frame rate usable up to x7. It's very responsive on the others as well so long as you stay at 3x scale or lower, x4 is still usable with a frame rate ~20.I'm still working on:RPi Zero v1.3 BCM2835 ARMv6Z (32-bit) 1× ARM1176JZF-S 1 GHz VFPv2; NEON not supportedRPi 2 Model B v1.1 BCM2836 ARMv7-A (32-bit) 4× Cortex-A7 900 MHz VFPv4 + NEONI think I also have a RPi 3 Model B+ but I won't be going to it for a few week. I can't imagine the result will be any different than the non + version anyhow, or for the model A variants I don't have.I also don't have any of the original variants but I believe they use the same ARM1176JZF-S as the first pi zero so they will most likely work the same, or not, we'll see how I get on when the libopencv-dev package finishes downloading and installing on Raspberry Pi OS (Legacy, 32-bit) 2023-12-05 which is taking an eternity at the moment.

author: Amish Technician
author_rank: Contributor
timestamp: January 01, 2024, 03:19:56 am
content: Working on Pi zero v1.3 !!! the lowest powered Pi I have, result!At x1 scale with the default HUD I have a usable average of 11.7 frames per second, there is some delay but it feels completely smooth. It's like the flirs and others with the 7 or so FPS limit, only slightly better.The CPU is only slightly warm to the touch after ~5 minutes so I'm tempted to see if some overclocking helps. I may have to do something to stabilise the power supply first though as it caused the Pi zero to reboot when I plugged the TC001 in, none of the other pi's had this issue using the same power supply.Pi2 v1.1 testing will have to wait for another day

author: G28
author_rank: Regular Contributor
timestamp: January 01, 2024, 04:58:03 pm
content: First of all, I wish to extend a big thanks to Amish Tech for his extensive testing on so many Rasb Pi platforms.Adding more refinements to the thermal rulers as a result of using them on my own thermal audits.The original rulers used a proportional distribution method relative the screen's average temp as shown in the 1st image.This works fine until there are extreme outliers that skew the plot of the non-outlier temps (e.g. a light bulb in frame when looking for cold spots).To address this, an equal distribution mode with outlier clipping has been added. This allows you to visually recognize the details such as the min temperature drop in the lower right hand corner that is compressed in the proportional plot.Modes are toggled in real time with a hot key so it is fast/easy to compare plots.

author: G28
author_rank: Regular Contributor
timestamp: January 03, 2024, 07:28:06 pm
content: FWIW, the app can be run "headless" from a remote machine by using X11 forwarding.https://goteleport.com/blog/x11-forwarding/Use "ssh -X username@ipaddress" to log into your remote machine that is running an X Server.It will not work with runlevel=3 that does not start the X server.The -X ssh session automatically sets the DISPLAY environment variable in the ssh session.Use the "xhosts" command on your local machine to allow remote X clients to display on your local machine.You can then run a test X app (via CLI on the remote machine) to validate display on the local machine (e.g. xeyes or xterm).Then run the redux OpenCV app.It runs faster over the network than running the full remote desktop (less pixels to push), but not as fast as running locally without the network overhead.As long as you have the X Server running on both ends, you should be able to remotely run the app "headless".Hope this helps those with networked SBC's with no attached displays.

author: 5U4GB
author_rank: Super Contributor
timestamp: January 04, 2024, 01:45:32 am
content: Quote from: G28 on January 03, 2024, 07:28:06 pmFor people using MobaTerm (my preferred SSH client), it's usable directly, just start MobaTerm's built-in X server, enable X forwarding in the MobaTerm settings window for that session/host, and you're done. You may optionally need to enable X in the SSH config on the target system, but it's usually enabled by default.Having said that, I've just tested it with an xterm so far, still getting round to setting up the TC001 stuff.

author: G28
author_rank: Regular Contributor
timestamp: January 04, 2024, 02:12:49 am
content: Added 2 more ruler clipping modes.Proportional - no clippingEqual - outlier clippingBelow average clipping - focus on above average tempsAbove average clipping - focus on below average tempsProportional:Equal - outlier clipping:Below average clipping:Above average clipping:

author: G28
author_rank: Regular Contributor
timestamp: January 04, 2024, 03:27:47 am
content: Added adjustable ruler thickness in range [ 1/5, 1/4, 1/3, 1/2 ] screen height to all ruler modes.1/5 screen height:1/2 screen height:

author: G28
author_rank: Regular Contributor
timestamp: January 04, 2024, 05:31:29 am
content: Added 1/1 ruler thickness mode.In this mode, the plot is full screen and becomes decoupled from the cross-hair temp grid.The cross-hair temp grid still moves around the screen as the plot updates, but the plot's position remains fixed relative to the upper left hand corner of the screen, no longer positioned relative the moving cross-hair temp grid.All of the other ruler modes are available in this full thickness mode.

author: G28
author_rank: Regular Contributor
timestamp: January 07, 2024, 04:41:59 am
content: Minor Updates:- Added user selectable fonts.- Optimized ruler drag scrolling to increase performance on slower hardware.- Made visual improvements for 1X and 2X scale, low resolution displays.Dual full ruler display mode:

author: G28
author_rank: Regular Contributor
timestamp: January 09, 2024, 03:31:54 pm
content: "Thermal Camera Redux" is being posted to Github.All future updates will be available there free, for personal, non-commercial use.No Microsoft or similar app stores required.https://github.com/92es/Thermal-Camera-Redux

author: Amish Technician
author_rank: Contributor
timestamp: January 10, 2024, 02:43:57 am
content: Fantastic seeing the project on Githubvery coolI've finally tested the RPi 2 Model B v1.1 with the same version I tried on all the others, and release 16 which I haven't tried on the others yet. Here is an updated list with my suggested scaling for stock CPU clock speeds and performance notes:Tested with the 2023-12-05 release of Raspberry Pi OS desktop 64-bit (Debian 12 bookworm):RPi 5 BCM2712 ARMv8.2-A (64/32-bit) 4× Cortex-A76 2.4 GHz CFLAGS='-mcpu=cortex-a76 -pipe -fomit-frame-pointer' 5x Excellent 7x Very usableRPi 4 / 400 BCM2711 ARMv8-A (64/32-bit) 4× Cortex-A72 1.8 GHz CFLAGS='-mcpu=cortex-a72 -pipe -fomit-frame-pointer' 4x Very good 5x Very usable ### RPi 400 Untested, higher stock CPU clock may yield slightly better performanceRPi Zero 2 W BCM2710A1 ARMv8-A (64/32-bit) 4× Cortex-A53 1 GHz CFLAGS='-mcpu=cortex-a53 -pipe -fomit-frame-pointer' 3x Very good 4x usableRPi 3 Model B v1.2 BCM2837B0 ARMv8-A (64/32-bit) 4× Cortex-A53 1.4 GHz CFLAGS='-mcpu=cortex-a53 -pipe -fomit-frame-pointer' 3x Very good 4x usableRPi 2 Model B v1.2 BCM2837 ARMv8-A (64/32-bit) 4× Cortex-A53 900 MHz CFLAGS='-mcpu=cortex-a53 -pipe -fomit-frame-pointer' 3x Very good 4x usableTested with the 2023-12-05 release of Raspberry Pi OS desktop Legacy 32-bit (Debian 12 bookworm):RPi 2 Model B v1.1 BCM2836 ARMv7-A (32-bit) 4× Cortex-A7 900 MHz CFLAGS='-mcpu=Cortex-A7 -pipe -fomit-frame-pointer' 2x Good with default HUD, 3x Usable. Struggles with extra window layout.RPi Zero v1.3 BCM2835 ARMv6Z (32-bit) 1× ARM1176JZF-S 1 GHz CFLAGS='-mcpu=ARM1176JZF-S -pipe -fomit-frame-pointer' 1x with default HUD 11.7 fps average, some delay but smooth.RPi 1 BCM2835 ARMv6Z (32-bit) 1× ARM1176JZF-S 700MHz CFLAGS='-mcpu=ARM1176JZF-S -pipe -fomit-frame-pointer' ### Untested. Variants with 512MB of RAM are likely to work but expect a very low frame rate, YMMV with the 256MB variants.Model A, +, and compute modules have also not been tested but are likely to work the same as their model B counterparts. None Raspberry Pi SBCs that run a linux desktop may also work.I'll go through my collection of RPIs again at some point soon as I noticed some image artefacts ('banding') which changed depending on how demanding the options where that I enabled. I only noticed this on some of the slower models, I need to check this again because I didn't note which models were affected as I initially assumed it was caused by the sensor in my camera. I'll use the latest version as my testing is a few versions behind now.I also want to try the RPi zero v1.3 again with the last release I have before multi-threading was added, version 4 I believe, to see if it helps performance.When time allows I'm also interested in testing "headless" using X11 forwarding, I haven't' attempted this at all yet. I'm sure a headless RPi zeroW / 2W could be a neat setup for some applications, very compact and portable.Thank you again G28 for all the improvements and updates.

author: G28
author_rank: Regular Contributor
timestamp: January 10, 2024, 05:03:20 am
content: Quote from: Amish Technician on January 10, 2024, 02:43:57 amFWIW, the last releases (github) should be faster than the 12/5 release with the global font, halo and anti-alias changes which impact the HUD, HELP, temp text and marker displays across the board.Ruler drags should also be faster with the elimination of halo rendering during drag scrolls.

author: cynfab
author_rank: Regular Contributor
timestamp: January 10, 2024, 03:01:12 pm
content: Great job, It compiled easily on my MacBook Pro running Linux Mint, and displays a great image from my P2 Pro.Thanks

author: G28
author_rank: Regular Contributor
timestamp: January 10, 2024, 03:04:38 pm
content: Quote from: cynfab on January 10, 2024, 03:01:12 pmGreat. Please post or PM any issues that you may encounter so I can try to address them.

author: G28
author_rank: Regular Contributor
timestamp: January 10, 2024, 03:36:39 pm
content: For those running Linux, you might be interested in the tuned-adm package.It controls your PC's scheduling and thread frequency SpeedStep controls providing a lot of profile options.I usually switch between "desktop" and "latency-performance".When regression testing with a long duration redirected stdin command script, "latency-performance" and unrestricted offline FPS (-fps 900), the "latency-performance" setting finishes the script [3-5]X faster.It may also be useful for your general purpose Linux use and performance targeted projects.Code:Available profiles:- accelerator-performance - Throughput performance based tuning with disabled higher latency STOP states- atomic-guest - Optimize virtual guests based on the Atomic variant- atomic-host - Optimize bare metal systems running the Atomic variant- balanced - General non-specialized tuned profile- cpu-partitioning - Optimize for CPU partitioning- default - Legacy default tuned profile- desktop - Optimize for the desktop use-case- desktop-powersave - Optmize for the desktop use-case with power saving- enterprise-storage - Legacy profile for RHEL6, for RHEL7, please use throughput-performance profile- hpc-compute - Optimize for HPC compute workloads- intel-sst - Configure for Intel Speed Select Base Frequency- laptop-ac-powersave - Optimize for laptop with power savings- laptop-battery-powersave - Optimize laptop profile with more aggressive power saving- latency-performance - Optimize for deterministic performance at the cost of increased power consumption- mssql - Optimize for MS SQL Server- network-latency - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance- network-throughput - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks- optimize-serial-console - Optimize for serial console use.- oracle - Optimize for Oracle RDBMS- postgresql - Optimize for PostgreSQL server- powersave - Optimize for low power consumption- realtime - Optimize for realtime workloads- realtime-virtual-guest - Optimize for realtime workloads running within a KVM guest- realtime-virtual-host - Optimize for KVM guests running realtime workloads- sap-hana - Optimize for SAP HANA- sap-netweaver - Optimize for SAP NetWeaver- server-powersave - Optimize for server power savings- spectrumscale-ece - Optimized for Spectrum Scale Erasure Code Edition Servers- spindown-disk - Optimize for power saving by spinning-down rotational disks- throughput-performance - Broadly applicable tuning that provides excellent performance across a variety of common server workloads- virtual-guest - Optimize for running inside a virtual guest- virtual-host - Optimize for running KVM guestsCurrent active profile: desktop

author: RO
author_rank: Contributor
timestamp: January 11, 2024, 05:33:34 pm
content: Quote from: Amish Technician on January 01, 2024, 02:33:33 amWell doneI am trying to achieve the same on the RPi Zero 2 WI have installed Raspberry Pi OS desktop 64-bit without trouble but keep running into errors when installing OpenCVDo you have any advice on the install?- Compiling the source on the Pi (cmake)- Memory increased to plentifull with swapfile- Have added the contrib modules- Cmake on all 4 cores -j4Would also be interested in your -D flagsThanks!

author: Amish Technician
author_rank: Contributor
timestamp: January 12, 2024, 02:04:12 am
content: The initial github release has noticeably improved performance on the RPi Zero v1.3 compared to the last version I tried on it, I saw FPS up to 16.9 with no HUD, 13.8 with the default HUD.The early pre multi threading version does indeed perform much worse. I wonder if a single threaded version of the current release with the numerous performance tweaks and improvements would run better on the single core single thread CPU of the Pi Zero.The optional flags are a very useful addition.Arrow keys aren't doing anything for me, I tried with two different keyboard, both were laptop style without a num-pad however. I will try again with a full size keyboard.RPi Zero v1.3Launch times consistently repeatable within 0.1 seconds (repeated at least 3 times)- Offline 11.6s to display key bindings in stdout, 13.7s to display image- Online 12.3s to display key bindings in stdout, 16.0s to display image, or 15.0s with flag -scale 1- FPS noticably improved at 1x, including with duel window layouts and rulers enabled, though dragging rulers reduces to ~1fps- No image artifactsCode:main:thrm:img (0.05 : 0.41 : 0.54) scale 1 fps 13.9 read 3.25 rot 4.89 : [5.17 | 38.93 | 51.02] + 3.83 67.35 12.50 OFF ONmain:thrm:img (0.06 : 0.42 : 0.52) scale 1 fps 13.9 read 1.69 rot 4.40 : [5.08 | 35.54 | 43.41] + 3.30 58.31 11.61 OFF ONmain:thrm:img (0.06 : 0.43 : 0.51) scale 1 fps 13.8 read 1.67 rot 4.39 : [5.11 | 35.78 | 43.24] + 3.27 58.55 12.04 OFF ONmain:thrm:img (0.06 : 0.42 : 0.52) scale 1 fps 13.8 read 1.66 rot 4.42 : [4.78 | 35.58 | 43.40] + 3.29 58.58 11.89 OFF ONmain:thrm:img (0.06 : 0.43 : 0.51) scale 1 fps 13.8 read 1.69 rot 4.42 : [5.22 | 36.08 | 43.13] + 3.27 58.57 12.16 OFF ONmain:thrm:img (0.06 : 0.42 : 0.52) scale 1 fps 13.8 read 1.63 rot 4.43 : [4.66 | 34.81 | 42.98] + 3.28 57.85 11.58 OFF OFFmain:thrm:img (0.05 : 0.40 : 0.55) scale 1 fps 13.9 read 1.70 rot 4.24 : [3.49 | 30.29 | 41.10] + 3.32 53.89 9.47 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.55) scale 1 fps 14.0 read 1.71 rot 4.28 : [3.46 | 30.39 | 40.62] + 3.32 53.62 9.68 OFF OFFmain:thrm:img (0.05 : 0.40 : 0.55) scale 1 fps 14.1 read 1.66 rot 4.20 : [3.44 | 30.15 | 40.97] + 3.32 53.97 9.68 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.55) scale 1 fps 14.2 read 1.72 rot 4.21 : [3.47 | 30.24 | 40.82] + 3.34 53.62 9.46 OFF OFFmain:thrm:img (0.05 : 0.40 : 0.55) scale 1 fps 14.2 read 1.69 rot 4.19 : [3.47 | 30.09 | 40.83] + 3.36 53.84 9.65 OFF OFFmain:thrm:img (0.05 : 0.40 : 0.55) scale 1 fps 14.2 read 1.66 rot 4.24 : [3.44 | 30.14 | 40.86] + 3.32 53.89 9.71 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.55) scale 1 fps 14.3 read 1.65 rot 4.24 : [3.47 | 30.22 | 40.92] + 3.30 53.76 9.54 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.55) scale 1 fps 14.3 read 1.64 rot 4.26 : [3.36 | 30.20 | 40.77] + 3.33 53.98 9.88 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.55) scale 1 fps 14.3 read 1.65 rot 4.27 : [3.38 | 30.20 | 40.80] + 3.31 53.83 9.73 OFF OFFmain:thrm:img (0.04 : 0.41 : 0.55) scale 1 fps 14.4 read 1.64 rot 4.30 : [3.19 | 30.20 | 40.91] + 3.31 54.06 9.83 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.54) scale 1 fps 14.8 read 2.37 rot 6.12 : [4.93 | 44.59 | 59.25] + 4.76 78.19 14.18 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.55) scale 1 fps 14.8 read 1.68 rot 4.24 : [3.39 | 30.16 | 40.64] + 3.29 53.63 9.69 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.55) scale 1 fps 14.7 read 1.69 rot 4.29 : [3.46 | 30.54 | 41.22] + 3.35 54.13 9.55 OFF OFFmain:thrm:img (0.05 : 0.41 : 0.55) scale 1 fps 14.7 read 1.72 rot 4.24 : [3.36 | 30.05 | 40.66] + 3.30 53.43 9.46 OFF OFFmain:thrm:img (0.04 : 0.41 : 0.55) scale 1 fps 14.7 read 1.65 rot 4.27 : [3.21 | 30.27 | 40.75] + 3.35 53.92 9.82 OFF OFFmain:thrm:img (0.04 : 0.40 : 0.55) scale 1 fps 14.7 read 1.65 rot 4.21 : [3.35 | 30.19 | 41.03] + 3.30 53.90 9.57 OFF OFFmain:thrm:img (0.02 : 0.41 : 0.58) scale 1 fps 17.0 read 2.27 rot 5.79 : [1.28 | 33.17 | 46.69] + 4.47 63.29 12.13 OFF NO_DRAWINGSmain:thrm:img (0.00 : 0.41 : 0.59) scale 1 fps 16.9 read 1.68 rot 4.36 : [0.03 | 22.37 | 32.67] + 3.41 45.28 9.20 OFF NO_DRAWINGSmain:thrm:img (0.00 : 0.41 : 0.59) scale 1 fps 16.9 read 1.65 rot 4.46 : [0.02 | 22.35 | 32.73] + 3.40 45.00 8.87 OFF NO_DRAWINGSmain:thrm:img (0.00 : 0.41 : 0.59) scale 1 fps 16.9 read 1.68 rot 4.44 : [0.03 | 22.72 | 32.99] + 3.38 45.24 8.86 OFF NO_DRAWINGSmain:thrm:img (0.00 : 0.41 : 0.59) scale 1 fps 16.9 read 1.64 rot 4.44 : [0.02 | 22.54 | 32.68] + 3.40 44.98 8.90 OFF NO_DRAWINGSmain:thrm:img (0.00 : 0.41 : 0.59) scale 1 fps 16.9 read 1.66 rot 4.41 : [0.03 | 22.57 | 32.87] + 3.42 45.39 9.10 OFF NO_DRAWINGSmain:thrm:img (0.00 : 0.41 : 0.59) scale 1 fps 16.9 read 1.72 rot 4.39 : [0.03 | 22.43 | 32.75] + 3.41 45.04 8.88 OFF NO_DRAWINGSRPi 2 v1.1Launch times consistently repeatable within 0.1 seconds (repeated at least 3 times)- Online 3.6s to display key bindings in stdout, 5.2s to display image.For comparison 3.7s and 5.9 with release 16.- At 2x scale shimmering horizontal bands, similar to a poorly tracking VHS tape- At 1x perfect 25 FPS, bands still present but far less noticeable, shimmering much less.I will try to work out the best way to send a recording of this, creating a gif to post here lost too much detail to be of any use and I suspect video hosting sites like youtube would do something similar when they trans-code it.Code:main:thrm:img (0.03 : 0.25 : 0.71) scale 2 fps 15.6 read 2.43 rot 2.53 : [2.15 | 16.93 | 47.82] + 2.05 52.91 3.04 OFF ONmain:thrm:img (0.03 : 0.26 : 0.71) scale 2 fps 15.7 read 1.01 rot 2.54 : [2.19 | 17.59 | 48.60] + 2.27 54.42 3.56 OFF ONmain:thrm:img (0.03 : 0.25 : 0.72) scale 2 fps 16.0 read 0.99 rot 2.53 : [2.06 | 16.76 | 47.45] + 1.99 52.51 3.07 OFF ONmain:thrm:img (0.03 : 0.25 : 0.72) scale 2 fps 16.1 read 0.99 rot 2.53 : [1.97 | 16.69 | 47.79] + 1.93 52.57 2.85 OFF ONmain:thrm:img (0.03 : 0.25 : 0.71) scale 2 fps 16.1 read 1.00 rot 2.54 : [2.15 | 17.18 | 48.20] + 2.00 53.21 3.01 OFF ONmain:thrm:img (0.03 : 0.25 : 0.72) scale 2 fps 16.2 read 0.98 rot 2.47 : [2.07 | 16.54 | 47.24] + 1.96 52.50 3.30 OFF ONmain:thrm:img (0.06 : 0.27 : 0.68) scale 2 fps 15.8 read 1.98 rot 4.92 : [7.77 | 37.31 | 95.40] + 3.86 106.14 6.88 BOTH ONmain:thrm:img (0.07 : 0.28 : 0.65) scale 2 fps 15.7 read 1.02 rot 2.57 : [5.45 | 21.20 | 49.90] + 1.94 55.98 4.15 BOTH ONmain:thrm:img (0.07 : 0.27 : 0.66) scale 2 fps 15.7 read 0.99 rot 2.51 : [5.35 | 20.41 | 49.19] + 2.02 55.26 4.05 BOTH ONmain:thrm:img (0.07 : 0.27 : 0.66) scale 2 fps 15.7 read 0.99 rot 2.48 : [5.24 | 20.57 | 49.31] + 1.99 55.09 3.80 BOTH ONmain:thrm:img (0.07 : 0.27 : 0.66) scale 2 fps 15.7 read 0.99 rot 2.58 : [5.32 | 20.55 | 49.67] + 1.96 55.77 4.13 BOTH ONmain:thrm:img (0.07 : 0.27 : 0.66) scale 2 fps 15.7 read 0.98 rot 2.54 : [5.34 | 20.70 | 50.25] + 1.95 56.16 3.97 BOTH ONmain:thrm:img (0.07 : 0.27 : 0.65) scale 1 fps 15.7 read 1.43 rot 2.50 : [5.32 | 20.10 | 47.98] + 1.95 53.81 3.89 BOTH ONmain:thrm:img (0.12 : 0.39 : 0.48) scale 1 fps 25.0 read 17.72 rot 2.39 : [4.50 | 14.59 | 17.89] + 1.20 21.53 2.44 BOTH ONmain:thrm:img (0.12 : 0.39 : 0.48) scale 1 fps 25.0 read 16.00 rot 2.34 : [4.45 | 14.10 | 17.25] + 1.07 20.76 2.44 BOTH ONmain:thrm:img (0.13 : 0.39 : 0.48) scale 1 fps 25.0 read 15.88 rot 2.28 : [4.74 | 14.52 | 17.61] + 1.06 20.99 2.32 BOTH ONmain:thrm:img (0.13 : 0.40 : 0.47) scale 1 fps 25.0 read 15.70 rot 2.25 : [4.79 | 14.65 | 17.30] + 1.09 20.89 2.51 BOTH ONmain:thrm:img (0.13 : 0.39 : 0.48) scale 1 fps 25.0 read 15.53 rot 2.30 : [4.83 | 14.49 | 17.52] + 1.13 21.22 2.57 BOTH ONmain:thrm:img (0.13 : 0.40 : 0.48) scale 1 fps 25.0 read 15.10 rot 2.36 : [4.67 | 14.76 | 17.74] + 1.12 21.35 2.50 BOTH ONmain:thrm:img (0.12 : 0.39 : 0.49) scale 1 fps 25.0 read 15.93 rot 2.31 : [4.41 | 14.06 | 17.46] + 1.07 20.75 2.21 BOTH ONmain:thrm:img (0.13 : 0.40 : 0.47) scale 1 fps 25.0 read 16.13 rot 2.24 : [4.72 | 14.61 | 17.26] + 1.09 20.72 2.37 BOTH ONmain:thrm:img (0.13 : 0.39 : 0.48) scale 1 fps 25.0 read 15.85 rot 2.27 : [4.56 | 14.25 | 17.52] + 1.08 20.88 2.28 BOTH ONmain:thrm:img (0.12 : 0.40 : 0.47) scale 1 fps 25.0 read 15.71 rot 2.30 : [4.61 | 14.86 | 17.42] + 1.07 21.08 2.59 BOTH ON

author: Amish Technician
author_rank: Contributor
timestamp: January 12, 2024, 02:26:33 am
content: Quote from: RO on January 11, 2024, 05:33:34 pmI installed the "libopencv-dev" package from the Debian stable repoCode:sudo apt install libopencv-devHere is my build script:Code:#!/bin/bash# Build Thermal Camera Reduxecho "Building redux and test_driver ..."rm ./redux# RPi Zero 2 WCFLAGS='-mcpu=cortex-a53 -pipe -fomit-frame-pointer'DEFAULT_FLAGS='-DDEFAULT_FONT=0 -DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=1920 -DDISPLAY_HEIGHT=1080 -DUSE_CELSIUS=1 -DHUD_ALPHA=0.4'# Compile and link Redux Thermal Camera codeg++ -Wall -Wextra -O3 -ffast-math ${DEFAULT_FLAGS} ${CFLAGS} -DUSE_ASSERT=0 -I/usr/include/opencv4 tc001.cpp thread.cpp -o redux -lpthread `pkg-config --cflags --libs opencv4`gcc -Wall test_driver.c -o test_driverHope this helps.Sincerely,Amish Tech.

author: G28
author_rank: Regular Contributor
timestamp: January 12, 2024, 03:28:12 am
content: Amish Tech,Thanks for the detailed update.RPi Zero v1.3:- The 11.6s and 12.3s to printKeyBindings() is disturbing. The only thing that is going on is argv parsing, a few variable declarations and opening either the camera or file. I would guess the lag is opening the disk/device since neither invokes a data read until after printing the key bindings. The initial GUI window creation is done next. Loading from disk could also be an issue. I assume you are starting the program from a SD card ?I can add some startup timing stats to zero in on the worst offenders including the load from disk.A single threaded -D flag is possible with some rework. From the logs, the processing of the image sub-frame and thermal sub-frame are taking the lion's share of the time. The 3rd thread is waiting idle most of the time. On the PC, all 3 are pretty evenly loaded. The 3rd column from the end shows that there is a significant amount of time waiting for threads to sync where a single thread would eliminate those waits.The latest github release logs gives a more accurate picture of how long the camera reads actually take. The "read n.nn" column looks fairly well. Before, the read timing also included the waits on the camera's FPS rates.RPi 2 v1.1:Horizontal banding. Have you tried using the "r" key to see if the banding shows up in the recorded .avi file ? It might help isolate the problem if it shows up in the composited video/graphic image, or OpenCV's display.If it doesn't show up in the .avi file, you might be able to use the Linux "peek" command to record a GIF file if peek is available on the Pi.The 3rd last column waits appear more reasonable compared to the Zero 1.3, but it appears there is still some uneven thread loading with the image thread taking the longest. I could swap some of the work loads between the thermal and image threads if the lag is in the rendering stages or dump some into the main thread.I added some function pointers in the last release and was thinking about doing realtime smart thread loading by monitoring the thread stats and then swapping loads in realtime to balance the aggregate load based on hardware capabilities.Also, the Zero 1.3 appear to take twice as long for OpenCV to show the prepared 1X frames vs the 2X frames on the Pi 2 v1.1, a factor of 4X slower considering the frame size delta.How were the font and ruler displays at 1X and 2X ?Were they more or less legible than the December release ?Was there any temp text-flickers ?Thanks much.

author: G28
author_rank: Regular Contributor
timestamp: January 12, 2024, 03:43:41 am
content: Another idea for the RPi Zero v1.3.I could reduce the resolution of the ruler drag. Right now it is plotting 256 landscape points and 192 portrait points. During drag, I could half or quarter that resolution and then return to full resolution at the end of the drag.What is the frame rate of dragging just 1 text temp and just the cross hair of text temps without the line plots ? If they are reasonable, decreasing the resolution of the line plots during drag will help.

author: RO
author_rank: Contributor
timestamp: January 12, 2024, 11:59:17 am
content: Quote from: Amish Technician on January 12, 2024, 02:26:33 amAh yes, I have been compiling opencv from the github as the repository is quite outdated and I read using apt might induce future problems when updating. (or if updating)But thanks! that should get me started.

author: Amish Technician
author_rank: Contributor
timestamp: January 12, 2024, 04:22:00 pm
content: RPi Zero v1.3:Yes the whole system runs from a micro sd card, I have two that I've been using for testing. The legacy 32bit Pi OS is on a slower class 4 16GB kingston card which I've used for the Zero v1.3 and 2 v1.1 while the rest of the 64bit models have been tested with a nearly new Samsung pro endurance 256GB U3 card. I'm going to have to borrow another one of those from another project and test again to eliminate the sd card differences. I have about a dozen cards for the RPIs now but still never have any spareRPi2 v1.1Recorded .avi file attached

author: G28
author_rank: Regular Contributor
timestamp: January 12, 2024, 08:48:40 pm
content: Quote from: Amish Technician on January 12, 2024, 04:22:00 pmThanks for the feedback and .avi file.PM's and test mods sent.The test mods also includes startup timing logs to see where the startup time is spent.

author: Amish Technician
author_rank: Contributor
timestamp: January 12, 2024, 09:12:47 pm
content: Note: I've just received the 'FAST_DRAG DRAW_SINGLE_THREAD' as I was about to post this message, thank youWill provide feedback on it probably tomorrow.I've cloned the slower SD card onto a faster card identical to the one I've used for 64bit models (purchased at the same time late last year so they shouldn't slow down due to wear). I overlooked the impact this could have as I'd incorrectly assumed the difference would be negligible for an app that's ~140KB compiled, but it appears to have improved things a bit, for RPi2 v1.1 especially.RPi Zero v1.3Launch times consistently repeatable within 0.1 seconds (repeated at least 3 times)- Offline 11.8s to display key bindings in stdout, 13.9s to display image- Online 12.1s to display key bindings in stdout, 15.8s to display image, or 15.0s with flag -scale 1Online -scale 1FPS taken after reset from at least 3 readings in stdout .x1 double 10.9fps dragging single temperature point around with status hud disabledx1 13.9fps dragging single temperature point around with status hud enabledx1 double 10.3fps dragging both rulers around with status hud disabledx1 double 9.7fps dragging both rulers around with status hud enabledx1 14.6fps dragging both rulers around with status hud disabledx1 13.7fps dragging both rulers around with status hud enabledThese fps figures for online are all far better than I had expected as they feel like ~2fps because all the frames come at once and then it freezes for ~0.5s, unless you drag slowely and then it's a relativly consistent stuttery update rate. Perhaps the best option for weaker CPUs is to disable dragging things and have it click to position only?Code:main:thrm:img (0.05 : 0.43 : 0.52) scale 1 fps 13.1 read 3.33 rot 4.62 : [5.28 | 41.61 | 50.19] + 3.45 64.33 10.68 ONE_TEMP ONmain:thrm:img (0.05 : 0.42 : 0.52) scale 1 fps 13.7 read 1.84 rot 4.64 : [4.79 | 40.38 | 49.89] + 3.44 63.13 9.80 ONE_TEMP ONmain:thrm:img (0.05 : 0.43 : 0.52) scale 1 fps 13.9 read 1.83 rot 4.70 : [4.56 | 40.57 | 49.78] + 3.47 63.18 9.93 ONE_TEMP ONmain:thrm:img (0.05 : 0.43 : 0.52) scale 1 fps 14.0 read 1.84 rot 4.70 : [5.08 | 41.38 | 50.12] + 3.53 63.91 10.26 ONE_TEMP ONmain:thrm:img (0.06 : 0.44 : 0.51) scale 1 fps 13.9 read 1.68 rot 4.35 : [5.02 | 39.31 | 45.38] + 3.32 60.68 11.98 ONE_TEMP ONmain:thrm:img (0.05 : 0.43 : 0.52) scale 1 fps 13.9 read 1.81 rot 4.60 : [4.95 | 40.03 | 48.16] + 3.41 62.18 10.61 ONE_TEMP ONmain:thrm:img (0.06 : 0.43 : 0.52) scale 1 fps 13.9 read 1.80 rot 4.61 : [5.43 | 40.83 | 49.13] + 3.42 63.03 10.47 CROSS_HAIR ONmain:thrm:img (0.06 : 0.43 : 0.51) scale 1 fps 14.0 read 1.76 rot 4.55 : [5.84 | 41.32 | 48.87] + 3.47 63.30 10.96 CROSS_HAIR ONmain:thrm:img (0.09 : 0.44 : 0.48) scale 1 fps 13.8 read 1.67 rot 4.28 : [8.55 | 42.88 | 46.98] + 3.35 64.33 14.00 CROSS_HAIR ONmain:thrm:img (0.09 : 0.44 : 0.46) scale 1 fps 13.7 read 1.67 rot 4.17 : [9.31 | 44.42 | 46.31] + 3.30 65.09 15.48 CROSS_HAIR ONmain:thrm:img (0.09 : 0.44 : 0.47) scale 1 fps 13.6 read 1.66 rot 4.20 : [9.23 | 43.75 | 46.95] + 3.32 64.76 14.49 CROSS_HAIR ONmain:thrm:img (0.09 : 0.44 : 0.47) scale 1 fps 13.5 read 1.70 rot 4.28 : [9.52 | 44.21 | 47.68] + 3.31 65.33 14.34 CROSS_HAIR ONmain:thrm:img (0.07 : 0.42 : 0.50) scale 1 fps 14.5 read 4.52 rot 11.03 : [18.08 | 103.35 | 122.09] + 8.76 160.16 29.30 BOTH OFFmain:thrm:img (0.06 : 0.41 : 0.53) scale 1 fps 14.6 read 1.85 rot 4.28 : [5.50 | 38.18 | 48.59] + 3.46 61.41 9.36 BOTH OFFmain:thrm:img (0.06 : 0.41 : 0.53) scale 1 fps 14.6 read 1.87 rot 4.35 : [5.59 | 38.12 | 48.81] + 3.55 61.37 9.02 BOTH OFFmain:thrm:img (0.09 : 0.42 : 0.49) scale 1 fps 14.3 read 1.71 rot 4.31 : [8.68 | 40.65 | 47.95] + 3.35 61.72 10.42 BOTH OFFmain:thrm:img (0.09 : 0.42 : 0.49) scale 1 fps 14.1 read 1.67 rot 4.30 : [8.96 | 40.30 | 47.53] + 3.32 61.36 10.50 BOTH OFFmain:thrm:img (0.09 : 0.42 : 0.49) scale 1 fps 13.9 read 1.64 rot 4.21 : [9.27 | 41.17 | 47.96] + 3.31 62.14 10.86 BOTH OFFmain:thrm:img (0.09 : 0.42 : 0.49) scale 1 fps 13.8 read 1.68 rot 4.30 : [9.30 | 41.16 | 48.57] + 3.31 62.14 10.26 BOTH OFFmain:thrm:img (0.10 : 0.42 : 0.49) scale 1 fps 13.7 read 1.68 rot 4.32 : [9.42 | 41.23 | 48.42] + 3.31 62.20 10.47 BOTH OFFmain:thrm:img (0.08 : 0.42 : 0.50) scale 1 fps 13.7 read 3.32 rot 8.41 : [15.62 | 81.51 | 96.40] + 6.34 122.57 19.82 BOTH ONmain:thrm:img (0.07 : 0.42 : 0.50) scale 1 fps 13.7 read 1.83 rot 4.62 : [7.71 | 44.56 | 52.72] + 3.39 66.32 10.21 BOTH ONmain:thrm:img (0.11 : 0.43 : 0.46) scale 1 fps 13.2 read 1.71 rot 4.18 : [11.41 | 46.35 | 49.19] + 3.30 67.33 14.85 BOTH ONmain:thrm:img (0.11 : 0.43 : 0.46) scale 1 fps 13.0 read 1.69 rot 4.22 : [11.35 | 46.59 | 49.52] + 3.29 67.61 14.80 BOTH ONmain:thrm:img (0.11 : 0.43 : 0.46) scale 1 fps 12.8 read 1.71 rot 4.17 : [12.02 | 46.76 | 49.12] + 3.32 67.66 15.23 BOTH ONmain:thrm:img (0.11 : 0.43 : 0.46) scale 1 fps 12.7 read 1.71 rot 4.21 : [11.78 | 46.52 | 49.90] + 3.29 67.66 14.47 BOTH ONmain:thrm:img (0.10 : 0.43 : 0.47) scale 1 fps 12.6 read 1.71 rot 4.36 : [11.45 | 46.94 | 50.85] + 3.29 68.30 14.15 BOTH ONmain:thrm:img (0.11 : 0.43 : 0.46) scale 1 fps 12.6 read 1.64 rot 4.15 : [11.50 | 46.91 | 49.80] + 3.28 67.89 14.81 BOTH ONmain:thrm:img (0.08 : 0.40 : 0.52) scale 1 fps 9.8 read 3.06 rot 9.34 : [18.04 | 89.49 | 118.02] + 9.33 148.03 20.67 BOTH ONmain:thrm:img (0.06 : 0.37 : 0.57) scale 1 fps 9.8 read 1.79 rot 5.68 : [7.95 | 51.21 | 77.99] + 6.53 92.41 7.89 BOTH ONmain:thrm:img (0.06 : 0.37 : 0.57) scale 1 fps 9.7 read 1.78 rot 5.89 : [7.85 | 50.80 | 76.93] + 6.40 91.53 8.20 BOTH ONmain:thrm:img (0.08 : 0.38 : 0.54) scale 1 fps 9.6 read 1.78 rot 5.79 : [11.33 | 54.31 | 78.60] + 6.48 94.96 9.87 BOTH ONmain:thrm:img (0.08 : 0.38 : 0.54) scale 1 fps 10.3 read 3.55 rot 10.56 : [23.73 | 105.71 | 150.38] + 12.62 183.92 20.92 BOTH OFFmain:thrm:img (0.05 : 0.37 : 0.58) scale 1 fps 10.3 read 1.75 rot 4.90 : [7.07 | 47.66 | 74.49] + 6.49 88.05 7.07 BOTH OFFmain:thrm:img (0.06 : 0.37 : 0.58) scale 1 fps 10.3 read 1.77 rot 4.98 : [7.11 | 46.90 | 73.32] + 6.49 87.57 7.75 BOTH OFFmain:thrm:img (0.06 : 0.37 : 0.57) scale 1 fps 10.9 read 3.41 rot 9.72 : [15.80 | 93.58 | 143.67] + 12.66 173.46 17.13 ONE_TEMP OFFmain:thrm:img (0.02 : 0.37 : 0.60) scale 1 fps 10.9 read 1.81 rot 4.79 : [2.63 | 43.04 | 69.94] + 6.49 83.31 6.88 ONE_TEMP OFFmain:thrm:img (0.02 : 0.37 : 0.61) scale 1 fps 10.9 read 1.76 rot 4.75 : [2.68 | 43.07 | 70.23] + 6.57 83.62 6.82 ONE_TEMP OFFmain:thrm:img (0.03 : 0.37 : 0.60) scale 1 fps 10.7 read 1.70 rot 4.88 : [3.48 | 42.75 | 67.94] + 6.39 82.84 8.51 ONE_TEMP OFFmain:thrm:img (0.04 : 0.37 : 0.59) scale 1 fps 10.5 read 1.74 rot 4.86 : [4.10 | 42.34 | 67.24] + 6.26 82.60 9.09 ONE_TEMP OFFmain:thrm:img (0.04 : 0.37 : 0.59) scale 1 fps 10.4 read 1.70 rot 4.69 : [4.11 | 41.92 | 67.28] + 6.28 83.00 9.43 ONE_TEMP OFFmain:thrm:img (0.04 : 0.38 : 0.59) scale 1 fps 10.3 read 1.87 rot 5.12 : [4.10 | 42.92 | 67.27] + 6.32 82.89 9.30 ONE_TEMP OFFOffline -scale 1FPS taken after reset from at least 3 readings in stdout.x1 double 23.3fps dragging single temperature point around with status hud disabledx1 24.9fps dragging single temperature point around with status hud disabledx1 double 22.2fps dragging both rulers around with status hud disabledx1 24.9fps dragging both rulers around with status hud disabledx1 24.8fps dragging both rulers around with status hud enabledFelt slightly less smooth at any given frame rate than I'd expect.Code:main:thrm:img (0.13 : 0.36 : 0.51) scale 2 fps 13.6 read 0.03 rot 3.71 : [7.07 | 19.23 | 27.78] + 11.62 47.35 7.95 OFF ONmain:thrm:img (0.14 : 0.35 : 0.51) scale 1 fps 25.0 read 0.01 rot 6.65 : [9.91 | 24.46 | 35.53] + 10.71 53.62 7.38 OFF ONmain:thrm:img (0.17 : 0.34 : 0.48) scale 1 fps 24.8 read 0.01 rot 3.88 : [5.88 | 11.53 | 16.30] + 2.99 21.64 2.35 ONE_TEMP ONmain:thrm:img (0.12 : 0.35 : 0.54) scale 1 fps 24.8 read 0.01 rot 4.00 : [3.40 | 10.17 | 15.63] + 3.03 20.43 1.76 ONE_TEMP OFFmain:thrm:img (0.14 : 0.31 : 0.56) scale 1 fps 24.9 read 0.01 rot 4.55 : [3.80 | 8.42 | 15.29] + 3.78 20.96 1.89 ONE_TEMP OFFmain:thrm:img (0.13 : 0.30 : 0.57) scale 1 fps 24.9 read 0.01 rot 3.86 : [2.96 | 6.71 | 12.57] + 3.16 17.46 1.72 ONE_TEMP OFFmain:thrm:img (0.13 : 0.30 : 0.56) scale 1 fps 24.9 read 0.01 rot 3.82 : [2.95 | 6.73 | 12.55] + 3.17 17.33 1.61 ONE_TEMP OFFmain:thrm:img (0.14 : 0.30 : 0.55) scale 1 fps 24.9 read 0.01 rot 3.76 : [3.22 | 6.85 | 12.48] + 3.03 16.96 1.46 ONE_TEMP OFFmain:thrm:img (0.15 : 0.31 : 0.54) scale 1 fps 24.9 read 0.01 rot 3.64 : [3.58 | 7.12 | 12.53] + 2.98 17.09 1.58 ONE_TEMP OFFmain:thrm:img (0.15 : 0.30 : 0.54) scale 1 fps 24.9 read 0.01 rot 3.62 : [3.51 | 7.00 | 12.48] + 2.97 16.87 1.41 ONE_TEMP OFFmain:thrm:img (0.15 : 0.30 : 0.54) scale 1 fps 24.9 read 0.01 rot 3.65 : [3.52 | 6.96 | 12.45] + 2.99 16.88 1.44 ONE_TEMP OFFmain:thrm:img (0.15 : 0.30 : 0.54) scale 1 fps 24.9 read 0.01 rot 3.65 : [3.58 | 7.08 | 12.58] + 2.99 17.04 1.47 ONE_TEMP OFFmain:thrm:img (0.11 : 0.40 : 0.49) scale 1 fps 22.5 read 0.02 rot 10.47 : [11.32 | 39.54 | 47.96] + 18.25 83.89 17.68 ONE_TEMP OFFmain:thrm:img (0.06 : 0.44 : 0.50) scale 1 fps 22.9 read 0.01 rot 6.03 : [1.91 | 14.90 | 16.89] + 6.00 29.37 6.48 ONE_TEMP OFFmain:thrm:img (0.06 : 0.44 : 0.50) scale 1 fps 23.1 read 0.01 rot 5.84 : [1.91 | 14.84 | 16.74] + 6.09 29.30 6.47 ONE_TEMP OFFmain:thrm:img (0.06 : 0.44 : 0.50) scale 1 fps 23.2 read 0.01 rot 5.91 : [1.94 | 14.84 | 16.78] + 6.04 29.26 6.44 ONE_TEMP OFFmain:thrm:img (0.06 : 0.45 : 0.50) scale 1 fps 23.2 read 0.01 rot 5.76 : [1.92 | 14.80 | 16.53] + 6.05 29.25 6.67 ONE_TEMP OFFmain:thrm:img (0.06 : 0.44 : 0.50) scale 1 fps 23.3 read 0.01 rot 5.90 : [1.94 | 14.71 | 16.61] + 6.11 29.28 6.56 ONE_TEMP OFFmain:thrm:img (0.06 : 0.44 : 0.50) scale 1 fps 23.3 read 0.01 rot 5.99 : [1.99 | 14.89 | 16.98] + 6.06 29.56 6.52 ONE_TEMP OFFmain:thrm:img (0.06 : 0.45 : 0.49) scale 1 fps 23.3 read 0.01 rot 5.98 : [1.96 | 15.25 | 16.77] + 6.13 29.75 6.84 ONE_TEMP OFFmain:thrm:img (0.06 : 0.44 : 0.50) scale 1 fps 23.3 read 0.01 rot 6.02 : [2.04 | 15.17 | 16.95] + 6.13 29.46 6.38 ONE_TEMP OFFmain:thrm:img (0.10 : 0.48 : 0.43) scale 1 fps 23.2 read 0.01 rot 4.55 : [3.28 | 16.16 | 14.45] + 5.96 29.70 7.59 ONE_TEMP OFFmain:thrm:img (0.10 : 0.48 : 0.42) scale 1 fps 23.0 read 0.01 rot 4.46 : [3.48 | 16.18 | 14.30] + 5.85 29.49 7.46 ONE_TEMP OFFmain:thrm:img (0.10 : 0.48 : 0.42) scale 1 fps 22.9 read 0.01 rot 4.49 : [3.46 | 16.18 | 14.28] + 5.87 29.62 7.56 ONE_TEMP OFFmain:thrm:img (0.10 : 0.48 : 0.42) scale 1 fps 22.8 read 0.01 rot 4.41 : [3.47 | 16.30 | 14.21] + 5.88 29.64 7.46 ONE_TEMP OFFmain:thrm:img (0.16 : 0.43 : 0.41) scale 1 fps 21.8 read 0.01 rot 12.01 : [19.20 | 51.34 | 48.92] + 14.81 86.32 20.18 BOTH OFFmain:thrm:img (0.14 : 0.42 : 0.44) scale 1 fps 22.1 read 0.01 rot 5.81 : [5.98 | 18.74 | 19.43] + 6.33 33.21 7.45 BOTH OFFmain:thrm:img (0.13 : 0.43 : 0.44) scale 1 fps 22.1 read 0.01 rot 5.62 : [5.92 | 18.87 | 19.31] + 6.27 33.11 7.54 BOTH OFFmain:thrm:img (0.13 : 0.43 : 0.44) scale 1 fps 22.2 read 0.01 rot 5.83 : [6.01 | 19.25 | 19.57] + 6.34 33.53 7.63 BOTH OFFmain:thrm:img (0.14 : 0.43 : 0.44) scale 1 fps 22.2 read 0.01 rot 5.61 : [5.98 | 19.00 | 19.24] + 6.32 33.27 7.71 BOTH OFFmain:thrm:img (0.13 : 0.43 : 0.44) scale 1 fps 22.2 read 0.01 rot 5.84 : [5.99 | 19.12 | 19.63] + 6.37 33.57 7.57 BOTH OFFmain:thrm:img (0.12 : 0.37 : 0.52) scale 1 fps 15.6 read 0.01 rot 3.80 : [5.03 | 15.92 | 22.45] + 8.74 39.00 7.81 BOTH ONmain:thrm:img (0.17 : 0.34 : 0.49) scale 1 fps 24.9 read 0.01 rot 4.95 : [7.30 | 14.22 | 20.35] + 4.04 27.33 2.94 BOTH OFFmain:thrm:img (0.16 : 0.33 : 0.52) scale 1 fps 24.9 read 0.01 rot 3.81 : [4.22 | 8.83 | 14.10] + 3.16 19.13 1.87 BOTH OFFmain:thrm:img (0.15 : 0.33 : 0.52) scale 1 fps 24.9 read 0.01 rot 3.92 : [4.15 | 8.99 | 14.40] + 3.22 19.46 1.85 BOTH OFFmain:thrm:img (0.15 : 0.33 : 0.52) scale 1 fps 24.9 read 0.01 rot 3.93 : [4.20 | 8.98 | 14.33] + 3.20 19.48 1.95 BOTH OFFmain:thrm:img (0.14 : 0.36 : 0.50) scale 1 fps 24.9 read 0.02 rot 7.59 : [9.46 | 24.14 | 33.35] + 6.45 44.45 4.65 BOTH ONmain:thrm:img (0.13 : 0.37 : 0.50) scale 1 fps 24.9 read 0.01 rot 4.10 : [4.49 | 12.77 | 17.38] + 3.11 22.71 2.22 BOTH ONmain:thrm:img (0.13 : 0.37 : 0.50) scale 1 fps 24.8 read 0.01 rot 4.12 : [4.48 | 12.88 | 17.47] + 3.10 22.85 2.28 BOTH ONmain:thrm:img (0.13 : 0.36 : 0.50) scale 1 fps 24.8 read 0.01 rot 4.10 : [4.56 | 12.61 | 17.38] + 3.11 22.59 2.10 BOTH ONmain:thrm:img (0.13 : 0.37 : 0.50) scale 1 fps 24.8 read 0.01 rot 4.02 : [4.57 | 12.78 | 17.29] + 3.10 22.65 2.25 BOTH ONRPi 2 v1.1Launch times consistently repeatable within 0.1 seconds (repeated at least 3 times)- Online 2.9s to display key bindings in stdout, 4.1s to display image.

author: G28
author_rank: Regular Contributor
timestamp: January 12, 2024, 10:06:04 pm
content: Quote from: Amish Technician on January 12, 2024, 09:12:47 pmWith only 0.6 fps delta between 1 temp and both rulers, FAST_DRAG probably isn't going to make much difference. Still like to see the results of the 2 new compile flags.Yep, will add -DNO_DRAG=1 to optionally disable drag scrolling, but even without it, it doesn't stop the user from using the click jump-scroll method.Quote from: Amish Technician on January 12, 2024, 09:12:47 pmThat is odd because waitKeyEx( 1ms ) is only supposed to block for a max of 1 millisecond and then get blocked waiting for the next frame read to finish. It appears as if imshow()'s are being stacked/buffered inside the OpenCV library (like printing buffered instead flushing buffers after each print statement).I am doing mouse debouncing to minimize unnecessary processing because there is only 1 composited render per frame, but OpenCV allows multiple mouse events per frame. I only act on the last mouse move because there are no "tween" frames at fixed rates.FAST_DRAG may speed up that stuttery update behavior.Quote from: Amish Technician on January 12, 2024, 09:12:47 pmOn my i7-9700 PC in offline mode and FPS set to "-fps 60" or higher, drag scrolling feels smoother than at 25 FPS.Part of what you are experiencing is 25 FPS.Question, did it feel smoother in older versions ?The newer versions uses nano-sleep to stabilize FPS instead of using waitKeyEx() which was very unpredictable/inconsistent (too much jitter) allowing FPS to wander and take a long time to reach steady state.Update:Just rechecked the code. Nano-sleep is only used during Freeze Frame and Offline modes, not live camera modes.

author: G28
author_rank: Regular Contributor
timestamp: January 12, 2024, 11:57:33 pm
content: -DNO_DRAG=1 added as an option to replace drag scrolling with jump scrolling for "CPU challenged" hardware.

author: G28
author_rank: Regular Contributor
timestamp: January 13, 2024, 04:58:57 pm
content: FWIW, I had installed Pi Desktop into a VirtualBox guest to test with the PiOS without the actual hardware.I passed the Topdon TC001 through to the guest. I could never get the camera to work in the proper pixel format.The issue is that the VM is passing the camera through as Motion JPEG instead of its native 'YUYV' (YUYV 4:2:2) pixel format. Motion JPEG is a lossy format, thus is useless to mine the thermal data.

author: Amish Technician
author_rank: Contributor
timestamp: January 15, 2024, 01:34:07 am
content: Replacing drag scrolling with jump scrolling provides a better user experience on "CPU challenged hardware" while the camera is onlinebut isn't necessary in freeze frame or offline: The benefit of it is that it prevents the live image stuttering.Seeing some improvement in fps from thesinglethread version, and the "CPU challenged" single core RPi zero and RPi1 need all the help they can getRPi Zero v1.3 - No DragOnline -scale 1x1 double 9.7fps both rulers with status hud enabledx1 double 11.8fps no hudx1 17.1fps no hudx1 14.0fps default hudx1 14.9fps single temperature point with status hud disabledx1 14.0fps both rulers with status hud disabledCode:Offline 2xStartup timings: m 0.026, var 0.665, suo 0.357, pa 1.268, pkb 7.985, nw 1421.364, run 1.431, total 1433.096Startup timings: m 0.025, var 0.797, suo 0.236, pa 1.211, pkb 7.455, nw 1412.152, run 1.495, total 1423.371 stdout keybindings 11.8s image 13.9sStartup timings: m 0.023, var 0.852, suo 0.237, pa 1.353, pkb 8.662, nw 1426.547, run 1.357, total 1439.031 stdout keybindings 12.1s image 13.9sStartup timings: m 0.028, var 0.654, suo 0.398, pa 1.318, pkb 8.508, nw 1393.718, run 1.364, total 1405.988 stdout keybindings 12.0s image 14.2sOnline -scale 1Startup timings: m 0.029, var 0.655, suo 6.975, pa 368.359, pkb 0.804, nw 1818.635, run 1.530, total 2196.987Startup timings: m 0.053, var 0.519, suo 0.322, pa 273.784, pkb 4.473, nw 1613.696, run 1.682, total 1894.529 stdout keybindings 12.4sStartup timings: m 0.027, var 0.910, suo 0.329, pa 269.718, pkb 4.385, nw 1557.246, run 1.573, total 1834.188 stdout keybindings 12.0s image 14.9sStartup timings: m 0.027, var 0.639, suo 0.365, pa 274.704, pkb 4.769, nw 1675.175, run 1.538, total 1957.217 stdout keybindings 12.0s image 14.9smain:thrm:img (0.04 : 0.34 : 0.62) scale 1 fps 12.7 read 3.10 rot 4.22 : [2.54 | 24.31 | 44.11] + 3.31 58.98 11.56 OFF HUD : h 0.00 v 12.01main:thrm:img (0.02 : 0.34 : 0.64) scale 1 fps 13.3 read 1.72 rot 4.25 : [1.68 | 24.27 | 46.36] + 3.39 60.32 10.57 HORIZ HUD : h 0.00 v 13.20main:thrm:img (0.01 : 0.30 : 0.69) scale 1 fps 9.6 read 4.87 rot 12.08 : [3.06 | 75.43 | 174.40] + 13.71 214.56 26.45 BOTH OFF : h 0.01 v 53.86main:thrm:img (0.00 : 0.28 : 0.72) scale 1 fps 9.6 read 1.66 rot 4.18 : [0.16 | 27.51 | 71.51] + 6.32 85.94 8.10 BOTH OFF : h 0.00 v 20.20main:thrm:img (0.00 : 0.32 : 0.68) scale 1 fps 11.8 read 3.02 rot 8.22 : [0.19 | 49.77 | 107.67] + 11.59 133.07 13.81 ONE_TEMP NO_DRAWINGS : h 0.01 v 15.45main:thrm:img (0.00 : 0.35 : 0.65) scale 1 fps 11.8 read 1.71 rot 4.54 : [0.03 | 27.66 | 51.39] + 6.52 65.53 7.61 ONE_TEMP NO_DRAWINGS : h 0.00 v 0.00main:thrm:img (0.00 : 0.35 : 0.65) scale 1 fps 11.8 read 1.69 rot 4.55 : [0.03 | 27.60 | 51.35] + 6.54 65.59 7.69 ONE_TEMP NO_DRAWINGS : h 0.00 v 0.00main:thrm:img (0.00 : 0.35 : 0.65) scale 1 fps 11.6 read 1.70 rot 4.36 : [0.03 | 29.54 | 54.39] + 6.76 70.23 9.08 ONE_TEMP NO_DRAWINGS : h 0.00 v 0.00main:thrm:img (0.00 : 0.41 : 0.59) scale 1 fps 17.1 read 1.74 rot 4.66 : [0.11 | 24.27 | 34.74] + 3.65 47.65 9.26 ONE_TEMP NO_DRAWINGS : h 0.00 v 0.69main:thrm:img (0.00 : 0.42 : 0.58) scale 1 fps 17.1 read 1.64 rot 4.45 : [0.04 | 23.04 | 32.18] + 3.49 44.46 8.79 ONE_TEMP NO_DRAWINGS : h 0.00 v 0.00main:thrm:img (0.02 : 0.38 : 0.60) scale 1 fps 14.0 read 3.25 rot 8.55 : [2.14 | 47.28 | 74.53] + 6.73 101.24 19.97 ONE_TEMP HUD : h 0.01 v 11.82main:thrm:img (0.03 : 0.35 : 0.62) scale 1 fps 14.0 read 1.65 rot 4.09 : [2.10 | 24.26 | 43.18] + 3.29 57.32 10.86 ONE_TEMP HUD : h 0.00 v 12.12main:thrm:img (0.02 : 0.35 : 0.63) scale 1 fps 14.0 read 1.60 rot 4.17 : [1.59 | 24.10 | 43.13] + 3.32 57.30 10.85 ONE_TEMP HUD : h 0.00 v 11.95main:thrm:img (0.01 : 0.36 : 0.64) scale 1 fps 15.1 read 2.23 rot 5.87 : [0.60 | 31.67 | 56.18] + 4.56 73.64 12.90 ONE_TEMP OFF : h 0.00 v 13.10main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.67 rot 4.24 : [0.04 | 22.81 | 40.35] + 3.36 53.35 9.64 ONE_TEMP OFF : h 0.00 v 9.52main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 15.0 read 1.64 rot 4.25 : [0.04 | 22.79 | 39.80] + 3.37 52.51 9.34 ONE_TEMP OFF : h 0.00 v 8.48main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.64 rot 4.23 : [0.03 | 22.74 | 40.53] + 3.36 53.11 9.22 ONE_TEMP OFF : h 0.00 v 9.33main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.66 rot 4.26 : [0.03 | 22.97 | 40.67] + 3.33 53.66 9.66 ONE_TEMP OFF : h 0.00 v 9.58main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.69 rot 4.21 : [0.04 | 22.05 | 39.93] + 3.38 53.18 9.87 ONE_TEMP OFF : h 0.00 v 9.26main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.62 rot 4.24 : [0.03 | 22.65 | 40.79] + 3.40 53.39 9.20 ONE_TEMP OFF : h 0.00 v 9.63main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.66 rot 4.31 : [0.03 | 22.53 | 40.05] + 3.36 53.18 9.77 ONE_TEMP OFF : h 0.00 v 9.13main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.66 rot 4.24 : [0.03 | 22.53 | 40.43] + 3.36 53.33 9.54 ONE_TEMP OFF : h 0.00 v 9.40main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.66 rot 4.31 : [0.03 | 22.64 | 40.01] + 3.35 52.69 9.33 ONE_TEMP OFF : h 0.00 v 8.58main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.63 rot 4.24 : [0.04 | 22.62 | 39.82] + 3.35 52.58 9.40 ONE_TEMP OFF : h 0.00 v 8.87main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.62 rot 4.30 : [0.04 | 22.73 | 39.71] + 3.38 52.65 9.55 ONE_TEMP OFF : h 0.00 v 8.42main:thrm:img (0.00 : 0.36 : 0.64) scale 1 fps 14.9 read 1.59 rot 4.27 : [0.03 | 22.56 | 40.00] + 3.36 52.71 9.35 ONE_TEMP OFF : h 0.00 v 8.80main:thrm:img (0.00 : 0.35 : 0.65) scale 1 fps 14.1 read 2.43 rot 6.20 : [0.29 | 34.64 | 65.38] + 5.01 84.29 13.90 BOTH OFF : h 0.00 v 18.60main:thrm:img (0.00 : 0.34 : 0.66) scale 1 fps 14.0 read 1.65 rot 4.18 : [0.14 | 23.25 | 44.75] + 3.34 57.53 9.44 BOTH OFF : h 0.00 v 13.36main:thrm:img (0.00 : 0.34 : 0.66) scale 1 fps 14.0 read 1.65 rot 4.14 : [0.14 | 23.26 | 44.72] + 3.32 57.53 9.49 BOTH OFF : h 0.00 v 13.29main:thrm:img (0.00 : 0.34 : 0.65) scale 1 fps 14.0 read 1.62 rot 4.18 : [0.17 | 23.33 | 44.37] + 3.35 57.23 9.51 BOTH OFF : h 0.00 v 13.15RPi Zero v1.3 - Fast drag draw single threadOnline -scale 1x1 14.3fps dragging single temperature point around with status hud enabled (was 13.9)x1 double 11.5fps dragging single temperature point around with status hud disabled (was 10.9)Offlinex2 19.5fps dragging both rulers around with status hud disabledx1 double 24.0fps dragging single temperature point around with status hud disabled (was 23.3)x1 double 23.2fps dragging both rulers around with status hud disabled (was 22.2)Code:Offline 2xStartup timings: m 0.029, var 0.753, suo 0.233, pa 1.179, pkb 17.813, nw 1426.867, run 1.407, total 1448.281 stdout keybindings 11.5s image 13.7sStartup timings: m 0.110, var 0.619, suo 0.262, pa 1.135, pkb 9.373, nw 1411.900, run 1.241, total 1424.640 stdout keybindings 11.7s image 13.9sStartup timings: m 0.027, var 0.682, suo 0.359, pa 1.199, pkb 8.709, nw 1422.815, run 1.308, total 1435.099 stdout keybindings 11.5s image 13.7sOffline -scale 1Startup timings: m 0.027, var 0.811, suo 0.326, pa 1.148, pkb 8.411, nw 1400.667, run 1.287, total 1412.677 stdout keybindings 11.5s image 13.7sStartup timings: m 0.027, var 0.667, suo 0.405, pa 1.342, pkb 8.201, nw 1422.054, run 1.381, total 1434.077 stdout keybindings 11.7s image 13.7sStartup timings: m 0.028, var 1.116, suo 0.342, pa 1.188, pkb 8.818, nw 1517.689, run 1.247, total 1530.428 stdout keybindings 11.5s image 13.6smain:thrm:img (0.01 : 0.10 : 0.88) scale 1 fps 23.4 read 0.01 rot 4.54 : [0.34 | 2.30 | 20.21] + 4.57 29.16 4.38 BOTH HUD : h 0.00 v 13.68main:thrm:img (0.01 : 0.21 : 0.78) scale 1 fps 21.4 read 0.01 rot 6.10 : [0.36 | 9.34 | 34.07] + 9.57 55.42 11.78 BOTH OFF : h 0.01 v 25.88main:thrm:img (0.01 : 0.30 : 0.69) scale 1 fps 22.4 read 0.01 rot 4.14 : [0.16 | 6.66 | 15.48] + 6.23 28.62 6.91 BOTH OFF : h 0.00 v 10.23main:thrm:img (0.01 : 0.31 : 0.68) scale 1 fps 22.8 read 0.01 rot 4.14 : [0.15 | 7.02 | 15.46] + 6.17 28.74 7.10 BOTH OFF : h 0.00 v 10.20main:thrm:img (0.01 : 0.30 : 0.69) scale 1 fps 23.0 read 0.01 rot 4.05 : [0.15 | 6.72 | 15.47] + 6.20 28.74 7.07 BOTH OFF : h 0.00 v 10.28main:thrm:img (0.01 : 0.31 : 0.69) scale 1 fps 23.1 read 0.01 rot 4.19 : [0.15 | 7.00 | 15.70] + 6.16 28.92 7.05 BOTH OFF : h 0.00 v 10.39main:thrm:img (0.01 : 0.31 : 0.69) scale 1 fps 23.2 read 0.01 rot 4.12 : [0.15 | 6.87 | 15.50] + 6.26 28.73 6.97 BOTH OFF : h 0.00 v 10.24main:thrm:img (0.01 : 0.31 : 0.68) scale 1 fps 23.2 read 0.01 rot 4.11 : [0.16 | 7.00 | 15.49] + 6.29 29.02 7.24 BOTH OFF : h 0.00 v 10.26main:thrm:img (0.01 : 0.30 : 0.70) scale 1 fps 23.2 read 0.01 rot 4.13 : [0.16 | 6.54 | 15.31] + 6.16 28.57 7.11 BOTH OFF : h 0.00 v 10.07main:thrm:img (0.01 : 0.20 : 0.80) scale 1 fps 22.9 read 0.01 rot 3.68 : [0.14 | 5.11 | 20.58] + 6.01 33.67 7.08 BOTH OFF : h 0.00 v 15.78main:thrm:img (0.01 : 0.19 : 0.81) scale 1 fps 22.5 read 0.01 rot 3.65 : [0.15 | 5.09 | 21.69] + 5.96 34.84 7.19 BOTH OFF : h 0.00 v 16.96main:thrm:img (0.01 : 0.19 : 0.81) scale 1 fps 22.2 read 0.01 rot 3.65 : [0.14 | 5.04 | 21.57] + 5.94 34.72 7.21 BOTH OFF : h 0.00 v 16.83main:thrm:img (0.01 : 0.19 : 0.81) scale 1 fps 21.9 read 0.01 rot 3.63 : [0.15 | 5.06 | 21.66] + 5.91 35.01 7.44 BOTH OFF : h 0.00 v 16.95main:thrm:img (0.00 : 0.26 : 0.74) scale 1 fps 21.9 read 0.01 rot 3.65 : [0.04 | 5.46 | 15.78] + 5.92 28.64 6.93 ONE_TEMP OFF : h 0.00 v 10.55main:thrm:img (0.00 : 0.30 : 0.70) scale 1 fps 23.5 read 0.01 rot 4.42 : [0.09 | 7.06 | 16.68] + 7.06 31.63 7.90 ONE_TEMP OFF : h 0.00 v 10.71main:thrm:img (0.00 : 0.33 : 0.67) scale 1 fps 23.8 read 0.01 rot 4.02 : [0.03 | 6.72 | 13.80] + 6.33 27.32 7.19 ONE_TEMP OFF : h 0.00 v 8.60main:thrm:img (0.00 : 0.32 : 0.68) scale 1 fps 23.9 read 0.01 rot 4.07 : [0.02 | 6.44 | 13.74] + 6.30 27.18 7.14 ONE_TEMP OFF : h 0.00 v 8.50main:thrm:img (0.00 : 0.31 : 0.69) scale 1 fps 24.0 read 0.01 rot 3.98 : [0.02 | 6.23 | 13.62] + 6.25 27.10 7.23 ONE_TEMP OFF : h 0.00 v 8.48main:thrm:img (0.00 : 0.32 : 0.67) scale 1 fps 24.0 read 0.01 rot 4.05 : [0.02 | 6.64 | 13.82] + 6.43 27.37 7.13 ONE_TEMP OFF : h 0.00 v 8.57main:thrm:img (0.00 : 0.28 : 0.72) scale 1 fps 23.8 read 0.01 rot 3.70 : [0.02 | 5.59 | 14.63] + 5.96 27.56 6.97 ONE_TEMP OFF : h 0.00 v 9.83main:thrm:img (0.00 : 0.26 : 0.74) scale 1 fps 23.6 read 0.01 rot 3.66 : [0.02 | 5.17 | 14.92] + 5.95 27.79 6.92 ONE_TEMP OFF : h 0.00 v 10.18main:thrm:img (0.00 : 0.26 : 0.74) scale 1 fps 23.4 read 0.01 rot 3.65 : [0.02 | 5.18 | 14.89] + 5.91 27.71 6.90 ONE_TEMP OFF : h 0.00 v 10.17Online -scale 1Startup timings: m 0.065, var 0.568, suo 7.085, pa 367.689, pkb 9.064, nw 1539.779, run 1.384, total 1925.634Startup timings: m 0.027, var 0.842, suo 0.274, pa 277.592, pkb 4.654, nw 1654.386, run 1.602, total 1939.377 stdout keybindings 12.0s image 14.9sStartup timings: m 0.028, var 0.836, suo 0.335, pa 269.684, pkb 12.028, nw 1573.312, run 1.387, total 1857.610 stdout keybindings 12.3s image 15.1sStartup timings: m 0.026, var 0.617, suo 0.294, pa 276.846, pkb 4.553, nw 1580.950, run 1.593, total 1864.879 stdout keybindings 12.1s image 14.8smain:thrm:img (0.01 : 0.37 : 0.62) scale 1 fps 16.6 read 4.34 rot 7.44 : [1.33 | 38.15 | 64.96] + 5.77 87.38 16.65 OFF NO_DRAWINGS : h 0.00 v 7.66main:thrm:img (0.00 : 0.40 : 0.60) scale 1 fps 15.3 read 2.05 rot 4.75 : [0.03 | 26.32 | 39.40] + 3.68 54.84 11.76 OFF NO_DRAWINGS : h 0.00 v 0.00main:thrm:img (0.00 : 0.40 : 0.60) scale 1 fps 14.8 read 2.22 rot 4.58 : [0.03 | 27.25 | 40.45] + 3.59 56.61 12.58 OFF NO_DRAWINGS : h 0.00 v 0.00main:thrm:img (0.01 : 0.36 : 0.63) scale 1 fps 14.4 read 3.57 rot 8.37 : [1.78 | 46.01 | 81.64] + 6.57 107.97 19.75 CROSS_HAIR HUD : h 0.00 v 12.85main:thrm:img (0.03 : 0.33 : 0.64) scale 1 fps 14.3 read 1.72 rot 4.24 : [2.29 | 24.50 | 48.57] + 3.39 62.17 10.21 BOTH HUD : h 0.00 v 13.19main:thrm:img (0.00 : 0.33 : 0.66) scale 1 fps 14.5 read 1.74 rot 4.32 : [0.20 | 22.58 | 44.91] + 3.37 57.53 9.25 CROSS_HAIR OFF : h 0.00 v 10.62main:thrm:img (0.00 : 0.37 : 0.63) scale 1 fps 16.8 read 2.50 rot 6.67 : [0.22 | 33.14 | 57.36] + 5.22 76.73 14.15 ONE_TEMP NO_DRAWINGS : h 0.00 v 6.43main:thrm:img (0.00 : 0.39 : 0.61) scale 1 fps 16.8 read 1.64 rot 4.40 : [0.03 | 21.56 | 33.21] + 3.40 45.55 8.94 ONE_TEMP NO_DRAWINGS : h 0.00 v 0.00thermalDataThread(4363) - exitingimageDataThread(3942) - exitingmain:thrm:img (0.02 : 0.36 : 0.62) scale 1 fps 13.1 read 3.23 rot 4.30 : [1.66 | 27.27 | 47.63] + 3.43 61.38 10.33 ONE_TEMP HUD : h 0.00 v 12.54main:thrm:img (0.02 : 0.36 : 0.62) scale 1 fps 13.9 read 1.82 rot 4.35 : [1.73 | 27.61 | 48.39] + 3.46 61.57 9.72 ONE_TEMP HUD : h 0.00 v 12.44main:thrm:img (0.02 : 0.35 : 0.63) scale 1 fps 14.2 read 1.81 rot 4.27 : [1.59 | 27.24 | 48.18] + 3.43 61.20 9.58 ONE_TEMP HUD : h 0.00 v 12.60main:thrm:img (0.02 : 0.35 : 0.63) scale 1 fps 14.3 read 1.79 rot 4.33 : [1.35 | 27.22 | 48.84] + 3.44 61.85 9.56 ONE_TEMP HUD : h 0.00 v 12.86main:thrm:img (0.02 : 0.35 : 0.62) scale 1 fps 14.3 read 1.81 rot 4.30 : [1.81 | 27.14 | 48.14] + 3.41 61.28 9.73 ONE_TEMP HUD : h 0.00 v 12.70main:thrm:img (0.02 : 0.35 : 0.63) scale 1 fps 14.3 read 1.71 rot 4.19 : [1.55 | 26.12 | 46.19] + 3.32 59.76 10.25 ONE_TEMP HUD : h 0.01 v 12.66main:thrm:img (0.02 : 0.36 : 0.62) scale 1 fps 14.2 read 1.65 rot 4.12 : [1.46 | 25.54 | 44.65] + 3.26 58.62 10.71 ONE_TEMP HUD : h 0.00 v 12.28main:thrm:img (0.00 : 0.34 : 0.66) scale 1 fps 11.4 read 3.66 rot 9.48 : [0.52 | 60.56 | 117.14] + 10.73 145.05 17.18 ONE_TEMP OFF : h 0.01 v 22.20main:thrm:img (0.00 : 0.33 : 0.67) scale 1 fps 11.5 read 1.78 rot 4.94 : [0.03 | 32.77 | 68.02] + 6.77 81.57 6.77 ONE_TEMP OFF : h 0.00 v 11.72main:thrm:img (0.00 : 0.32 : 0.68) scale 1 fps 11.5 read 1.73 rot 4.80 : [0.04 | 32.03 | 67.87] + 6.86 81.74 7.01 ONE_TEMP OFF : h 0.00 v 11.67main:thrm:img (0.00 : 0.31 : 0.69) scale 1 fps 11.1 read 1.63 rot 5.18 : [0.03 | 30.02 | 65.95] + 6.37 81.38 9.06 ONE_TEMP OFF : h 0.00 v 12.01main:thrm:img (0.00 : 0.30 : 0.70) scale 1 fps 10.8 read 1.67 rot 5.30 : [0.03 | 28.70 | 66.34] + 6.40 81.73 8.98 ONE_TEMP OFF : h 0.00 v 12.41thermalDataThread(4363) - exitingimageDataThread(3942) - exiting

author: Amish Technician
author_rank: Contributor
timestamp: January 15, 2024, 01:56:42 am
content: Quote from: G28 on January 12, 2024, 10:06:04 pmThis is true and a fair point, I was more thinking of a users first impression of the user experience because it causes the live image to stutter.Quote from: G28 on January 12, 2024, 10:06:04 pmI haven't noted any reduction in performance compared to older versions no. I was drawing a comparison to other Pi models with better CPUs, they felt smoother while reporting similar fps, eg RPi zero offline 1x double dragging rulers at ~22fps vs doing the same on RPi 2/3 at a higher scale with the same or even slightly lower fps. I wonder if this is due to them having 4 CPU cores instead of 1.

author: G28
author_rank: Regular Contributor
timestamp: January 15, 2024, 03:22:41 am
content: The FAST_DRAG mods only apply to ruler plots. The improvements in the single thread rendering of single temps warrant refactoring the other parts of the code for the single threaded hardware.I can make a conditionally compiled hybrid jump/drag scroll version, but don't know if it will confuse users why drag works in one mode and not the other. Guess that is what documentation is for.The startup stats are in milliseconds. Getting to PKB is taking less than [10-20] milliseconds, so I have to attribute the majority of the 11-12 seconds to loading off the SD card and the app initializing global variables (e.g. additional colormaps) before calling main(). I can add a flush to stdout after the prints to see if they appear sooner, but I don't think I can do anything about the SD load speeds. Maybe the Pi needs a ramdisk to load apps from.

author: 5U4GB
author_rank: Super Contributor
timestamp: January 15, 2024, 01:39:39 pm
content: Finally got a bit of time to play with it on an ODroid. Some notes, and I'll provide longish dumps so others can see the expected output...You need both the OpenCV dev tools and the V4L utilities to run it, and for the build CFLAGS using -march=native would be a lot easier than having to set device-specific options, so "CFLAGS='-march=native -pipe -fomit-frame-pointer'" is a one-size-fits-all entry:Code:# This will install ~500MB of gunksudo apt-get install libopencv-dev./build_reduxsudo apt-get install v4l-utilsWhen you plug in the camera it'll turn up as a generic USB camera:Code:> lsusbBus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. USB3.1 HubBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub-> Bus 001 Device 004: ID 0bda:5830 Realtek Semiconductor Corp. USB CameraBus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubOn the ODroid it required a reboot to set up the drivers, with just hotplug I got:Code:[3873017.213567] usb 1-1.1: new high-speed USB device number 4 using xhci-hcd[3873017.485976] usb 1-1.1: New USB device found, idVendor=0bda, idProduct=5830[3873017.485980] usb 1-1.1: New USB device strings: Mfr=3, Product=1, SerialNumber=2[3873017.485982] usb 1-1.1: Product: USB Camera[3873017.485984] usb 1-1.1: Manufacturer: Generic[3873017.485986] usb 1-1.1: SerialNumber: 200901010001[3873017.522882] usb 1-1.1: Unsupported device[3873017.522983] usb 1-1.1: Unsupported deviceWith a reboot I got:Code:[ 7.366970] usb 1-1.1: new high-speed USB device number 3 using xhci-hcd[ 7.639681] usb 1-1.1: New USB device found, idVendor=0bda, idProduct=5830[ 7.641078] usb 1-1.1: New USB device strings: Mfr=3, Product=1, SerialNumber=2[ 7.648574] usb 1-1.1: Product: USB Camera[ 7.652796] usb 1-1.1: Manufacturer: Generic[ 7.657213] usb 1-1.1: SerialNumber: 200901010001[ 7.706387] usb 1-1.1: Unsupported device[ 7.706478] usb 1-1.1: Unsupported device[ 10.330514] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5830)[ 10.345930] uvcvideo 1-1.1:1.0: Entity type for entity Extension 4 was not initialized![ 10.345938] uvcvideo 1-1.1:1.0: Entity type for entity Processing 2 was not initialized![ 10.345941] uvcvideo 1-1.1:1.0: Entity type for entity Camera 1 was not initialized![ 10.346181] input: USB Camera as /devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/input/input1[ 10.350606] usbcore: registered new interface driver uvcvideo[ 10.350612] USB Video Class driver (1.1.1)Be aware of the fact that the ODroid firmware image installs a bunch of default loopback video devices so if you see:Code:0 video100 video130 video140 video150 video160 video170 video180 video190 video200 video210 video23then the camera isn't being picked up, it should be video device 0.Code:> udevadm info --a --name /dev/video0[...]looking at device '/devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/video4linux/video0':KERNEL=="video0"SUBSYSTEM=="video4linux"DRIVER==""ATTR{dev_debug}=="0"ATTR{index}=="0"ATTR{name}=="USB Camera"ATTR{power/control}=="auto"ATTR{power/runtime_active_time}=="0"ATTR{power/runtime_status}=="unsupported"ATTR{power/runtime_suspended_time}=="0"[...]looking at parent device '/devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1':KERNELS=="1-1.1"SUBSYSTEMS=="usb"DRIVERS=="usb"ATTRS{authorized}=="1"ATTRS{avoid_reset_quirk}=="0"ATTRS{bConfigurationValue}=="1"ATTRS{bDeviceClass}=="ef"ATTRS{bDeviceProtocol}=="01"ATTRS{bDeviceSubClass}=="02"ATTRS{bMaxPacketSize0}=="64"ATTRS{bMaxPower}=="500mA"ATTRS{bNumConfigurations}=="1"ATTRS{bNumInterfaces}==" 2"ATTRS{bcdDevice}=="1101"ATTRS{bmAttributes}=="80"ATTRS{busnum}=="1"ATTRS{configuration}=="USB Camera"ATTRS{devnum}=="3"ATTRS{devpath}=="1.1"ATTRS{idProduct}=="5830"ATTRS{idVendor}=="0bda"ATTRS{ltm_capable}=="no"ATTRS{manufacturer}=="Generic"ATTRS{maxchild}=="0"ATTRS{power/active_duration}=="287456"ATTRS{power/autosuspend}=="2"ATTRS{power/autosuspend_delay_ms}=="2000"ATTRS{power/connected_duration}=="287456"ATTRS{power/control}=="auto"ATTRS{power/level}=="auto"ATTRS{power/persist}=="1"ATTRS{power/runtime_active_time}=="287212"ATTRS{power/runtime_status}=="active"ATTRS{power/runtime_suspended_time}=="0"ATTRS{product}=="USB Camera"ATTRS{quirks}=="0x0"ATTRS{removable}=="unknown"ATTRS{serial}=="200901010001"ATTRS{speed}=="480"ATTRS{urbnum}=="70"ATTRS{version}==" 2.00"[...]I assume that serial number will be the same across all cameras, is anyone seeing a different value there?For the video details:Code:> sudo v4l2-ctl --all --device /dev/video0Driver Info:Driver name : uvcvideoCard type : USB CameraBus info : usb-xhci-hcd.0.auto-1.1Driver version : 4.9.255Capabilities : 0x84200001Video CaptureStreamingExtended Pix FormatDevice CapabilitiesDevice Caps : 0x04200001Video CaptureStreamingExtended Pix FormatMedia Driver Info:Driver name : uvcvideoModel : USB CameraSerial : 200901010001Bus info : usb-xhci-hcd.0.auto-1.1Media version : 0.1.0Hardware revision: 0x00001101 (4353)Driver version : 4.9.255Interface Info:ID : 0x03000002Type : V4L VideoEntity Info:ID : 0x00000001 (1)Name : USB CameraFunction : V4L2 I/OPad 0x01000004 : SinkLink 0x0200000d: from remote pad 0x1000007 of entity 'Extension 4' (Unknown V4L2 Sub-Device): Data, Enabled, ImmutablePriority: 2Video input : 0 (Camera 1: ok)Format Video Capture:Width/Height : 256/192Pixel Format : 'YUYV' (YUYV 4:2:2)Field : NoneBytes per Line : 512Size Image : 98304Colorspace : sRGBTransfer Function : Default (maps to sRGB)YCbCr/HSV Encoding: Default (maps to ITU-R 601)Quantization : Default (maps to Limited Range)Flags :Crop Capability Video Capture:Bounds : Left 0, Top 0, Width 256, Height 192Default : Left 0, Top 0, Width 256, Height 192Pixel Aspect: 1/1Selection Video Capture: crop_default, Left 0, Top 0, Width 256, Height 192, Flags:Selection Video Capture: crop_bounds, Left 0, Top 0, Width 256, Height 192, Flags:Streaming Parameters Video Capture:Capabilities : timeperframeFrames per second: 25.000 (25/1)Read buffers : 0brightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=0contrast 0x00980901 (int) : min=0 max=100 step=1 default=50 value=50saturation 0x00980902 (int) : min=0 max=100 step=1 default=64 value=64hue 0x00980903 (int) : min=-180 max=180 step=1 default=0 value=0white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1gamma 0x00980910 (int) : min=100 max=500 step=1 default=300 value=300power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=1 (50 Hz)0: Disabled1: 50 Hz2: 60 Hzwhite_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=10 default=4600 value=4600 flags=inactivesharpness 0x0098091b (int) : min=0 max=100 step=1 default=50 value=50backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=0 value=0exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=3 (Aperture Priority Mode)1: Manual Mode3: Aperture Priority Modeexposure_absolute 0x009a0902 (int) : min=50 max=10000 step=1 default=166 value=166 flags=inactiveexposure_auto_priority 0x009a0903 (bool) : default=0 value=1Now I'm stuck in a maze of X11 plumbing to try and get it to display output via SSH-forwarded X11... would it be possible to add a -b batch-mode flag to just grab a frame of video and dump it to disk?Another bit of feedback, it's annoyingly chatty which means I keep having to scroll back through all the output to find the bit I want, it'd be good to have the credits and usage only displayed in response to '--help' so you can see the useful output at a glance.

author: Amish Technician
author_rank: Contributor
timestamp: January 15, 2024, 04:15:16 pm
content: Quote from: 5U4GB on January 15, 2024, 01:39:39 pmAgreed. I used device specific options so I could cross compile code optimised for slower RPis on a faster RPi, however for the purposes of sharing on github I think your suggestion makes a lot more sense as most people will compile on the device it will run on.Quote from: 5U4GB on January 15, 2024, 01:39:39 pmGood idea, how about verbose mode option '-v --verbose'and a help option '-? -h --help'

author: G28
author_rank: Regular Contributor
timestamp: January 15, 2024, 04:22:18 pm
content: Quote from: 5U4GB on January 15, 2024, 01:39:39 pmThanks for the update.My TC001's serial number is the same as yours.Added a "-quiet" flag to quiet STDOUT prints and stat logging prints.Added a "-help" flag to print and exit.Will add "-snapshot prefix" and "-record prefix" 'batch' features to the TODO list.Will investigate the camera open error. I disabled it via the "-quiet" flag during the interim.

author: G28
author_rank: Regular Contributor
timestamp: January 15, 2024, 04:27:07 pm
content: Quote from: Amish Technician on January 15, 2024, 04:15:16 pmI will move stat logging over to "-verbose" or "-stat" once we get the single threaded platform optimizations finalized.

author: G28
author_rank: Regular Contributor
timestamp: January 15, 2024, 06:10:23 pm
content: Requested feature:"-snapshot " and exit has been added to the pre-release.If the optional prefix isn't added, it uses the default timestamp naming convention for the .png and .raw files. can consist of alpha-numeric characters, underscores and hyphens as long as it does NOT start with a hyphen to differentiate it from a command line -flag.

author: Amish Technician
author_rank: Contributor
timestamp: January 16, 2024, 12:34:24 am
content: The banding/shimmering issue isn't caused by redux, I've checked with all my RPi's opening the TC001 as a capture device in VLC:RPi Zero GoodRPi Zero2 MinimalRPi2v1.1 BadRPi2v1.2 MinimalRPi3v1.2 BadRPi4 GoodRPi5 GoodI'll look into this further to try and understand what causes it/how to mitigate it.The test version DRAW_SINGLE_THREAD has yeild a further improvment in FPS for the single threaded RPi zero. Props G28 for the significant improvements since I first tested on the RPi zero and it struggled to get above single digit FPS.RPi Zero v1.3 - No DragOnline -scale 1x1 18.9fps no hud (was 17.1)x1 15.3fps default hud (was 14.0)x1 16.4fps single temperature point with status hud disabled (was 14.9 )x1 15.1fps both rulers with status hud disabled (was 14.0 )x1 double 9.7fps both rulers with status hud enabled (was 9.7 )x1 double 12.9fps no hud (was 11.8 )Code:-DNO_DRAG=1 -DFAST_DRAG=1 -DDRAW_SINGLE_THREAD=1Startup timings: s 14.712, var 0.523, suo 7.021, pa 273.823, pkb 8.210, nw 1393.966, run 0.516, total 1698.771main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.6 read 4.32 rot 8.03 : [90.09 | 22.04 | 67.69] + 5.87 96.07 0.10 ONE_TEMP HUD : h 0.00 v 21.33main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 15.6 read 1.58 rot 4.28 : [47.32 | 11.66 | 35.47] + 3.15 50.51 0.05 ONE_TEMP HUD : h 0.00 v 10.76main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 15.6 read 1.57 rot 4.26 : [47.90 | 11.78 | 35.94] + 3.15 51.10 0.04 ONE_TEMP HUD : h 0.00 v 11.10main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.6 read 1.58 rot 4.25 : [47.68 | 11.67 | 35.82] + 3.17 50.90 0.04 ONE_TEMP HUD : h 0.00 v 11.09main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.6 read 1.52 rot 4.27 : [48.06 | 11.71 | 36.15] + 3.21 51.31 0.04 ONE_TEMP HUD : h 0.00 v 11.40main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 15.5 read 1.53 rot 4.23 : [48.22 | 11.82 | 36.19] + 3.19 51.45 0.04 ONE_TEMP HUD : h 0.00 v 11.41main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 15.5 read 1.55 rot 4.30 : [47.76 | 11.73 | 35.84] + 3.22 51.03 0.05 ONE_TEMP HUD : h 0.00 v 11.09Startup timings: s 1.845, var 0.526, suo 0.312, pa 271.071, pkb 4.054, nw 1496.493, run 0.524, total 1774.825main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 15.5 read 4.69 rot 8.75 : [104.83 | 26.23 | 78.16] + 7.04 111.96 0.10 OFF HUD : h 0.00 v 24.54main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 15.4 read 1.56 rot 4.24 : [49.07 | 12.17 | 36.71] + 3.21 52.33 0.04 OFF HUD : h 0.00 v 11.62main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 15.3 read 1.56 rot 4.22 : [49.13 | 12.08 | 36.86] + 3.17 52.34 0.04 OFF HUD : h 0.00 v 11.82main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.3 read 1.54 rot 4.31 : [49.32 | 12.07 | 37.07] + 3.18 52.57 0.07 OFF HUD : h 0.00 v 11.93main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.3 read 1.56 rot 4.29 : [49.57 | 12.05 | 37.33] + 3.15 52.77 0.05 OFF HUD : h 0.00 v 12.24Startup timings: s 1.793, var 0.685, suo 0.326, pa 273.368, pkb 4.283, nw 1496.998, run 0.521, total 1777.974main:thrm:img (1.00 : 0.31 : 0.69) scale 1 fps 18.9 read 3.42 rot 5.77 : [49.47 | 15.35 | 33.99] + 4.17 53.70 0.06 OFF ONLY_VIDEO : h 0.00 v 3.21main:thrm:img (1.00 : 0.34 : 0.66) scale 1 fps 18.9 read 1.57 rot 4.69 : [36.29 | 12.16 | 24.08] + 3.26 39.59 0.04 OFF ONLY_VIDEO : h 0.00 v 0.00main:thrm:img (1.00 : 0.33 : 0.67) scale 1 fps 18.9 read 1.56 rot 4.69 : [36.47 | 12.16 | 24.26] + 3.26 39.78 0.05 OFF ONLY_VIDEO : h 0.00 v 0.00main:thrm:img (1.00 : 0.33 : 0.67) scale 1 fps 18.9 read 1.61 rot 4.57 : [35.78 | 11.88 | 23.85] + 3.26 39.08 0.04 OFF ONLY_VIDEO : h 0.00 v 0.00main:thrm:img (1.00 : 0.28 : 0.72) scale 1 fps 16.5 read 2.49 rot 6.92 : [67.44 | 18.93 | 48.38] + 5.15 72.66 0.07 OFF OFF : h 0.00 v 10.19main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.4 read 1.53 rot 4.28 : [44.54 | 11.82 | 32.67] + 3.22 47.81 0.04 OFF OFF : h 0.00 v 8.57main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.4 read 1.50 rot 4.40 : [44.67 | 11.93 | 32.69] + 3.26 47.98 0.05 OFF OFF : h 0.00 v 8.32main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.4 read 1.53 rot 4.35 : [44.64 | 11.90 | 32.69] + 3.26 47.94 0.04 OFF OFF : h 0.00 v 8.49main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.4 read 1.60 rot 4.32 : [44.75 | 11.95 | 32.75] + 3.25 48.05 0.05 OFF OFF : h 0.00 v 8.48main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.1 read 2.01 rot 5.66 : [65.52 | 15.95 | 49.35] + 4.30 69.89 0.06 BOTH OFF : h 0.00 v 17.21main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.1 read 1.51 rot 4.19 : [49.69 | 12.04 | 37.47] + 3.17 52.95 0.09 BOTH OFF : h 0.00 v 13.49main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.1 read 1.54 rot 4.26 : [50.18 | 12.12 | 37.88] + 3.24 53.47 0.04 BOTH OFF : h 0.00 v 13.69main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 15.1 read 1.54 rot 4.17 : [49.70 | 12.04 | 37.47] + 3.19 52.93 0.04 BOTH OFF : h 0.00 v 13.51main:thrm:img (1.00 : 0.22 : 0.77) scale 1 fps 9.8 read 2.16 rot 6.29 : [100.82 | 21.81 | 78.08] + 7.39 108.28 0.06 BOTH HUD : h 0.00 v 30.83main:thrm:img (1.00 : 0.21 : 0.78) scale 1 fps 9.7 read 1.54 rot 4.49 : [79.32 | 16.89 | 61.75] + 6.00 85.36 0.04 BOTH HUD : h 0.00 v 25.15main:thrm:img (1.00 : 0.22 : 0.77) scale 1 fps 9.7 read 1.62 rot 4.23 : [79.50 | 17.14 | 61.57] + 6.02 85.57 0.04 BOTH HUD : h 0.00 v 25.26main:thrm:img (1.00 : 0.29 : 0.70) scale 1 fps 12.9 read 1.80 rot 5.67 : [69.75 | 19.94 | 48.95] + 7.49 77.30 0.07 BOTH ONLY_VIDEO : h 0.00 v 5.84main:thrm:img (1.00 : 0.32 : 0.67) scale 1 fps 12.9 read 1.52 rot 4.43 : [52.95 | 16.80 | 35.48] + 6.30 59.30 0.06 BOTH ONLY_VIDEO : h 0.00 v 0.00main:thrm:img (1.00 : 0.32 : 0.67) scale 1 fps 12.9 read 1.54 rot 4.76 : [53.01 | 16.79 | 35.69] + 6.26 59.32 0.05 BOTH ONLY_VIDEO : h 0.00 v 0.00main:thrm:img (1.00 : 0.33 : 0.66) scale 1 fps 12.9 read 1.53 rot 4.22 : [53.15 | 17.35 | 35.22] + 6.23 59.42 0.04 BOTH ONLY_VIDEO : h 0.00 v 0.00main:thrm:img (1.00 : 0.29 : 0.71) scale 1 fps 15.9 read 2.83 rot 7.95 : [90.41 | 26.07 | 63.84] + 8.23 98.73 0.09 ONE_TEMP OFF : h 0.00 v 9.87main:thrm:img (1.00 : 0.26 : 0.74) scale 1 fps 16.0 read 1.53 rot 4.34 : [45.67 | 11.87 | 33.75] + 3.20 48.92 0.04 ONE_TEMP OFF : h 0.00 v 8.92main:thrm:img (1.00 : 0.26 : 0.74) scale 1 fps 16.0 read 1.52 rot 4.36 : [45.89 | 11.89 | 33.95] + 3.27 49.20 0.05 ONE_TEMP OFF : h 0.00 v 8.99main:thrm:img (1.00 : 0.26 : 0.74) scale 1 fps 16.0 read 1.56 rot 4.44 : [45.85 | 11.94 | 33.85] + 3.24 49.13 0.04 ONE_TEMP OFF : h 0.00 v 8.98main:thrm:img (1.00 : 0.26 : 0.74) scale 1 fps 16.0 read 1.55 rot 4.37 : [45.76 | 11.88 | 33.82] + 3.22 49.02 0.04 ONE_TEMP OFF : h 0.00 v 8.84RPi Zero v1.3 - Fast drag draw single threadOfflinex2 21.0fps dragging both rulers around with status hud disabled (was 19.5 )x1 double 24.3fps dragging single temperature point around with status hud disabled (was 24.0, 23.3 )x1 double 23.8fps dragging both rulers around with status hud disabled (was 23.2, 22.2 )Online -scale 1x1 16.0fps dragging single temperature point around with status hud enabled (was 14.3, 13.9 )x1 double 11.7fps dragging single temperature point around with status hud disabled (was 11.5, 10.9 )x1 16.9fps dragging single temperature point around with status hud disabledCode:-DNO_DRAG=0 -DFAST_DRAG=1 -DDRAW_SINGLE_THREAD=1Startup timings: s 15.435, var 0.518, suo 7.039, pa 1.257, pkb 8.521, nw 1395.784, run 0.512, total 1429.066main:thrm:img (1.00 : 0.10 : 0.89) scale 2 fps 12.3 read 0.01 rot 5.38 : [65.15 | 6.64 | 57.95] + 35.28 100.52 0.09 BOTH OFF : h 0.00 v 31.92main:thrm:img (1.00 : 0.12 : 0.87) scale 2 fps 12.6 read 0.00 rot 4.32 : [37.41 | 4.58 | 32.55] + 26.84 64.30 0.04 BOTH OFF : h 0.00 v 17.00main:thrm:img (1.00 : 0.12 : 0.87) scale 2 fps 12.5 read 0.00 rot 4.06 : [38.33 | 4.67 | 33.41] + 26.79 65.16 0.03 BOTH OFF : h 0.00 v 17.83main:thrm:img (1.00 : 0.11 : 0.89) scale 2 fps 12.1 read 0.00 rot 3.97 : [41.24 | 4.42 | 36.62] + 28.45 69.72 0.03 BOTH OFF : h 0.00 v 18.94main:thrm:img (1.00 : 0.12 : 0.88) scale 2 fps 12.1 read 0.00 rot 4.28 : [38.47 | 4.45 | 33.82] + 27.19 65.71 0.06 BOTH OFF : h 0.00 v 17.68main:thrm:img (1.00 : 0.11 : 0.88) scale 2 fps 12.1 read 0.00 rot 3.92 : [39.23 | 4.50 | 34.48] + 27.45 66.72 0.03 BOTH OFF : h 0.00 v 18.06main:thrm:img (1.00 : 0.06 : 0.94) scale 2 fps 11.3 read 0.00 rot 3.55 : [71.34 | 4.21 | 66.94] + 21.98 93.36 0.03 BOTH OFF : h 0.00 v 46.18main:thrm:img (1.00 : 0.06 : 0.94) scale 2 fps 10.7 read 0.00 rot 3.54 : [72.34 | 4.23 | 67.91] + 21.93 94.32 0.05 BOTH OFF : h 0.00 v 46.83main:thrm:img (1.00 : 0.06 : 0.94) scale 2 fps 10.3 read 0.01 rot 3.56 : [72.80 | 4.07 | 68.54] + 21.78 94.61 0.03 BOTH OFF : h 0.00 v 47.62main:thrm:img (1.00 : 0.06 : 0.94) scale 2 fps 10.0 read 0.01 rot 3.59 : [73.97 | 4.17 | 69.59] + 21.50 95.50 0.03 BOTH OFF : h 0.00 v 48.56main:thrm:img (1.00 : 0.06 : 0.94) scale 1 fps 9.7 read 0.00 rot 3.58 : [73.75 | 4.09 | 69.47] + 21.43 95.21 0.03 BOTH OFF : h 0.00 v 48.40main:thrm:img (1.00 : 0.06 : 0.93) scale 2 fps 20.8 read 0.01 rot 5.42 : [38.58 | 2.19 | 36.07] + 15.72 54.35 0.05 BOTH OFF : h 0.00 v 22.75main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 21.1 read 0.01 rot 3.98 : [21.51 | 0.47 | 20.81] + 12.14 33.69 0.04 BOTH OFF : h 0.00 v 11.89main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 20.8 read 0.00 rot 3.82 : [21.93 | 0.47 | 21.25] + 12.26 34.22 0.04 BOTH OFF : h 0.00 v 12.63main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 21.0 read 0.00 rot 3.97 : [21.50 | 0.47 | 20.84] + 12.18 33.71 0.04 BOTH OFF : h 0.00 v 12.17main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 21.1 read 0.01 rot 4.02 : [21.45 | 0.49 | 20.76] + 12.09 33.57 0.03 BOTH OFF : h 0.00 v 11.91main:thrm:img (1.00 : 0.07 : 0.93) scale 1 fps 20.6 read 0.00 rot 3.72 : [27.90 | 1.86 | 25.83] + 9.22 37.15 0.03 BOTH OFF : h 0.00 v 18.48main:thrm:img (1.00 : 0.21 : 0.79) scale 1 fps 24.3 read 0.01 rot 4.77 : [26.54 | 5.59 | 20.87] + 7.28 33.86 0.05 ONE_TEMP OFF : h 0.00 v 13.09main:thrm:img (1.00 : 0.22 : 0.78) scale 1 fps 24.3 read 0.01 rot 4.09 : [20.82 | 4.52 | 16.22] + 6.03 26.89 0.04 ONE_TEMP OFF : h 0.00 v 9.90main:thrm:img (1.00 : 0.23 : 0.77) scale 1 fps 24.3 read 0.01 rot 3.86 : [20.57 | 4.66 | 15.86] + 5.91 26.52 0.04 ONE_TEMP OFF : h 0.00 v 9.74main:thrm:img (1.00 : 0.19 : 0.80) scale 1 fps 23.5 read 0.01 rot 6.67 : [40.96 | 7.85 | 32.88] + 10.30 51.32 0.06 BOTH OFF : h 0.00 v 21.74main:thrm:img (1.00 : 0.20 : 0.79) scale 1 fps 23.7 read 0.01 rot 4.02 : [22.24 | 4.56 | 17.52] + 6.04 28.32 0.04 BOTH OFF : h 0.00 v 11.28main:thrm:img (1.00 : 0.20 : 0.79) scale 1 fps 23.8 read 0.01 rot 4.06 : [22.19 | 4.44 | 17.58] + 5.98 28.21 0.04 BOTH OFF : h 0.00 v 11.36main:thrm:img (1.00 : 0.20 : 0.80) scale 1 fps 23.8 read 0.01 rot 4.02 : [22.49 | 4.43 | 17.90] + 5.99 28.51 0.04 BOTH OFF : h 0.00 v 11.57main:thrm:img (1.00 : 0.20 : 0.79) scale 1 fps 23.8 read 0.01 rot 4.08 : [22.13 | 4.46 | 17.48] + 5.95 28.12 0.04 BOTH OFF : h 0.00 v 11.33Startup timings: s 1.774, var 0.600, suo 0.366, pa 369.657, pkb 0.673, nw 1433.173, run 0.551, total 1806.794main:thrm:img (1.00 : 0.25 : 0.74) scale 1 fps 16.1 read 4.09 rot 6.85 : [81.10 | 20.52 | 60.22] + 5.20 86.38 0.08 ONE_TEMP HUD : h 0.00 v 18.15main:thrm:img (1.00 : 0.25 : 0.74) scale 1 fps 16.0 read 1.74 rot 4.38 : [51.74 | 13.11 | 38.40] + 3.25 55.03 0.05 ONE_TEMP HUD : h 0.00 v 11.58main:thrm:img (1.00 : 0.25 : 0.74) scale 1 fps 15.9 read 1.72 rot 4.36 : [52.31 | 13.22 | 38.87] + 3.32 55.69 0.05 ONE_TEMP HUD : h 0.00 v 11.85main:thrm:img (1.00 : 0.25 : 0.74) scale 1 fps 15.9 read 1.73 rot 4.33 : [52.20 | 13.11 | 38.88] + 3.25 55.50 0.05 ONE_TEMP HUD : h 0.00 v 11.93main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 11.7 read 3.01 rot 7.75 : [114.38 | 28.42 | 85.68] + 9.19 123.65 0.09 ONE_TEMP OFF : h 0.00 v 21.42main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 11.7 read 1.65 rot 4.44 : [71.39 | 17.47 | 53.86] + 6.37 77.81 0.05 ONE_TEMP OFF : h 0.00 v 11.57main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 11.7 read 1.65 rot 4.38 : [71.81 | 17.84 | 53.90] + 6.43 78.29 0.05 ONE_TEMP OFF : h 0.00 v 11.48main:thrm:img (1.00 : 0.26 : 0.74) scale 1 fps 16.9 read 2.55 rot 7.18 : [86.33 | 22.28 | 63.90] + 6.62 93.04 0.09 ONE_TEMP OFF : h 0.00 v 15.34main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.9 read 1.72 rot 4.45 : [47.86 | 13.02 | 34.78] + 3.32 51.23 0.05 ONE_TEMP OFF : h 0.00 v 8.22main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.9 read 1.74 rot 4.43 : [48.04 | 12.96 | 35.01] + 3.30 51.39 0.05 ONE_TEMP OFF : h 0.00 v 8.35

author: 5U4GB
author_rank: Super Contributor
timestamp: January 16, 2024, 05:36:28 am
content: Quote from: Amish Technician on January 15, 2024, 04:15:16 pmYup, sounds good.

author: aerdoc
author_rank: Newbie
timestamp: January 16, 2024, 04:46:23 pm
content: Just setup my Topdon on my RPi 4 this weekend and wow this is awesome! I've been messing a round with the FLIR Lepton the last few months but have been kind of disappointed by the lack of community development and wanting a higher resolution. I made a 3D model of the Topdon and I'm gonna adapt the bootleg zoom lens I made for the Lepton. If anyone's interested I can share the design.I've got a question about the images below. What is that gradient affect happening to the right image? I was able to enable the 8-bit AGC Histogram Equalization on the Lepton and that's what it looked like.Quote from: G28 on December 02, 2023, 06:33:51 pm

author: G28
author_rank: Regular Contributor
timestamp: January 16, 2024, 05:07:30 pm
content: Quote from: aerdoc on January 16, 2024, 04:46:23 pmEach frame of the camera consists of 2 sub-frames. 1 sub-frame is the image and the other sub-frame is the thermal data in Kelvin.There is 1 temperature value per pixel ( 256 x 192 temps in total ).This double-wide image shows both the Image ( left ) + Thermal ( right ) sub-frame as indicated by the OSD text "Img - Therm".The app allows each sub-frame to be displayed individually or jointly.The app does have an optional Histogram Equalization filter that can enabled / disabled as well as other optional filters and 37 colormaps.Hope that answers your question.

author: Amish Technician
author_rank: Contributor
timestamp: January 16, 2024, 07:59:55 pm
content: I've done some more testing on the RPi zero with the new DRAW_SINGLE_THREAD version to compare performance while dragging both rulers (status hud disabled) with -DFAST_DRAG=0 and -DFAST_DRAG=1OFFLINE-DFAST_DRAG=01x Double 23.0 fps2x 19.5 fps-DFAST_DRAG=11x Double 23.3 fps2x 19.2 fpsONLINE-DFAST_DRAG=01x Double 11.5 fps1x 15.9 fps-DFAST_DRAG=11x Double 11.3 fps1x 16.0 fpsAs you can see with DRAW_SINGLE_THREAD, frame rate averages are virtually identical with -DFAST_DRAG=0 or -DFAST_DRAG=1I've gone back and forth between each to subjectively compare the experience for stuttering and frame rate consistency. Offline there was no benefit to fast drag. Online I think it now slightly reduces the experience: With fast drag there's stuttering while dragging slowly but freezes for a moment while dragging quickly, whereas without fast drag enabled it doesn't freeze.My recommendations:RPi 1, RPi Zero (W), RPi Compute Module 1- Single thread- Online: No drag- Offline/Freeze frame: Normal dragAll other RPi models- Multi thread- Normal drag both online and offlineNot the conclusion I'd expected to come to as fast drag had measurably helped with the previous version, but it's good that this work around is no longer necessary thanks to the improvements from single threading for RPi zero.DEFAULT_FLAGS='-DNO_DRAG=0 -DFAST_DRAG=0 -DDRAW_SINGLE_THREAD=1 -DDEFAULT_FONT=0 -DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=1920 -DDISPLAY_HEIGHT=1080 -DUSE_CELSIUS=1 -DHUD_ALPHA=0.4'Code:OfflineStartup timings: s 1.880, var 0.712, suo 0.357, pa 1.379, pkb 17.916, nw 1421.720, run 0.638, total 1444.6021x Double, Dragging both rulers around with status hud disabledmain:thrm:img (1.00 : 0.17 : 0.82) scale 1 fps 22.2 read 0.04 rot 7.05 : [47.32 | 8.00 | 38.81] + 10.88 58.27 0.07 BOTH OFF : h 0.00 v 28.30main:thrm:img (1.00 : 0.19 : 0.80) scale 1 fps 22.7 read 0.01 rot 4.40 : [24.67 | 4.77 | 19.69] + 6.05 30.76 0.04 BOTH OFF : h 0.00 v 14.07main:thrm:img (1.00 : 0.19 : 0.80) scale 1 fps 22.9 read 0.01 rot 4.27 : [24.61 | 4.76 | 19.60] + 6.07 30.74 0.06 BOTH OFF : h 0.00 v 14.07main:thrm:img (1.00 : 0.20 : 0.79) scale 1 fps 22.9 read 0.01 rot 4.26 : [24.84 | 4.86 | 19.74] + 6.13 31.02 0.05 BOTH OFF : h 0.00 v 14.26main:thrm:img (1.00 : 0.20 : 0.79) scale 1 fps 23.0 read 0.01 rot 4.16 : [24.60 | 4.87 | 19.53] + 6.03 30.67 0.04 BOTH OFF : h 0.01 v 14.16main:thrm:img (1.00 : 0.20 : 0.80) scale 1 fps 23.0 read 0.01 rot 4.31 : [24.63 | 4.80 | 19.60] + 6.10 30.77 0.04 BOTH OFF : h 0.00 v 14.09main:thrm:img (1.00 : 0.19 : 0.80) scale 1 fps 23.0 read 0.01 rot 4.29 : [24.83 | 4.80 | 19.81] + 6.12 30.99 0.04 BOTH OFF : h 0.00 v 14.352x Dragging both rulers around with status hud disabledmain:thrm:img (1.00 : 0.03 : 0.96) scale 2 fps 19.2 read 0.01 rot 4.24 : [24.45 | 0.62 | 23.58] + 14.08 38.57 0.04 BOTH OFF : h 0.00 v 13.89main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.3 read 0.01 rot 4.18 : [24.41 | 0.58 | 23.60] + 13.95 38.41 0.04 BOTH OFF : h 0.00 v 14.22main:thrm:img (1.00 : 0.02 : 0.96) scale 2 fps 19.4 read 0.01 rot 4.25 : [24.85 | 0.60 | 23.98] + 13.70 38.59 0.04 BOTH OFF : h 0.00 v 14.27main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.5 read 0.01 rot 4.20 : [24.63 | 0.59 | 23.81] + 13.69 38.36 0.04 BOTH OFF : h 0.00 v 14.08main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.5 read 0.01 rot 4.40 : [24.55 | 0.58 | 23.76] + 13.84 38.43 0.04 BOTH OFF : h 0.00 v 13.94main:thrm:img (1.00 : 0.02 : 0.96) scale 2 fps 19.5 read 0.01 rot 4.19 : [24.71 | 0.61 | 23.79] + 13.85 38.61 0.04 BOTH OFF : h 0.00 v 14.35main:thrm:img (1.00 : 0.03 : 0.96) scale 2 fps 19.5 read 0.01 rot 4.05 : [24.72 | 0.64 | 23.85] + 13.84 38.60 0.04 BOTH OFF : h 0.00 v 14.32main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.5 read 0.01 rot 4.34 : [24.86 | 0.56 | 24.06] + 13.93 38.84 0.04 BOTH OFF : h 0.00 v 14.29main:thrm:img (1.00 : 0.02 : 0.96) scale 2 fps 19.5 read 0.01 rot 4.11 : [25.53 | 0.62 | 24.62] + 13.48 39.04 0.04 BOTH OFF : h 0.00 v 15.23OnlineStartup timings: s 2.021, var 0.571, suo 0.410, pa 371.017, pkb 0.712, nw 1546.901, run 0.744, total 1922.3761x Double, Dragging both rulers around with status hud disabledmain:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 11.4 read 3.78 rot 5.71 : [89.79 | 21.90 | 67.53] + 7.65 97.51 0.07 BOTH OFF : h 0.01 v 19.61main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 11.5 read 1.85 rot 4.48 : [73.41 | 18.06 | 55.16] + 6.62 80.08 0.05 BOTH OFF : h 0.00 v 14.73main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 11.5 read 1.88 rot 4.59 : [73.41 | 17.93 | 55.28] + 6.57 80.04 0.05 BOTH OFF : h 0.00 v 14.73main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 11.6 read 1.88 rot 4.58 : [73.44 | 17.89 | 55.36] + 6.68 80.18 0.06 BOTH OFF : h 0.00 v 14.75main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 11.5 read 1.90 rot 5.01 : [72.89 | 17.75 | 54.91] + 6.50 79.45 0.05 BOTH OFF : h 0.00 v 14.45main:thrm:img (1.00 : 0.25 : 0.75) scale 1 fps 11.5 read 1.93 rot 4.64 : [72.91 | 17.97 | 54.70] + 6.55 79.51 0.05 BOTH OFF : h 0.00 v 14.33main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 11.5 read 1.85 rot 4.88 : [73.26 | 17.86 | 55.18] + 6.55 79.87 0.06 BOTH OFF : h 0.00 v 14.512x Dragging both rulers around with status hud disabledmain:thrm:img (1.00 : 0.14 : 0.86) scale 2 fps 5.5 read 2.88 rot 7.42 : [205.74 | 28.23 | 177.11] + 16.12 221.97 0.11 BOTH OFF : h 0.00 v 22.07main:thrm:img (1.00 : 0.11 : 0.88) scale 2 fps 5.5 read 1.92 rot 4.12 : [158.58 | 17.98 | 140.32] + 12.46 171.09 0.05 BOTH OFF : h 0.00 v 10.001x Dragging both rulers around with status hud disabled - stuttering / inconsistent movement but still better while dragging quickly compared to the 'fast drag' optionmain:thrm:img (1.00 : 0.26 : 0.73) scale 1 fps 15.9 read 2.47 rot 5.83 : [71.48 | 18.81 | 52.36] + 4.66 76.23 0.08 BOTH OFF : h 0.00 v 15.67main:thrm:img (1.00 : -0.00 : 1.00) scale 1 fps 15.9 read 1.98 rot 4.61 : [-8537.67 | 14.08 | -8551.96] + 3.55 -8534.06 0.06 BOTH OFF : h 0.00 v 10.18main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 15.9 read 1.95 rot 4.50 : [51.72 | 14.01 | 37.51] + 3.52 55.30 0.05 BOTH OFF : h 0.00 v 9.98main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 15.9 read 1.93 rot 4.50 : [52.04 | 14.00 | 37.84] + 3.52 55.61 0.05 BOTH OFF : h 0.00 v 10.28DEFAULT_FLAGS='-DNO_DRAG=0 -DFAST_DRAG=1 -DDRAW_SINGLE_THREAD=1 -DDEFAULT_FONT=0 -DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=1920 -DDISPLAY_HEIGHT=1080 -DUSE_CELSIUS=1 -DHUD_ALPHA=0.4'Code:OfflineStartup timings: s 15.927, var 0.636, suo 7.181, pa 1.102, pkb 16.664, nw 1488.083, run 0.527, total 1530.1201x Double, Dragging both rulers around with status hud disabledmain:thrm:img (1.00 : 0.11 : 0.88) scale 1 fps 22.3 read 0.05 rot 10.91 : [114.21 | 12.28 | 100.99] + 45.92 160.23 0.10 BOTH OFF : h 0.00 v 61.77main:thrm:img (1.00 : 0.21 : 0.78) scale 1 fps 22.7 read 0.01 rot 4.28 : [23.33 | 4.87 | 18.23] + 6.16 29.52 0.03 BOTH OFF : h 0.00 v 12.67main:thrm:img (1.00 : 0.21 : 0.78) scale 1 fps 23.0 read 0.01 rot 4.38 : [22.82 | 4.72 | 17.87] + 6.13 28.99 0.04 BOTH OFF : h 0.00 v 12.40main:thrm:img (1.00 : 0.21 : 0.78) scale 1 fps 23.1 read 0.01 rot 4.30 : [22.72 | 4.74 | 17.79] + 6.12 28.88 0.04 BOTH OFF : h 0.00 v 12.30main:thrm:img (1.00 : 0.21 : 0.78) scale 1 fps 23.2 read 0.01 rot 4.50 : [23.08 | 4.85 | 18.04] + 6.16 29.28 0.04 BOTH OFF : h 0.00 v 12.39main:thrm:img (1.00 : 0.21 : 0.78) scale 1 fps 23.3 read 0.01 rot 4.61 : [23.00 | 4.92 | 17.91] + 6.08 29.12 0.04 BOTH OFF : h 0.00 v 12.14main:thrm:img (1.00 : 0.21 : 0.78) scale 1 fps 23.3 read 0.01 rot 4.49 : [22.90 | 4.91 | 17.81] + 6.14 29.07 0.04 BOTH OFF : h 0.00 v 12.18main:thrm:img (1.00 : 0.21 : 0.78) scale 1 fps 23.3 read 0.01 rot 4.59 : [23.00 | 4.95 | 17.87] + 6.18 29.22 0.04 BOTH OFF : h 0.00 v 12.152x Dragging both rulers around with status hud disabledmain:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 18.4 read 0.00 rot 4.13 : [23.61 | 0.51 | 22.81] + 14.04 37.68 0.04 BOTH OFF : h 0.00 v 13.53main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 18.6 read 0.01 rot 4.12 : [24.42 | 0.55 | 23.60] + 13.90 38.36 0.04 BOTH OFF : h 0.00 v 14.36main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 18.8 read 0.00 rot 4.29 : [23.65 | 0.51 | 22.88] + 14.06 37.75 0.04 BOTH OFF : h 0.00 v 13.26main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 18.9 read 0.00 rot 4.09 : [23.79 | 0.53 | 23.03] + 14.13 37.96 0.04 BOTH OFF : h 0.00 v 13.85main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.0 read 0.01 rot 4.12 : [23.58 | 0.51 | 22.83] + 14.06 37.69 0.05 BOTH OFF : h 0.00 v 13.15main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.1 read 0.01 rot 4.09 : [23.62 | 0.52 | 22.83] + 13.88 37.55 0.04 BOTH OFF : h 0.00 v 13.22main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.2 read 0.01 rot 4.10 : [23.92 | 0.51 | 23.18] + 14.25 38.21 0.04 BOTH OFF : h 0.00 v 13.61main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.2 read 0.01 rot 4.06 : [23.71 | 0.51 | 22.96] + 14.06 37.81 0.04 BOTH OFF : h 0.00 v 13.42main:thrm:img (1.00 : 0.02 : 0.97) scale 2 fps 19.2 read 0.00 rot 4.01 : [23.31 | 0.56 | 22.53] + 14.45 37.80 0.04 BOTH OFF : h 0.00 v 13.17OnlineStartup timings: s 1.900, var 0.684, suo 0.390, pa 264.882, pkb 8.979, nw 1513.572, run 0.649, total 1791.0561x Double, Dragging both rulers around with status hud disabled - poor experience. recommend 'no drag'main:thrm:img (1.00 : 0.23 : 0.76) scale 1 fps 11.3 read 3.49 rot 5.57 : [90.55 | 21.11 | 69.03] + 7.74 98.35 0.06 BOTH OFF : h 0.00 v 17.15main:thrm:img (1.00 : 0.24 : 0.75) scale 1 fps 11.4 read 1.73 rot 4.45 : [74.61 | 18.08 | 56.31] + 6.58 81.24 0.06 BOTH OFF : h 0.00 v 11.96main:thrm:img (1.00 : 0.23 : 0.76) scale 1 fps 11.3 read 1.75 rot 4.75 : [75.64 | 17.71 | 57.71] + 6.57 82.25 0.05 BOTH OFF : h 0.00 v 13.341x Dragging both rulers around with status hud disabled - stuttering while dragging slowely, freezes while dragging quicklymain:thrm:img (1.00 : 0.24 : 0.76) scale 1 fps 15.9 read 2.90 rot 8.41 : [111.15 | 26.17 | 84.57] + 8.02 119.25 0.09 BOTH OFF : h 0.00 v 26.77main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.0 read 1.80 rot 4.58 : [51.16 | 13.67 | 37.30] + 3.57 54.77 0.05 BOTH OFF : h 0.00 v 9.70main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.0 read 1.85 rot 4.40 : [51.59 | 13.78 | 37.57] + 3.49 55.13 0.05 BOTH OFF : h 0.00 v 10.02main:thrm:img (1.00 : 0.27 : 0.73) scale 1 fps 16.0 read 1.82 rot 4.52 : [50.89 | 13.79 | 36.90] + 3.50 54.44 0.06 BOTH OFF : h 0.00 v 9.41

author: Amish Technician
author_rank: Contributor
timestamp: January 17, 2024, 02:30:21 pm
content: Quote from: Amish Technician on January 12, 2024, 02:04:12 am": Keypad Up/Down/Left/Right/Center(5) moves rulers"With a RPi it's not working on a full size keyboard for me either. It IS working on my PC however using the same full size keyboard with the num-pad arrows while num-lock is off.Is anyone else able to reproduce this issue? I'd be interested to know which layout your keyboard uses, and what device you're running redux on.On a related note I discovered the 'insert' key performs the same function as the 'c' key, decreases the scale. I haven't found another key that increases scale other than 'd'To compile redux for my PC I first tried just changing the 'march' CFlag like so: '-mavx2 -msse4.2 -msse4.1 -malign-double -march=native' which compiled without errors but fails to run with "Illegal instruction (core dumped)". I'm using a Ivy Bridge CPU which should support these flags according to this page:https://gcc.gnu.org/onlinedocs/gcc/x86-Options.htmlI then used these flags and it's working perfectly: CFLAGS='-march=native -mtune=native -pipe -fomit-frame-pointer'

author: 5U4GB
author_rank: Super Contributor
timestamp: January 17, 2024, 02:58:27 pm
content: Feedback on the latest snapshot, on an ODroid at least it definitely needs to run as root because most of /dev isn't user-accessible:Code:> ll /dev/video0crw-rw---- 1 root video 81, 11 Jan 18 03:35 /dev/video0> ./redux -d 0 -snapshotopenCamera(4065): Opening cameara /dev/video0Error opening video stream(/dev/video0)Failed to open /dev/video0: Permission denied> sudo ./redux -d 0 -snapshotopenCamera(4065): Opening cameara /dev/video0openCamera(4094): Opened camera /dev/video0Backend: V4L2However it's still trying to interact with the X11 system when -snapshot is specified:Code:MoTTY X11 proxy: No authorisation providedterminate called after throwing an instance of 'cv::Exception'what(): OpenCV(4.5.4) ./modules/highgui/src/window_gtk.cpp:635: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'

author: tankslapper
author_rank: Newbie
timestamp: January 17, 2024, 06:09:21 pm
content: Quote from: 5U4GB on January 17, 2024, 02:58:27 pmAdd your user to the group "video", and you shouldn't need to run it as root.Do the command:sudo usermod -a -G video yourusernameand you should have access.

author: G28
author_rank: Regular Contributor
timestamp: January 17, 2024, 08:32:31 pm
content: Quote from: 5U4GB on January 17, 2024, 02:58:27 pmThe back end is required for the video capture to open the camera. The code is using CAP_V4L.X11 needs to be running to do X11 forwarding.I could move the [-snapshot ] before the imshow() and exit, but that is well after the camera is initialized.Here is the OpenCV architecture. To access the thermal camera, you need to go through a backend. The selected backend must be available on your platform AND must be able to pass the raw data.If you choose CAP_OPENCV_MJPEG, it returns Motion JPEG which is a lossy format. Lossy formats scath the thermal frame data, rendering it useless for this purpose. CAP_FFMPEG would have pass the raw data unscathed. CAP_V4L supports the raw format.

author: 5U4GB
author_rank: Super Contributor
timestamp: January 18, 2024, 04:11:18 am
content: Quote from: G28 on January 17, 2024, 08:32:31 pmUnfortunately the call it fails in returns essentially useless diagnostics, ./modules/highgui/src/window_gtk.cpp calls gtk_gl_init() which just exits with no useful information ("This function will terminate your program if it was unable to initialize the library for some reason"), a Google search just reveals lots of other people with the same problem and no answers. I can start an xterm so who knows what it could be...Does it need a particular OpenCV release? The current version is 4.9.0 but the one that apt-get installs is 4.5.4, I initially tried building 4.9.0 from source but it seems to require a specific build environment that doesn't match what's on the ODroid device.

author: G28
author_rank: Regular Contributor
timestamp: January 18, 2024, 04:18:02 am
content: Quote from: 5U4GB on January 18, 2024, 04:11:18 amI am using 4.5.1, so you are using a newer version than what I have tried.What does the following return ?v4l2-ctl --list-devices --all

author: G28
author_rank: Regular Contributor
timestamp: January 18, 2024, 04:23:15 am
content: Quote from: 5U4GB on January 18, 2024, 04:11:18 amFound this:https://github.com/opencv/opencv/issues/18461Code:I managed to solve it by making sure when I ssh into aarch64 that I use ssh -Y user@host.This gives authorization to allow cv2.imshow() to display the window.gtk_init_check error solvedhope that helpsAnother post:To help others, I found that my .bashrc needed to contain the following:export DISPLAY=:0.0previously, it saidexport DISPLAY=localhost:0.0

author: G28
author_rank: Regular Contributor
timestamp: January 18, 2024, 06:50:42 pm
content: 2024-01-18: Version 0.9.1 modifications have been pushed to github for weak and single threaded/single core hardware.BIG THANKStoAmish Technicianfor all of his RPi model variant testing and regressions.The release also contains some minor optimizations for regular multi-threaded hardware as well as some recent requests made by others.Thanks to all who have provided feedback.https://github.com/92es/Thermal-Camera-Redux

author: 5U4GB
author_rank: Super Contributor
timestamp: January 19, 2024, 09:22:01 am
content: Quote from: G28 on January 18, 2024, 04:18:02 amSee my earlier post, it's fine with that:Code:USB Camera (usb-xhci-hcd.0.auto-1.1):/dev/video0/dev/media0Driver Info:Driver name : uvcvideoCard type : USB CameraBus info : usb-xhci-hcd.0.auto-1.1Driver version : 4.9.255Capabilities : 0x84200001Video CaptureStreamingExtended Pix FormatDevice CapabilitiesDevice Caps : 0x04200001Video CaptureStreamingExtended Pix Format(About two more screens of output snipped)

author: G28
author_rank: Regular Contributor
timestamp: January 19, 2024, 04:02:01 pm
content: Sorry about that. I wanted to make sure it saw V4L and the proper color format.Code:Entity Info:ID : 0x00000001 (1)Name : USB CameraFunction : V4L2 I/OPad 0x01000004 : SinkLink 0x0200000d: from remote pad 0x1000007 of entity 'Extension 4' (Unknown V4L2 Sub-Device): Data, Enabled, ImmutablePriority: 2Video input : 0 (Camera 1: ok)Format Video Capture:Width/Height : 256/192Pixel Format : 'YUYV' (YUYV 4:2:2)Field : NoneBytes per Line : 512Size Image : 98304Colorspace : sRGBTransfer Function : Default (maps to sRGB)YCbCr/HSV Encoding: Default (maps to ITU-R 601)Quantization : Default (maps to Limited Range)Flags :

author: Amish Technician
author_rank: Contributor
timestamp: January 20, 2024, 12:34:22 pm
content: I've just made a bit of a breakthrough with the 'CPU challenged' Pi zero v1.3I'm able to achieve a consistent and very responsive 24.9fps live image at 1x scale with both rulers by setting the colour map to 'none'. I only get ~15 with the default colour map.

author: G28
author_rank: Regular Contributor
timestamp: January 20, 2024, 03:20:55 pm
content: Quote from: Amish Technician on January 20, 2024, 12:34:22 pmApplying a colormap is a single API call into the OpenCV library / frame which appears to be expensive on the Pi Zero v1.3.Applying an inverse colormap makes 2 API calls into the OpenCV library. Could possibly pre-generate inverse maps on startup so when they are applied at runtime, they only make 1 call / frame.

author: Amish Technician
author_rank: Contributor
timestamp: January 20, 2024, 07:01:49 pm
content: Quote from: G28 on January 20, 2024, 03:20:55 pmThis probably explains how I'm seeing different FPS with different colourmaps (RPi zero):'Jet' 18.6fps with overlays disabled, 15.4fps with default overlays.'Bone' 23.5fps with overlays disabled, 18.7fps with default overlays.'Winter' 24.7fps with overlays disabled, 20.0fps with default overlays.'None' 25.0fps with overlays disabled, 24.9fps with default overlays.

author: G28
author_rank: Regular Contributor
timestamp: January 20, 2024, 07:21:46 pm
content: Quote from: Amish Technician on January 20, 2024, 07:01:49 pmJet and Bone should take the same time."Inv Jet" should take longer (as well as any of the other "Inv XXX" and "Cold" because they make 2 OpenCV calls per frame vs 1.Changing the interpolation method will also change the amount of CPU cycles used.Cubic is the slowest, but also the best image quality. Try Nearest or Linear to see if it makes any detectable speed difference.

author: Amish Technician
author_rank: Contributor
timestamp: January 20, 2024, 09:25:24 pm
content: RPi zero 1x onlineCubic'Jet' 18.6fps with overlays disabled, 15.4fps with default overlays.'Jet Inv' 18.0fps with overlays disabled, 15.4fps with default overlays.Linear'Jet' 19.0fps with overlays disabled, 16.2fps with default overlays.'Jet Inv' 18.0fps with overlays disabled, 15.2fps with default overlays.Nearest'Jet' 18.8fps with overlays disabled, 16.3fps with default overlays.'Jet Inv' 17.6fps with overlays disabled, 15.2fps with default overlays.

author: G28
author_rank: Regular Contributor
timestamp: January 20, 2024, 09:35:45 pm
content: Looks like 1 FPS can be had on INV maps by pre-generating them at startup.

author: Amish Technician
author_rank: Contributor
timestamp: January 22, 2024, 07:37:14 pm
content: For anyone having difficulty getting Thermal Camera Redux working you first need toinstall the 'libopencv-dev' package. Enter the following in a terminal on Raspberry Pi OS (or Debian derived distro on any other device or PC):Code:sudo apt update && sudo apt install libopencv-devOpen the 'build_redux' file in the 'src' source directory with a text editor and configure the options for your device, or just replace the contents of this file with my one size fits all 'build_redux' script which should work on PC, all raspberry pi's, and likely most other similar SBCs:Code:#!/bin/bash# Build Thermal Camera Reduxecho "Building redux and test_driver ..."rm ./redux# Change build flags based on your hardwareCFLAGS='-march=native -mtune=native -pipe -fomit-frame-pointer'# Setup default startup configuration options# ROTATION options: 0, 90, 180, 270# USE_CELSIUS options: 0, 1# DEFAULT_COLORMAP options: 0 - 36# USE_ASSERT: 0, 1# HUD_ALPHA: 0.0 = Full Transparent, 1.0 Full Opaque, Default 0.4# VGA - 800 x 480 is a max 2X scale# 1280 x 720 is a max 3X scale# 1920 x 1080 is a max 5X scale# 2560 x 1440 is a max 7X scale# 2560 x 1600 is a max 8X scaleDEFAULT_FLAGS='-DNO_TS=0 -DNO_DRAG=0 -DFAST_DRAG=0 -DDRAW_SINGLE_THREAD=0 -DDEFAULT_FONT=0 -DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=1920 -DDISPLAY_HEIGHT=1080 -DUSE_CELSIUS=1 -DHUD_ALPHA=0.4'#DEFAULT_FLAGS='-DDEFAI:T_FONT=0 -DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=1024 -DDISPLAY_HEIGHT=768 -DUSE_CELSIUS=0 -DHUD_ALPHA=0.4'#DEFAULT_FLAGS='-DDEFAI:T_FONT=0 -DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=320 -DDISPLAY_HEIGHT=240 -DUSE_CELSIUS=0 -DHUD_ALPHA=0.4'#DEFAULT_FLAGS='-DDEFAI:T_FONT=0 -DDEFAULT_COLORMAP=4 -DROTATION=0 -DDISPLAY_WIDTH=1280 -DDISPLAY_HEIGHT=1024 -DUSE_CELSIUS=0 -DHUD_ALPHA=0.4'# Compile and link Redux Thermal Camera codeg++ -Wall -Wextra -O3 -ffast-math ${DEFAULT_FLAGS} ${CFLAGS} -DUSE_ASSERT=0 -I/usr/include/opencv4 tc001.cpp thread.cpp -o redux -lpthread `pkg-config --cflags --libs opencv4`# Debug for gprof, valgrind and perf#g++ -Wall -Wextra -ffast-math -pg -ggdb3 ${DEFAULT_FLAGS} ${CFLAGS} -DUSE_ASSERT=0 -I/usr/include/opencv4 tc001.cpp thread.cpp -o redux -lpthread `pkg-config --cflags --libs opencv4`gcc -Wall test_driver.c -o test_driverChange these default flags to =1 for improved performance on Pi Zero 1 (W), Pi 1, computer module 1, or any other SBC with a single threaded CPU:-DNO_TS=1-DDRAW_SINGLE_THREAD=1Then from the directory with the source files run the build script:Code:sudo ./build_reduxIf it builds successfully you should now have a new binary file called 'redux' in the same directory. Connect your camera and run redux:Code:./redux -d 0If this fails check file permission and ensure 'redux' is executable. Your camera might not be 'device 0' in which case specify the appropriate number for yours instead:Code:./redux -d 1A limitation to keep in mind with my script is that the resulting binary may not work if you take it to a different device from the one you build it on, if you build it on a PC and copy it to a raspberry pi, or even between some pi models. The flags in this script haven't resulted in a degradation in performance compared to the flags I had manually specified for each RPi before, that said there are flags I haven't tried yet. I'll update here if I discover any improvements (or if someone more knowledgeable has a suggestion that works better).Hope this is helpful, feel free to ask if any clarification is required or if you run in to any problems.

author: G28
author_rank: Regular Contributor
timestamp: January 22, 2024, 07:56:32 pm
content: Amish Tech, did you need any additional commands to install the V4L packages or did the OpenCV install pull those in as well ?

author: Amish Technician
author_rank: Contributor
timestamp: January 22, 2024, 08:10:02 pm
content: From a fresh install of Pi OS 'libopencv-dev' was the only package I installed.

author: G28
author_rank: Regular Contributor
timestamp: January 22, 2024, 10:02:50 pm
content: Many have expressed the desire for the various thermal camera apps to be able to lock the camera's auto-ranging so when the camera is panned, the colormap would not jump around making it hard to compare relative color coded temperatures.Originally, I tried to implement this feature, but was only to get it to half work. After learning more about the camera and the APIs, I believe I will have this feature available soon with a few twists.So far, it will have 2 controls. One control will determine if the locking method uses a static pass band or an adaptive pass band filter.The static pass band filter will clip temps outside of the original pass band set by the original lock as requested by a TC001 user.The dynamic pass band grows as the camera encounters outliers, never clips and never shrinks back until reset.The other control will cycle through various linear/weighted temp to colormap conversion algorithms. Some colormaps favor one algorithm over another depending on the data one is interested in. It appears the camera uses a weighted algorithm internally so I will try and provide that emulation as well.I will probably release a beta version to receive feedback and adjust the code accordingly.

author: G28
author_rank: Regular Contributor
timestamp: January 24, 2024, 06:38:06 am
content: Quote from: G28 on January 22, 2024, 10:02:50 pmSome more previews:The left window has Auto Ranging Locked while the right window has Auto Ranging Unlocked. Both windows look the same until panned off the hot spots.The left image retains it's locked colormap in contrast to the camera's auto ranging in the right window making it hard to compare colorized temps around the room.While the auto-ranging is locked, any of the mapping filters can be changed along with any of the other configurations including changing colormaps, portrait/landscale, scale, fonts, etc.

author: Amish Technician
author_rank: Contributor
timestamp: January 25, 2024, 12:34:44 pm
content: Thermal Camera Redux running at 2x scale on a RPi Zero 2 W with 800x480 60Hz touchscreen (With TC001 for scale):2x scale2x scale full screenMock-up of possible overlay layout to make better use of available screen spaceThis is the mock-up being displayed above. I doubled the width of the gradient scale to 16 pixels, I think it might be slightly too wide nowI have all the different elements on separate layers in GIMP so I can experiment with it. I'm happy to mock-up any layout suggestions.

author: Amish Technician
author_rank: Contributor
timestamp: January 25, 2024, 01:55:23 pm
content: Another mock-up, 3x scale with no display size limitation.

author: G28
author_rank: Regular Contributor
timestamp: January 26, 2024, 06:03:18 am
content: UPDATE:Thermal-Camera-Redux reported working on: Topdon TC001, InfiRay P2 Pro, MaAnt Super IR Cam2024-01-25: Version 0.9.2 modifications have been pushed to github to optionally lock out camera's colormap auto-ranging.2024-01-18: Version 0.9.1 modifications have been pushed to github for weak and single threaded/single core hardware.https://github.com/92es/Thermal-Camera-ReduxThe ability to lock the camera's colormap auto ranging has been pushed to the github repository.The user can optionally enable / disable auto ranging.The user can optionally cycle through temperature pixel to color pixel mapping methods.These mapping methods are a WIP and may change over time with user feedback.The 'l' key cycles between unlocked, static band pass and dynamic band pass.Static band pass will clip temps outside of the band pass range established at the time the lock was set.Dynamic band pass will dynamically grow, but not shrink from the time the lock was set.The 'i' and 'k' keys will allow the user to cycle through mapping options. No mapping is also included in the cycle so one can view the default images as displayed in the first row below.The left or top window ( normally the image window ) will display the range locked view while the right or bottom ( normally thermal window ) will display the live auto-ranging for side-by-side real time comparison.The user can optionally display any of the single and double window layouts as before as well as change colormaps or any other configuration option.Note 1:Colormap / Mapping permutations vary in utility.Note 2:This feature utilizes more CPU cycles and will be optimized over time. Plan accordingly for entry level SBCs.In offline mode, the right/bottom window will display the same mapping methods when locking is enabled for offline use of these maps.Here are some example permutations:Image and Thermal windows with Auto Ranging Disabled ( or map option 0 ):Locked and Unlocked windows with the left window using mapping option 1Locked and Unlocked windows with the left window using mapping option 5Please post any feedback you may have. It will be greatly appreciated.

author: Amish Technician
author_rank: Contributor
timestamp: January 27, 2024, 01:34:42 am
content: OpenCV copyMakeBorder demo attached.

author: G28
author_rank: Regular Contributor
timestamp: January 27, 2024, 05:00:49 am
content: Quote from: Amish Technician on January 27, 2024, 01:34:42 amHere is an initial cut.It scales dynamically based on font/text widths.This will probably be a compile flag to switch between borders and no borders.Key map overlap:

author: Amish Technician
author_rank: Contributor
timestamp: January 28, 2024, 01:55:29 am
content: Thank you G28for implementing my layout suggestions!

author: G28
author_rank: Regular Contributor
timestamp: January 28, 2024, 02:01:35 am
content: Thanks for testing.I am updating the HUD display with the various auto-ranging lock permutations and will push the changes to git hub within a day.

author: G28
author_rank: Regular Contributor
timestamp: January 28, 2024, 02:46:24 am
content: UPDATE:2024-01-27: Version 0.9.3 modifications have been pushed to github to optionally build with dynamic border layout.2024-01-25: Version 0.9.2 modifications have been pushed to github to optionally lock out camera's colormap auto-ranging.2024-01-18: Version 0.9.1 modifications have been pushed to github for weak and single threaded/single core hardware.https://github.com/92es/Thermal-Camera-Redux

author: Amish Technician
author_rank: Contributor
timestamp: January 28, 2024, 11:32:27 pm
content: Full screen aspect ratio fixedMany thanks G28

author: G28
author_rank: Regular Contributor
timestamp: January 28, 2024, 11:37:12 pm
content: Quote from: Amish Technician on January 28, 2024, 11:32:27 pmJust added the border layout feature description page to github.https://github.com/92es/Thermal-Camera-Redux/blob/main/doc/BORDER_LAYOUT.md

author: Amish Technician
author_rank: Contributor
timestamp: January 29, 2024, 11:03:50 pm
content: I've discovered using the screen configuration utility included with raspberry pi OS to flip the display output can noticeably lower the frame rate. Around 15fps on Pi Zero 2W at 2x scale full screen instead of 25.Performance appears negligibly affected by the addition of 'borders'.Clearer fonts

author: Amish Technician
author_rank: Contributor
timestamp: February 01, 2024, 01:57:59 pm
content: Edit: Display configured 800x480But build_redux configuredDISPLAY_WIDTH/HEIGHT 480x800max scale, full screen.Rotation:0, 90,180, 270'BeltsAndSuspenders' 1'BeltsAndSuspenders' 2

author: Amish Technician
author_rank: Contributor
timestamp: February 04, 2024, 12:43:36 pm
content: Mock-up of 480x800 portrait layout

author: Amish Technician
author_rank: Contributor
timestamp: February 04, 2024, 05:19:29 pm
content: The attachment 'Rotations.7z' contains full screen resolution captures of all combinations of;build_reduxCode:-DDISPLAY_WIDTH=800 -DDISPLAY_HEIGHT=480andCode:-DDISPLAY_WIDTH=480 -DDISPLAY_HEIGHT=800OS (xrandr) rotation 0 and 90,Camera 0 and 90,Display 0 and 90.I've omitted 180 and 270 as they produce the same layout as as 0 and 90, just rotated 180 degrees.OS (xrandr) rotation not recommended on lower performing devices, frame rate drops to ~15-16fps on pi zero 2w. It's still useful for testing portrait layouts as there are pi displays with native portrait resolutions.These combinations are currently working well making good use of the available resolution to display the thermal image as large as possible without stretching/distorting it, overlapped minimally by HUD elements:800x480_OS-0_Cam0_Display0800x480_OS-90_Cam0_Display90Edit: a miss labelled Display180 appears to have sneaked in called 800x480_OS-0_Cam90_Display90

author: G28
author_rank: Regular Contributor
timestamp: July 08, 2024, 06:44:26 pm
content: FWIW, been putting the thermal camera to good use insulating the house.Both snapshots were taken at the same time of day (sun overhead) with same outside temps with no cloud cover.Hallway is @ 5 degrees cooler after fixing the missing insulation.Found uninsulated area around solar tube skylight.After rockwool insulation added.The solar tube skylight is still a heat transfer channel.Still have 2 more rooms to finish insulation upgrades on.

author: artag
author_rank: Super Contributor
timestamp: July 15, 2024, 09:04:27 pm
content: You can add Topdon TS001 to the 'tested on' list (Debian 11 on PC)Hardly a surprise as it seems to be electronically identical to the TC001 but nice to confirm it.

author: G28
author_rank: Regular Contributor
timestamp: July 15, 2024, 09:22:59 pm
content: Quote from: artag on July 15, 2024, 09:04:27 pmThanks much. Done and done.Maybe I should add some spectacles to my TC001.

author: artag
author_rank: Super Contributor
timestamp: October 18, 2024, 10:02:21 pm
content: Does the USB interface provide any control over the timing of the reference shutter, and the frame capture itself ?I want to show a continuous display at 25 fps or better but the calibration creates a very noticeable break. I'm wondering if it's possible to run two of these cameras synchronised such that each is active when the other is calibrating.I know it's possible to suppress the calibration at least in the android app but it's likely that if these are freerunning they would soon drift in and out of sync. In addition, the output would need to be the aggregate of the two streams, if this is feasible. That might also allow a higher frame rate, at least part of the time.

author: G28
author_rank: Regular Contributor
timestamp: October 18, 2024, 11:25:44 pm
content: Quote from: artag on October 18, 2024, 10:02:21 pmThe Redux app just reads from the USB interface. I do not try to send any commands to the camera because I do not want to accidentally brick anyone's camera.I emailed Todon 3 times for the USB command API, but they have provided any information. I don't think they want any software competition.NOTE:Github is changing their authorization/login policy so any further updates I make in the future will most likely be hosted elsewhere. I placed a notice on the top of the Redux page that any further hosting information will be announced here.

author: artag
author_rank: Super Contributor
timestamp: October 19, 2024, 03:35:42 pm
content: Thanks for fast response. I also tried to get some other details from Topdon - I wanted to write a vertical application for their android-based TC003 device. To me, an important feature of using an open platform is so you can write dependent applications, not just so you can run unrelated android apps on the device. But they weren't interested, and their reason seemed to be that they didn't want to have the effort required to support programmers. Maybe that means there's a market niche for a repackaged off-the-shelf camera that does support an API.Other than that, are there any other ways I can get pauseless video ? Do expensive cameras do this ? What about security cameras ? Or are there some bare modules with a defined API - infiray perhaps ?I don't want especially high resolution. 192x255 is great but I could probably use 160x240 without too much loss. I just don't want it to keep freezing, and ideally I would use relatively low cost cameras (maybe sub $500). Ideally I'd want a lens that captures 2m of image at about 3-5m distance.

author: G28
author_rank: Regular Contributor
timestamp: October 19, 2024, 04:20:12 pm
content: Quote from: artag on October 19, 2024, 03:35:42 pmTopdon responded to my first email saying they would get back to me and then ghosted me. They ignored 2 more follow up requests after that. Not cool. If they didn't want to release that information, they could just say so. Personally, I think my app is much more feature rich than their's.I don't know what you mean by pauseless video. The Topdon plays without pause. The gating factors are the software playback and the speed of the playback machine.The original Python script immediately ran out of steam because it was single threaded and Python is a slow interpretive, CPU intensive language.The more frame processing you add, the faster CPU (and faster programming language) you need to keep the frame rates constant on a given piece of hardware.The OpenCV video library is written in C++ which I found has C++ overhead (needless constructors/destructors) which slows it down vs being writtien in pure C. Those observations were derived from doing a lot of profiling, benchmarking and optimizations to the code.You can run the Topdon without pauses if your PC and software is fast enough. You could also just write the camera's raw stream to disk without processing assuming your write speeds are fast enough.

author: artag
author_rank: Super Contributor
timestamp: October 19, 2024, 06:17:42 pm
content: Every few seconds, the live picture freezes. I haven't tried recording as live is what I want to use. When it's not frozen it's great and reports 25 frames/sec with minimal lag.I took this for the shutter action but perhaps I'm wrong. I'll try some other CPUs and also the topdon phone app. Ideally I'd use a raspberry pi 4 or 5. Does the code benefit from extra threads or GPU support ?CPU is a dual 3GHz Zeon (8 cpu total) with a radeon RX (not sure what model - 480 ?) . Pretty old tech but probably adequate. Camera is a TS001.

author: G28
author_rank: Regular Contributor
timestamp: October 19, 2024, 07:35:36 pm
content: Quote from: artag on October 19, 2024, 06:17:42 pmI have never used the phone apps nor the TS model. The TS model may behave differently. I use Redux on the TC001 and Intel based PCs. Amish Technician graciously did the RPi testing on the TC001.I have personally tested Redux with a TC001 on ai7-3770K (Max 3.9GHz -3rd gen - 2012),i7-6700 (Max 4.0GHz - 6th gen - 2015),i7-9700 (Max 4.7GHz - 9th gen - 2019) andi7-10700 (Max 4.8GHz - 10th gen - 2020),all using Intel's on-CPU graphics (no separate graphics cards).RasbPis are not the fastest processors (RPi 5 is 2.4GHz) out there and their PCIe bus is slow as well as their SD cards.Multi-threading helps if the app was designed to use it and the hardware supports it (to a point). Depending on the app, there are limits on what can be done in parallel.Forex, Redux uses at most 4 threads. I tried using 5 threads to decouple capture from rendering (double buffering - reading one frame while rendering another) to tighten inter-frame tolerances, but the OpenCV library wasn't having it even using critical sections. Double buffering would be a good optimization.Low end RPis are single threaded. Redux can be compiled for single or multiple threading. The weaker the hardware, the more the per frame functionality has to be scaled down accordingly.NOTE: Your power savings settings will also affect realtime performance. If you have power savings turned on, you may want to change your power profile when running the app.Also, depending on the age of your Xeon, it may or may not have recent CPU instruction set extensions (SSE4.1, SSE4.2, AVX2, etc.)I do loop unrolling in the code, but the code benefits from the CPU's instruction set optimizations.

author: artag
author_rank: Super Contributor
timestamp: October 20, 2024, 01:05:09 am
content: Quote from: G28 on October 19, 2024, 07:35:36 pmYes, but I think they're higher than a phone, which this camera was intended to be used with.I've checked the android app. It freezes for about 1/2 a second every 5 seconds accompanied by a faint click. I'm sure therefore that this is the reference shutter. Does the TC001 not do this ?The app has 'temp measuring' and an 'observe' mode. In the observe mode there are no on-screen temperature spots but the shutter operates only every 10 seconds.

author: G28
author_rank: Regular Contributor
timestamp: October 20, 2024, 01:20:00 am
content: Quote from: artag on October 20, 2024, 01:05:09 amAs I said before, I have never used the OEM app. I have only used the original Python script and my C/C++ Redux app on Debian Linux.I have not experienced that stalling behavior with either the Python or Redux app on Debian Linux. I have experienced reduced frame rates when trying to do too much frame processing for a given CPU.The original Python app only plots 4 temps (min, max, average and center of screen) per frame.Depending on the features enabled in the Redux app, Redux can process and plot @ 450 temps per frame (over 100X more than the Python script) out of 49,152 temps per frame.

author: Rampler
author_rank: Newbie
timestamp: October 20, 2024, 06:48:01 pm
content: Hi,i only want to say .. THANK YOU .., good job ..I use it with Linux Mint V22, P2Pro ..best regards Klaus

author: G28
author_rank: Regular Contributor
timestamp: October 20, 2024, 10:19:43 pm
content: Quote from: Rampler on October 20, 2024, 06:48:01 pmYou are welcome. Hope it is as helpful to you as it has been for me.

author: artag
author_rank: Super Contributor
timestamp: October 26, 2024, 09:52:58 am
content: Quote from: G28 on January 26, 2024, 06:03:18 amI have just received a TC001 Plus. That also works with this application. It creates 4 /dev/video* devices, one pair for each of the thermal and visible cameras. The first pair are visible light and the second pair infrared. The application works on either but as you'd expect, the false colour is mapped from image brightness on the visible light camera.I haven't tested it thoroughly, just a quick overview - I bought this primarily for the wider angle lens (than the TS001).Let me know if I can provide any more specific details.Here's the dmesg content - it enumerates as a hub and two cameras. In case the numbering is surprising, this computer already has a webcam so the device is /dev/video2 .. 5.[3452888.951839] usb 7-2.3: new high-speed USB device number 19 using ehci-pci[3452889.061442] usb 7-2.3: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=61.60[3452889.061446] usb 7-2.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0[3452889.061448] usb 7-2.3: Product: USB2.0 Hub[3452889.062000] hub 7-2.3:1.0: USB hub found[3452889.062316] hub 7-2.3:1.0: 4 ports detected[3452889.363830] usb 7-2.3.1: new high-speed USB device number 20 using ehci-pci[3452889.504692] usb 7-2.3.1: New USB device found, idVendor=0bda, idProduct=3031, bcdDevice= 0.01[3452889.504696] usb 7-2.3.1: New USB device strings: Mfr=3, Product=1, SerialNumber=2[3452889.504699] usb 7-2.3.1: Product: USB Camera[3452889.504700] usb 7-2.3.1: Manufacturer: Generic[3452889.504702] usb 7-2.3.1: SerialNumber: 200901010001[3452889.510591] uvcvideo: Found UVC 1.00 device USB Camera (0bda:3031)[3452889.531556] input: USB Camera: USB Camera as /devices/pci0000:00/0000:00:1d.7/usb7/7-2/7-2.3/7-2.3.1/7-2.3.1:1.0/input/input52[3452889.611818] usb 7-2.3.2: new high-speed USB device number 21 using ehci-pci[3452889.872692] usb 7-2.3.2: New USB device found, idVendor=0bda, idProduct=5830, bcdDevice=11.01[3452889.872695] usb 7-2.3.2: New USB device strings: Mfr=3, Product=1, SerialNumber=2[3452889.872697] usb 7-2.3.2: Product: USB Camera[3452889.872699] usb 7-2.3.2: Manufacturer: Generic[3452889.872701] usb 7-2.3.2: SerialNumber: 200901010001[3452889.888708] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5830)[3452889.929580] input: USB Camera: USB Camera as /devices/pci0000:00/0000:00:1d.7/usb7/7-2/7-2.3/7-2.3.2/7-2.3.2:1.0/input/input53

author: G28
author_rank: Regular Contributor
timestamp: October 26, 2024, 06:41:35 pm
content: Artag,Thanks for the info on the Plus version. If you can dump and post the following information, it maybe useful in the future.Code:v4l2-ctl --list-devices --allTo write code for the new 2-camera version, I would need one to develop with. The price appears to be the same as the original from what I could find.Thanks again !!!

author: artag
author_rank: Super Contributor
timestamp: October 26, 2024, 07:39:03 pm
content: This is what I get on Debian 11 with just the TC001+ connectedUSB Camera: USB Camera (usb-0000:00:1d.7-2.3.1):/dev/video0/dev/video1/dev/media0USB Camera: USB Camera (usb-0000:00:1d.7-2.3.2):/dev/video2/dev/video3/dev/media1Driver Info:Driver name : uvcvideoCard type : USB Camera: USB CameraBus info : usb-0000:00:1d.7-2.3.1Driver version : 5.10.223Capabilities : 0x84a00001Video CaptureMetadata CaptureStreamingExtended Pix FormatDevice CapabilitiesDevice Caps : 0x04200001Video CaptureStreamingExtended Pix FormatMedia Driver Info:Driver name : uvcvideoModel : USB Camera: USB CameraSerial : 200901010001Bus info : usb-0000:00:1d.7-2.3.1Media version : 5.10.223Hardware revision: 0x00000001 (1)Driver version : 5.10.223Interface Info:ID : 0x03000002Type : V4L VideoEntity Info:ID : 0x00000001 (1)Name : USB Camera: USB CameraFunction : V4L2 I/OFlags : defaultPad 0x01000007 : 0: SinkLink 0x02000010: from remote pad 0x100000a of entity &apos;Extension 4&apos;: Data, Enabled, ImmutablePriority: 2Video input : 0 (Input 1: ok)Format Video Capture:Width/Height : 1280/720Pixel Format : &apos;MJPG&apos; (Motion-JPEG)Field : NoneBytes per Line : 0Size Image : 1843200Colorspace : sRGBTransfer Function : Rec. 709YCbCr/HSV Encoding: ITU-R 601Quantization : Default (maps to Full Range)Flags :Crop Capability Video Capture:Bounds : Left 0, Top 0, Width 1280, Height 720Default : Left 0, Top 0, Width 1280, Height 720Pixel Aspect: 1/1Selection Video Capture: crop_default, Left 0, Top 0, Width 1280, Height 720, Flags:Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1280, Height 720, Flags:Streaming Parameters Video Capture:Capabilities : timeperframeFrames per second: 30.000 (30/1)Read buffers : 0brightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=0contrast 0x00980901 (int) : min=0 max=100 step=1 default=40 value=40saturation 0x00980902 (int) : min=0 max=100 step=1 default=64 value=64hue 0x00980903 (int) : min=-180 max=180 step=1 default=0 value=0white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1gamma 0x00980910 (int) : min=100 max=500 step=1 default=300 value=300power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=10: Disabled1: 50 Hz2: 60 Hzwhite_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=10 default=4600 value=4600 flags=inactivesharpness 0x0098091b (int) : min=0 max=100 step=1 default=50 value=50backlight_compensation 0x0098091c (int) : min=0 max=2 step=1 default=0 value=0exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=31: Manual Mode3: Aperture Priority Modeexposure_absolute 0x009a0902 (int) : min=50 max=10000 step=1 default=166 value=166 flags=inactiveexposure_auto_priority 0x009a0903 (bool) : default=0 value=0pan_absolute 0x009a0908 (int) : min=-57600 max=57600 step=3600 default=0 value=0tilt_absolute 0x009a0909 (int) : min=-43200 max=43200 step=3600 default=0 value=0zoom_absolute 0x009a090d (int) : min=0 max=3 step=1 default=0 value=0

author: artag
author_rank: Super Contributor
timestamp: October 26, 2024, 07:52:34 pm
content: Yes, they're just about £30 more on ebay here in the UK. And when I purchased it, another£20 discount was given. Although I don't really need the edge-sharpening it seemed silly to get the older version, I just hoped it would still work with your softwareMight be cheaper on aliexpress. I think Topdon have some grey importers and maybe cloners but I was hoping they wouldn't be cloning this new one yet.

author: G28
author_rank: Regular Contributor
timestamp: October 26, 2024, 08:15:25 pm
content: There seems to be various differences in the outputs between the stock TC001 and the PLUS model.v4l2-ctl --list-devices --allUSB Camera: USB Camera (usb-0000:00:14.0-6):/dev/video0/dev/video1/dev/media0Driver Info:Driver name : uvcvideoCard type : USB Camera: USB CameraBus info : usb-0000:00:14.0-6Driver version : 6.1.90Capabilities : 0x84a00001Video CaptureMetadata CaptureStreamingExtended Pix FormatDevice CapabilitiesDevice Caps : 0x04200001Video CaptureStreamingExtended Pix FormatMedia Driver Info:Driver name : uvcvideoModel : USB Camera: USB CameraSerial : 200901010001Bus info : usb-0000:00:14.0-6Media version : 6.1.90Hardware revision: 0x00001101 (4353)Driver version : 6.1.90Interface Info:ID : 0x03000002Type : V4L VideoEntity Info:ID : 0x00000001 (1)Name : USB Camera: USB CameraFunction : V4L2 I/OFlags : defaultPad 0x01000007 : 0: SinkLink 0x02000010: from remote pad 0x100000a of entity 'Extension 4': Data, Enabled, ImmutablePriority: 2Video input : 0 (Input 1: ok)Format Video Capture:Width/Height : 256/192Pixel Format : 'YUYV' (YUYV 4:2:2)Field : NoneBytes per Line : 512Size Image : 98304Colorspace : sRGBTransfer Function : Rec. 709YCbCr/HSV Encoding: ITU-R 601Quantization : Default (maps to Limited Range)Flags :Crop Capability Video Capture:Bounds : Left 0, Top 0, Width 256, Height 192Default : Left 0, Top 0, Width 256, Height 192Pixel Aspect: 1/1Selection Video Capture: crop_default, Left 0, Top 0, Width 256, Height 192, Flags:Selection Video Capture: crop_bounds, Left 0, Top 0, Width 256, Height 192, Flags:Streaming Parameters Video Capture:Capabilities : timeperframeFrames per second: 25.000 (25/1)Read buffers : 0User Controlsbrightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=0contrast 0x00980901 (int) : min=0 max=100 step=1 default=50 value=50saturation 0x00980902 (int) : min=0 max=100 step=1 default=64 value=64hue 0x00980903 (int) : min=-180 max=180 step=1 default=0 value=0white_balance_automatic 0x0098090c (bool) : default=1 value=1gamma 0x00980910 (int) : min=100 max=500 step=1 default=300 value=300power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=10: Disabled1: 50 Hz2: 60 Hzwhite_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=10 default=4600 value=4600 flags=inactivesharpness 0x0098091b (int) : min=0 max=100 step=1 default=50 value=50backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=0 value=0Camera Controlsauto_exposure 0x009a0901 (menu) : min=0 max=3 default=3 value=31: Manual Mode3: Aperture Priority Modeexposure_time_absolute 0x009a0902 (int) : min=50 max=10000 step=1 default=166 value=166 flags=inactiveexposure_dynamic_framerate 0x009a0903 (bool) : default=0 value=1

author: artag
author_rank: Super Contributor
timestamp: October 27, 2024, 12:22:37 pm
content: Does what I posted make sense ? I don't really understand the output but although it lists two streams at the top they're not distinguished in the driver. Does it set up some sort of composite driver that can handle the combination ?Would it be helpful to show the same output for the TS001 ?

author: G28
author_rank: Regular Contributor
timestamp: October 27, 2024, 03:16:42 pm
content: For clarity and completeness, you could run the command on each /dev/videoN device.The video format, resolution, FPS, image size and color format all appear off.Motion-JPEG is a lossy compression format, so it will scath the thermal data (temps won't be correct).The Topdon specs state 25 FPS, but your output indicates 30 FPS. Same goes for the frame and image size.Most of that data would prevent my app from working, so I am surprised it does unless the command is dumping the information for another device.Code:v4l2-ctl --all --device /dev/video0v4l2-ctl --all --device /dev/video1v4l2-ctl --all --device /dev/video2v4l2-ctl --all --device /dev/video3Also, does your Linux computer have a built in video camera (e.g. laptop) ?

author: artag
author_rank: Super Contributor
timestamp: November 16, 2024, 01:55:21 am
content: Apologies for not following up on this.Yes, there do seem to be some peculiarities. I'm also getting absurd spot temperatures registered so I need to investigate fuirther.I have two applications for this at the moment. The TS001 is mostly for hardware debug where the manual focus is good and the focal length Ok. After getting that I wanted to use it in a turnkey mode where the camera is controlled by a raspberry pi (currently 4 but I may change to a 5. Also have a recent intel NUC available).In this mode I've had some difficulties. Ideally it would be started from a script and left running. Typically there is no keyboard/mouse on the pi. I have tried to give it setup commands via stdin but there seems to be some conflict with openCV. If I provide an input file it reads it but when it reaches EOF it closes the application. If I don't redirect input then it will run until a control-d and then terminate. This might be OK but it also ignores any other input (the first thing I need to do is send 'hhh'.I've rushed through this and am currently setting up manually as I can't find a way to automate. I'd like to solve this but time is limited. I hope I can be more thorough soon.I have a number of possible test options :Desktop machine that normally has another USB camera but can be detachedLaptop with built-in cameraRaspberry pi with no camera fitted

author: Rampler
author_rank: Newbie
timestamp: November 20, 2024, 06:42:57 pm
content: Hi,i have more then one camera attached to my computer.In order to be sure that the P2Pro gets always the same /dev/videox device, this rule is working:Code:sudo nano /etc/udev/rules.d/50-usb-access.rulesSUBSYSTEM=="video4linux", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="5830", ATTR{index}=="0", SYMLINK+="video10"Only reconnect the cam (no udev restart is necessary) , now it is usable as /dev/video10:Code:ls -ali /dev/vide*719 crw-rw----+ 1 root video 81, 0 Nov 20 16:32 /dev/video0720 crw-rw----+ 1 root video 81, 1 Nov 20 16:32 /dev/video1904 lrwxrwxrwx 1 root root 6 Nov 20 19:12 /dev/video10 -> video2897 crw-rw----+ 1 root video 81, 2 Nov 20 19:12 /dev/video2898 crw-rw----+ 1 root video 81, 3 Nov 20 19:12 /dev/video3Maybe you have to adapt Vendor and Product...Klaus@Klaus-Werkstatt:~$lsusb....Bus 002 Device 013: ID0bda:5830Realtek Semiconductor Corp. USB Camera....Maybe it is useful for other's ..PS: Instead of choosing Video x, a name would be nice, for example /dev/video_p2pro

author: Rampler
author_rank: Newbie
timestamp: November 20, 2024, 07:52:49 pm
content: Hi G28,the InfiRay P2Pro is able to measure up to 550 (-20℃ to 550℃) degrees.It seems, that your software have a range until 180 degrees, isn't it ?Is it possible to change that ?regards from germany

author: artag
author_rank: Super Contributor
timestamp: November 25, 2024, 01:17:51 am
content: Both the Topdon TS001 and the Topdon TC001+ thermal part also identify as 0bda:5830. This is OK for the TS001 as it appears to function the same as the p2pro. For the TC001+ it's not so good as it appears to need to be driven slightly differently.The TC001+ also contains a visible-light camera which identifies as 0bda:3031 and a USB hub type 05e3:0610.

author: ir-30thz
author_rank: Newbie
timestamp: February 17, 2025, 08:22:28 pm
content: As a newbie, many thanks for all the work which has gone into Redux which I have working with an InfiRay P2 Pro running on a RPi4.I would be very interested in the proposed temperature data logging vs time. The Windows version of the TCview software already has this option but data is only saved once every second which is rather slow for a ham radio project I have underway. Ideally something like 10 times/second would be nice or maybe set the time interval as a user selected option?

author: Quincy
author_rank: Newbie
timestamp: March 30, 2025, 10:32:42 am
content: First I have to thank @G28 for all the work having been put in this nice piece of software.I'm still exploring all the functionality existing and trying to understand things that turned up using a more recent version of OpenCV on my Gentoo Linux box.

author: Quincy
author_rank: Newbie
timestamp: March 31, 2025, 08:00:06 am
content: Quote from: Rampler on November 20, 2024, 07:52:49 pmThe underlying sensor module of P2 Pro/TC001 uses two different ranges as reported in @Fraser'sextensive review. The lower one/high sensitivity is specified till 170 °C , but recommended to be used till 120 °C. The upper one covers 120-550 °C.Quote from: G28 on October 18, 2024, 11:25:44 pmRedux does not send any commands to the camera, therefore currently there lower (default) range is the one always active, which obviously maxes out at about 180 °C in display (and internal ADC of sensor). So unfortunately it's not just re-scaling the read data, but switching modes on the camera module itself to switch into the low sensitivity mode for extended range.LeoDJ has announced inhis postthat he figured out how to send commands to the camera including switch to high temperature mode. The magic is in his codehereandthere. This sends the command needed to the camera via USB to select between high-gain (mode 1, low temp range) and low-gain (mode 0, high temp range).My module always starts in high-gain mode, but it can be switched anytime to low-gain mode. After the next calibration (shutter clicking) temperatures are updated correctly with new mode. This is even possible while redux is running as there is only reading from the video channel, but not blocking the other USB functions. I stripped down P2Pro-Viewer to the USB communication part to use it as a kind of "module control app". Then you can achieve what you want as shown in an example with a soldering iron at about 250 °C (left: high gain; right: low gain):Edit: I just see something is wrong with temperature color scale. The marker obviously says 33.7 °C/35.5 °C for the lamp head, but colors indicate something around/above 100 °C in both screenshots, which is certainly not true, but the label is.

author: G28
author_rank: Regular Contributor
timestamp: March 31, 2025, 05:45:52 pm
content: Quote from: Rampler on November 20, 2024, 07:52:49 pmSorry for the late reply, for some reason I am not getting thread notifications.The REDUX software does not write to the camera. I did NOT want to accidentally brick anyone's camera, so it operates in READ-ONLY-MODE.I contacted TOPDON multiple times for the command set and comm protocol, but they never responded other than saying they were going to get back to me.They never did.

author: G28
author_rank: Regular Contributor
timestamp: March 31, 2025, 05:53:32 pm
content: Quote from: ir-30thz on February 17, 2025, 08:22:28 pmCould you elaborate more on what you would want logged and what your use cases are ?The camera is 25FPS (assuming no dropped frames) so you are requesting it to log @ half its frame rate.This will require more procession power, so something probably reserved for a stronger processor with a speedy storage device.

author: G28
author_rank: Regular Contributor
timestamp: March 31, 2025, 05:54:53 pm
content: Quote from: artag on November 25, 2024, 01:17:51 amI see TOPDON is coming out with new models. I only have the original model to experiment with.

author: G28
author_rank: Regular Contributor
timestamp: March 31, 2025, 06:27:40 pm
content: Quote from: Quincy on March 31, 2025, 08:00:06 amThanks for pointing this out. I will have to do some investigation.Using the rulers and digital displays are always more accurate than the colors because widgets directly represent the thermal data where the color pixels do not.I know the camera modifies the image using filters to enhance the visual appearance. These modifications distort the pixel color to temp mappings. 1 of 256 CLUT index mapping to a given temp sub-range doesn't work pixel for pixel as one would first think.I haven't tested at extremely high temps like soldering irons.It maybe using a non-linear distribution between temps and 256-CLUT entries.It might also be an artifact of poking values to the camera.P.S.I have been playing with AI and code generation. I may try putting AI on this app to see if it can recommend any improvements.

author: Quincy
author_rank: Newbie
timestamp: March 31, 2025, 07:24:13 pm
content: The last image (with "Bone" colormap) has not been taken without any tinkering of settings in the camera. The camera has been unplugged before and thereby reset everything to low temperature range. Therefore the hot air gun made it to the second pic, not the soldering iron which starts at 200 °C. But I think we can rule out the different gain setting to be the problem. The discrepancy of the color map just gets worse/more obvious the higher the temperature differences in the image are.I did not read (neither understand) the whole code: The false-color image is generated from the "upper half" of the video the camera originally sends itself? It's not produced from the "raw data" in the lower half, but only the markings/rulers take data from there? But both "substreams" are displayed if redux is switched to the double window layout?P.S.: I posted the color map thing as an issue to Github (which you obviously found), because I thought it would be more suited for software development/following single issues than "general chatter and discussion" done here - but I don't mind as long there is productive discussion.

author: Quincy
author_rank: Newbie
timestamp: March 31, 2025, 08:28:08 pm
content: OK, I think I can answer my own question without having to look at the code. If I set redux to color map "None", switch to side-by-side view (which indeed displays both substreams sent by the camera) and change camera's pseudo-color type to "PSEUDO_IRON_RED" using LeoDJ's commands, i get this:Looks like a side-by-side image produced earlier by others using ffmpeg, just with the false colors here coming from the camera itself instead from redux.The initial mode camera starts with is 1 = PSEUDO_WHITE_HOT as it is named inLeoDJ's code. This is also reported by the camera and I assume that there is already some translation function applied to the raw image making the color map non-linear to the temperatures and thereby causing the mismatches I've encountered.So why do we use the upper substream of the image at all and not just take the real temperature stream, rescale it to 0-255 and then apply the false color maps? I think I'm missing something obvious, so please point me there...

author: G28
author_rank: Regular Contributor
timestamp: March 31, 2025, 08:29:12 pm
content: Quote from: Quincy on March 31, 2025, 07:24:13 pmGithub has locked me out until I use some form of dual authentications (2FA). I do not have a smart phone and don't intend to tie them to one if I had one.I will try to answer your questions.The camera sends 2 subframes, image (eye candy) and thermal data (kelvin temps per pixel).The 1st subframe is the image direct from the camera (with a 256 entry CLUT applied), not the thermal data. It contains the camera's dithering (think color newspaper print from a dot-matrix printer), edge enhancements, visual eye-candy filters, etc. which are not direct mappings to the thermal data in the 2nd frame (which I initially assumed it was). Any of the camera's visual settings/filters with further alter the color to temp mappings in this subframe.The 1st subframe does not contain any legends, text, crosshairs, widgets, plots, temp displays, thermal gradient widgets, etc. Those are all derived/generated in the REDUX app from the thermal subframe and then overlayed on to the 1st subframe by the REDUX app using graphics rendering APIs available in the OpenCV library (video frame with graphics overlays). This composite image is what you see on the screen and what snapshots are taken from.Other filters including interpolated scaling/blur, etc. is part of that composited image all done in the REDUX app.The code has been "highly" optimized to read and process all 49,152 kelvin temps (@ 12.3M/second) in the 2nd subframe to discover the frame's MIN/MAX/AVG, the temps for all of the widgets, text displays and rulers. The horizontal ruler plots 256 discrete temps and the vertical ruler plots 192 discrete temps in landscape mode, all read from the 2nd-subframe. If you are running with both rulers on, you will have (MIN + MAX + AVG + 256 + 192 = 451) temps displayed/plotted per major frame up to 25 times per second. Most all the math is done in Kelvin for speed and then only the resulting display subset is converted to C or F to save CPU cycles.NOTE: There maybe more than 1 MIN and MAX values in a frame, only the 1st one found is plotted in text. The entire frame could be the same temp, thus all pixels would be MIN/MAX/AVG with MIN and MAX being the 1st pixel in the top-left corner.The 2nd subframe contains the per-pixel temps stored in Kelvin. If you map [minK to mapK] to a given 256 CLUT, you get a picture much different than what is in frame 1. Its appearance is very "soft/fuzzy" depicting the actual temp transitions.Someone requested a feature to lock auto-ranging so that is how I discovered the mapping anomalies in the 1st subframe. I also discovered that if I generated an image from the raw thermal data, I could add my own image enhancement eye-candy filters to approximate the functionality of the camera. I used this technique to "lock" the cameras autoranging. I don't use the 1st subframe in this mode, but derive a replacement 1st subframe from the raw thermal data, a given colormap and some image enhancement software filters.As for the last question, REDUX can display both the image frame and the raw thermal data frame.Here is an example displaying both the image frame (which is mapped to a 256 CLUT) and the raw kevin values from the 2nd subframe.The reason why the 2nd image looks like it is nuked is because the 1st subframe's values are CLUT indexed to the range of [0-255] while the kevin values are not in that range and would have to be converted to that range (e.g. subsets of temp ranges to 1 CLUT entry because there are more than 256 temps).

author: G28
author_rank: Regular Contributor
timestamp: March 31, 2025, 08:46:09 pm
content: Quote from: Quincy on March 31, 2025, 08:28:08 pmI hope my last post answers your question.To software emulate the 1st subframe's eye-candy image enhancements, it takes a lot of CPU cycles which would make REDUX not work on some of the weak hardware it currently runs on. Without the edge enhancements, image detail would be lost.Python is way to slow to do most of the functions in this app while maintaining frame rates.The C++ OpenCV implementation also adds overhead over a raw C implementation that I could not optimize out of the app.

author: Quincy
author_rank: Newbie
timestamp: March 31, 2025, 08:57:09 pm
content: What a timing - one minute apartBut your explanations match very well with what I found out a bit the hard way above.You write, that there is already a mode generating an image from the raw temp data ignoring the cameras 1st subframe - that's what comes with the "l" shortcut in conjunction with "i" and "k" - I have to explore that.Up to now I see it always running pretty fast- but I'm not on a RPi, but some normal PC hardware (old, but still a Intel Core i5-7200U which I think still beats most of the RPis tested so far).OK, so Github is out in your case - what a pity. I was not "choosen" to use 2-FA yet there (likely because of my very little contributions), so I did not notice it's already mandatory since some time.

author: G28
author_rank: Regular Contributor
timestamp: March 31, 2025, 09:50:36 pm
content: I had posted a couple of smaller ALSA sound card/mixer mods prior to the REDUX app.Focusrite doesn't formally support Linux so I added my requisite support features to a pre-existing mixer project.They are getting free code so I don't know why they need to track your every move.I posted this on the REDUX page before the 2FA window closed.

author: G28
author_rank: Regular Contributor
timestamp: March 31, 2025, 10:34:01 pm
content: Quote from: Quincy on March 31, 2025, 08:57:09 pmIt looks like Linux's stock OTPClient package maybe suitable to satiate github's 2FA requirement with no biometrics, QR readers, USB keyfobs, google/social media accounts, external hardware, bank accounts, bitcoin wallets, etc.If so, I may look into it further.FWIW, I just built out my 1st 14th gen box and REDUX is actually able to run on it !!!

author: Quincy
author_rank: Newbie
timestamp: April 01, 2025, 05:01:06 am
content: I've seen the message (letters are big enough), but as there was neither an update here or there I did not think more closely about it.Back on topic of thermal cameras:I really like the offline mode very much - you can go back to whatever snapshot one has taken and work with it as if it were live. Also the locking is very useful for various reasons. IMHO it is not stated clear enough, that in this mode the thermal image itself is used for generating the main image. I would not be able to recognize as (except for the colors) it looks so similar to the original output of the camera.In offline mode I can even produce a side by side comparison of what I found as erroneous earlier:I took my old raw image fro offline mode, locked it and applied "Map 1" which is according to console output "Mapping filter: LINEAR".On the left side there is the original camera image with added "Inv HSV" mapping, where the scale labels do not fit with labelled temps. Applying some color map to the obviously already mapped image fails - especially obvious if the range is large. On the right side the colors match the scale given for the left image: Power supply and lamp head with some blueish color indicating 30 °C and not in the mid of the images total temp range.The left image definitely gives more visual guidance because there are more objects/contours visible, but I think no information in the image should be contradicting each other. According to screenshots of the original app it only labels the extremes of the scale with temperature, but nothing in between - to avoid the problem of non-linearity? As stated earlier I'm not too much into resource effectiveness in the first line in my current use case, but definitely not when content is wrong because of that.So easiest way to solve this with minimal impact to current functionality and optimization for low-power platforms IMHO would be:- do not display intermediate temperature labels next to the scale if we are not sure about its calculation- as this is seems to always be the case with post-processing the 1st camera sub-stream, indicate the stream used for generation of the (sub-)window somewhere (as it is has already been started by "Img" and "Therm" indicators)- add a scale bar (like it is now with intermediate labels) to the self-produced image with known mapping if it is present (generated from 2nd sub-stream because of locking and such)Another track would be to fiddle out how the camera transforms the scale and reverse that processing to end up with something that we know. But I assume that also is computationally intensive like "forward processing" the raw temperature image due to the fact we need to apply some transformation function to all pixels present?BTW: In offline mode there is no display change between "Clip" and "Grow" (obviously because it makes no sense with static information), but I still need to press "l" two times to get back to default, while nothing changes in display with the second key press. Perhaps it cycles through both modes in the background?

author: G28
author_rank: Regular Contributor
timestamp: April 01, 2025, 05:35:55 am
content: I used a technique from the film era to do the edge enhancements called GaussianBlur, which contrary to its name Blur, actually increases image quality.Gaussian blur, a common image processing technique, can be used to enhance edges byreducing noise and smoothing out unwanted details, making edges appear clearer and more defined.Now that there are AI queries, there might be better alternate methods to employ.Maybe hook up the camera to AI for extreme image processing and deep fakes ?To address the color gradient linearity, I would rather try to reverse engineer what the camera is doing offline and then emulate its behavior in real time to retain the color gradient widget.Yep, the blocking of auto-ranging was one of the last features added. About the only use it has in offline mode is for debugging since there is only one static temperature range from a single frame. Maybe that could change if logging and logging playback is added to offline mode.The offline mode was my idea after trying to analyze thermal audit snapshots of my home. It quickly became painfully obvious that I always wanted a different colormap, filter, ruler location, rotation, interpolated zoom level, etc. after taking the snapshot. A still JPEG would not provide that information.

author: ir-30thz
author_rank: Newbie
timestamp: April 03, 2025, 10:56:37 am
content: Sorry for the slow replyI would be happy to just have a measurement of the maximum temperature within a small area of the picture several times a second. The exact number is not too important but better than 1/second which is what TCview offers.I am interested in ham radio using 30THz radiation (10um wavelength, infrared) and want to monitor the surface of a remote parabolic dish which is being illuminated by a hot source which can be turned on and off so as to transmit slow Morse code.

author: Quincy
author_rank: Newbie
timestamp: April 07, 2025, 07:27:01 am
content: Quote from: G28 on April 01, 2025, 05:35:55 amI do not want to remove the widget completely, just make it correctly labelled by removing the intermediate labels (which are wrongly indicating the color to temperature relation) and only keep start and end (which are correct) when working with the 1st sub-stream data (left side of my last image pair).If the intermediate labels are correct because there is a linear scale (right half of the last image pair), the should stay as they are because they help getting better information of intermediate colors.Quote from: G28 on April 01, 2025, 05:35:55 amThat would be nice and enable to always have intermediate labels which are correct. I just guess it needs some more work to figure out function they apply to the color scale - basically the difference between the linear and their interpretation. From the images it seems there is some compression of the scale on higher temperatures, but that may be only because of the low number/small area of hot spots.Quote from: G28 on April 01, 2025, 05:35:55 amThe video currently getting recorded is from the displayed output which has basically the same limitations that you describe for the JPEGs. Why not record and later offline replay the original streams to use them?Recording temperatures in some text format as @ir-30thz describes is another story IMHO. The full matrix stream (2nd sub-stream) is hard to parse if it is a video, but it seems there is the need to extract data in a textual form out of this stream. I think people there want to use the usual suspects like Python (pandas, numpy), R (tidyverse, data.table, array), Matlab and such.For basic "home use" one could write out a table with multiple columns of temperatures at given markers together with a common timestamp column for all of them ("wide" data format). Rate of recording could be a setting (based on frame rate or some time). If markers could be also areas (currently only single pixel spot) and a function applied to that area which produces a single value (max/min/mean) this would also be a concept working for more complex cases.Problem with such a solution: It's involving more GUI features to set up what is needed and as I'm not into OpenCV I don't know if there is much of this functionality already present in the library to not have to code that all yourself.