07-23-2013 02:25 PM
Here is my current VI...
07-23-2013 02:49 PM
It's error with WriteBMPFile cause you are deallocating (IMAQ Dispose) the Image inside the Aquisition Loop before save it.
07-23-2013 02:54 PM
How should I fix that? I need to dispose of the images at some point right?
07-23-2013 03:01 PM - edited 07-23-2013 03:22 PM
If there isn't before ... should be after, agree? 😄
07-23-2013 03:06 PM
Hmm, still not working. Absolutely no files show up.
07-23-2013 03:24 PM - edited 07-23-2013 03:24 PM
Sry, i had make one mistake. Image updated in previous post.
Look two attached examples. Both still working.
'm using IMAQdx Functions instead.
07-24-2013 10:41 AM
I really appreciate your help!
Something pretty frustrating has just happened. I wired an error message to the save BMP portion and noticed that the BMP selection resulted in an "invalid image type" error. Can I not save my image as a BMP?! That seems rather odd.
So I decided to select PNG instead. I actually named the file that I was saving as *.bmp, and checked my folder to see what happened. It was a BMP image (hurray?), but I have a feeling that it is not a raw BMP. Does selecting PNG and then writing .bmp compress the image and lose data or something?
And, any help regarding using write to file to actually save a BMP.
The rest of the code is working perfectly!
Thank you.
07-24-2013 12:01 PM - edited 07-24-2013 12:02 PM
Functions: IMAQ ColorImageToArray, Flatten Pixmap and Write BMP File
07-24-2013 02:41 PM
Ok, so I just realized the a 24 bit is probably unecessary. I am working with grayscale images from a 12bit camera. The images go straight to 16 bit, but the read in BMP VI does not support 16-bit. How can I work with the arrays of these 16 bit images, also how can I save them as 16bit in the first place?
The code I wrote to work with the arrays is for 24 bit images. So if there is an easy way to get the image to 24 bits in the first place I guess I could do that.
07-24-2013 06:10 PM - edited 07-24-2013 06:20 PM
I think should be better consider force a "typecast " with IMAQ CastImageType Function to U16 (If need) and use PNG format and write into file using IMAQ WriteFile2 Function. U can swap the extensions (Putting bmp instead png) in filepath (Works as the same)... consider this like a pseudo-workaround 😄
I found it inside Read BMP File Header.vi . Labview cannot handle 16 bits BMP. Even using Vision Toolkit (Always throws an error in Write BMP File)