LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

take and save images from webcam only in the box highlighted

hi there...

i am working on my master project and I am stuck. My professor is not able to help me because he doesnt know how to program labview.

i got the webcam to work.

i need to be able to save the image (the barcode) and give back on display the barcode number.

can someone please help me. 

I have to show him that i have done this by this Saturday.

I have a camera with high resolution. i dont need the full resolution. 

can LAbview just take portion of the image and save it? How would I do that?

are there any examples?

i need to do this ....

Best regards,
Krispiekream
0 Kudos
Message 1 of 9
(3,503 Views)

Hi krispiekream

 

Looking at the picture you are already using the Vision Assistant and determined your ROI (Region Of Interest) for the bar Code  :smileyhappy:

Into Vision Assistant you can use the Barcode Reader function from the menu:  Identification/Barcode Reader  or simply click Barcode Reader in the Identification tab of the Processing Functions palette (down left corner);


If your image is not 8 bit binary you have to select the Color tab from the Processing Functions palette and add any of the color plane to covert into grayscale before your read the code.
You can also use the Pattern Matching functions to locate your code and orient in a manner to have the lines from the bar code showing vertically.

 

In the Bar Code Reader Tab select the <<1D Barcode reader>> and draw the region window using the mouse cursor that will contains all of the bars to read from the image of the camera. 

You can select only the lines not all the code for that part (see picture);
Then select the Barcode Type (UPCA gave me good results with you barcode sample) and the check box to add a check sum.

The Barcode read string should appear under the region profile graph: 8473670228


When you find the right type select OK and go to the Tools/Create Labview VI.. to generate your program via a 4 steps process.
In the last step4 select the check box to add the string from your barcode into LabView in order to get the value that you want to display.

 

Stap4 CheckBox for Barcode String

I think with this you can create the LabView code that you need for the Barcode picture as well.

Hope this assist you into getting a solution to show tomorrow.

0 Kudos
Message 2 of 9
(3,474 Views)

i installed NI-IMAQ for USB Cameras

and i also installed  NI.Vision.v8.5.Acquisition.Software but I do not have

Vision Assistant. 

I didn't choose the ROI yet, I used PAINT AND crop out the other images that is not my region of interest..

where can i find trial version for vision assistant 8.5?

 

 

Best regards,
Krispiekream
0 Kudos
Message 3 of 9
(3,455 Views)

Hi krispiekream!

 

You can request a trial version of VDM, which includes Vision Assistant, here: http://www.ni.com/vision/vdm.htm

 

Kristen H.

Message 4 of 9
(3,443 Views)

If you have IMAQ for USB, you should have Vision Development Module (VDM) which includes Vision Assistant.

 

Vision assistant is not going to be found in LabVIEW, it is a prototyping environment, where you create something, then generate LabVIEW code from that. You can use the VDM examples for a barcode reader though, and you should be fine. You'll find them in the NI example finder, just search for barcode.

 

You can then save your image with more of our VIs (IMAQ Write File in particular) to JPEG, PNG, etc.

 

Hope this helps!

 

 

 

 

Message Edited by Chris_VH on 04-03-2009 02:36 PM
Chris Van Horn
Applications Engineer
Message 5 of 9
(3,439 Views)

Thank you guys for all your help..

but I am still having problems..

I think NI has a IMAQ Select Rectangle for ROI.

But I am not sucessful of selecting the ROI from the an image,

 

I want to do this...

Select ROI, save image and plug it into the BARCODE example to decode it?

Can you please show me how to do that?

Thanks in advance..

Best regards,
Krispiekream
0 Kudos
Message 6 of 9
(3,356 Views)

Hi krispiekream,

 

How is the example giving you problems?  Is it throwing an error?  Are you wanting to take the image from the camera instead of a file?

 

Kristen H.

0 Kudos
Message 7 of 9
(3,332 Views)

well, the example does discriple what ROI means.

what are the constants in the ROI array.

I had to download the Vision Developemnt module and found how that you can have use alot of ROI functions in Vision to select the region you want the bar code to work.

I finally got it to work yesterday. Thank you so much Kristen for all the help you giving me. 

My project is 50% finish. the other 50% is to use a microcontroller and display my barcode on an LCD module using USB Visa.

I think it shouldn't be hard. 

Best regards,
Krispiekream
0 Kudos
Message 8 of 9
(3,329 Views)

Hello people.

I really need your help.:(

actually i did my coding for barcode but i have to get TP022216

bUT instead i am gettting TP02221

Why the last number 6 is not appearing

pLease help

Download All
0 Kudos
Message 9 of 9
(2,488 Views)