Módulo HUI

Homography UI module User interface for homography correspondences.

The user uses the keyboard to run the UI command, then click on the image to set the element place. There are three commands, setting three horizontal lines. HORIZON and TOP are used to compute the homography. LIMIT sets the far edge of the zenithal transform.

class HUI.Command
EMPTY = ''
HORIZON = 'h'
LIMIT = 'l'
TOP = 't'
class HUI.Hui(windowName: str, imShowSize: tuple, afterRoi=None)
H: ndarray = array([[1., 0., 0.],        [0., 1., 0.],        [0., 0., 1.]], dtype=float32)
Hview: ndarray = array([[1., 0., 0.],        [0., 1., 0.],        [0., 0., 1.]], dtype=float32)
__init__(windowName: str, imShowSize: tuple, afterRoi=None) None
anotate(im)
calculateRoi(H: ndarray | None = None)

H is the homography transforming the trapezoid into a square. Hview is the modify homography to get the zenithal view, a wider view than the prior.

command = ''
drawHorizontalLine(im, y, text='', selected=False)
horizon: int
imShowSize: tuple
limit: int
processKey(key)
toggleCommand(command)
top: int
windowName: str
zenithalSize: tuple
zenithalSquareSide: int = 500
HUI.mouseListener(event, x, y, flags, self)