RealOrangeOne / zoloto

A fiducial marker system powered by OpenCV - Supports ArUco and April
https://zoloto.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
13 stars 7 forks source link

RFC: API refactor away from primarily camera classes #279

Open RealOrangeOne opened 3 years ago

RealOrangeOne commented 3 years ago

As with all good things, I've been tempted to rewrite the API and implementation and change things massively.

The primary changes being:

API examples

def process_image_eager(file: Path, marker_dict, detector_params: CalibrationParameters, marker_size: int) -> Generator[EagerMarker, None, None]: ...
def process_image(file: Path, marker_dict, detector_params: CalibrationParameters, marker_size: int) -> Generator[Marker, None, None]: ...
def process_frame(data: ndarray, marker_dict, detector_params: CalibrationParameters, marker_size: int) -> Generator[Marker, None, None]: ...
def process_frame_eager(data: ndarray, marker_dict, detector_params: CalibrationParameters, marker_size: int) -> Generator[EagerMarker, None, None]: ...
def get_marker_image(border_size: int, marker_id: int, marker_size: int, border_colour: Tuple[int, int, int]) -> ndarray: ...

Implementation probably also requires #202 (and thus #220).

trickeydan commented 3 years ago

:+1: