【发布时间】:2021-04-12 14:06:48
【问题描述】:
我很难完成这项工作。 我的图像集由小图像 (58x65) 组成。
我正在使用带有以下参数的 ORB:
# Initiate ORB detector
# default: ORB(int nfeatures=500, float scaleFactor=1.2f, int nlevels=8, int edgeThreshold=31, int firstLevel=0, int WTA_K=2, int scoreType=ORB::HARRIS_SCORE, int patchSize=31)
orb = cv2.ORB_create(
nfeatures = 500, # The maximum number of features to retain.
scaleFactor = 1.2, # Pyramid decimation ratio, greater than 1
nlevels = 8, # The number of pyramid levels.
edgeThreshold = 7, # This is size of the border where the features are not detected. It should roughly match the patchSize parameter
firstLevel = 0, # It should be 0 in the current implementation.
WTA_K = 2, # The number of points that produce each element of the oriented BRIEF descriptor.
scoreType = cv2.ORB_HARRIS_SCORE, # The default HARRIS_SCORE means that Harris algorithm is used to rank features (the score is written to KeyPoint::score and is
# used to retain best nfeatures features); FAST_SCORE is alternative value of the parameter that produces slightly less stable
# keypoints, but it is a little faster to compute.
#scoreType = cv2.ORB_FAST_SCORE,
patchSize = 7 # size of the patch used by the oriented BRIEF descriptor. Of course, on smaller pyramid layers the perceived image area covered
# by a feature will be larger.
)
可以看出我更改了 edgeThreshold 和 patchSize 参数,但我担心这些尺寸太小而无法找到有意义的特征。
我正在测试一组相当大的停车场图像(约 3900 张 58x65 的图像),包括空的和被占用的。
但结果并不一致:停放的汽车(来自集合外)的图像显示为比其他停放的汽车更接近空位。
我做错了什么?我的猜测是上面提到的参数。在这方面有更多经验的人可以确认一下吗?
编辑:
Here 是图像的一小部分。
完整的数据集可以在here找到。
【问题讨论】:
-
您是否正在尝试使用 ORB 特征检测器构建汽车分类器? ORB 特征是低级特征,只是从训练集中找到相似的特征并不能很好地发挥作用,正如您现在所想的那样。
-
不是汽车分类器(识别本田、日产、福特等),而是停车场空间标识符(空的与占用的)
-
你能展示一些图片(空的和占用的)吗?也许实现了 ORB 检测?
-
刚刚用图片样本和完整数据集的链接更新了问题
标签: python opencv image-processing feature-extraction orb