Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

RGB64 Video

Hello all,

 

Given that I now have somewhat of a working vi capturing RGB64 images, my next challenge is to try and save these images into a movie. AVI's won't  work since they only support RGB32 so I've just been dumping the different channel images into separate txt files with a small header file specifying x-y resolutions, and frame rate.

 

Saving, loading and converting using this method is a real hassle. Is there a better way of doing this?

 

Regards,

Anderson 

0 Kudos
Message 1 of 3
(3,422 Views)
I think you've got the right idea...to manually create the file based on the 64-bit format since IMAQ only natively supports writing 8 and 32-bit AVI
--Michelle

National Instruments
0 Kudos
Message 2 of 3
(3,398 Views)

Writing to separate files is very slow.  The operating system has to open and close many different files.  Reading is also slow, because a lot of time is lost locating, opening and closing the files.

 

If it is all going to be in LabVIEW, I would consider using flatten to string, if it supports 64 bit color.  You can configure it to compress or not (although if you compress you lose the benefit of 64 bit color, may as well just use 32 bit).  For each image, flatten it to a string.  Write the strings consecutively to a single binary file.  It will write much faster if you keep the file open and append the strings as you generate them.  Reading them and restoring the image is pretty quick also.  If it is a small movie, you can load the entire file into memory as an array of strings.  Larger movies will require streaming from the disk.

 

Is there a major reason to stick with 64 bit RGB?  Computers can't display it, so they automatically reduce it to 32 bit RGB.  If your movie is just for display, go ahead and reduce it to 32 bit RGB.  Does your analysis really need those extra bits?  Just because your camera is capable of measuring greater than 8 bits per color plane doesn't mean it is necessary to use it.  I haven't seen too many applications that require high bit counts, which is why I ask.

 

Bruce

Message Edited by Bruce Ammons on 11-24-2008 11:59 AM
Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 3
(3,378 Views)