Searching \ for 'White Line' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=white+line
Search entire site for: 'White Line'.

Truncated match.
PICList Thread
'White Line'
1999\08\10@203339 by Tony Nixon

flavicon
picon face
Hi all,

This may be an upcoming PIC project depending on it's feasabillity.

I was wondering if a small BW video camera could be set up to monitor
the position of a horizontally moving white vertical line against a dark
background. I was hoping it may be a simple as using a comparator on the
video signal to detect where the line is. Then I could use this signal
to detect the current line position in relation to the frame width.

Any thoughts?


I've also finished a Parallax to PIC source code converter. This changes
Parallax mnemonics to PIC mnemonics and leaves the labels and comments
etc intact and will be available free on my web site - if and when the
domain provider gets off thier backside and completes the transfer, (3
weeks now) >:-[

--
Best regards

Tony

http://www.picnpoke.com
Email ???

1999\08\10@213134 by Wagner Lipnharski

picon face
Tony Nixon wrote:
>
> Hi all,
>
> This may be an upcoming PIC project depending on it's feasabillity.
>
> I was wondering if a small BW video camera could be set up to monitor
> the position of a horizontally moving white vertical line against a dark
> background. I was hoping it may be a simple as using a comparator on the
> video signal to detect where the line is. Then I could use this signal
> to detect the current line position in relation to the frame width.
>
> Any thoughts?
>
> I've also finished a Parallax to PIC source code converter. This changes
> Parallax mnemonics to PIC mnemonics and leaves the labels and comments
> etc intact and will be available free on my web site - if and when the
> domain provider gets off thier backside and completes the transfer, (3
> weeks now) >:-[

What about use those Texas Instruments photo cells with 128 pixels?, you
could just locate the white line position on the pixels... another idea
is to use three photo resistors or photo cells, feed the analog signal
into a triangular comparison at analog comparators and voil‡, you would
have a single analog signal which amplitude would represent the position
of the white line. Some table representation:

Left    Center   Right    White-Line  ADC Out
Cell    Cell     Cell     position    Value
-----   ------   ------  ----------  -------
100%     50%       0      Far left     0%
50%     100%      50%     Center       50%
0%       50%     100%     Far right    100%
25%     100%      75%     75% right    75%
75%     100%      25%     75% left     25%

As you can see, the Right Cell values represent directly the ADC value,
but it needs the triangulation to get that values.

and so on. A simple adc would tell you where the white line is, without
needing to use a video camara.

1999\08\10@230605 by Vincent Deno

flavicon
face
>
> I've also finished a Parallax to PIC source code converter. This changes
> Parallax mnemonics to PIC mnemonics and leaves the labels and comments
> etc intact and will be available free on my web site - if and when the
> domain provider gets off thier backside and completes the transfer, (3
> weeks now) >:-[
>

I would be more than happy to put it on my web-site for the time being
until your provider gets around to it.  I would of course put appropriate
links and acknowledgements to you.  At any rate, I would like a copy.

As far as the detection of white lines goes, there is enough of a voltage
difference to use a comparator to detect the"white" peak in NTSC.  Just
have to dtect the start and the stop of the frame too so you can calculate
where the line is.

-Vince


> --
> Best regards
>
> Tony
>
> http://www.picnpoke.com
> Email ???
>

1999\08\11@092949 by Harrison Cooper

flavicon
face
Although its composite video, you should still be able to see the
transitions.  Put a scope on the output of the camera video, and time delay
sweep till you see the transition line.  You can reset the count based on
vertical sync, and use hsync to count the lines.  I think National and maybe
some others make a composite video sync separator as well, so they become
digital inputs.  Then, use the A/D or just a window comparator (as you
suggested) to look for the voltage transition from 0 (black) to 700mV
(white).  One thing to watch for is the window settings because the
transition from black to white may cover several lines.

{Original Message removed}

1999\08\11@175555 by Nigel Goodwin

flavicon
picon face
In message <spam_OUT37B0C4F3.D6A2DA39TakeThisOuTspameng.monash.edu.au>, Tony Nixon
<.....Tony.NixonKILLspamspam@spam@ENG.MONASH.EDU.AU> writes
>Hi all,
>
>This may be an upcoming PIC project depending on it's feasabillity.
>
>I was wondering if a small BW video camera could be set up to monitor
>the position of a horizontally moving white vertical line against a dark
>background. I was hoping it may be a simple as using a comparator on the
>video signal to detect where the line is. Then I could use this signal
>to detect the current line position in relation to the frame width.

It should be fairly simple to do, first you need a reliable source of
sync pulses, the Elantec EL5481 is an excellent, easy to use, sync
separator chip. It has outputs for frame sync, and composite sync, you
could use a PIC to monitor both of these, first wait for the frame sync
pulse, then delay until enough time has passed to get to a suitable line
part way down the screen, then monitor the composite sync, waiting for
the next line sync pulse. Use a comparator to monitor the video signal,
set to switch at a fairly high video level, feed this to another PIC
pin. Then just measure the time it takes from the line sync pulse to the
comparator output changing. You will probably need a fairly fast PIC, as
one TV line only lasts 64uS (for 625 line PAL), a 10MHz 16F84 should be
sufficient!.
--

Nigel.

       /--------------------------------------------------------------\
       | Nigel Goodwin   | Internet : nigelgspamKILLspamlpilsley.demon.co.uk     |
       | Lower Pilsley   | Web Page : http://www.lpilsley.demon.co.uk |
       | Chesterfield    | Official site for Shin Ki and New Spirit   |
       | England         |                 Ju Jitsu                   |
       \--------------------------------------------------------------/

1999\08\11@185904 by Peter van Hoof

flavicon
face
> I was wondering if a small BW video camera could be set up to monitor
> the position of a horizontally moving white vertical line against a dark
> background. I was hoping it may be a simple as using a comparator on the
> video signal to detect where the line is. Then I could use this signal
> to detect the current line position in relation to the frame width.
>
> Any thoughts?
>
How about turning the camera 90 degrees for starters
(this will turn the signal from a high frequency to a low frequency one)
separate the frame synch with a suitable chip
feed the video into a low pass filter and then into a comparator
set a flip-flop with frame sync reset it with the comparator signal
feed it into a pwm input for your position signal
or do the timing on a regular input


Peter

1999\08\11@195804 by Wagner Lipnharski

picon face
Peter van Hoof wrote:
> How about turning the camera 90 degrees for starters
> (this will turn the signal from a high frequency to a low frequency one)
> separate the frame synch with a suitable chip
> feed the video into a low pass filter and then into a comparator
> set a flip-flop with frame sync reset it with the comparator signal
> feed it into a pwm input for your position signal
> or do the timing on a regular input

Very nice solution Peter.  Lets call the wall vertical white line as
"MARK".  A pure video signal (without the syncs), will have a high level
voltage for the bright luminance (white color), all the other time it
would be low voltage (dark). Turning the camera 90¡, will make the MARK
appears as a horizontal line (or lines) at any video monitor, so the
image.  

I believe the low pass filter is not necessary since the first high
level at the video would represent the first MARK scan line. Probably
the MARK would take 5 or more video lines, right? Add 5 x 16us of extra
time to consider it as "center white video line".

Considering that the video camera generates 262.5 lines per frame (it is
interlaced, isn't?), the center of the image is exactly at 131.25 x
63.49us = 8.333ms. If the MARK is at the left (top of image), the time
would be zero, if it is at the right (bottom), it would be 16.66ms.

So, the software needs to have a 8 bit counter. Frame sync sets it to
zero, then software increments it every 65.1 microseconds, until it
receives a high level at video signal. Then it adds MARK displacement,
that is the average video lines MARK uses in the image times 262.5 /
512.

For unsigned result, 0 means MARK at the left, 128 is center, 255 is
right.

For signed result subtracts 128 from the counter.  Value around zero is
MARK at the center of the screen, value from 1 to 127 MARK is to the
Right, value from 128 to 255 MARK is to the Left.

Using the low pass filter suggested by Peter, would create a large width
high level pulse during all the time MARK exist at the image (without
the blanks caused by the H Sync), so you could measure MARK start and
end, and calculate the center exactly. This filter would needs to be
calculated based on how many video lines MARK will use at the image.
Multiply that number or lines by 64us and divide from one, you will have
the central frequency.

1999\08\11@213020 by Tony Nixon

flavicon
picon face
Wagner Lipnharski wrote:
>
> Peter van Hoof wrote:
> > How about turning the camera 90 degrees for starters
>
> Very nice solution Peter.

Yes, I thought so too, and I think that's where I will start. Thanks
Peter.

> Considering that the video camera generates 262.5 lines per frame (it is

[snip]

> So, the software needs to have a 8 bit counter. Frame sync sets it to

[snip]

I think the LM1881 might do to begin with as it has digital outputs for
start of frames and lines plus odd/even for interlaced frames. Also,
I've got one in my 'junk' box.

This is probably the easiest part to do. If possible, the aim is to
provide feedback to a steering mechanism to make a vehicle follow a
straight white line along a bitumen surface. I thought about sensor
arrays etc., but this may be a simpler solution. If the camera field of
view is similar to the car width then I have a reasonable amount to play
with. Camera height may be a problem though.

Just a matter of keeping the white line in the center of the screen.
Ho Ho |-)


--
Best regards

Tony

1999\08\11@222745 by Dennis Plunkett

flavicon
face
At 11:25 12/08/99 +1000, you wrote:
{Quote hidden}

Ah Tony now you have let the car out of the bag. There was a simple project
like this in (Believe it or not) Electronics Australia in the early 80s
called a while line follower. It used a light source and two LDRS on eitehr
side and then compared the bightness level. Of course it had some problems
with excess daylight, but hte basics where simple.
Your problems will be many If you mount the camera too close then too much
of the signal will be whiteand you will have troubles when the line changes
direction (When the car is traveling at high speed (15kph or more)). Also
if too close then large patches of missing while will send the thing off
into no mans land. I do hope that youre trying to attempt to follow a fixed
single while line.
Hey why don't you tell us more about youre projects as a whole rather than
little bits here and there, last one I cna remember was how to control a
stearing wheel, before that ignition control, now it all makes sense <G>

Dennis

1999\08\11@222752 by Dennis Plunkett

flavicon
face
At 11:25 12/08/99 +1000, you wrote:
{Quote hidden}

Oh yes just another point, it may be better to have two cameras one on
either side of the car pointing to the middle, this will then let you
produce a 3D image and make it easyer to see "Where" the line has gone to

Dennis

1999\08\11@223150 by Dennis Plunkett

flavicon
face
At 19:56 11/08/99 -0400, you wrote:
{Quote hidden}

15625 is frame sync, corresponding to 625 lines interlaced in Australia

Dennis

1999\08\11@224504 by Wagner Lipnharski

picon face
Tony Nixon wrote:
[snip]
> This is probably the easiest part to do. If possible, the aim is to
> provide feedback to a steering mechanism to make a vehicle follow a
> straight white line along a bitumen surface. I thought about sensor
> arrays etc., but this may be a simpler solution. If the camera field of
> view is similar to the car width then I have a reasonable amount to play
> with. Camera height may be a problem though.

I was suspecting this would be the application.
So you will need to illuminate the floor, from where the video camera
will get the image.

I saw many years ago in Canada (IBM laboratory), a small vehicle to
transport the internal mail, documents, envelops and so on. Every
possible stop door has a kind of allocated slot (mail box) on the top of
the car, so you just slip the envelope into the destination slot and the
machine would stop at that door and start to beep until somebody remove
the envelope, or it goes away after 1 minute of beeping if nobody
cleared the mail box.

A simple ultraviolet lamp on the bottom of the machine's nose, and a
reflective painted stripe on the floor. Two sets of two photodiodes, the
inner diodes 6 inches apart, and the outer 12, the inner diodes when
illuminated by the UV reflection on the pain, just compensate the
direction, so the paint stripe just stay always in the middle of the
car's nose.  The outer diodes to recognize a severe out of course.  A
central photodiode to recognize the stripe exists, so the car could move
forward.
Another set of reflective bar code style just to read the stop number
and possible Y intersections, to device to go left or right. Pretty
neat. Battery operated, switches on bumpers. It was pretty easy to fool
the car with very white paper stripes on the floor... ;) So imagine if
we didn't play with that machine for a while... bringing it into the
cafeteria... then removing the paper stripe the machine start beeping "I
am lost, I am lost..., where am I?"

Shouldn't it be more economic than using a video camera and all?

1999\08\11@225729 by Tony Nixon

flavicon
picon face
Dennis Plunkett wrote:

> Ah Tony now you have let the car out of the bag.

Yeah. I thought I was a biker, now I've turned into a carby ;-)

> Hey why don't you tell us more about youre projects as a whole rather than
> little bits here and there, last one I cna remember was how to control a
> stearing wheel, before that ignition control, now it all makes sense <G>

Progressing through the maze of problems I suppose, plus experience
gained in real life testing. Funding has a lot to do with it also.
Playing around with cars worth $30K plus at speeds (so far) of 50kph
gets a few people biting thier finger nails. (mine too) These are
controlled by me with a Joystick and a PIC 16F84 at ther moment. Sweet
and simple but limited value.

The next step which I'm about to start on is a steering mechanism that
directly follows the position of another 'steering wheel' to give more
precise control. This however, is fine for 100-120M runs, but for 300 -
400M runs you can't see when the car veers even by a small amount and
then it's usually too late to correct.

The final aim is at 100kph, hence the need for close up position
monitoring. I actually thought of a video camera 'looking' directly
ahead and feeding a picture to a monitor via a small radio link and let
a 'human' computer do the steering instead of automating it. Any way you
look at it though, it's a tall ask and a long way to go yet. Something
akin to a laser guided missile. I'm glad I'll be standing behind it.

Maybe I could eventually control it over the internet. That would be
something - drive a car from the other side of the world with a PIC at
the helm. (I wonder how much money the boss has got)

--
Best regards

Tony

1999\08\12@005733 by l.allen

picon face
{Quote hidden}

Sounds like you need a number of navigational inputs that come to a
fuzzy decision on course correction. Multitude of council and all
that.
The value of the information would be subsumtive in nature (some
having much more weight than others) and would be additive in result
creating the smoothest course possible.
Well thats robot theory anyway... fuzzy (and associated techniques)
yield impressive results for this sort of application.

There are numerous web pages on it.


_____________________________

Lance Allen
Technical Officer
Uni of Auckland
Psych Dept
New Zealand
_____________________________

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...