On Wednesday 08 October 2014 09:25:56 Ralph Stirling did opine
And Gene did reply:
> Running OpenCV code in a real time thread would be an entirely
> different matter, I suspect.  I do not know if the cv2 library would
> be compatible with real time requirements, or what level of processing
> could be accomplished in a reasonable fraction of a servo period.  You
> would also need to think carefully about what camera you use.  I used
> a USB2 microscope camera, and I suspect USB2 would be entirely
> incompatible with the realtime requirements. Perhaps some PCI bus
> board with internal frame buffer could work, if OpenCV could talk to
> it.  I normally just get UVC compatible cameras, but those are all
> USB2.
> 
> If you wanted to really get into it, you could work with the machinekit
> fork, and use the Parallella board as your platform. That has a 16
> core (or 64 core) processor that has had OpenCV ported already. There
> is also a Xilinx fpga (which contains two Arm cores that run Linux)
> that could be used for CNC tasks.  I have one sitting on my desk, but
> don't know when I'm going to have time to play with it.  There would
> still be the matter of camera communications.
> 
> -- Ralph

I have the camunits kit running on my mill and would make some comments.
1. It does not appear to impinge on my mills performance thru a parport 
interface.

2. Its slow as hell, several seconds expire between a machine move, and 
seeing the final stop on the monitor, so when manually driving the mill to 
a target, the lag in the video processing path means you have to use very 
slow feeds, else you get there, take your finger off the key, and the 
video keeps on going so you have to run it back a teeny peck at a time.

3. My colonoscopy camera is falling apart, it needs to be stuffed back 
into the tube with a drop of superglue. I think I pulled on the cable too 
hard when lowering the head because I was trying to hold it up out of 
harms way.  So much for plans...  Mice & men category. :)

> From: Javier Ros [j...@unavarra.es]
> Sent: Wednesday, October 08, 2014 1:00 AM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] opencv for shape recognition
> 
> Very interesting Ralph.
> 
> I always wandered if it would be possible to do head position tracking
> for robot calibration based on OpenCV. Do you think that this would be
> possible using a real time HAL module, written in C, using the a
> PREEMPT RT PATH real time based kernel?. If it is possible, I suppose
> that GPU power could theoretically be made available to OpenCV
> operations.

That probably would help, a lot.  But not on the kernel we are now using.  
And it introduces another rather large bag of housekeeping LCNC would have 
to do because there are so darned many video cards out there. Our pet 
motherboard ATM is based the atom family, probably using the i915 driver, 
which works, but I've no clue if it can share its gpu core for off chip 
usages.
 
> What is you opinion?.

I think its a software problem, so it can be done. But it will take 
someone more familiar with the requirements, and interfacing those 
requirements with LCNC than I can bring to the table.

> Thanks,
> 
> Javier
> 
> 
> On Tue, Oct 7, 2014 at 9:20 PM, Ralph Stirling <
> 
> ralph.stirl...@wallawalla.edu> wrote:
> > This is what I used to do machine vision homing a couple of years
> > ago: FitElipse is a function that finds the best fit circle in the
> > frame.  I can supply
> > that function too if you like. It is adapted from examples I found
> > online.
> > 
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > # homecart.py
> > import sys
> > import urllib2
> > import random
> > import cv2.cv as cv
> > import time
> > import hal
> > 
> > if __name__ == '__main__':
> >     h = hal.component("homecart")
> >     h.newpin("offset", hal.HAL_FLOAT, hal.HAL_OUT)
> >     h.newpin("located", hal.HAL_BIT, hal.HAL_OUT)
> >     h.ready()
> >     
> >     capture = cv.CaptureFromCAM(0)
> >     
> >     while True:
> >         img = cv.QueryFrame(capture)
> >         
> >         gimg = cv.CreateImage((640,480), cv.IPL_DEPTH_8U, 1)
> >         
> >         cv.CvtColor(img, gimg, cv.CV_RGB2GRAY)
> >         
> >         fe = FitEllipse(gimg, 116)
> >         h['offset'] = fe.offset
> >         h['located'] = fe.located
> > 
> > In the hal file, I have:
> > 
> > loadusr ./homecart              # Can't have .py on the end of the
> > filename
> > 
> > then I can use homecart.located and homecard.offset pins.  I can't
> > find an example where I actually used it to do the homing though.  I
> > must have gotten distracted by something else before I got that step
> > completed.
> > 
> > Hope this is useful.
> > 
> > -- Ralph
> > 
> > 
> > 
> > -- Ralph
> > ________________________________________
> > From: sam sokolik [sa...@empirescreen.com]
> > Sent: Tuesday, October 07, 2014 11:59 AM
> > To: Enhanced Machine Controller (EMC)
> > Subject: Re: [Emc-users] opencv for shape recognition
> > 
> > You make it sound /so/ easy...  :)
> > 
> > sam
> > 
> > On 10/7/2014 1:09 PM, andy pugh wrote:
> > > On 7 October 2014 19:06, sam sokolik <sa...@empirescreen.com> wrote:
> > >> this is my first real exposure to python. the next step is to see
> > >> how I can fidldle hal stuff with it..
> > > 
> > > import hal
> > > 
> > > make hal pins, job done :-)


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to