Closed xqms closed 6 years ago
Can you unrotate the clicked location that is optionally published?
Thanks, good catch. I implemented unrotation for the clicked points and tested on sample images.
A push button seems like a rather intuitive choice for this feature. Why not use a combo box to select the desired rotation directly?
@dirk-thomas In my usecase (teleoperation) it is easier to click until the image is upright, rather than think about what the current mismatch is, how much you have already rotated and what the resulting absolute rotation is.
Maybe two push buttons for rotating 90° clockwise and counterclockwise?
Maybe two push buttons for rotating 90° clockwise and counterclockwise?
Since space is always "costly" I am not sure if two buttons is better. On the other hand the label could probably be reduced to "0°" / "90°" / "180°" / "270°" (without the "Rotate: " prefix) if it is accompanied with a button on the left and right for (counter-)clockwise rotation. Those could then also have a nice icon instead of text. So maybe that is space wise still fine with two buttons...
Sounds good to me. I'll update the PR soon. Thanks for the feedback :-)
I just tried the patch and it works great.
But there is one more thing I think should be changed. If you check e.g. the Qt transformation example I would expect that a 90° rotation clockwise should be label "90°". In the current patch it seems to be the opposite. Does that make sense?
Sorry for the long silence, I actually forgot about this.
@dirk-thomas That depends on the definition of the rotation angle as "clockwise" or "anti-clockwise", but I agree that "clockwise" seems to be used more often for image rotations. Also corresponds to a rotation in 3D around the Z axis of the optical coordinate system, which points into the image.
I updated the PR to use clockwise rotations.
Thank you for the patch and for iterating on it.
This is useful for webcams mounted in non-upright orientations. Rather than rotating in the camera driver, it is often better to rotate at the display side, e.g. for cameras mounted on robotic arms that change orientation all the time.