Change vision sensor filters from script

Typically: "How do I... ", "How can I... " questions
Post Reply
Pitmairen
Posts: 2
Joined: 01 Jul 2015, 09:49

Change vision sensor filters from script

Post 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?

coppelia
Site Admin
Posts: 10378
Joined: 14 Dec 2012, 00:25

Re: Change vision sensor filters from script

Post 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

Pitmairen
Posts: 2
Joined: 01 Jul 2015, 09:49

Re: Change vision sensor filters from script

Post by Pitmairen »

Thank you, that works pretty well.

Post Reply