LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview 8.5 IMAQ usb example

Dear Labview users,

I am vince, A student from ROC Eindhoven in the netherlands.

I started a project at school with the idea or a robot that could follow a line.

Sounds easy.. is not..

My teacher suggested to use Labview to actually do it.

i got myself labview 8.5 through school, i got the vision addon: Vision 8.5.0 Development Module

I installed the Imaq USB webcam support: ni_imaq_usb_installer_86.exe

This would practicly allow me to use a webcam as a vision tool, right?

 

The problem:

I am pretty new to Labview, i know some basics, But none about vision.

What i want is to have 1 webcam stream that can be used, to locate and follow a black line.

Point is, i got the tools, though i have no clue how to extually make it work.

All examples i found were for labview 8.6 that i do not have.

 

My question:

Does anyone know anything about this USB support.

If my idea is possible with this setup? (loading a webcam stream, identify a black line, steer servo's to drive there)

Could anyone help me around building the program? or give me an example or explain to me into detail how the,

Usb webcam needs to be set up to react to a black line inside labview?

 

My apoligies for lacking english, its quite late here and ive been trying and puzzeling all night here.

Also my, eehhm, choose of words might not be the most formal and correct way.

never the less, I hope someone could be of great help to me, Thanks in advance!

 

Vince houbraken,

Student at ROC Eindhoven, the netherlands.

 

Message Edited by Smileynator on 09-26-2009 09:24 PM
0 Kudos
Message 1 of 13
(6,736 Views)

Yes it is possbile. In fact, people have done this before:

http://www.youtube.com/watch?v=F9Ls-ZL9g4g

 

The vision toolkit has a function to check the color at a specific location.

So if the floor is white, and you put a black line on the ground, that will make life easier.

 

In terms of coding, you could use logic like this:

- check the color of the ground in front of you

- if the color if the ground straight in front of you is black, driver forwards a few inches

- check the color of the ground in front of you

- if the color of the ground is not black, turn left or right until you see black again.

- once you see black, stop turning, and begin driving.

 

For an architecture, I would recommend a 'State Machine'.

States:
- Initialization

- Locate black line

- Drive

 

See what you can come up with on your own, and post back if/when you get stuck

Cory K
Message 2 of 13
(6,707 Views)

Thanks alot!

 

This really comforts me with the fact that it is indeed possible.

I found some sort of avi capture from USB webcam software.

 

Though im stuck till my laptop get back from repairs this week till i can test it (got 3 webcams, none work on vista)

 

One way or another, i will be stuck most with programming the thing, since i only know the basics of it right from a damn book.

is there some kind of small manual to teach you some advanced programming used in this project? or will i have to find and pay for a big manual with all ins and outs of labview?

I know teachers on school wil fail me quick enough, since i perhaps know more then they do in labview.

Though ive never really understood it myself. 

 

Is it ok that once i found the testing .VI i found to work with a webcam, 

and i start programming something from scrap, ill post questions about parts i get stuck on?

(note those might be really silly questions to you people.)

 

Already a load of thanks for showing me its actually possible!

 

P.S. The state machine architecture sounds quite good for me to start off with.

I got more stuff i want it to do, but ill fit it in somehwere, once i got the hang of the software it should all be pretty easy to do.

(i already did PLC programming and assembly and they told me i pick up fast once i know what im looking at.)

 

Greetings,

Vince 

0 Kudos
Message 3 of 13
(6,696 Views)

Ok, I am stuck on my first problem.

 

VisionTest.jpg

I both got Vision acqusition software, and Vision Assistant (Both on a 30day trail 😕 ) So that means i have limited time, after that i will have to find another way to do my project, school wont bunge to pay 380Euros for vision acqusition. Stand alone to pay for vision assistant, Since both will only be used once, for half a year, by me (then my project is over.)

 

Back to the problem. I had my first try at the vision software, i got no teacher whatsoever, so this might come as a noob question. 

First of all i have no idea how toget Vision assistant to read the LIVE webcam feat to use the most recent picture to work with.

I think that  somehow vision acqusition and VisionAssistant will do the job. But i got no clue how.

Even if i get them to work, The webcam i buyed for this. Uses a 32Bit image as the error claims, i need 16 bit or even lower for some of the vision stuff to work for me!

I'm at a total loss at how to go on with this project, I hope someone has an answer for me.

 

Thanks in advance,

Vince

0 Kudos
Message 4 of 13
(6,549 Views)
Hi Vince.
Insert a step like "Color Plane Extraction" and select e.g. the Luminance Plane. The next step then can Straight Edge (Rake) on this plane.
Hope this helps, Guenter
0 Kudos
Message 5 of 13
(6,536 Views)

Your a hero, though now i am stuck with finishing it, it tried to create an VI, but it failed because it is missing some stuff, like: IMAQ extractcolorplane, He looks for it in \Vision\color.llb , Though its not there, did the installation go wrong or something? if so, ill be stuck for another 3 hours of installing and registering everything all over.

 

Thanks in advance, 

Vince

0 Kudos
Message 6 of 13
(6,530 Views)

Hello Vince,

 

Are you still working in evaluation mode? Can you try to do this on a computer with a full edition of Labview and the vision development module? Do you have these folders on your computer. We can try to replace these missing VI's manually (rightclick on the missing; replace).

If the folders aren't installed you could try a repair of the vision development module.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 7 of 13
(6,508 Views)

Thanks martijn,

I am indeed still using a evaluation,

I run Labview 8.5 on a student license i got from school to work at home.

Though my vision assistant and all the vision software is all on evaluation, and i cant (and will not because its for school and not for me personally) buy the vision software because i looked it up and 1 half of it costs 380 Euro's (didnt see any student version for it) And school simply wont buy it for me, I plan on nagging there ass off until they do though.

 

But on the other subject, indeed the files were gone missing through installation, might have done something wrong when i had to reinstall everything because i messed it all up.

Ill just simply replace those files with the backup i got on my laptop, itll work out just fine i hope.

 

PS. Martijn: Eindelijk eens een nederlander hier!

Ill go and try to get this VI to work, fingers crossed 😛

 

Kind regards, 

Vince

0 Kudos
Message 8 of 13
(6,499 Views)

 There you go,I tryed to copy all the files from my laptop, but they seem gone there 2.

Halp! 😛

 

FailFind.jpg

0 Kudos
Message 9 of 13
(6,497 Views)

Hello Vince,

 

I'm sorry to hear things are not working out with transferring vision assistant to Labview code. I think something went wrong with installing yous vision development module. It is hard to repair this by placing the libraries in the right folders. What I can recommend is to run the installer from the vision development module again; hopefully this will fix your problem.

You can also install the latest version; which is also compatible with older Labview versions, the vision development modules are available here . Please let me know if you need any further assistance.

 

Met vriendelijke groet,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 10 of 13
(6,445 Views)