Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Locating Billiard Balls

These are lower resolution images, so you can't see the compression artifacts.  I think the 3x3 areas have been combined down to single pixels.  They both look about the same to me.  Can you look at them again with higher resolution?  I suspect the highest resolution of the camera would be the worst, with 4x4 areas.  I think it is taking the same original image and changing the number of pixels per block during decompression to adjust the resolution.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 21 of 27
(752 Views)

BruceAmmons escreveu:

These are lower resolution images, so you can't see the compression artifacts.  I think the 3x3 areas have been combined down to single pixels.  They both look about the same to me.  Can you look at them again with higher resolution?  I suspect the highest resolution of the camera would be the worst, with 4x4 areas.  I think it is taking the same original image and changing the number of pixels per block during decompression to adjust the resolution.

 

Bruce

I was making some simple calculations and realised that the image processing is taking too much time, myRIO takes about 13 seconds to scan one image with the 800x600 resolution and JPEG image format. As we have to analyze at least 47 images each task, it would take the robot more than 600 seconds just to process all the images and 600 seconds is the maximum time of the task, which means that only by processing the images we would already get out of time, imagine if we add the time that the robot needs to move from one position to another...

0 Kudos
Message 22 of 27
(744 Views)

ChristopheC

I don't think that increasing the resolution or anything else that would take myRIO more time to process the images is possible.

 

We're kinda getting out of options here, the real method to separate objects in image processing is the watershed algorithm, at least is the only one I know.

 

Is there a way to apply this tool without getting the image cracked, even if the circles aren't perfectly round?

 

I'm thinking about some other logical operations with binary/grayscale images to separate the balls, but I couldn't find out a solution yet.

 

I would really appreciate if you could help me 🙂

0 Kudos
Message 23 of 27
(743 Views)

The lower resolution images could work.  The biggest problem I see is that the striped balls show very little color when they are turned so that the stripe is a thin circle all the way around.  I think you can still identify the color in the cases where you can see a larger color area.

 

I would still consider using the color classification routines.  You can train it with several examples.  With a little work, you should be able to quickly identify the colors of each of the balls.  If all else fails, you could convert the images to arrays and step through each pixel and figure out what color it is.

 

I think you need to work on your routines.  If it takes a myRIO 13 seconds to run, it is too complicated.  You should be able to do it in a second or two max.  If you set them up as a script in Vision Assistant, you can have it analyze the timing of each step.  That will tell you what is taking too long.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 24 of 27
(738 Views)

BruceAmmons escreveu:

The lower resolution images could work.  The biggest problem I see is that the striped balls show very little color when they are turned so that the stripe is a thin circle all the way around.  I think you can still identify the color in the cases where you can see a larger color area.

 

I would still consider using the color classification routines.  You can train it with several examples.  With a little work, you should be able to quickly identify the colors of each of the balls.  If all else fails, you could convert the images to arrays and step through each pixel and figure out what color it is.

 

I think you need to work on your routines.  If it takes a myRIO 13 seconds to run, it is too complicated.  You should be able to do it in a second or two max.  If you set them up as a script in Vision Assistant, you can have it analyze the timing of each step.  That will tell you what is taking too long.

 

Bruce


I will try 640x480 and 320x240 today.

 

Can you help me on using the color classification routines?

There are:

- Color Operators

- Color Plane Extraction

- Color Threshold (that we've been trying unsuccessfully to use for the past month) 😕

- Color Classification

- Color Segmentation

- Color Matching

- Color Location

- Color Pattern Matching

- Object tracking

 

The process we use now is the following: Find balls > Mask on the ball (ROI) > Identify ball by the color.

My doubt is about how to use the highlighted tools to find the balls on the image so we can know the ROI coordinates to mask it.

 

 

 

 

 

 

 

0 Kudos
Message 25 of 27
(732 Views)

for first step to start take 10 pic of your board without the ball and then take 10 photo of board with ball in same position 

with one 30 fps camera you could do it in second 
offer that I think I think I could help you to separate ball and find position by averaging and then background removing and then edging the ball for separate 

0 Kudos
Message 26 of 27
(726 Views)

@Theodoro_Cardoso wrote:
Can you help me on using the color classification routines?

There are:

- Color Operators

- Color Plane Extraction

- Color Threshold (that we've been trying unsuccessfully to use for the past month) 😕

- Color Classification

- Color Segmentation

- Color Matching

- Color Location

- Color Pattern Matching

- Object tracking

 

The process we use now is the following: Find balls > Mask on the ball (ROI) > Identify ball by the color.

My doubt is about how to use the highlighted tools to find the balls on the image so we can know the ROI coordinates to mask it.


Look at these links for the indepth of how the above said Color Processing and Inspection methods:

http://zone.ni.com/reference/en-XX/help/370281AD-01/TOC24.htm and http://zone.ni.com/reference/en-XX/help/370281AD-01/nivisionconcepts/color_classification/

Thanks
uday
0 Kudos
Message 27 of 27
(723 Views)