Giter Site home page Giter Site logo

DN to Temp conversion results in a data matrix that exceeds (696, 928) the dimensions of the original camera resolution (640x480) about thermimage HOT 11 CLOSED

gtatters avatar gtatters commented on May 30, 2024
DN to Temp conversion results in a data matrix that exceeds (696, 928) the dimensions of the original camera resolution (640x480)

from thermimage.

Comments (11)

gtatters avatar gtatters commented on May 30, 2024 1

sounds like a plan. It would be fine if someone forked this and started a python version of Thermimage as well.

from thermimage.

aloisklink avatar aloisklink commented on May 30, 2024 1

@ReneHeim, if you are still interested in a Python port of Thermimage, I've ported the raw2temp functionality of Thermimage into a Python package at aloisklink/flirextractor. It currently just works for extracting FLIR .jpgs (since that's all I need), but as it is open-source, feel free to extend it in your own work if you need to do anything else with it.

from thermimage.

gtatters avatar gtatters commented on May 30, 2024

Hmm...I'm not sure I fully understand the question, but I see from running exiftool the raw sensor width x height of your camera is 696x928:

Screen Shot 2019-10-24 at 9 49 55 AM

I can't quite get your function to run at the moment, but I can definitely load your image using readFlirJPG, but you will have to set your width and height to 696 and 928.

img<-readflirJPG("flirpic.jpg")

img.t<-raw2temp(img)

plotTherm(img.t, w=928, h=696)

Maybe I am confused by the statement "larger than the original camera resolution". The images above are from a T540, which is rated online as 464 × 348 resolution. It seems that model is capable of a supermax resolution (i.e. twice the resolution), so I'm not sure why we would expect it to be 640x480?

Are you getting an error statement I can replicate?

from thermimage.

gtatters avatar gtatters commented on May 30, 2024

can you save your function as an .R file? The formatting didn't copy over properly.

from thermimage.

ReneHeim avatar ReneHeim commented on May 30, 2024

Oh no. Glenn. I am super sorry. Sitting here working with a flu and should have looked more properly at the exif information. I read the image resolution. About the supermax resolution, could I set width and height in your function to 464 × 348?

As I am currently doing most of my image processing in Python, would you be interested in converting your functions into Python functions? Python has some amazing image processing tools but your FLIR conversion tool would be an interesting addition.

Cheers,

Rene

from thermimage.

gtatters avatar gtatters commented on May 30, 2024

I think your real width and heights are 928 x 696 for those images. the readflirJPG function and the flirsettings functions or the raw2temp functions do not discriminate or care about the width and height. When reading the image in, however, I take the raw binary output from Exiftool and then have to interpolate that it corresponds to an image of w x h dimensions. I gave up working in matrixes in R since it seemed easiest to simply import the entire image as a vector and reconstitute it as a matrix later (usually vectors show faster computation).

If I knew more python, I would convert the functions. I think a few people have forked Thermimage already and may have done some of their own functions. I'd need to learn more Python to do this. I know it is far more powerful for image analysis, especially with ML.

To answer you question...no I don't think you can set the resolution to 464 x 348 since that is the camera's normal sensor size, but with the ultramax image, FLIR has up-sampled your image by capitalising on the vibration in the camera to sample ~16 images at once and blow up the resolution to double the true sensor size. It's a bit of a cheat and it can confuse us when we think we know the camera's true resolution.

from thermimage.

gtatters avatar gtatters commented on May 30, 2024

just be careful with some of the output from Exiftool that might confuse. For example, the Exif width is listed as 640 for your images. I don't know if that refers to a digital camera image that is also being captured and stored along with the thermal image or not?

from thermimage.

ReneHeim avatar ReneHeim commented on May 30, 2024

Wow! I really admire your knowledge on that topic. I will be starting a postdoc in Belgium/Ghent with Wouter Maes. He has done a lot of work in thermal imaging and UAV research.

Regarding Python, I don´t know how to build modules but for starters, it would be great to build a function that could convert DN to T. Unfortunately, I could not manage to use exiftools in Python. A wrapper exists but I didn´t find anyone how made it work. I was thinking that I could use your function and translate it into Python...

from thermimage.

ReneHeim avatar ReneHeim commented on May 30, 2024

Interestingly, when I convert the image DNs into T with FLIR Tools+, the output has a resolution of 464 × 348...

from thermimage.

gtatters avatar gtatters commented on May 30, 2024

I think that FLIR tools+ won't extract the ultramax data. On purpose. They want you to have a different software for that, or you have to click an option to extract the ultramax data when importing.
If I tackle this in Python, it likely won't be soon enough for you, unfortunately. :( A steep learning curve for me and lack of time at the moment.

from thermimage.

ReneHeim avatar ReneHeim commented on May 30, 2024

I will start converting your function and send it to you once I feel it is useful if you like.

Cheers,
Rene

from thermimage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.