help in image processing robot

hi people,
i am making a line follower robot using image processing..tat means i wil have certain no of images which are given as input..each images specifying a particular direction..if the arrow mark in the image indicates right the robot got to turn right and so on..i don kno anythin about matlab..i want to know how to find a particular image contains an arrow mark(which is right or left or forward or backward)using matlab..the problem i have is...if the dimensions of the arrowmark is known i would construct an arrow mark and do correlation and find out...now i don know the dimensions..
please help me out..

thanks in advance

I don't know how to do it in MATLAB, but I can tell you how I would approach the algorithm in general:

  1. process the image until I had a simple black arrow on a white background, or vice-versa.

  2. loop thru all columns of the image; if a significant number of rows in one or more adjacent columns are found, it is likely a vertical line - goto step 4

  3. loop thru all rows of the image; if a significant number of columns in one or more adjacent rows are found, it is likely a horizontal line - goto step 5

  4. loop thru the columns of image, left to right; if for several columns I find that the rows with pixels are trending in the upward direction, that's an up arrow; if trending downward, that's a down arrow. STOP.

  5. loop thru the rows of the image, top to bottom; if for several rows I find that the columns with pixels are trending in the left direction, that's a left arrow; if trending right, that's a right arrow. STOP.

Note that the above will require a ton of work to flesh out; there will likely be problems with small arrows, shaded arrows, filled arrows (non-line arrows), as well as with images which don't just contain an arrow. It will need a lot of work and such to get it to work perfectly (or near enough).

Hope that helps!

:slight_smile:

Generally in image processing, it is best to minimise the number of passes through the raw dataset.
If you can easily binarise your image, do blob agglomeration on the thresholded pixels, then do simple shape (aspect ratio, centroid, major axis) analysis on the blobs.

Sir what i did is first i converted an image into binary image and used edge detection followed by filtering..then i used rotation to generate all other arrowmarks..then i tried to complement all images..now the image and its complement adds up to blank image...from that i can found out..but the problem is i got to know what is my first image direction..else i cant do...cud you help me out