01-24-2014 09:10 AM
Hello All,
I've spent a good deal of time looking into this topic and came up with limited results so I request help from the masses...
I have a FLIR SC7650 thermal imaging camera. FLIR has a ThermoVision toolkit for LabVIEW to interface to their cameras. Just happens that this particular camera is not supported. It is theoretically a GigE camera so I should be able to pull images with LabVIEW vision, which I can do, however I cannot attain the speed I require. For example the camera can record at 200fps but through MAX I can only get 33fps. There are limited features I can access through MAX so I can't really track down the problem. I believe the camera is storing the video to memory for the duration of the recording then transferring it over ethernet to FLIR's software.
Anyway, here is my problem/question. Through FLIR's software I can record a thermal video which gets saved as a .ptw file. In order to do the analysis I require, I have to open the file and export the individual frames I am interested in. It sounds trivial but this process can take hours given the number of videos I have and the number of frames I need to export. Does anyone have experience with opening the .ptw file and grabbing frames from the video in LabVIEW? Through my searching I have found someone did something similar using python. I am in the process of seeing if I can use labpython to reach my goal but figured I would ask here as well.
Thank you,
Chris
01-27-2014 10:23 AM
Hi cjensen,
It might be a good idea to repost this in the Machine Vision forums. People there will have more experience in dealing with cameras and image processing.
http://forums.ni.com/t5/Machine-Vision/bd-p/200
As far as extracting the frames from the PTW file, I am not familiar with that format. I did some searching around but wasn't able to come up with much. Perhaps FLIR has some documentation on how to read the files?
-N
01-28-2014 07:13 AM
Hello Nathanael,
Thank you for the recommendation. I'll give that a try.
Best,
Chris
05-01-2014 03:53 PM
I'm not sure this is what you need, but I can offer this comment: FLIR sometimes uses frame-stacking. This is a technique that combines multiple images into one frame. This is done to save IO overhead for the GigE transfers. When working with a FLIR7650 I found that the camera automatically went to frame stacking of 3 when I tried to do 100 fps at full frame. With the software I had written this meant an apparent frame rate of 33 fps. Meanwhile, the FLIR software reported 100 fps. Sound familiar?
If you want to go further, we can discuss how to set the frame stacking, or avoid it all together, or unstack frames. If you have recordings, it is possible that the recorded data has stacked frames.
Alternately, talk to your FLIR sales/support team and ask about combining frames for transmission over the ethernet connection.
05-02-2014 09:00 AM
bboyce,
Thank you for your comment. I'll take a look into frame stacking. Did you write software to communicate with an SC7650? I find that there is not much of a support base for that particular camera. FLIR support has not been too useful as this is a legacy camera that was basically a product of a French company they acquired. Much of the progress made with the camera has been trial and error rather than guidance from support.
If possible can you outline where the frame stacking option is how to avoid it?
Thank you again for your comment.
05-02-2014 10:06 AM
Hello cjensen,
I'm about to fight the battle again, in that I have another system to put together that will use the 7650 camera. In the process of the setup I will be reviewing all the code. At that time I can make more sure and detailed comments, but until then let me make a few comments.
There is a software from FLIR called Cirrus. It is mainly a control panel software that communicates with the camera over a serial link (works with serial part of CameraLink , or GigE Vision , but I'm not sure about the USB). Cirrus comes on the camera's CD. Look through the User Manual and pay particular attention to section 8.3 which shows you how to access the serial communications between the camera and the computer.
When you start a program like ExaminIR there is a flurry of activity over the serial port and you can monitor it with Cirrus, or the monitor that is built into ExaminIR. The information about what all the commands and responses mean are in a manual called "Silver Interface Manual". There is one code for controling (and monitoring the frame stacking); GIP. It goes something like this you send "GIP" over the serial COM port and back comes "GIP n" where n is the number of frames per packet. You can set the number frames by sending "GIP 1" (1 frame per packet).
I have found that the 1 frame per packet setting does NOT cause any problems on the CameraLink interface that I use, and, though I don't use it much, I don't think there is a problem with modern Pleaora based transfers of GigE data.
FLIR also sells a VIRCAM SDK for the hard core programer, but as a first step you should look at building your own little serial interface. Unforeturnately, Windows 7 does not include a serial port program like Windows XP, so you might find that a commercially available serial port monitor program is useful. Even using a simple serial port IO program you can type in a few commands to see how it works.
As a start, get the Cirrus Users Manual, and the Silver Interface manual. You can go a long way by just sending a few serial commands. FLIR warns that you can do damage to the camera if you send the wrong set of commands, but I haven't been scared off by this, BUT I have limited my commands to a tiny fraction of what is available.
By the way, I belive, the set of Silver Interface commands is the complete control set. I think, if you purchase the SDK you will findi it is a packaging of the serial Interface commands. In my IR camera experience, the SDK is well worth it, since sending a single command for something like pixel integration time is not necessarily a matter of only sending one command, and the sequence of commands is important. The manual says more, but probably not everything.
We use the SDK with VS2010 VBdotNet. Although, now that I think about it, we might have finally decided that we would only use the serial commands directly.
One more comment; FLIR has purchased a range of camera and electronics companies. All of them have written there own little control set. It is maddening, but they promise to unity it all going forward. We'll see.
This might be a little overwhelming, but if this is not all beyond what you are interested in, then maybe we can go further.
Sorry abou the long ramble,
Brad
05-02-2014 12:09 PM
Hi Brad,
Thank you for your through responce, it was not a ramble at all and quite helpful.
I have used Cirrus in the past. It is a long story but when I was looking to externally trigger the camera there was some back and forth between FLIR USA and the French company. Anyway the French company asked for some settings displayed within Cirrus.
I use serial communication extensively both in HyperTerminal for debugging and LabView for developing. While it is no longer included in the latest versions of Windows HyperTerminal works quite nicely. It is basic but I find it more convienient than other "simple" terminal programs and runs within Windows 7 and 8. A quick look through the Cirrus manual shows there is a command line section which allows a command to be sent and the response to be displayed. There is also a "Spy Com" program witin Cirrus which does exactly as the name suggests. I'll look into the frame stacking.
I also found the document called Silver Software Interfaces. Seems there is an aweful lot in there. Thank you for pointing it out.
FLIR has a ThermoVision Toolkit for LabView but unfortunatly it is not compatible with the SC7650. As you mentioned they said all of their current cameras are fully LabView operable.
Thank you again for all the helpful information,
Chris