#robotics Logs
Mar 10 2012
#robotics Calendar
00:27 rue_house hahahahaha
00:27 rue_house now THATS attenuation!
00:47 GuShH rue_house: were those edible? :p
00:51 rue_house turn up the power, I want mine roasted
03:11 Jaylord Can anybody help me with some basic OpenCV stuff?
10:55 Fred_Raud good morning
10:57 rue_house Jaylord,
10:58 rue_house your still here, thats a good start
10:58 rue_house the folks who work with opencv usually leave after 5 mins
11:43 rue_house Jaylord, ask tho
14:16 Jaylord I'm trying to find circles using cvFindContours, and I have some questions about implementing the algorithm. The basic idea is find the contours in a thresholded grayscale image, flood them, then compare the arclength to the area to decide whether or not they're circular. I'm new to OpenCV though so just getting the code to work is my real issue - I already have something similar working
14:16 Jaylord in MATLAB.
14:21 Steffanx You know opencv has a function "cvHoughCircles" ? :P
14:25 effanx is messing around with opencv too at the mo
15:11 Jaylord Hough Circles isn't reliable, it shows lots of extra circles
15:12 Jaylord and sometimes it doesn't show the circles I'm trying to detect
15:16 Steffanx What kind of circles you try to find? You have an example video/image?
15:16 rue_house I'd not worked out how to do vector 2d regexs yet
15:17 rue_house I'v not worked out how to do 2d regular expressions yet
15:17 Steffanx Amateur .. I just started on regexes in 3d rue_house
15:18 rue_house how do you phrase them?
15:18 Jaylord I'm looking for traffic lights, and the easiest way to find them is to do some preprocessing (top hat transform) and then look for blobs above a certain threshold that are circles. I've passed in images with very distinct circles and it picks up none of them, it seems to work better with color images than grayscale.
15:19 rue_house heh
15:19 rue_house hmm
15:20 rue_house I'v done quite a bit of thinking about how
15:21 rue_house http://www.psy.ritsumei.ac.jp/~akitaoka/rotsnakemini.gif
15:21 rue_house the parser errors to make that seem to rotate
15:21 rue_house I think it says a lot about how the edge detection is done
15:22 rue_house I think its a type of diffraction grating based error
15:23 rue_house meaning that the mind effectivly applies grate masks to what it sees to detect things
15:23 rue_house edges and such
15:24 rue_house http://www.ritsumei.ac.jp/~akitaoka/rotate-e.html
15:25 rue_house http://www.ritsumei.ac.jp/~akitaoka/candy2.gif
15:25 rue_house that one sorry, seems to rotate/counter rotate as I get closer/farther
15:26 rue_house http://www.ritsumei.ac.jp/~akitaoka/kyushu1.gif
15:27 rue_house this one makes me think its more based on the colour sequence
15:27 Steffanx Writse some software that is able to turn 'magic things' like that into animated gifs :)
15:27 Steffanx -s
15:28 rue_house http://www.ritsumei.ac.jp/~akitaoka/tire.gif
15:28 rue_house intersting, not colour based there
15:29 rue_house but it seems that it only rotates when I focus on the centre and move farther/closer
15:29 Steffanx Yes yes
15:29 rue_house if I focus off center of it, the rotation slow/stops
15:29 Steffanx You're stupid :P
15:29 Steffanx A simple image fools you
15:29 rue_house I wonder if shpare recognition is effected by where you looking
15:30 rue_house http://www.ritsumei.ac.jp/~akitaoka/kanjosen.jpg
15:30 rue_house ouch
15:30 rue_house it must be a trick with distance perception
15:30 rue_house that would start to explain it
15:31 rue_house that would imply that shape recognition is part of a distance perception mechanism
15:31 Steffanx Clone one eye and it still 'works'
15:31 Steffanx *close
15:31 rue_house again, only if I look into the middle
15:31 rue_house if I look at the edge, it dosn't work
15:32 rue_house is there a grate that will always form a consitant pattern when applied to a circle?
15:36 Steffanx Good luck when the unraveling of the human mind rue_house
15:36 Steffanx With the
15:36 Steffanx Me 'human' mind has trouble with English at the moment
15:36 Steffanx *my :P
15:38 rue_house but I have an advantage
15:38 rue_house I can reverse engineer this thing from the inside out
15:44 rue_house maybe later today I'll play with some b&w images with some masking grates and see what I get
15:57 Jaylord Yo steffan, any thoughts for detecting circles? And if you have working code that can detect circles, care to share?
15:57 Jaylord The given code for Hough Circles doesn't work with white circles for some reason - I guess I could invert my image as a workaround but that doesn't seem like the best solution
16:07 Steffanx No I only played with rectangle detection
16:07 Steffanx Actually .. car license plates
16:07 Steffanx It works pretty well, except for some false positives
16:10 Jaylord Did you just use sample code or did you write your own? I might be able to modify it - anything helps at this point.
16:12 Steffanx I wrote it myself, using examples :)
16:12 Jaylord Care to share?
16:12 Steffanx And it's not accurate enough
16:13 Jaylord I assume you used some sort of filters to get rid of squares too large/small, yes?
16:13 Steffanx At the moment.. yes :)
16:13 Steffanx Yes, it's very simplistic
16:14 Steffanx GaussianBlur, Canny Edge detection, Find contours
16:14 Jaylord My question is pretty basic really to help me get started - how do you loop that? Do you have it so the filters out the contours before updating the sequence or do you remove them from the sequence? I think my question is really more of a basic C programming question than specific to OpenCV, but if I could see your code that would help.
16:15 Jaylord Also did you use C or C++?
16:15 Steffanx c++
16:16 Steffanx I loop through the contours and add them to another buffer/vector when they match with the specifications
16:17 Steffanx Some blurring now and then seems to help pretty much when you try to find circels/squares etc. :)
16:18 Steffanx I have to say i've no idea what the traffic lights in the US look like :P
16:18 Jaylord That's not an issue - find the circles then do template matching
16:21 Steffanx For me it does matter :)
16:42 Steffanx What's your plan with it btw, Jaylord ?
16:49 Jaylord The plan is to use the traffic light detection on a car
17:49 delinquentme so I chopped a acme threaded rod and I've had hella issues getting the nut around that end .. any suggestions as to the portion of the rod that I need to chunk off to allow it to slide right in?
17:51 Tom_itx file a small taper on the end and make sure the start threads are clean
17:51 rue_shop what kinda ninny desinged my truck, hitting the breakes jams the 4 ways
17:57 delinquentme What this means is that when properly assembled, this board will allow you to detect the the position of something like a linear axis.
17:57 delinquentme nm
17:58 delinquentme Simple, 4 pin, .100" pitch interface <, whats the .1" pitch about?
18:56 delinquentme can I get someone to verify some numbers for me? ( 16,000,000*nm^2*pi ) / nL = .005027 mm/nL
19:00 rue_shop give me an hour
19:11 rue_shop no
19:11 rue_shop your units dont work
19:56 Tom_itx rue_shop what did you do to your truck?
19:59 rue_house aha
19:59 rue_house ok I suspect that shape is determined via rod data, not from cones, which is why colour information is seperate
20:00 rue_house replaced the 4 way, but it didn't need it
20:00 Tom_itx 4 way what?
20:00 rue_house might look at how thats wired, both times I'v needed my 4ways in a hurry I'v had the brakes on
20:00 Tom_itx equalizer valve?
20:01 rue_house and thats why shape recognition isn't effected by colour
20:05 Tom_itx http://webvision.umh.es/webvision/imageswv/schem.jpeg
20:06 rue_house http://www.cs.mcgill.ca/~rwest/wikispeedia/wpcd/images/18/1886.png
20:07 rue_house this would explain why green and red are bad colours to use on a whiteboard, its beyond the spectral range of the rods that do shape recognition, .... or soemthing like that
20:08 Tom_itx http://webvision.umh.es/webvision/sretina.html
20:16 rue_house http://en.wikipedia.org/wiki/Retina
20:16 rue_house spacial encoding
20:17 rue_house ah, so edge detection is build right into the detectors
20:22 rue_house huh
20:23 e_house th
20:23 rue_house may also explain why animals tilt their head
20:59 delinquentme when we're talking Quadriture output ... its simply a 00 01 10 or 11 right?
20:59 delinquentme so there is no absolute positioning
21:00 Tom_itx http://en.wikipedia.org/wiki/Quadrature_encoder#Single-track_Gray_encoding
21:00 Tom_itx 90 deg out of phase
21:15 delinquentme LOL http://www.austriamicrosystems.com/Support/Design-Resources/Demoboards/Magnetic-Encoders/Linear-Encoder/AS5306-DK-ST/(oi)/1
21:15 delinquentme eff that.
21:16 Tom_itx what are you making?
21:16 delinquentme so yeah this is incremental not absolute
21:17 delinquentme syringe pump
21:17 delinquentme probs something awesomely hacked like this: http://www.syringepump.com/oem.php
22:10 rue_house delinquentme,
22:10 delinquentme yars
22:11 rue_house http://eds.dyndns.org/~ircjunk/projects/servo/p1020396.jpg
22:12 delinquentme yeahh i think you showed me something like this
22:13 rue_house http://www.youtube.com/watch?v=4tG2bTOGxK0
22:13 rue_house that ones a linear encoder
22:13 delinquentme wait .. thats the linear encoder you told me about
22:14 rue_house and thats a standard solinoid
22:14 rue_house and thats position control of a solinoid with a linear encoder and PD control (iirc)
22:15 delinquentme hmmm
22:15 katsmeow-afk rue, in some vehicles, the high intensity filament of the bulb is brake and turn, you need a system with separate filaments(or LEDs) for each signal
22:16 katsmeow-afk caution, may not be legal, even if it's better
22:16 delinquentme atm I need to figure out what kind of sensors I need on this pump
22:16 rue_house I"d rather fix the logic function that combines the 4 ways and brakes
22:16 rue_house delinquentme, use a variable capacitor like I said first
22:16 rue_house it gives you back an analog voltage
22:17 rue_house do you have a linear encoder strip from an inkjet printer?
22:17 delinquentme rue_house, im not as good as you at hacking things together
22:17 delinquentme i really want modular pieces which can be purchased
22:17 delinquentme ( another open source project )
22:17 rue_house ok, give me $400 and I'll send you that whole linear solinoid rig
22:17 delinquentme in the hopes someone else will build it
22:18 katsmeow-afk rue uses modular pieces that are free
22:18 delinquentme haha
22:18 rue_house with a preprogrammed avr and everything
22:18 delinquentme no but like
22:18 delinquentme suppier
22:18 rue_house I'll list the suppliers for the parts
22:19 delinquentme yes but fewer steps = better
22:19 rue_house if you want me to convert it to a stepper, I'll do it for just $800
22:19 delinquentme i want someone w less knowledge than I have to build this
22:19 delinquentme its supposed to be a good abstraction
22:19 delinquentme do I know how ruby works @ the core .. nope!
22:19 delinquentme do I need to .. to get it to function? nope!
22:19 rue_house then it would be done,a nd you would have all the information to make as many as you want
22:20 rue_house just ~2 weeks and $800
22:20 rue_house wait, what am I gonna do with $800...
22:20 delinquentme i appreciate the offer rue
22:20 rue_house your right,
22:21 delinquentme also I want fewer things to troubleshoot
22:21 rue_house times slipping, just $8000
22:21 delinquentme i want a supplier to call up and yell at when something breaks
22:21 delinquentme you're too nice for me to bitch at
22:21 rue_house for $800 I can get it togethor for you in just 1 week
22:21 rue_house er $8000
22:21 rue_house yea dude, dont lose the zero
22:21 rue_house and only half down!
22:21 rue_house but wait! there's more!
22:22 rue_house if you buy now you become a preffered customer!
22:22 rue_house buy now and reap the rewards of being a preffered customer of Electronic DEvice Serices!
22:22 rue_house :)
22:23 rue_house ya know, I'm sure I had a page about that liner encoder/ solinoid thing and I just cant find it
22:23 rue_house delinquentme, what hardware do you want to use
22:23 rue_house if you think about this project too long you will never build it
22:24 delinquentme large modular pieces
22:24 rue_house what goes in and what comes out
22:25 rue_house http://eds.dyndns.org/~ircjunk/nb/nb.html
22:25 delinquentme something like 2 guide shafts 1 drive , a few clamps a stepper a MC 2 gears and 2 drilled slugs of metal or PDE
22:26 delinquentme the background there is very key
22:26 rue_house :/ my website needs another round of co-hesion
22:28 delinquentme input is going to be some kind of JSON style hashed data with direction, speed and delays
22:28 delinquentme parsed in the C code on the MC, then looped some X number of time
22:29 rue_house http://eds.dyndns.org/~ircjunk/shop/dscn8802.jpg
22:29 rue_house wow that seems like ages ago
22:29 delinquentme the current issue is I need a way to index the expanded position of the syringe ... with syringes of different sizes
22:30 delinquentme http://www.syringepump.com/design.php thats lovely
22:30 delinquentme thats like exactly what I want to build
22:31 rue_house http://intellidrives.com/LinearServoMotors.htm
22:32 delinquentme rue you dont know of any sensors I could lay parallell with the length of the syringe there do you?
22:32 delinquentme and have it read the position of the black rubber stopper in the syringe?
22:32 rue_house do you know how
22:33 delinquentme i dont think so?
22:33 rue_house http://www.emovendo.net/image.php?type=P&id=16386
22:33 rue_house those work?
22:33 rue_house do you know those have a serial port on them?
22:33 delinquentme yeah i saw that Im not using serial though
22:34 delinquentme and yeah I've used calipers before
22:34 rue_house http://hackaday.com/2010/12/15/reading-a-digital-caliper-with-a-microcontroller/
22:34 rue_house oh you weren't gonna use a microcontroller?
22:35 rue_house http://robocombo.blogspot.com/2010/12/using-tis-launchpad-to-interface.html
22:35 delinquentme not rigged to each individual pump
22:36 delinquentme i was looking for more of some kind of visual encoder at the stopper
22:36 rue_house how are you gonna control mutilple positions if you dont ahve a microcontroller on each pump?
22:36 rue_house you dont know about the depth guage on the calipers?
22:37 delinquentme ahhh
22:38 delinquentme i want the wiring for each individual to be as simple as possible .. maybe ill just run whatever wires to the main MC
22:38 rue_house do you want control or for it to be simple?
22:39 delinquentme control and wiring
22:39 rue_house http://thump01.pbase.com/g3/84/622984/3/110362849.AB3hJ9dY.jpg <--- works in holes, aka up aginast plungers
22:39 delinquentme ( i feel like this is all obvious though )
22:39 rue_house then deith the need for exacting control
22:39 rue_house you have have exacting control without a microcontroller
22:39 rue_house you can guess with a stepper and a leadscrew
22:40 delinquentme yeah
22:40 delinquentme not a bad idea
22:40 delinquentme kinda like that
22:41 rue_house http://eds.dyndns.org/~ircjunk/projects/cnc/dscn7641.jpg
22:41 rue_house stepper -> 2:1 -> threaded rod
22:42 rue_house for a 200ppr motor, and a 6/32 lead screw, you get 0.00015625 " per step ""
22:42 rue_house the centering of the machine will cause more innaccuracy than that
22:43 rue_house with a 2:! in there
22:43 rue_house 12800 steps/inch
22:44 rue_house :) I should put feedback on my old cnc :)
22:45 rue_house http://eds.dyndns.org/~ircjunk/projects/cnc2/p1030106.jpg
22:45 delinquentme http://www.sigmaaldrich.com/large/prodimages/z/z720372g.jpg
22:45 delinquentme BAM
22:45 rue_house the new cnc is all dc motor with encoder feedback
22:45 delinquentme thats the sex right there
22:45 delinquentme modular ( the metal rod on the side interlocks them ) ... networked w cat 5 cable
22:45 rue_house I dont get you
22:45 delinquentme (though thats way overkill )
22:46 rue_house you want to make it yourself or not? you want a microcontroller or not? you want precision or not?
22:46 delinquentme haha rue_house we're definitely a little different
22:46 delinquentme i do want to make it myself
22:46 delinquentme and I MIGHT want a MC .. the issue is that when I think MC i think $60 dollar arduino
22:47 delinquentme but there are breakoutboards which I could have a MC for like 10 bucks
22:47 delinquentme uniqanomaly, :D
23:02 rue_house hm
23:03 delinquentme I think what I should go with is a large protoboard
23:03 delinquentme and figure out just the bare minimum I need to wire up each pump
23:04 delinquentme and then hook up a new set of those components for each new pump
23:07 rue_house mhm
23:12 katsmeow-afk hmm
23:13 Tom_itx hmh
23:23 delinquentme IR proximity sensors
23:31 rue_house distance varries with target colour
23:33 delinquentme also need to shield it from external IR
23:33 delinquentme whats the name of the sensors in printers?
23:34 delinquentme w the bar strips
23:34 rue_house their HP
23:34 rue_house look on digikey for encoder
23:42 Tom_itx HEDS
23:45 delinquentme like this http://search.digikey.com/us/en/products/AEDR-8400-130/AEDR-8400-130-ND/2210587
23:47 rue_house no
23:47 delinquentme hmm
23:47 delinquentme seems like what im after... what am i missing
23:48 delinquentme "code strip"
23:48 delinquentme they're way small
23:49 rue_house damnit I wish dk was better with their images
23:49 delinquentme 3mm width
23:49 rue_house I need to get a part number, I cant find them now
23:50 rue_house its all I could find last week
23:50 rue_house HP6168C isn't giving me the right results, so much for memory
23:55 delinquentme haha