简体   繁体   中英

creating Haar cascade XML - different sizes

As I understood in order to generate XML, we gotta gather negative and positive images. In every tutorial I read/saw, all images; positive or negative, are resized to the same size, where the negative is usually double the size of the positive.

My question is as follow; can I have different sizes for positive images? I know it is going to be tedious since you need to specify the size of each image every time. But is it possible? Or would the detection of the object fail?

Imagine I am detecting an object, lets say a bed. A bed can be single or double, king size, queen size , .. etc. You got my point. So is it better to create a different XML for each of these sizes? Or I can put them in one positive directory and adjust the parameters accordingly to the size?

Reasons I am using Haar Cascade features is that it is fast and I need the detection to be done later on in real-time on Raspberry. If there any other way, I am open to any other suggestion too.

Thanks!

Yes it is possible to have different sizes for positive images and you are right its a very tedious task but what you see in all the tutorials they will just tell to keep all the images in a same size because it takes a lot of time to specify all the different sizes for each images so they try to keep the code simple and clean but if want to try out with different sizes u can do it but before doing it first try it out with the a same size then if it works then only try with the different sizes. blindly don't try it make sure you are on the right way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM