Jump to content

How to convert an 8/16 or 32 bit image to a binary image?


Recommended Posts

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

Link to comment

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

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.