Machine Vision 101 / Taos TSL1401
Brian_B
Posts: 842
Hi,
·I'm trying to learn how to use·the Taos line scan camera in a industrial setting. I've talked with Phil P and decided to make this a learning experience for everyone that would like to use the camera. I have built a small conveyor and mounted the Taos and a HED's encoder on it.
·
·The goal here is to sort washers by size; this version will just have a LED that will come on when the washer is at the location on the belt where it should be extracted. Future versions will have a means to remove the washer at its desired location.
·
·Jump in if you have any questions or comments.
·
Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein
·I'm trying to learn how to use·the Taos line scan camera in a industrial setting. I've talked with Phil P and decided to make this a learning experience for everyone that would like to use the camera. I have built a small conveyor and mounted the Taos and a HED's encoder on it.
·
·The goal here is to sort washers by size; this version will just have a LED that will come on when the washer is at the location on the belt where it should be extracted. Future versions will have a means to remove the washer at its desired location.
·
·Jump in if you have any questions or comments.
·
Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein
Comments
Running conveyor as slow I can ,business card looks like it is 1/4" long. Also trying to figure out how to hook encoder up.
Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein
Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein
-Phil
I'm trying to figure out what point the the controller starts counting pixels , It's bound to pick up a few bright pixels here and there , how do you decide when the washer starts and when it ends ?
Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein
Since the washers have holes in them, you will probably want to look for the leftmost and rightmost edges, rather than just counting pixels. This will give you the areal extent of the washer, including the hole.
-Phil
done with other project and want to get moving on this again.
Phil,
have you looked at the TSL1401 object in the object exchange? does it seem like a good starting point for this application?
Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein
No, I regret to say I haven't looked at it as closely as I should. I've started on my own object for the '1401 and the Propeller Backpack, but it's just a start...
-Phil
I've tried the object in the OBEX... it works fine.· The speed limit is in the adc... Here is a file that will get you up to around 2.5M Pixels/Sec... but not with the MCP3208.· It controls the first pass at the 1401 in PASM but does the actual data acquition in Spin.· Kind of a hibrid... or a not quite done object[noparse]:)[/noparse]·
With the MCP3208 and this object you can still adjust the·exposure duration down to around the tsl1401's theoretical minimum... 10s of microseconds.·
With two 1401's, which is supported by this object... you just wire them up on the Prop side to the same pins... only difference is the adc channel.... you should be able to get rid of your encoder.
This is set up for video on pin 20.
ISSUE for Phil... in order to make this work, I have to put a 100ohm resistor on the tsl1401 clock.· I'm using 3.3V everywhere and I have the jumpers in place... ?
My Mac died[noparse]:([/noparse] and my pc has a virus)... I'm going to reboot before sending the object.
Rich
I have a 10K pot hooked up to ch2 on the MCP... and two 1401's... on ch0 and 1.· This is configured to save data to another Prop... object not included here...
The pins for the 1401 are set in the top level... but also in the PASM object... so you have to change both... not a preferred programming style![noparse]:)[/noparse]
Rich
-Phil
Sorry, no the resistor ties the clocki pin to ground... What happened is that I was coding the assembly version... and nothing was working. The Obex version worked fine. so, I thought it was a timing problem... I put an LED on the the clock line and all of a sudden the thing sprang into life. Some LED's would work... others not. I put some different resistors in there an came up with 100 Ohms as the magic number. Try it... it makes no sense to me, except that there is something acting as a capacitor somewhere[noparse]:)[/noparse]
I don't mind it, except that when I use the OBEX object... it doesn't work with the resistor in place... go figure[noparse]:)[/noparse]
By the way... I think the tsl1401 should be sold as a kit... with the connectors as an option up to the builder. I couldn't get them off... so right now everything is jumper wired into place. That option could make it cheaper to produce... or you could make it more expensive and include the cables. I like door number 1.
Rich
You might want to leave the lenses off and just put the holder there and then offer an array of different lenses... I prefer no IR filter.
rich
Post Edited (rjo_) : 3/1/2010 5:54:12 PM GMT
I'm currently redoing everything to demo this as is. I"m thinking that our gamers might eventually be able to create real 3D worlds to play in[noparse]:)[/noparse] If Andre isn't reading this thread... someone needs to let him know that I'm serious about this... and at the time of the first Mars mission... my stereo matching was better than Nasa's... no joke!
thanks
rich
I took a glance at your code and noticed that you've set dira for the clock line to one in two separate cogs. This will surely lead to conflict and may account for the necessity of the 100 ohm resistor, as well as the low values you're getting for the first ten pixels.
-Phil
I'm not trying to hijack your thread. I think the problem
breaks down to getting the image data as quickly as possible and processing the data as fast as you can. Your problem should be simple from an image processing standpoint... so, it is just a matter of process control with the TSL being at the center of the process.
Phil,
I was warming up my stepper motor... futzed with it all day... finally found a bad connection and some reversed lines[noparse]:)[/noparse]
I took another look at the code. About the cog issue... it kind of has to be that way. If I don't explicitly declare dira :=1 on the clock line in the cog, the cog treats it as an input.
Unless I have a huge misunderstaning... a cog's direction register gets or'd with all the others. So theoretically, there shouldn't be a problem.
I am only making calls to the tsl clock in one place at one time... when the assembly routine is being called... the
spin routine is waiting. On exit, both routines set the clock pin outa:=0.
In the getImage method, I am using "cmd" as a shared variable, which the assembly routine waits to be non-zero, when the assembly routine sees "cmd" as non-zero, it does its work and then sets "cmd" to zero.... at which point the spin routine stops waiting and continues. the assembly routine then goes into a wait state. I believe that this logic is working... otherwise my spin routine would hang and I would never get data. I have tested this in both directions.
I'm not entirely sure I understood what you were saying... if this is not it... please let me know.
I am clocking the tsl pretty hard in the assembly routine... but I have tried putting a bunch of nops between clocks phases and slowed everything down to a snails pace and it doesn't seem to care... I am absolutely stumped.
I am using the same line to clock both TSLs... but the Obex object doesn't seem to mind... so I don't see why it should make any difference if I am using PASM or Spin.
Rich
Could you start a new thread, please? I'll take a look at your issues there. Brian is working on a specific project that's unrelated to yours, which I've agreed weigh in on from time to time as needed. I'd like to keep this thread centerd on that project, if possible.
Thanks,
-Phil