用于在OpenCV中训练级联分类器的负样本图像尺寸? [英] Negative sample image dimensions for training cascaded classifier in OpenCV?

查看:448
本文介绍了用于在OpenCV中训练级联分类器的负样本图像尺寸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,从此处进行跟踪之后,我现在需要收集负样本,以进行级联使用OpenCV进行分类. 对于正样本,我知道所有样本都应具有相同的长宽比.

So following up from here, I now need to collect negative samples, for cascaded classification using OpenCV. With positive samples, I know that all samples should have the same aspect ratio.

阴性样品呢?

它们都应该大于正样本(因为OpenCV将正样本粘贴在负样本之上以创建测试图像).

Should they all be larger than positive samples (since OpenCV is going to paste positives on top of negatives to create the test images).

应该都一样大小吗?

它们可以是任意大小吗?

Can they be arbitrary sizes?

它们之间是否也应该具有相同的长宽比?

Should they too have the same aspect ratio among themselves?

推荐答案

来自有关Cascade分类器培训的OpenCV文档:

负样本是从任意图像中获取的.这些图像不得包含检测到的物体. [...]所描述的图像可能具有不同的大小. 但是每个图像应该(但不是必须)大于训练窗口大小,因为这些图像用于将负像子采样到训练大小.

Negative samples are taken from arbitrary images. These images must not contain detected objects. [...] Described images may be of different sizes. But each image should be (but not nessesarily) larger then a training window size, because these images are used to subsample negative image to the training size.

这篇关于用于在OpenCV中训练级联分类器的负样本图像尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