wan81 Posted April 22, 2008 Report Share Posted April 22, 2008 Hi guys!!! I was wondering how I can store an image which is represented in 8/16 or 32 bits into a binary image? I know using IMAQ pallete, i can convert an image into an array using ImageToArray VI. However, the image will be represented in an 8 bit or 16 bit format. How can I achieve binary? Please help. Thanks Quote Link to comment
LAVA 1.0 Content Posted April 22, 2008 Report Share Posted April 22, 2008 QUOTE (wan81 @ Apr 21 2008, 07:46 AM) Hi guys!!!I was wondering how I can store an image which is represented in 8/16 or 32 bits into a binary image? I know using IMAQ pallete, i can convert an image into an array using ImageToArray VI. However, the image will be represented in an 8 bit or 16 bit format. How can I achieve binary? Please help. Thanks Hello, I don't think you can create a binary image like you can create a 8/16 bit image. If you create an 8 bit image an perform an IMAQ threshold, the result image IS binary (if you cast it to an array with the IMAQ image to array you get a 2D array of 1s and 0s) but the data type still is an 8 bit image. On the image display on the front panel, to see the binary image, you have to right click the image display, select "Palette" and "binary" http://lavag.org/old_files/monthly_04_2008/post-7452-1208763587.png' target="_blank"> hope this helps Quote Link to comment
tushar Posted April 23, 2008 Report Share Posted April 23, 2008 QUOTE (wan81 @ Apr 21 2008, 12:16 PM) Hi guys!!!I was wondering how I can store an image which is represented in 8/16 or 32 bits into a binary image? I know using IMAQ pallete, i can convert an image into an array using ImageToArray VI. However, the image will be represented in an 8 bit or 16 bit format. How can I achieve binary? Please help. Thanks Though readymade binary file saving is not available you can convert the U8 image into binary format. Please Find Attached Example In the example above i have shown image as 1D array, I hope Converting 2D image data to 1D array isnt big deal Quote Link to comment
Neville D Posted April 23, 2008 Report Share Posted April 23, 2008 QUOTE (tushar @ Apr 22 2008, 01:41 AM) Though readymade binary file saving is not available you can convert the U8 image into binary format. Please Find Attached Example In the example above i have shown image as 1D array, I hope Converting 2D image data to 1D array isnt big deal The approach is fine, but if you have the IMAQ package it is always better to use the IMAQ functions which are much faster and more memory efficient. Getting an image as a large array and then manipulating the array usually highlights the weaknesses of LabVIEW.. dealing with large amounts of data usually invokes the memory manager, or an inadvertent copy or two, which more than likely will slow things down. Like the previous poster suggested, threshold the image to produce a binary image using a number of available thresholding options for manual, automatic etc. from the IMAQ library. Neville. Quote Link to comment
wan81 Posted April 29, 2008 Author Report Share Posted April 29, 2008 Hey thanks guys.. Really appreciate all the help. I am currently trying out the image thresholding method first. Ridwan Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.