Most of the listed drawback statements are not solid:
> Deploying an OpenCV-based OCR pipeline balloons container images to 1.5–2.0 GB.
Copying only the required shared libraries into the final layer or using the distribution-provided packages should not result in additional GBs.
> Host-Level Dynamic Linking: The application process must dynamically link against heavy shared libraries
Application can link statically against heavy dependencies, but you can deploy the dynamic libraries as part of your package.
In case of containers you have full control.
> Buffer Marshalling & Memory Copies
OpenCV has DNN with ONNX support and you can use external engines like TensorRT, copies can be avoided if image
is in the correct format.
In case data needs to be moved to the GPU on non-unified memory architectures there will be a copy anyway.
There is no language or library constraint that enforces any additional copy compared to a non-OpenCV implementation.
Get Szijarto Gabor’s stories in your inbox
Join Medium for free to get updates from this writer.
> Cross-Compilation Nightmares
I think this is a very strong point of C++ and OpenCV as well.
Not cross-compilation, that sucks. (cross-compilation where your host does not match with your target)
But supporting multiple targets with same code-base is very easy.
I often work with image processing pipelines operating on x64 Windows & Ubuntu, ARM-based NVIDIA edge devices.
> Thread-Safety Bottlenecks:
I'm not sure about this part. You can use high-level libraries like TBB and you can easily build complex optimized parallel
multi-threaded pipelines without manually managing a single low-level std::mutex or std::conditional_variable.
It is also feasible to implement helper structures to wrap your data together with the synchronization primitives and use of RAII
to have similar guarantees built into the type system and language just like for Rust.
Of course data races and synchronization requires care and Rust provides more safety out of the box, but the situation is not that bad in modern C++ using high-level libraries as people describe and imagine.
The binding to different ecosystems is a real good point, although in the age of LLMs this is much less of an issue.





