<< return to Pixycam.com

Tracking lines of an athletics track with Pixy2

Hi

I’m trying to track the white lines of an athletics track using Pixy2 and line tracking. As you can see, the white lines are kind of pixelated as the paint coverage is not 100%. Standard width for lines is 50mm so I’ve set minimum and max pixels of 170 and 210 and enabled the white line setting. I’m having issues getting Pixy2 to recognize it as a vector though. I’ve tried changing lines widths and camera brightness (which almost manages to show a vector when brightness is very high).

Do you have any suggestions?
I’m trying to get a robot to follow the lines, and also around the athletic track curves.

Thank you.
Nick

IMG_20180610_133841

Maybe it’s a question of distance from camera to track?

Thanks, tried that too but it didn’t seem to make much difference (I did test it with a white line on paper to check it’s working). Plus I’d rather not have the Pixy up high/1 metre off the ground.

Hi Nick,
Pixy detects lines using an edge detection algorithm. I’m guessing the edges on this line might be giving Pixy some problems.

You might try playing with the “edge distance”, try increasing it.

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:pixymon_index#line-tracking-expert-tab

It’s also a little challenging because the track has texture which can create unintended edges. I would guess also that moving the camera away from the track would help because the texture will be less defined.

Edward

Thanks Edward for the reply.

I’ll give that a try and report back. I guess there’s no way to blur the image or run it through an algorithm before Pixy evaluates it?

Hi Nick,
I’m guessing that blurring would help with texturing but hurt with the edges. Perhaps an algorithm that doesn’t assume that a line has distinct edges would be better, some kind of region growing algorithm.

When you give it a try, also play with the exposure/brightness. If you can get the rest of the track underexposed, the texture will mostly go away and you’ll be left with the line, which Pixy should be able to detect.

Let me know how it goes.

Edward

Thanks Edward, I actually have a good algorithm for producing a distinct thin line over the painted area.

Can you please point me in the right direction of how I can use/insert the algorithm so that Pixy sees the results of that instead of just the painted line?

Hi Nick,
Please check out this page:
https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_pixy_firmware

Edward