I am wondering how the coordinates of specific bounding-boxes are saved? What is the reference point?
I have an example. In the file the bounding box is saved as:
param name=“topLeft”>45.3781362007169 -20.6863799283154 0
param name=“bottomRight”>34.3673835125448 -35.3673835125448 0
I assume that first value is the number of bounding box in the image, second is the type corresponding to the color in ImFusion Labels, third is the slice number counted from 0, am I right?
What are the next values?
I checked the exported image and the values of bounding box are
top left: x = 158 y = 277
bottom right: x = 146 y = 291
with the reference point in the top right corner of an image.
How should I understand the values saved in the project? What does negative value mean?
You are correct about the name, type and frame properties.
The coordinates encoded in the xml files are in the “world” coordinates, which take into account the spacing (= pixel size) of the image, as well as the transformation matrix associated to the data (if it exists), which identify its position in space.
This image illustrates the relation between the different coordinates systems in use (the one in the file is on the right).
If you just want to get the coordinates in “pixel” space, you can use the Export tab, and under “Label encoding”, select “Encode Landmarks as Coordinates”. After export, the resulting JSON files should contain the coordinates in both world and pixel space.
Great, thank you for your help.
for me under “Label encoding” there is only the option as “Encode bounding boxes as” which has 2 options:“Label map” and “Corner Coordinates” When I select “Corner Coordinates”, the JSON File encodes the boxes only with x y and z, so there are only the World Space Coordinates.
How Can I convert them to Pixel Space? Am I missing something?
the output json file should contain two objects, “worldSpace” and “imageSpace”. The former contains coordinates of the corners of the bounding box in world space coordinates, the latter in pixel coordinates.
Thanks a lot, I was assuming that they were also world space since they had z coordinates, now I get it. There is one thing I want to add: When I compare the imageSpace coordinates of the boxes with what mouse pointer shows on annotated images, I see that values match but they are interchanged. “bottomRight” object in Json file actually shows the actual top left position of the bounding box and “topLeft” object corresponds to the actual bottom right coordinates.