Page 1 of 1

Change vision sensor filters from script

Posted: 01 Jul 2015, 12:11
by Pitmairen
Hi,

What I am trying to do is to use the vision sensors for blob detection. I want to detect only blobs of a certain color, so I use a color filter to filter only the color I want.
Now i want to dynamically change the color filter from the script so i can find a new blob with a different color.

I am just wondering if it is possible to change the vision sensor image filters from lua scripts?
Or is it some other way I can achieve what I am trying to do?

Re: Change vision sensor filters from script

Posted: 01 Jul 2015, 21:37
by coppelia
Hello,

you cannot modify the vision sensors from a script (for now). But instead, simply read the pixels at the blob positions, and check the color. Basically do the same as was done in the blobDetectionWithPickAndPlace.ttt demo scene.

Cheers

Re: Change vision sensor filters from script

Posted: 02 Jul 2015, 11:40
by Pitmairen
Thank you, that works pretty well.