The order of events was as follows.
Graph storage was implemented in Scala.
Textual modality was modeled in the graph storage.
Visual modality was added to allow different words to reference one picture and obtain meaning.
Performance problems were detected when the library had to deal with millions of pixels.
Several attempts to improve performance in Scala (Scala Native and Int versions) were done with little success.
A fast graph storage was implemented in C.
Textual and visual modalities were put atop of the C library.
Computer vision algorithms were added in their primitive form.
It was discovered that OpenCV library stopped supporting C and continues supporting Java.
So, the new design is to access OpenCV functionality through its Java API. ZIO should be employed to wrap such calls to facilitate concurrent execution. The results should be passed to the semantic layer of Binet library.