08-08-2011 12:52 PM
Hi all,
I am using labview 8.6 and I have been reading around the forums trying to find a solution to why my vi is reading in bad data. I have a raw binary video file that can get quite large (I16 data type), upwards of 7 GB as we are running 500 frames per second. The issue is that when I try to read this file in, around 2GB (position varies from 1.8GB - 1.9GB) I get a few bad frames that look like garbage data, lines of black and white pixels are the output of the video file. I have tried loading this video file into a program written in C and it works fine, there are no actual bad frames. So it must be an issue with labview.
After the couple of bad frames the data picks up again and runs fine for the rest of the video. Problem is that those couple of bad frames are in random locations within that readin range and it throws off my centroid tracking. I have included a snap shot of the method I am using to read in the data. About every 1000th frame (~30MB) I refill the buffer using this subVI.
Let me know if you need anymore info, thanks for any help guys!
Joe
08-08-2011 03:14 PM
There may be a mix of Gibi(2^30) and Giga(10^9) bytes. Since your binary file is made of I16, each count takes 2 bytes. 2GB = 1.86GiB, which falls in your range of issues. The overflow of an I32 is around this range too. Not sure how LabVIEW handles file offsets, maybe this will give someone else an idea.
08-08-2011 03:18 PM
I was just reading the file again in an offline analysis program and apparently there are bad frames 😞 So it must be an artifact of how the data is being captured, I will have to look into that code as I didn't write it. Thanks for the advice though.