[USER ACTOR WORKAROUND] Blob Target Proximity - Doesn't Understand Aspect Ratio?
-
I am using the blob target proximity actor and a few things are unclear. It takes an input of a blob list, when there are multi blobs in the list does it always output the closest blob, ie the blob with the lowest proximity?
Also in testing this actor, it is a bit strange, I would have expected if I used a shapes actor with a circle and the same values for the position and size values I would be able to visualize the active area of the proximity actor. However this is not the case. The distance seems to inconsistent, in that in a circle the blob will give different proximity values in horizontal and vertical axis, where it should be consistent inside a circle, a patch is attached to illustrate.
-
Yes, I see this. I find that if I set the height of the White circle to ~31 then the proximity is as expected as I trace the white circle with the mouse. This looks to me like its a matter of some value being based on the width or height percentage. By setting the stage size to 1080x1080, I can see this is in fact the case (now the yellow shape and the mouse don't match, but the mouse traces the white circle as expected). Setting the yellow Shapes actor H + V size to the size of stage 1, fixes this.
So in the end, it appears to work as expected with a Square stage. I think the Blob Target Proximity actor isn't taking into account the stage ratio when calculating the proximity (it actually doesn't know any canvas/stage reference). This can be accomplished by adjusting the vert min and vert max inputs of the Blob Target Proximity actor
This seems to work (only for a centered target). It will need to be done differently if the stage is Portrait (change horz settings rather than vert).
Note: I had to switch the inputs to a range of Min Max to allow the calculated values (they were set to 0-100)
Also, its worth ensuring the yellow Shapes actor (mouse tracker) is using a canvas that matches in ratio. -
@dusx yes I could get there too, but it feels odd. In the end there is a circle, I am tracking from an input with a non square aspect ratio. That is why I took the stage mouse watcher and was using the same stage as I was outputting to. In this respect I would expect it to match. Also the size part of the actor seems arbitrary, I would expect to be able to draw a circle the same size as the circle it is looking at for distance and have them correlated.
-
I think adding a source Height and Width to the Blob Target Proximity actor might be the easiest way to make this simpler.
Not a stage input since you may not be tracking from a stage (likely an video input rather).
So the Blob Target Proximity could use the H+W to calculate the ratio and make the required adjustments.
@mark does that seem like a logical addition? -
Hi,
Here is a patch I made a couple of months ago that tests the blob proximity actor in a different way. Note that I have to invert the Horizontal orientation of the mouse watcher in the Eyes++ input to get the tracking data to match - why is that?
Best Wishes
Russell
-
Dear All,
So, there is an issue with the Blob Target Proximity in that it does not allow take the aspect ratio of the source image into account when calculating the distance to the target. If the image fed to Eyes++ were square, then it would work. But given that it is 16:9 in Fred's test patch, the height is incorrectly calculated. There is nothing to be done about this at the moment, because we'll need to add more information to the "blob" structure so that it knows the resolution of the source image.
In the meantime, see the attached modification of Fred's patch. It contains a User Actor called Target Proximity Pixels which accepts a blob, the height and width of the source image, the target position, and the target size, all of which are specied in pixels instead of percentages. (It could be percentages too... but maybe it's clearer with actual pixels?)
There is another User Actor called Quad Target Proximity Pixels that accepts a blob input and allows you to specify four targets. (If you don't want to use a target, set it's size to 0.)
The example now contains four white circles at 25% size, and one yellow circle at 50% size. The white text reports the output of the Quad Target Proximity actor, showing a value whenever you approch any of the four white targets. The yellow text reports the postion within the larger, yellow circle.
Hopefully that's enough to get you going on your own and address the problem until we can update the Blob Target Proximity.
Blob Proximity - User Actor Fix.izz
Best Wishes,
Mark