LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a barcode from a digital camera into labview

Hello All

 

Ive been playing with the ROI descriptor for some time now. My problem remains the same as of yet. I have changed the values of ROI descriptor cluster. I still dont have an idea about what they are. I entered the context help and i came to know that yeah one of em is the global rectangle the other is the contour cluster with one value for contour type the other for ROI type and the last one for the point. Ive changed all the vlaues and the results still remain the same that is those images that are pre fed by NI for the example are read and those that ive added dont get read.

The only thing that creates a difference is the ROI type. When i change it in the cluster than the ROI type changes from a rectangle to a cross hair or a diagnol line or an ellipse. The difference this activity creates is that even those images that are stored by NI dont get read.

 

Now mates what i want to do is to get my images read on this code. Previously i thought a displacement of ROI rectangle would help me read my images. But my ROI descriptor lies in the correct position on my image. so why dont it read the barcode. specially when it is the EAN-13. the type whose images are stored with the example.

 

im confused as to where the mistake is. Whether its the ROI descriptor that is not in the  correct place or is it the resolution of the image that needs to be standardized. There are just so many possibilities.

Regards
Asad Tirmizi
Design Engineer
Institute of Avionics and Aeronautics

" Its never too late to be, what u want to be"
Using LabVIEW 8.2
0 Kudos
Message 11 of 18
(2,668 Views)

Image00.jpg  

Where do i need to place the ROI rectangle to acquire the information embedded in the barcode ? By default the rectangle falls on the lines. Shouldnt this relay the information. Please check the atatched VI in my first post in helping me know where im going wrong. Help will be highly appreciated.

Regards
Asad Tirmizi
Design Engineer
Institute of Avionics and Aeronautics

" Its never too late to be, what u want to be"
Using LabVIEW 8.2
Message 12 of 18
(2,654 Views)

Hi,

 

Have you tried your labview images using the Vision Assistant included in the vision development module to read you barcode images. This is a great tool for trying things out in vision and will even generate the labview code for you once you have finished.

 

The image you attached was from the toolkit sample images so I tried a different image and loaded this into the assistant

 

 

So taking the example above you have an image of size 300 x 214 pixels

The ROI in this case is a rectangle defined by (x-pixel, y-pixel) coordinate between (8,64) and (292,130).i.e top, left to bottom,right

(0,0) is the top left of the image

x +ve is down

y +ve is right

I have made sure that there is enough quite space before and after the barcode to ensure that its decoded properly

 

I suggest that you read the Vision Concept Manual to get a background in the relevant concepts to your task. 

 

Hope this helps.

 

David

Message Edited by David Crawford on 10-27-2009 08:56 AM
Message Edited by David Crawford on 10-27-2009 08:59 AM
Download All
Message 13 of 18
(2,640 Views)
Hi this idea of Vision Assistant looks very promising. But i am unable to proceed over the first stage till now. Whenever i open up an image the first prompt that i get is that your image is 32-bit while the 1-D barcode opens only 8-bit binary images. What is supposed to be done in order to proceed furthur.
Regards
Asad Tirmizi
Design Engineer
Institute of Avionics and Aeronautics

" Its never too late to be, what u want to be"
Using LabVIEW 8.2
Message 14 of 18
(2,609 Views)

You would normally use Color Plane Extraction

 

Here is the same image converted to 8 BPP to get you started.

 

David

Message 15 of 18
(2,607 Views)

1)Run the VI
2)Show Barcode infront of the camera
3)Draw ROI in the image according to the Barcode Size
4)VI will stop when it finishes the reading of
    Barcode

Prems
0 Kudos
Message 16 of 18
(2,078 Views)

please send the vi for me to read the bar code sir my email id is girini1995@gmail.com

0 Kudos
Message 17 of 18
(1,486 Views)

Did you try downloading his attachment?

0 Kudos
Message 18 of 18
(1,450 Views)