Searching \ for '[EE]: PIC camera tricks' 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/microchip/devices.htm?key=pic
Search entire site for: 'PIC camera tricks'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: PIC camera tricks'
2002\01\06@122837 by Roman Black

flavicon
face
Has anyone tried this camera trick??

I want to connect one of those cheap "camera
on a PCB" things, (you know the monochrome
ones with standard composite video output
that you can buy almost anywhere) to a PIC and
use the PIC for image recognition, to detect
the position etc of SMD chips on a white
surface.

My (late night) idea is to get a cheapy
camera and change it's one obvious crystal
to a slower speed one, a very easy job.
So instead of a 15625Hz line rate you get a
1500Hz line rate etc. Obviously going from
25 frames/second to about 2.5 frames/second.

BUT then of course the rate is slow enough
for a PIC to do processing and work as an
effective robotic vision system to detect the
position and orientation of the parts shown
on the camera.

So will it work? I'd love to hear from anyone
who's done this trick or similar camera tricks.
:o)
-Roman

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2002\01\06@141347 by Walter Banks

picon face
There are some other issues when you slow down the clock. In CCD
camera's
there is a limit to how long you can image before the CCD will saturate.
Just
slowing down the clock will extend the imaging time. The new CMOS
camera's
are relatively easy to interface to, in some cases the video is
digitized within the
camera sensor.

w..

Roman Black wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2002\01\06@143154 by Andrew Mcdowell

picon face
You can get black and white or color CMOS cameras with digital outputs so it
can easily be interfaced to a PIC from
http://www.electronics123.com/amazon/default.htm and these are almost the
same price as typical analog cameras



{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu


2002\01\06@145706 by Robert Rolf

picon face
Potentially, yes. However most CCD readout amps are AC coupled so you
might not have any charge to read since the settling time will also
be extended 10 fold. This will also increase your camera sensitivity
10 fold (IF the readout bucket brigade can handle the slower clock rate.
Think DRAM refresh capacitances).

One trick that was used decades ago for slow scan television (amateur
radio TV in a 3khz BW) is a sweep fast sample and hold.
You basically use a ramp generator at the horizontal rate and
monostable S&H driven by a comparator whose second input you control.
With a low voltage, you sample the left edge of the video, and with a
higher voltage, the right side. You can use a slow ramp generator
(15seconds was what was used for SSTV) for automatic sweeping.

This gives you 15k samples a second (easily within a PIC's capability)
and allows you to use ANY standard video signal as input (as long as
it doesn't change over the sampling time).

It's easy enough to test the idea. Just look at the 10x slower
video output to see if it 'looks right'.

Robert

Roman Black wrote:
{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2002\01\06@160754 by Robert Rolf

picon face
Nice chips. However
www.electronics123.com/amazon/datasheet/OV5017DS.pdf
"Since the video data is a continuous non-stop byte stream, ..."

you still need to be able to capture the data a video rates since there
does not appear to be a way to slow the transfer rate since there is no
on board frame buffer, and the frame rate control merely controls the
update period. i.e. how many frames get dropped before a new one sampled.

I suppose one could use a counter chain to control which sample you
get after HREF, but CMOS sensors are also fairly noisy compared to CCD,
so I don't see that you're much futher ahead with these chips.

Robert


Andrew Mcdowell wrote:
{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2002\01\07@051333 by Roman Black

flavicon
face
Andrew Mcdowell wrote:
>
> You can get black and white or color CMOS cameras with digital outputs so it
> can easily be interfaced to a PIC from
> http://www.electronics123.com/amazon/default.htm and these are almost the
> same price as typical analog cameras


Thanks Andrew for the link, they have quite
a few cameras there worth investigating. :o)
-Roman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\01\07@051957 by Roman Black

flavicon
face
Thanks for the info Walter, I was worried
there would be some issue like that. But if
this only applies to CCD cameras maybe I could
just use a CMOS one?
-Roman


Walter Banks wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\01\07@084921 by o-8859-1?Q?K=FCbek_Tony?=

flavicon
face
Hi Roman,
make an search for gameboy cameras :)
( this artificial retina chip is used in it )

for example:

homepages.paradise.net.nz/~vkemp/gbcam.htm
or
www.geocities.com/SiliconValley/Park/1302/gbcam.html
or
http://www.lh.co.nz/hardware/ar/techinfo.htm


You should be able to get hold of one quite easily.
The really neat stuff is the edge enhancement / extraction
and goes right along with your objectives.


/Tony

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\01\08@130619 by Peter L. Peres

picon face
I have done 'camera tricks' but I used a PIC only once (to interface the
PC that was doing the tricks with the camera controls).

I think that something very crude can be done but by the time you want to
determine part orientation you start to need MIPS and room. If the part
orientation is not a problem (already aligned) then it might work.

Slowing down the camera crystal also increases exposure 10 times and
leakage by the same amount (assuming that the dynamic pulse circuitry and
S&H systems and clamping in the camera do not c..p out totally due to too
slow speed).  The latter causes image shading or even 'disappearance'
which is something you do NOT want for this application imho.

Imho leave the clock alone and perform slicing and integration using
analog means at normal video speed, then use the PIC to control the servos
for positioning.

Of course a PC has the power to do this by itself.

good luck,

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\01\08@140924 by 859-1?Q?Alexandre_Guimar=E3es?=

flavicon
face
Hi,


> I have done 'camera tricks' but I used a PIC only once (to interface the
> PC that was doing the tricks with the camera controls).
>
> I think that something very crude can be done but by the time you want to
> determine part orientation you start to need MIPS and room. If the part
> orientation is not a problem (already aligned) then it might work.

   Do you have references or source code for the position and orientation
determination ?? I have been looking at it since Roman gave that idea but
have not been able to find much. Seem like everyone is trying to do face
recognition nowadays and are not working with rectangles anymore :-(

Best regards,
Alexandre Guimaraes

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\01\09@112005 by Roman Black

flavicon
face
Thanks!! I hadn't even though of the
good old gameboy camera. :o)
-Roman


Kübek Tony wrote:
{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\01\09@113809 by Roman Black

flavicon
face
Peter L. Peres wrote:
>
> I have done 'camera tricks' but I used a PIC only once (to interface the
> PC that was doing the tricks with the camera controls).
>
> I think that something very crude can be done but by the time you want to
> determine part orientation you start to need MIPS and room. If the part
> orientation is not a problem (already aligned) then it might work.

MIPS? to detect the angular orientation of a
20 pixel sized rectangle to about 2% accuracy?
Thats about 12 PIC instructions... ;o)

Also, sorry if I gave the impression that I
wanted to do the entire image processing with the
PIC, actually it just needs to be a pre-processor
and give some sort of meaningful data to the
computer. If I get a slow frame rate, about 5
frames per second or less the PC will be able
to do all the processing in between driving the
machine's stepper motors. It may not even need
the PIC. :o)

>
> Slowing down the camera crystal also increases exposure 10 times and
> leakage by the same amount (assuming that the dynamic pulse circuitry and
> S&H systems and clamping in the camera do not c..p out totally due to too
> slow speed).  The latter causes image shading or even 'disappearance'
> which is something you do NOT want for this application imho.

True. Maybe CMOS cameras would not suffer from
this problem?

> Imho leave the clock alone and perform slicing and integration using
> analog means at normal video speed, then use the PIC to control the servos
> for positioning.

Yes, a good idea to slice it. In this app the
PC can spend a time period getting the scan and
finding parts posiions, then a few parts can be
placed before the next scan is needed.

> good luck,
Thanks! :o)
-Roman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\01\09@120857 by Roman Black

flavicon
face
Alexandre Guimarães wrote:
>
> Hi,
>
> > I have done 'camera tricks' but I used a PIC only once (to interface the
> > PC that was doing the tricks with the camera controls).
> >
> > I think that something very crude can be done but by the time you want to
> > determine part orientation you start to need MIPS and room. If the part
> > orientation is not a problem (already aligned) then it might work.
>
>     Do you have references or source code for the position and orientation
> determination ?? I have been looking at it since Roman gave that idea but
> have not been able to find much. Seem like everyone is trying to do face
> recognition nowadays and are not working with rectangles anymore :-(


Relax with the angular orientation stuff! ;o)
It's very easy, as is finding the center of mass.
The rectangle (SMD part on camera) has 90 degree
sides, and only one side needs to be analysed
to give orientation. With a 0805 etc sized SMD
part, orientation is not critical and 64 rotary
positions are acceptable. So you only need to
be able to identify 64/2 = 32 actual orientations,
probably by a simple lookup table.

For centre of mass you average the positions of
all the highest pixels, and lowest pixels, then
average them together. A few additions and
subtractions. Besides being a TV technician I did
a couple years as a 2d game graphics programmer. :o)
-Roman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\01\09@162955 by Peter L. Peres

