我需要在监控摄像头下测量传送带的速度。经过多年的佩戴,腰带基本上没有纹理,如果上面没有东西,甚至很难看出腰带是否在运动。
我试图把这个问题作为一个对象跟踪问题来解决:
tracker.
如果步骤1中的关键点/对象是手动给定的,那么步骤2和3工作得很好,但是我有自动查找关键点的性能问题:即使我将图像裁剪成非常小的图像,关键点检测成本也是60ms+。我尝试过在OpenCV中实现SURF & ORB,两者都不够快。
还有其他更快的选择吗?
发布于 2021-02-08 10:11:44
也许你可以尝试一下快速的角点检测算法。比你尝试过的更快。它是用opencv实现的。下面是从opencv文档(https://docs.opencv.org/master/df/d0c/tutorial_py_fast.html)中直接提取的示例代码:
import numpy as np
import cv2 as cv
from matplotlib import pyplot as plt
img = cv.imread('simple.jpg',0)
# Initiate FAST object with default values
fast = cv.FastFeatureDetector_create()
# find and draw the keypoints
kp = fast.detect(img,None)
img2 = cv.drawKeypoints(img, kp, None, color=(255,0,0))
# Print all default params
print( "Threshold: {}".format(fast.getThreshold()) )
print( "nonmaxSuppression:{}".format(fast.getNonmaxSuppression()) )
print( "neighborhood: {}".format(fast.getType()) )
print( "Total Keypoints with nonmaxSuppression: {}".format(len(kp)) )
cv.imwrite('fast_true.png',img2)
# Disable nonmaxSuppression
fast.setNonmaxSuppression(0)
kp = fast.detect(img,None)
print( "Total Keypoints without nonmaxSuppression: {}".format(len(kp)) )
img3 = cv.drawKeypoints(img, kp, None, color=(255,0,0))
cv.imwrite('fast_false.png',img3)https://stackoverflow.com/questions/66099176
复制相似问题