Labeling top-left pixel coordinate/offset

Hi
I am using the interactive annotator to draw a rectangular ROI on images.
I was wondering if it could be possible to recover the coordinates of the top left pixel of those ROI.

The segment feature nodes allows to recover the coordinates of the centroid and the dimensions of the ROI so I can recalculate the coordinates of the corner but then I have to take into account even/uneven dimensions of the ROI in the calculation so it is maybe not the best way.
I found that I can recover the exact coordinates using the segment cropper node first and then the Image properties returning the offset features. But what if I don’t need to crop my image ?

I know that for non rectangular ROI this coordinate is maybe confusing, in this case it could be the coordinate of the smallest rectangular bounding box enclosing the ROI maybe ?

Hi @l.thomas,
I am sorry for the late reply,

You can use the Segment Features node followed by the Image Properties node. The Segment Features node creates a bitmask of each segment’s bounding box that contains the offset information you can extract with Image Properties. Take a look at the example workflow: Labeling top left pixel.knwf (383.8 KB)
best,
Gabriel

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.