Using ht-301 with USB-C to HDMI converte - Page 1
Forum section: electronics / general

author: Tavana
author_rank: Newbie
timestamp: November 24, 2020, 06:19:22 am
content: HiI have seen some post that ht-301 can connect to PC as webcam.But I am interested to know is it possible to connect it to USB-C to HDMI converter and viewing images and videos on monitor?

author: Spirit532
author_rank: Frequent Contributor
timestamp: November 24, 2020, 06:20:02 am
content: No.

author: zrq
author_rank: Frequent Contributor
timestamp: November 24, 2020, 09:40:50 am
content: no

author: angelortega
author_rank: Contributor
timestamp: November 24, 2020, 08:35:49 pm
content: All you need to do is link your phone to your tv using mirror cast type apps. No hdmi cables needed.

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: November 25, 2020, 04:37:19 am
content: Just to add a little dimension here since USB-C is confusing: USB-C has a bunch of alternate modes that aren't USB at all, including DisplayPort. A USB-C to HDMI converter ingests DisplayPort on one end, and sources HDMI on the other. Since the HT-301 is a USB2.0 webcam, that's utterly inapplicable here.As far as webcaminess - the HT-301 enumerates as a USB Video Class device, aka UVC. It'll show up in most webcam apps regardless of platform you plug it into, as long as they support USB webcams. The UVC class has some support for sending commands to the camera, such as "zoom level" and "focus" and so on, which the HT-301 repurposes to, for instance, cycle the FFC shutter or switch the camera to radiometric output mode. But otherwise, it just streams YUV video like any old webcam.Long story short, if you want to see it on any old monitor, you'll need a computer between the two.

author: Tavana
author_rank: Newbie
timestamp: November 25, 2020, 09:17:30 am
content: My goal is to use ht-301 on drone.For receiving live thermal videos in ground station in need to convert it to HDMI (There are some light weight Transmitter/Receiver sets for drones that have HDMI input). I want to know what is the solution for this job. I think should connect ht-301 to a Raspberry PI and using HDMI output of the PI to feed the transmitter.Do you have any comment?

author: Tavana
author_rank: Newbie
timestamp: November 25, 2020, 09:28:36 am
content: Thank you. May I ask you to please explain how can I extract radiometric data from ht-301 when I using it as a webcam. (Connecting it to PC or Mini-PC).

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: November 25, 2020, 04:52:06 pm
content: Oh - I realize now you PM'd me AND replied to the thread.Here's my reply for anyone else interested:I'm not sure exactly what you mean. Do you simply want to record video? Do you want to beam thermal video back to ground so you can search for a target or something? Just want to get video from a roof?A couple things jump to mind:* Try installing PiOS on a Pi Zero W, without a desktop environment. I'm not sure exactly how, but you should be able to capture any old webcam to a video file with some command line tool (V4L?). That'll get you video recorded in the air.* Streaming over WiFi should be comparably easy. Again, I'm not sure how, but you should be able to use some command line utility like ffmpeg to stream the camera feed over RTSP, and watch that video with an RTSP client on your phone or something on the ground. Obviously, you'd be limited to wifi range of the Pi, which won't be great. You're on your own for figuring out how to do longer-range wireless video.* One or two thoughts there though: the Pi Zero has composite video out, so if you DO install a desktop environment on the pi and set up the pi to open a full screen viewer for the webcam as soon as it boots, you should be able to pipe that out over composite video and into a drone FPV link, which you can buy off the shelf. I imagine that'd work OK.Anyway long story short, the complex piece of this project is software on the raspberry pi. Getting video out of the thermal camera is as easy, in your case, as getting video out of any old webcam.Also, I'm not sure why you DM'd me - I'd encourage you to start a thread about this (and feel free to copy/paste this reply) so others can chime in. You're probably not the first to want to try this, or the last.*****Adding a little per the two messages here:I stand by that you need a raspberry pi or something to handle the webcam on one side and output video on the other. I think the FPV transmitter/receiver is the right call, and either HDMI or composite would work just fine to basically just transmit the Pi desktop output. I imagine composite would be a bit lighter weight in terms of cables, and probably processing power too (i.e. battery life), but I don't know.As far as how to extract radiometric data: This info isn't yet very practical, but the "SDK" from zrq over athttps://www.eevblog.com/forum/thermal-imaging/software-for-xtherm-t3s-and-ht-301/has good info in it about how you run this camera. To get radiometric output, you send a command over the "zoom control" channel of UVC to put the camera in radiometric mode. Basically, in non-radiometric mode, the camera streems grayscale video in YUV (I think yuv422) format. VLC or ffmpeg or your camera app or whatever will interpret this as greyscale video, and it'll look like a white-hot thermal image. If you send the camera the "give me radiometric" command, it just switches from YUV format to "16 bit integer per channel" format. The integer isn't a TEMPERATURE, but a raw value that needs to be mathematically processed with emissivity, humidity, temperature, and a few other parameters to calculate actual surface temperature (I don't have that working properly yet). If you switch to this mode while watching the video in something like VLC, the image goes all crazy simply because data is no longer aligned to the YUV fields in a relevant way.Long story short, for your purposes, I'd ignore radiometry for now. Just get it working streaming the normal webcam feed. Later on, you could write an app to save out radiometric video while viewing the stream to transmit via HDMI or whatever.

author: Tavana
author_rank: Newbie
timestamp: November 25, 2020, 09:42:26 pm
content: I appreciate your help.Thank you very much.

author: Tavana
author_rank: Newbie
timestamp: November 25, 2020, 10:09:56 pm
content: Can I use HDMI output of the Zero pi W or should use composite only?Quote from: alexwhittemore on November 25, 2020, 04:52:06 pm

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: November 25, 2020, 11:28:07 pm
content: Either is fine - I just suggested composite because I didn't realize you already had an HDMI transmitter. HDMI obviously offers much better resolution than composite, which isn't super relevant when your image fits well within the composite bandwidth. Also like I mentioned - weight.Using a Pi, hdmi will be easier to set up.

author: Tavana
author_rank: Newbie
timestamp: November 26, 2020, 02:39:45 am
content: Thanks again.

author: mrsteveman1
author_rank: Newbie
timestamp: December 04, 2020, 03:57:57 am
content: We use them at OpenHD on Raspberry Pi, no HDMI converter necessary. Here's a test flight when i was just messing around: