Closed RealOrangeOne closed 3 years ago
Having tried this, it's not that simple. The CV APIs require ndarray
The bigger drawback is that casting appears to be very expensive. It's critical zoloto is as fast as possible, and leaving the data in ndarray
trades off speed for API flexibility, and I think that's a trade off worth making.
Happy to review in future if it becomes too annoying, but for now...
ndarray
is annoying, and not very type safe, especially in its uses in OpenCV.I think the best option here is to just remove as much
ndarray
as possible.This has the benefit of reducing this issue as much as possible, but also enables deeper typing.
I'm expecting to have to create a
Frame
andPixel
type, and reuse some of the existing ones incoords.py
.Also,
array
is a method, not a type.See also https://github.com/RealOrangeOne/zoloto/pull/282