I am developing a project of detecting vehicles' headlights in night scene. I am working on a demo on MATLAB. First I use Gaussian blur to filter the grayscale image, then threshold to get the binary image. The next step is to find connected components and bounding box to recognize them. I have CCL code using two pass 4-connectivity method without using bwlabel and it's fairly simple. But I think this method is very resource intensive when implementing on FPGA. I'm considering other algorithms such as contour tracing or single pass. Could you guys give me some suggestions of other CCL methods suitable for FPGA? Thanks alot
1 Answers
2
votes
Depending on the type of image you're using, and depending upon the output of the thresholding operation, you may manage to bypass CCL and go straight to contour tracing.
I'd say the real challenge is to correctly threshold the image, so that the binary resultant contains only the headlight (as close as possible).
For example, if I take this image:

and do the following steps sequentially: 1. conversion to grayscale 2. median filter 3. Otsu's threshold 4. Morphological gradient
... I get the following output:

I guess a simple Hough circle on that image would suffice.