在OPENCV
以二进制格式保存和加载垫子对象是一个实质性的性能增强器。 OpenCV的副词和MATREAD功能有助于此过程。 Using binary files avoids the overhead associated with OpenCV's serialization and deserialization procedures, resulting in much faster loading times.
Test ResultsLoad time comparisons between FileStorage and binary formats for both small and large images:Using FileStorage: 5523.45 ms (small image) 使用原始:50.0879毫秒(小图像) 使用文件:(不记忆)(大图) 使用RAW:197.381 ms(大图)
代码example提示更快的加载
避免使用debug模式:在辩论模式下切勿进行性能测量,因为它会在debug模式下进行,因为它会显着减速代码执行。可用的内存,尤其是在处理大垫子对象时。考虑二进制格式:
二进制文件格式提供了出色的速度改进,尤其是对于大型垫子对象。免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3