Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

C Code for Bit Shifting 10 & 12-bit images for 8-bit display

Can someone please point me to some C code that I can use for bit shifting 10 & 12-bit images to convert them to 8-bit for display?

Thanks for your help.

0 Kudos
Message 1 of 2
(3,914 Views)

Hello,

 

If you have vision acquisition software there should bean option to include Visual C examples during the installation.  You can check/repair the installation to include these examples.  In MAX expand "Devices and Interfaces" then right-click on software and select  "Change/Remove Software"  this will bring up the Windows Modify/Repair/Remove wizard for National Instruments software.  Select NI-IMAQ then click modify, you will need the VAS disk.  Then select to include examples.

 

 

Untitled.png

 

 

After the examples are installed you can go to Start >> All Programs >> National Instruments >> Vision >> Text-Based Examples.  I would open the read and and define the image type as U16.  There will be unused bits but the IMAQ display will scale it to 8-bit resolution.

Regards,
Isaac S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,894 Views)