Skip to content

Rotated rectangle implementation [Question] #21

@edu638s

Description

@edu638s

I'm trying to get some parameters from a rotated rectangle in the roLabelImg generated XML and print the rectangle with matplotlib, which has a very similar representation, with variables "center coordinates, widht/height and angle":
Matplotlib: Rectangle((cx, cy), width=w, height=h, angle=theta).

So long I haven't been able to do that. I've even tried to do transformations like: cx' = cx - l*math.cos(theta+alfa)
I've considered the center points maybe could be different, because in matplotlib they represent xmin, ymin, so it can explain the transformation above. But didn't work.
So I'd like to know what is your implementation, or if you know how can i transform your coordinates to matplotlib style. Well, i would appreciate some help. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions