Giter Site home page Giter Site logo

frameLocates() error about thermimage HOT 3 CLOSED

gtatters avatar gtatters commented on May 30, 2024
frameLocates() error

from thermimage.

Comments (3)

gtatters avatar gtatters commented on May 30, 2024 1

Hi Rima

Thank you for posting this. I can confirm that I get the same error.

I worried I might find an issue like this one day! The .seq file type contains meta tags that Thermimage does not fully understand. When the package was put together, I only had access to SEQ files that were generated using Thermacam Researcher Pro.

The frameLocates() function is unfortunately a bit of a legacy function from the time when I first started the package (I was so naive), so troubleshooting this may force me to re-visit some old code. Thus, I'll leave this issue open until/if I get this fixed and will provide updates.

For this reason, I did add conversion functions that would allow you to convert the SEQ file using Exiftool, ImageMagick and FFMPEG, all called from convertFLIRVid.

Can you see if using the convertflirVID function will work on your system:

convertflirVID(v, exiftoolpath="installed", perlpath="installed",
               fr=30, res.in="640x480", res.out="640x480", outputcompresstype="png", 
               outputfilenameroot=NULL, outputfiletype="avi", outputfolder="output", verbose=FALSE)

will generate an avi grayscale file you could analyse without the aggravation.

Or use this to generate a folder of pngs:

convertflirVID(v, exiftoolpath="installed", perlpath="installed",
               fr=30, res.in="640x480", res.out="640x480", outputcompresstype="png", 
               outputfilenameroot=NULL, outputfiletype="png", outputfolder="output", verbose=FALSE)

Regards
Glenn

from thermimage.

gtatters avatar gtatters commented on May 30, 2024 1

Update: I found where the error was in frameLocates. Ironically, I had a calculation in place to check for a particular type of error that I've never encountered. Funny thing, the error check was faulty. So, I've tried to fix it. I uploaded a minor update (v. 3.1.4) and it ran the frameLocates() without error on my system.

v <- "Rec-000099.seq"
camvals <- flirsettings(imagefile = v)
w <- camvals$Info$RawThermalImageWidth
h <- camvals$Info$RawThermalImageHeight
fl <- frameLocates(v,w,h)
frames<-getFrames(v, fl$f.start)
alldata<-unlist(lapply(fl$f.start, getFrames, vidfile=v, w=w, h=h))
alldata<-matrix(alldata, nrow=w*h, byrow=FALSE)
plotTherm(alldata[,1], templookup=NULL, w=w, h=h,  minrangeset=min(alldata[,2]),
          maxrangeset=max(alldata[,2]), trans="mirror.matrix")

rplot

However, the memory use required to load SEQ files into working memory makes the frameLocates() and getFrames() functions unfeasible to use on anything except small SEQ files (<100 Mb). This is why I added the convertflirVID and convertflirJPG functions which would also allow the user to convert files for use outside of R or by re-importing into R as png, tiff, or avi files.

Note: the getTimes() function relies on knowing where the frame time stamps are located in the SEQ files. Your camera file seems to be different than the one I used to extract time stamps, so I would have to examine why that is the case.

v 3.1.4 will be on github. I won't update CRAN until further tests.

from thermimage.

rimamrahal avatar rimamrahal commented on May 30, 2024

Works perfectly, thank you!

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.