V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
cooljiang
V2EX  ›  OpenCV

用 C++调用 OpenCV 的 matchTemplate 反而比 Python 更慢

  •  
  •   cooljiang · Oct 18, 2023 · 1793 views
    This topic created in 930 days ago, the information mentioned may be changed or developed.
    如题,src_image 大小为 100MB ,template_image 大小为 30MB ,使用的 match_method 为 TM_CCOEFF_NORMED 。Python 调用的是 OpenCV 的 C++接口,理论上 C++直接调用更快才对。但实际测试时 Python 的耗时为 5046ms ,而 C++的耗时为 5681ms 。
    另外,除了 OpenCV 的 matchTemplate 方法外,是否有其他速度更快的模板匹配方法呢?
    谢谢各位。
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3206 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 13:27 · PVG 21:27 · LAX 06:27 · JFK 09:27
    ♥ Do have faith in what you're doing.