Lepton-FLiR-Arduino icon indicating copy to clipboard operation
Lepton-FLiR-Arduino copied to clipboard

Lepton 3.5 frame rate and VSYNC

Open TinManAkshay opened this issue 3 years ago • 7 comments

Hi,

I am thinking to use these libraries, but had few questions in mind.

  1. Have you implemented VSYNC functionality successfully in these libraries?
  2. What is the max frame rate you could get?

Please let me know when you can.

Thanks, Akshay

TinManAkshay avatar Apr 14 '21 03:04 TinManAkshay

Max frame rate is the ITAR-Compliant <9Hz (UNLESS YOU HAVE AN UNLOCKED LEPTON, which by the way are all but unobtanium lmao)

ArsenioDev avatar Apr 14 '21 03:04 ArsenioDev

Honestly, back when I was heavily invested in writing this I was only able to go up to an Arduino Due, and even at the 84MHz it runs at barely was able to even get a frame, let alone anywhere near 9Hz. It would basically be unable to do the frame transfer, and quickly go from reading valid frame data to reading the EOF error code for desync (because it took too long to read the frame buffer). All the command functions worked though, so I figured that it just wasn't possible through the Arduino SPI library as implemented at the time (which I have heard is not the greatest).

I've seen people do custom SPI port manipulation stuff (very dependent on your board ofc) to get up to the transfer speeds needed to not desync, but that's kind of a cheap solution. I additionally was told by the makers of the FLiR chip that they would have to radically change their stack architecture to make it so you could read a frame without desync (and just allow a slower SPI transfer speed), so no luck there either. Ultimately I felt like the better solution would be to await a hardware DMA solution - such now exists ofc via STM32, but I just haven't really had the time to go back and work on this library as much as I would like to again.

As well, the fact that you can now do these kinds of FLIR applications on things like OpenMV kinda makes it a more-m00t point, anyways, especially if you want to offload the massive amount of processing speed needed to both read a frame and do any considerable frame specific image processing onto one microprocessor. I did want to still finish it off though, even if it meant using ESP32-CAMs, which I think has its own FLIR library as well (maybe a different language, can't remember, too lazy to Google).

Anyways, if I ever do get back to finishing this, it would be basically be more like a tech demonstrator at that point since it would just be too risky for companies to depend on an external party (i.e. me) for any considerable amount of updates/bug fixes/etc. without a contract in place to begin with. Which I wouldn't want to do, anyways, since that's way too involved.

I'll come back to it eventually. Work kinda takes precedence for now.

Best of luck!

NachtRaveVL avatar Apr 14 '21 08:04 NachtRaveVL

So you are saying that these libraries are working good on ESP32 and Teensy so far? (OR) its still in progress??

Thanks Akshay

TinManAkshay avatar Apr 15 '21 22:04 TinManAkshay

Oh, it's still very much in progress. I was attempting to capture more of the up to v3.5 functionality of the chip, just because that at least was somewhat working through i2c. The SPI interface is probably enough now with the 300-400+ MHz chips we see on the Arduino market (if not the STM32 DMA stuff), but ultimately as mentioned the more specialized chipsets for the task of image processing (such as OpenMV and ESP32CAM) are much better options to be using than an Arduino.

As it stands, it's very much a pet project that I wanna finish it's just that I genuinely have very little time due to work taking precedence.

NachtRaveVL avatar Apr 18 '21 04:04 NachtRaveVL

Side note, I have a proof of concept that I forgot where I got from but runs at 9hz on the t3.2 to display. Gotta dig it out from my source directory sometimes

ArsenioDev avatar Apr 24 '21 04:04 ArsenioDev

Hi!!

I connected Lepton 3.5 to Adafruit ESP32 Feather but I can't read frames from IR camera. I followed @NachtRaveVL examples from her library but I still can't read the frames. I don't know if there is a frequency problems or not. I am using Serial.begin(115200) and Wire.setClock(400000).

Can you help me, please?

GoncaloRodrigues241 avatar Jun 16 '21 15:06 GoncaloRodrigues241

Hey guys, have a look at my NOCTIX-1 project. I have designed and manufactured a PCB based on a 200 MHz PIC32 do use the Lepton 3.5. With a 20 MHz SPI channel I read out the frame packets, and with a 100 MHz SPI channel I visualize the frames on a TFT at 11 FPS now. I am going to implement DMA support, so I expect that it will run faster... have a look at it

hvictor avatar Oct 01 '21 07:10 hvictor