Best approach for detecting motion

I have just received my H7 and also very new to vision applications.

My camera will be aimed at a scene with moving cars and is aimed perpendicular to the direction of motion. Cars are moving in front of the camera in 4 lanes.

What is the best approach for detecting a moving car, only at the closest lane to the camera? I am interested in detecting motion only, and do not care about the quality of the image. I do however need to reliably detect motion in the lane closest to the camera. I am only interested in cars, i.e. do not care about pedestrians, bicycles etc.

Thanks in advance for the help.

Hi Jimmy,

Generally, you’re not going to get the best results for what you want to do no matter what as you’re trying to use the camera in a non-controlled environment. If you can’t predict what’s going to be in-front of it you’ll get a lot of false positives. Deep learning an AI really help on this but we don’t support those higher end algorithms right now.

Anyway, given what the system can do you’ll want to do frame differencing with blob detection. This will give you detections where you see differences. You can then look for larger blobs to detect a car versus a cyclist. Given a list of detected movement blobs you can filter them out based on the area in the image to only trigger on something you care about.

Thank you.

I am sorry my post may have been confusing. I meant to say that in my application, there are no pedestrians and no cyclists. Only cars and trucks (usual freeway traffic).

In this case, what is the best method?

Thanks again.

As mentioned previously, frame differencing plus blob detection.

Thank you.