JP6.2版本opencv性能问题

您好,我司从JP5.1.2升级到JP6.2后,相机相关的应用程序的上层代码在调用cv::remap时,代码在没有变化的情况下, 调用cv::remap的开销里, __sched_yield的占比JP62版本是Jp512版本的15倍+【火焰图占比0.75% → 12.65%】。这个应该是opencv依赖的tbb库里调用的。这种回退是正常的吗?还是有手段可以让其恢复之前的水平吗?

如下图为JP6.2下的火焰图

问题发生版本:JetPack6.2

cv::remap调用代码:cv::remap(cpu_input, *cpu_output, std::get<0>(cpu_mat_), std::get<1>(cpu_mat_), cv::INTER_LINEAR);

Hi,

Not sure if we understand this correctly.

The OpenCV version between JetPack 5 and JetPack 6 is quite different (v4.5.4 vs. v4.8.0).
So the algorithm may also be different.

Thanks.

是的,JP5和JP6的opencv版本及它所依赖的库都有更新,目前看这种更新导致我们使用相同方法调用同一个接口时开销变大了,像上面我们遇到的问题。

所以想请教下,您这边是否有什么建议,来降低JP62上调用cv::remap接口时的开销变大(相对于JP512)问题,或者有什么建议的优化方向

Hi,

You might need to check with the OpenCV team to get more information.
Since they should know more about the algorithm differences between versions.

Thanks.