How to get the X-Y values configured inside coordinate extraction vision filter

Typically: "How do I... ", "How can I... " questions
Post Reply
ravi
Posts: 85
Joined: 24 Oct 2016, 08:00

How to get the X-Y values configured inside coordinate extraction vision filter

Post by ravi » 02 Jul 2018, 11:02

I want to get the X-Y values configured inside coordinate extraction vision filter in my Lua script. Unfortunately, I couldn't find the API for it.

Please see the screenshot below-
https://www.dropbox.com/s/zs71c0w6n0hnp ... n.png?dl=0

I am looking for the way to get the highlighted values.

-
Thanks
Ravi

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

Re: How to get the X-Y values configured inside coordinate extraction vision filter

Post by coppelia » 04 Jul 2018, 06:14

Hello Ravi,

have a look at sim.getVisionSensorFilter.

Cheers

ravi
Posts: 85
Joined: 24 Oct 2016, 08:00

Re: How to get the X-Y values configured inside coordinate extraction vision filter

Post by ravi » 04 Jul 2018, 11:06

Thank you very much. It worked. Below is the code snippet (putting it here as it may be useful for others)-

Code: Select all

local filterType,options,bytes,ints,floats,buffer=simGetVisionSensorFilter(depthCamHandle,1)
local point_count_along_x=ints[1]
local point_count_along_y=ints[2]
The filter "Extract coordinates from work image" was placed in second place from the top. Hence the index is 1.

Post Reply