meiqua / shape_based_matching

try to implement halcon shape based matching, refer to machine vision algorithms and applications, page 317 3.11.5, written by halcon engineers
BSD 2-Clause "Simplified" License
1.24k stars 480 forks source link

运行要4s。。哪里不对呢 #75

Open pudge11 opened 4 years ago

pudge11 commented 4 years ago

大大你好,运行速度上好像有点问题 MIPP tests

Instr. type: AVX Instr. full type: AVX2 Instr. version: 2 Instr. size: 256 bits Instr. lanes: 2 64-bit support: yes Byte/word support: yes

test img size: 2355200

construct response map elasped time:2.89429s

templ match elasped time:0.0515722s

elasped time:3.06314s

matches.size(): 4

match.template_id: 339 match.similarity: 97.5191

meiqua commented 4 years ago

是windows吧,O2优化有打开吗?

pudge11 commented 4 years ago

对的,是windows。3个优化都打开了,没有打开之前需要30+s

meiqua commented 4 years ago

可能是opencv没用release模式编译?

lgx98 commented 4 years ago

MSVC里面没有-O3选项,改成/O2再试试吧

ohenrygithub commented 4 years ago

release模式和Debug模式差异很大,创建模板,Debug模式要11s,release模式只要0.4s;匹配测试,debug模式要1s多,release模式0.55s;

wangyuou commented 4 years ago

对的,是windows。3个优化都打开了,没有打开之前需要30+s

这个问题有解决吗 我也遇到相同情况

feiyangzc commented 4 years ago

大神,请问下当点数为2~3千个的时候,进行匹配的时候耗时会不会很长,这种问题能够怎样解决啊,谢谢!

meiqua commented 4 years ago

不会,windows上其实也挺快的,可以参考这个issue。一般200个点够了,2000多的话,估计100万像素在200ms吧

wiekern commented 2 years ago

QT6.2 debug版本匹配12秒,release版本0.3秒,差异确实大,找到这个issue才发现问题,还以为代码改动导致的。