Detect car trailer
To detect a car trailer its very hard. There're a lot of car trailers that has the same license plate as the car itself. To detect if its a trailer I need to search in a area around the license plate. I already are making a detector for the license plate with Viola and Jones. Only to detect if there is a triangle you don't see very clearly on the image. The images coming from section control so a lot of different thresholds in the day time.
For the privacy I have to delete the license plate details
So my question are there special ways of image processing that would be help full. I thought about: - canny - adapting threshold - Image Gradients
But big difficulty is that the application needs to be real-time.
I think adaptiveThreshold() should be not the worst option, when light ratio is not stable. The question is whether the image ROI is always at the same position, than you can save yourself the license plate detection. If not, you can eventually use adaptiveThreshold as starting point for both, license plate detection and triangle detection. Another question is: What is realtime? I don't think there are 20 cars per second passing the camera. Or will you track one car for a while and then the next?
If you need several calculations/second I can give you some cues at the moment:
use gpu acceleration (see: UMat in OpenCV3.0.0 for example)
rescale the image. E.g. a triangle of that size (like in your image) doesn't need a 1MPx image to become detected
check out some feature detectors
If my program works at it would be slow if it takes more tan 250 ms. This is because the main program for section control is really big.