Video-based Radar For Your Car

[Gustaf] has been playing around with machine vision for a while and sent in his latest project in on our tip line. It’s a video based car radar system that can detect cars in a camera’s field of vision while cruising down the highway.

Like [Gustaf]’s previous experiments with machine vision where he got a computer to recognize and count yellow cylinders and green rectangles, the radar build uses ADABoost and the AForge AI/Machine Vision C# framework. [Gustef] used an evolutionary algorithm to detect the presence of a car in a video frame, first by selecting 150 images of cars from a pre-recorded video, and the another 1,850 images were selected by a computer and confirmed as a car by a human eye.

With 2000 images of cars in its database, [Gustaf]’s machine vision algorithm is able to detect a car in real-time as he drove down a beautiful Swedish highway. In addition to overlaying a rectangle underneath each car in a video frame and an awesome  Terminator-style HUD in the upper right corner, [Gustaf] also a distance display above the hood of his car.

It’s an awesome build that makes us wonder if [Gustef] is building an autonomous car. Even if he’s not, it really makes us want to install a video HUD in our whip, just to see this in action.

28 thoughts on “Video-based Radar For Your Car

  1. I feel like fully autonomous cars are a bit of a stretch and not something we will see anytime soon. However I think the fly by wire computer assisted driving has a lot of potential. Imagine a car that would automatiaclly warn you if you didn’t give enough distance between you and the car in front and apply breaks if the car stops short or prevent you from turning if there is a car in your blind spot. Maybe it could scan the road for deer and hit the breaks for you before a person would have time to react.

    1. There are a few high-end vehicles that do that already. I know there have been systems to automatically hit the brakes when coming up too quick on a car ahead for years now.

    2. Interestingly enough I think I would say the opposite. I would much rather have the car take care of the easier and more mundane parts of driving with the option to override it at any time in a more difficult situation.

    3. I think the anti-tailgating feature would be great but most people would find it a pain considering how few drivers leave sufficient stopping distance in front. At least here in N.J..

      1. > how few drivers leave sufficient stopping distance in front

        Not just that: anyone who does leave enough room is just going to be cut in front of, ad nauseam. I remember a show talking about japanese car makers working in this area in the 90s. The automatic-and-legal car winds up constantly braking, or they design a car they know will be breaking the law by not leaving the proper distance.

    1. I would figure with video stabilization (you can easily have a point of reference in view you can keep the frames all lined up on, and with the outside frame section trashed just adjust the x,y position to always line up, thats how steady cam works anyway on most older cameras) wouldn’t be to difficult. i always figured something that could look for the reflectors may be useful but didn’t look to much more into it, never decided to do some kind of full on video recognition to recognize a car rear end

  2. Zee, it may be the type of camera you’re using..
    for example, a standard webcam is probably awful, while the hardware and software image stabilization of my point and shoot does a marvelous job (with about a 1/2 second delay) of stabilizing even very shaky video. so, consider using a different video source.

  3. Pardon me if I’m wrong, but I don’t see any mention of the actual RADAR anywhere. I think this should be classed as LIDAR at best, if not just sophisticated machine vision.

    1. The write-up made it pretty clear it wasn’t actually RADAR but with the current rapid loss of meaning of words it is indeed a bit tricky.

      And to help (since in places like the US dictionaries are no longer available I gather):
      RADAR from radio detection and ranging.

  4. Not sure I want to go as far as an autonomous car with this system, but I sure as hell wouldn’t mind a setup that projected that on the windshield somehow as I drove manually.

    Where are those project-on-the-retina displays when I need one?

  5. There is already at least one mobile app for doing this: iOnRoad. I assume with the computing power at his disposal this is somewhat better.
    I tried to use the above app but I ran into a few problems which people attempting this should think about:
    – AGC really messes up the recognition, especially in strong backlight. The app should know where the road is and set the correct brightness on that not on the complete scene.
    – lag. Not much else to say
    – picking up cars from the side as well not only from behind (license plates)
    – learning: not all setups are identical so the system must adapt to the various conditions

    All the components are already in place in a phone: fast hardware, good cameras, GPS, accelerometer, sound I/O, software libraries. I think this aid will be here in the near future, though I wish for even more augmentation, like detecting road speed and angle velocity from movements, like the optical mouse does.

    As a note, even current cars move more into the direction of camera integration as: rain sensor, lane departure warning, collision warning.

    Autonomous driving is not so far away as a technical possibility but rather because of human acceptance. Probably all these small additions will sometime be accepted as a whole by the law.

  6. Next step, patch that into an addon for the cruise control so it’ll automatically keep a safe following distance behind slowpoke drivers who refuse to keep a steady speed.

  7. It occurs to me that in the next couple of years, consumer-level hardware will be at the point where it can not only recognize vehicles, but vehicles with certain characteristics.

    Like lightbars (be they red-white-blue, or transparent arrays of LEDs, or maybe even LED arrays mounted inside the vehicle) or the bull-bars on the front of certain vehicles.

    Identifying and outbraking a radar trap on the side of the road is trivial with the naked eye. Identifying and outbraking an oncoming vehicle that happens to be running mobile radar before it can get a good return on you is another matter entirely. This is fair game; unlike a LIDAR jammer, which actively interferes with the cop’s gear, an optical cop-recognition system would be entirely passive, it would just be a very well-trained set of eyeballs.

    (The comparable counter-countermeasure is going to involve drones and timing the vehicle’s speed between two landmarks, thereby rendering the 30-year-old arms race between radar detectors, radar-detector-detectors, LIDAR, LIDAR-jammers, and assorted what-not moot. If you’re going so fast that you can’t be completely aware of everything around you, you probably deserve the ticket.)

    1. In Holland they already do this: timing the license plates at regular intervals. Fines are as well pretty steep, leading to permanent car impounding, AFAIK. I’m sure there are several countries in EU with average speed cameras.

    2. You may not see them, but it’s VERY common to have all state border roads (apart from farmer’s roads and gravel trails) running very advanced optics with plate readers. I think almost all states do this (or are in testing phases) these days.

      For now, they do it to catch folks – if you have warrants, and they know your plate, you’re popped pretty quickly (if manpower is available). The good news: It works. Really Well.

      The bad news: Many major intersections in most large cities are instrumented in the same way, and a surprising number of ordinary traffic lights have cameras (still low quality at the minute, but plate capture video is getting better and cheaper by the month) and any city using fiber or wifi to network these lights has the ability to open new revenue sources any day now.

      You don’t hear about it yet, mostly because using it for enforcement may bring law suits that could slow down the construction of panopticons for state/local/fed programs – but they’re going in at a very rapid pace.

      By the end of the decade, it will be ubiquitous and well established to the point that your approximate location (in non-rural areas) will be discoverable at all times. This is why the big push was made to get secure ID – it has little to do with borders or illegal aliens – and lots to do with profiling and finding anyone (and their behavioral patterns) at random.

      The fact that any metropolitan area can then add a little post-processing software and generate cash on demand for a variety of offenses is pure gravy.

      The same thing is happening with insurance – at the moment, you have to consent to install their little bugs (in exchange for a discount) – but as soon as they have a big enough body of data to build profiles from, it will become mandated and privatized to a few big companies, just as credit reporting was.

      Your right to privacy only extends to things which are currently hard to monitor or inspect; The very minute something becomes easy to monitor or access, those rights no longer apply to it.

      The reason Scott McNealy said “You have no privacy, get over it.” is because he was in the business of selling technology to eliminate it, and he saw exactly how fast and easy it was to penetrate our illusion of privacy with a couple of PCs and a database application.

      So, as to the UAVs – they’re only for use in cases where the lights, signs and overpasses haven’t been instrumented yet. The only thing holding up tickets for the average sporting driver is… politics.

Leave a Reply to TracyCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.