loading
 
Blob Filter Problem
Panayiotis Mousarris from United Kingdom  [20 posts]
16 year
  I am trying to do the Lego NXT Ball Picker tutorial to find a blue ball and track it. I have been able to do all the filters except for the flicker which doesn't work, and I guess it's because it can only be applied to a stationery image. My problem though, is with the blob filter. I currently have it disabled. When enabled I only see a black screen with no blue ball shown anywhere and I see the blob filter value of 0.99 printed on screen and moving all the time, but the ball is not moving. I can only see a tiny pixel of colour blue in the middle of the blob value where it is shown. Seems like the rest of the ball's blue is lost when I use the blob filter to add a circular function.
  I've attached my robo file if you need to see what settings I used. When I have the blob filter disabled, the rest of the filters work fine and the ball is tracked.
program.robo
Anonymous 16 year
Panayiotis,

The blob filter will return the best matching blob based on the attributes you have selected. In your case you only have 1 allowed blob (you can increase the "Select Top X Objects" to see more than 1 object. Because you did not specify anything regarding the size of the blob a single pixel blob will be the most circular and thus will "win" the blob filter competition. If you, however, attach a "largest" attribute as in the updated robofile below, you will then see a much larger circular blob.

If you find that the blob filter goes black, increase the blob count from 1 to 500 and set the weight to 0. Then check the blob weights you want and adjust accordingly.

STeven.
program.robo
Panayiotis Mousarris from United Kingdom  [20 posts] 16 year
  Thank you, it now works. Is the blob filter the only way that you can detect a number of objects (obstacles) and able to obtain the necessary coordinates from them? I tend to use this filter as the basis of how I will detect the positions of the obstacles the robot will have to avoid. All of them will be in square shape and have same color.
Anonymous 16 year
It is not the only one that provides the COG ... you can also use the COG module but this only tracks one object. The other is the Geometry and other analysis modules that also track the COG. Regardless, I'd stick with the Blob Filter as that is almost always used for this purpose and normally is used anyhow. Its a nice side benefit from using that module.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index