0
votes

I am developing a project of detecting vehicles' headlights in night scene. First I am working on a demo on MATLAB. My detection method is edge detection using Difference of Gaussian (DoG): I take the convolution of the image with Gaussian blur with 2 difference sigma then minus 2 filtered images to find edge. My result is shown below:

Now my problem is to find a method in MATLAB to circle the round edge such as car's headlights and even street lights and ignore other edge. If you guys got any suggestion, please tell me.

enter image description here

enter image description here

1

1 Answers

4
votes

I think you may be able to get a better segmentation using a slightly different approach.

There is already strong contrast between the lights and the background, so you can take advantage of this to segment out the bright spots using a simple threshold, then you can apply some blob detection to filter out any small blobs (e.g. streetlights). Then you can proceed from there with contour detection, Hough circles, etc. until you find the objects of interest.

As an example, I took your source image and did the following:

  1. Convert to 8-bit greyscale
  2. Apply Gaussian blur
  3. Threshold

This is a section of the source image:

before

And this is the thresholded overlay:

after

Perhaps this type of approach is worth exploring further. Please comment to let me know what you think.