Line Follower Using Image Processing

Posted: July 3, 2012 in Work
Tags: , , ,

Am writing after so long.

But still am back. Past days were learning days for me. I learned lots of things.

Once i found people talking about line follower. Line follower is simply a bot that follows a line. It is very easy to make one using IR sensors. But being an Image Processing Learner I decided to make one using Image Processing.

My aim is not only to make a Line follower but to make it more robust (using image processing)

Till now writing code was easy, but will have to surely append some changes to make it robust.

Simplest line follower (image processing ) can be made doing following, as I did first:

My first step was to reduce brightness variation , which i did through intensity normalization. Generating histogram over some images could explain why i did so.

Secondly I set up a control box which helps me robustly select few parameters for edge detection and image morphology.

Then i perform edge detection (canny). On doing this I get the Image containing path boundaries with white colour and rest with black.

Then i compute Cente of Gravity for white pixels in the image.

Now this COG helps me to orient my bot properly.

Tills here everything is easy. In this i even used Opencv2 (for C++)

the code is though simple but works even for distorted path.

Advertisements
Comments
  1. awsum wok man!! keep on d good work…

  2. Zargonovski says:

    hey can you share with us the source code please 🙂

  3. sweeseng says:

    hi there, i have some question to ask. can i have your email. thanks

  4. C RANGA SUMIRAN says:

    hi, does finding cog means finding the moments

  5. Bhushan says:

    Hi
    Can you send me code please

    • Hi

      Unfortunately, it is a very old post and I do not have back up of the code. But every step defined in the post in very easy. If you have any specific issues in understanding or implementing, let me know. Maybe then I can help you with code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s