Overview about IR image processing and its raw information storage

Hi, I’m new to image processing and OpenCV. I’m here to educate myself about what are the rights tools for the work.
I’m working on a new project dealing with IR images, actually a stream of images. What I think I would like to accomplish is to read this stream of images and process it on-line to give some insights on the monitored process. I wanted to ask you, if you have experience or knowledge, if my idea is good:

  1. Read the proprietary IR thermal information from the camera stream using its SDK. This should output the RAW information from the radiometric file: (640x480) matrix with each pixel having 16 bit of dynamic range to store the temperature.
  2. Use OpenCV to actually process the image, e.g. take a desired ROI, preprocess/process the information and run some algorithms online. This is the goal of OpenCV, right?
  3. Now I need to storage and move the raw information, e.g. save it to the cloud to archive the data. What can I do in this step? I tried educating myself but I found no reference or best practices. What I know is that since the matrix of information is the actual data (the radiometric information), I am not able to compress the image. Is there a best practice to save the data? What I thought of was: having a dataframe-like structure to save the metadata of the images, e.g. a parquet file, and a binary RLE of the raw information (since I expect there will be many black pixels around the object analysed in the desired ROI, so I can take advatange of it). Does OpenCV have functions to handle this situation? Are there other libraries to storage IR images efficiently?

Any input is appreciated, thanks!

why is that? it’s a thermal image?

no. that’s for runs of equal values. you don’t have that.

real-world measurements contain noise.

either store without compression, with lossless compression (which will hardly do anything), or compress lossily, which is perfectly acceptable since the measurements already contain noise anyway.

store as individual images, or as video. OpenCV can do both.

again: no. those are “relational tables”. you don’t have that. you have 2D scalar data.

never ever put “image” data into a “dataframe”. that’s bad and wrong.

make sure you understand that word and its applications.

“online” can mean “as it happens”, or “real-time”.

“online” can also mean “someone made a webservice on the internet”.

that is beyond the scope of computer vision. store your data wherever.

you could simply store it locally, unless you plan to work on devices that don’t let you do it.

Yes, it is a thermal image. Each image has a resolution of 640x480 and I expect each pixel to have 2 bytes (16 bit) of thermal information. This will be checked against the SDK as soon as I have access to it.

The desired ROI would contain the desired object plus some space around it where the thermal information would be close to the baseline (the end of the dynamical range, I suppose) so I expect black or close to black pixels. That is why I wanted to exploit compression.

If I understand correctly, since the measurements are already noisy, it is expected that those blacks will not be the same, so RLE for instance will not do anything, also other lossless compression such as PNG (I read about it today).
So I either save the full information because lossless compression will hardly do anything or I use lossy compression. Is that right?

What if I decide to save the full information without lossy compression and manipulate the 2D vector into 1D vector flattening the information? The resolution is fixed as well the bit of each pixel. I could store the binary information into one column along with other columns containing the metadata of the frame. Is that bad?

On the other hand, if I decide to go along with lossy compression, I expect each frame to have a different size. In this scenario, I can’t use a dataframe-like object and I could save the individual frames to individual files and have a dataframe-object to store their id/metadata.

By online I mean the opposite of offline, that is “as it happens” with no time deadline constraints. By realtime I mean “with deterministic time deadline constraints”. The framerate is 1Hz so if the processing will be under that period, it would be cool, otherwise we will see.

I wish to understand the previous questions in order to select an educated way to store the information and later transmit it, either locally or into the cloud and viceversa.
I understand my questions are not related specifically to OpenCV, do you know a place where I can ask the same questions to different kind of users? Thank you a lot.