picon face
Alexandre, I am sorry but I cannot help you with source for the camera
aided positioning. You will have to do your own homework, although there
are some projects related to computer vision for CNC and robotics on the
web (mostly academic software for unix and I don't have a url).

You really need to read about robot vision and a good start would be a
book, for example Image Processing and Computer Vision by Parker (I keep
recommending this because I used it - there are others).

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\01\09@171423 by Roman Black

flavicon
face
Alan King wrote:
>
> Hi Roman,
>   We're going to have to get talking, you seem to be working on a lot of
> similar things to what I'm working on at the moment.

Talking we are. :o)

>   Here's what I'm working on at the moment:
> http://photos.yahoo.com/alantak69 and look in the stepper folder.  I
> have a few hundred steppers around now and a couple thousand mosfets,
> I'm going to start selling stepper motor controllers and machines I'll
> make from them.

A few hundred motors? Wow. I saw your PCB
photo.

{Quote hidden}

Cool. Sounds like you will be making stepper
controllers? Can you give any specs?

One thing with the boards would be to use your
CNC drilling mill to hold a DALO pen, then draw
direct to PCB and etch. Drill last. :o)
-Roman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\01\10@053205 by Alan B. Pearce

face picon face
>The rectangle (SMD part on camera) has 90 degree
>sides, and only one side needs to be analysed
>to give orientation. With a 0805 etc sized SMD
>part, orientation is not critical and 64 rotary
>positions are acceptable. So you only need to
>be able to identify 64/2 = 32 actual orientations,
>probably by a simple lookup table.

How do you plan to deal with polarity sensitive components like diodes and
electrolytic caps?

Maybe all your diodes come in SOT23 and you don't use electros ;) I take it
you plan to be able to identify which side has one lead and which has 2
leads on an SOT23 - yeah I know one thing at a time get the basic system
working first ;)

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


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