Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Read image 8bit to bitmap

Hello all,

I am using the zxing library to read the Barcode, it supports very well when I use the correct image path of the image (as shown below).

vuka_0-1606560771777.png

The problem here is that I want to read the image directly from IMAQ. I used the below method to read the picture, but it can only read when the picture is 32bit RGB, and the 8 bit image cannot be read (when using the image path, it is 8bit, 32bit picture it can read). So is there a way to read the 8bit image to pass through the bitmap to use the zxing library?

vuka_1-1606560815524.png

Any advice welcome!

Vuka, Thank all.

 

0 Kudos
Message 1 of 3
(1,462 Views)

Can't you change the format property node to some type that would match an 8bit image ?

Otherwise an (ugly) workaround could be that you create an intermediate RGB32 IMAQ image you would fill with the 8bits you acquire using the ReplaceColorRGB Plane vi and feeding the 8bit source image to all R, G and B plane inputs.

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

Thank for reply,

I tried yours but I don't understand how the ReplaceColorPlan Vi function works. The figure below shows the list of bitmap formats to choose from.

vuka_0-1606583712719.png

I attach the Vi below, can you help me out?

Download All
0 Kudos
Message 3 of 3
(1,426 Views)