Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem if using multi-concentric Annulus Region with CWIMAQVision.SPOKE -(follows previous post)URGENT

I want to detect the balls of a roll bearing during its operation
(rotating).
In order to do this I am using a high speed camera capable of acquiring 260
fps.
I trying to detect both radius and its position x,y with following
proccedure:

First I define an Annulus region which has almost the same radius with the
ball and then I perform CWIMAQVision.Spoke
to find circular edges. I then use CWIMAQVision.FitCircle to define a best
fitted circle (radius, center.x, center.y)

As you can see from the figures the annulus region should be like figure.2
and not like figure.1 in order to find the right edges.

The problem begins from the implementation of CWIMAQVision.Spoke which does
not support multi-Annulus-Concetric-Regions with the same radius.
I tried to add both annulus regions in one in order to pass them in SPOKE.
But the resulting found edges were only from the first region.

So the next thing to do was to perform the SPOKE twice. First for Annulus
region 1 and then for Annulus region 2. The result was two CWIMAQPoints
collection which should be joined in order to pass them in
CWIMAQVision.FitCircle in order to evaluate the best fitted circle.

Using this method I had to ADD in the first collection the items
(CWIMAQPoint(s)) of the second with a loop like this.
For i=1 to Collection2.count
Collection1.Add.Initialize Collection2(i).x, Collection2(i).y
Next

This is where the whole detecting proccedure fails as the framereate falls
to 180 fps and the proccessor usage reaches 100%.
Notice that without using this, the proccessor usage reaches almost 50%.

As you can clearly understand I cannot access the function that requires the
collection.
The items in the CWIMAQPoints object are not so many (10 -15) in each
collection, but take under consideration that this must be executed 260
times per second. When I used inside the proccedure the CopyTo function (as a test to copy one collection to another)
there was no noticable change in the proccessor usage. That is the reason
that I asked in my previous post for a modified CopyTo function or a dll that could be able not only to
copy the collection, but also point the index from where to start copying. e.g
CWIMAQPoints.CopyTo collection1,index

Another thought of mine was if I could possible extract points to separate arrays(xarray,yarray) from
the collections (whithout For loop), join the arrays and then use the
CWIMAQPoints.Initialize to create a new collection.

Please help me on this as my whole research has stopped and I am in great
hurry.

Figures 1,2 are attached
Please contact me as soon as possible
Thank you again

Iraklis KOURTIS
Mechanical Enginner
Download All
0 Kudos
Message 1 of 2
(2,979 Views)
Iraklis,

Perhaps instead of using the spoke function you should use the concentric rake function. This would give you both edges in the same function if you select first and last edge.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 2
(2,979 Views)