I need to train a cascaded classifier to detect vehicles and different viewing angles. I'm using OpenCV.
Some of the angles that I need to capture cause the placement of the vehicle within the image to be diagonal, as shown below:
Now the problem with this is that because the vehicle is diagonally placed across the image, then there's a lot of unnecessary background which I can't crop out simply because images have to be rectangular. Is there another way to build positive samples for diagonally placed angles/perspectives of objects? I do need the classifier to be able to recognize this specific view of an object. It isn't so bad in the car above, because a car doesn't have a huge difference between its length and width. But if I do the same with a truck for example, which is several times longer than it is wide, then the images end up having more background than object of interest in them, like below. I'm worried about whether this is good or bad for classification, and if there's any solution.
Will a classifier recognize a specific angle of a vehicle regardless of which way it's rotated on the background? And in that case, would it be better to rotate the entire truck image such that the truck is horizontal/vertical, then clip the rest of the image?