ETHZ-INS/DLCAnalyzer

Create zone around a point?

Opened this issue · 1 comments

Hello,

First, thank you so much for this code. I was wondering, is there any way to create a zone, either square or circle, around a given point?

Hi There,

unfortunately this is not implemented. you would have to write your own code to add such zones easily. for the Circle there is an easy workaround that may help you. since inside circle means that the distance between the center and the relevant point is less than the radius.
you could use the command:
IsInZone <- GetDistances(Tracking,"CircleCenter","RelevantPoint") < Radius

where Tracking is the Trackingobject, the name of the two points are "CircleCenter" and "RelevantPoint" (the point you want to check if it is inside the zone) and Radius is a numeric value for the circles radius.

This will give you a boolean vector (1s and 0s) that indicates if the point is inside the Zone at each frame.

Best,
Lukas