Embedded Camera

Discussion of linuxCNC (formerly knows as EMC2)
edwardrford
Posts: 1250
Joined: Mon Apr 09, 2012 5:40 pm
Location: Dixon, IL
Contact:

Embedded Camera

Post by edwardrford » Tue Jul 03, 2012 4:30 am

I really want to to put a camera like this on my machine. I'm not 100% sure where I would mount it. Perhaps right behind the z-axis, if spacer permits.

The idea would then be to place a sticker, or otherwise mark a spot in the corner of the work envelope that would signify *home*. It would have a crosshair mark. I would then use the camera to align the machine to home before each run. It's the same sort of thing that pick and place machines use to set their home positions.

The other cool things about a camera would be watching it while the machine is cutting. Of course, depending on it's position relative to the spindle, it might be a boring video feed....

I'm sure switches might be easier, but this seems too cool to pass up. Any takers helping me get it set up? As soon as the camera's are back in stock at Sparkfun I'll pick one up. Unless someone knows another source where I could get one sooner?

-Edward
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

zimmer62
Posts: 81
Joined: Fri Jun 22, 2012 4:51 pm
Location: Lansing, MI

Embedded Camera

Post by zimmer62 » Tue Jul 03, 2012 11:34 am

That does sound cool, I have extra cameras to try this with.

I saw one mill using a USB microscope on the z axis to take really high resolution images of a part, also cool.

Any how do you see this happening in EMC2? Or Mach? Or other?

edwardrford
Posts: 1250
Joined: Mon Apr 09, 2012 5:40 pm
Location: Dixon, IL
Contact:

Re: Embedded Camera

Post by edwardrford » Tue Jul 03, 2012 11:41 am

I was thinking EMC2, because that's what I use. I know Mach3 has a built in webcam feature, but I'm not really interested in Mach3.

At this point, I might just hookup one of my old webcams to start with. Because of it's size, it will be less than ideal, but it'll at least get me going.

Actually, I suppose I could take it apart and only use the guts... that would probably shrink it down considerably!

-Edward
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

zimmer62
Posts: 81
Joined: Fri Jun 22, 2012 4:51 pm
Location: Lansing, MI

Re: Embedded Camera

Post by zimmer62 » Tue Jul 03, 2012 2:33 pm

I'll try and configure my machine against EMC2, eventually I think that's going to be a better solution in the long run, both because of cost, and reliability.

If all goes well, I can start looking at camera stuff. I have a little bit of experience with cameras in linux, I've run zoneminder for years.

Tom Smith
Posts: 297
Joined: Mon Apr 09, 2012 9:55 pm
Location: North Vancouver, British Columbia

Re: Embedded Camera

Post by Tom Smith » Tue Jul 03, 2012 2:57 pm

I've used these - http://www.dealextreme.com/p/compact-fl ... 74?item=72 in projects before; cheap, easy to place and/or open up. The picture quality is acceptable as well, though I doubt you'd want to open a portrait studio with one.

Tom
_______________
ShapeOko1 191

potatotron
Posts: 135
Joined: Sun Apr 29, 2012 12:47 am
Location: Southern California
Contact:

Re: Embedded Camera

Post by potatotron » Tue Jul 03, 2012 3:18 pm

I like the idea of adding a camera to the system, but my concern with that particular one is the output is composite analog. It seems like if you're going to do anything interesting with the video you'll need to get it into a computer, which means you'll have to add a video capture device. Starting out with a USB camera (or microscope), so you bypass the need for digitizing the signal, may be easier.

zimmer62
Posts: 81
Joined: Fri Jun 22, 2012 4:51 pm
Location: Lansing, MI

Re: Embedded Camera

Post by zimmer62 » Tue Jul 03, 2012 3:26 pm

Actually a capture card in linux is pretty easy. There are really inexpensive cards that work great too...

I think I'd go the USB route based on cost and simplicity, however I wouldn't think a capture card is a deal breaker.

Digitalmagic
Posts: 123
Joined: Sat Jun 23, 2012 8:47 am

Re: Embedded Camera

Post by Digitalmagic » Tue Jul 03, 2012 4:00 pm

What is really interesting with a digital output minicam is towards application.
Streaming to an OpenCV app, you can detect shapes, and that's a good point for pick and place, or all purpose positioning. (closed loop idea?)
Or taking advantage of IR for heat area mapping.

EDIT: There is also http://www.roborealm.com, a commercial app, asking for less programming ala OpenCV.
http://www.crim.ncsu.edu/research/past- ... inspection

Image
Last edited by Digitalmagic on Tue Jul 03, 2012 4:51 pm, edited 3 times in total.
s/o #650 - Wish my digits are ... magic!

edwardrford
Posts: 1250
Joined: Mon Apr 09, 2012 5:40 pm
Location: Dixon, IL
Contact:

Re: Embedded Camera

Post by edwardrford » Tue Jul 03, 2012 4:24 pm

That's exactly the sort of thing I'm interested in (detecting shapes). Not so much for a pick and place, but for something else (twisting mustache!) I have in mind.

openCV is awesome, but it looks like this was made for this sort of thing. If I'm understanding it correctly, there is some openCV compatibility built in to camunits.

Looks like this is a tutorial on how to get started adding a video feed to emc2! http://wiki.linuxcnc.org/cgi-bin/wiki.p ... mbed_Video

What's our next step? I have an extra D430 laptop that I could install linuxcnc on, and test from there. Although it will probably be several weeks until I can commit to working on it for a few nights.

-Edward
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

dewy721
Posts: 16
Joined: Sun May 20, 2012 10:12 pm

Re: Embedded Camera

Post by dewy721 » Fri Jul 06, 2012 8:17 pm

Not sure how to implement it, but I've seen cheap laser pointers (with x-hair pattern) used with a camera for not only automated homing but also range finding to get a touch-less Z offset.

Perhaps the Processing + cheap/good CCD camera + laser pointer combo often used to make 3d scanners has been or could be applied to help a CNC machine correctly reference its workpiece for initial start up then after milling (and debris removed) could scan for conformity and apply any divergent measurement toward corrective machining such as requesting a re-pass over the current work piece or even (though really ambitious) could apply distortion measurements to an auto-compensation routine for future avoidance.

A machine that could learn its own limitations (and work around them) could be really handy in helping an amateur machinist to avoid costly mistakes but unless somebody has a an AI specialist in their back pocket I'm at a loss as to how to achieve it. But it would be SO awesome to see it done. :)

Post Reply