Re: C3088 CMOS Imaging Sensor Questions



On Friday, in article
<20060714161612.A1141@xxxxxxxxxxxxxxxxxxxx>
Colin_Paul_Gloster@xxxxxxx "Colin Paul Gloster" wrote:

Paul Carpenter wrote:
"[..]
Are you sure your PIC has enough RAM for your program variables and at least
a buffer 356 x 292 x 2 bytes EACH! Your PIC does have 256kB of RAM at least
I take it. Normally you need at least two buffers for image processing on
whole images so double that memory requirement to 0.5MB!
[..]"


On Fri, 14 Jul 2006 weg22@xxxxxxxxxx wrote:

"[..]

Can you please explain why you need two buffers when doing image
processing (I'm new at this)?"

Well, you could read about the technique of double buffering in animation
for DOS games and OpenGL applications and other graphical applications, in
which an older image is displayed while a newer image is being computed.
After the newer image has been completed, the two buffers can be swapped
very quickly so that drawing the new buffer on the screen is performed
more smoothly.

I doubt you want to do this, but perhaps Paul Carpenter was thinking of
something similar to this (e.g. your robot using the older buffer as its
interpretation of the enviornment while making a newer image in the newer
buffer).

That is the main reason as well as quite a few algorithms have input
and output buffer (especially for object recognition). Dual buffering
with separate acquire and processing buffers will speed up the frame
processing rate.

" My PIC has 3.94 KB of RAM and I probably
won't be processing the entire image...more like a 100 x 292 image.

[..]"

The product of 100 multiplied by 292 is 29200. I am not familiar with the
sensor you mentioned, but if it has just 8 bit grayscale resolution you
will need 29200 bytes (which is over 28KB) for an image (excluding data
structure overhead).

Actually it is a colour sensor producing YUV data normally as 16bit 4:2:2
so as 16bit data it will need twice the information, and if converted
to RGB THREE times the space.

In reality most robotic vision only need monochrome details unless they
actually need to see colour information of objects (e.g. print colour
checks, fruit picking, colour area of right colour means bottle/can has
label on correctly).

--
Paul Carpenter | paul@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<http://www.pcserviceselectronics.co.uk/> PC Services
<http://www.gnuh8.org.uk/> GNU H8 & mailing list info
<http://www.badweb.org.uk/> For those web sites you hate

.