Camera Module Video Processing (FFTs in C?)

3 views
Skip to first unread message

Christopher Jeffry Hamilton

unread,
Apr 13, 2008, 7:56:38 PM4/13/08
to virtu...@googlegroups.com
Hello again,

I have another question about image processing with the camera module.
I will be processing live video -- currently all I want to do is get
average R, G, & B color values for, say, a 640x480 image @ 15fps. I
know in the world of image processing, often times a fast Fourier
transform will be used, with some filters, to more quickly get a
statistical representation of such a matrix in a few lines/rows.

What suggestions might there be out there / what processing can I do on
the module (does it have anything dedicated to such processing?) so that
I may quickly and efficiently do this calculation.

Also, any other suggestions on perfecting the process would be great!

Starting off, it is rather simple:

init everything
loop:
take picture, copy image to buffer --> this might be inefficient?
2d loop across buffer(i 0...640,j 0...480) --> this I know is inefficient
sum R, G, B components
end 2d loop
convert to sound -> Multimedia module (specific frequency based on
the strongest weight of the 3 components)
end loop

trying to do 15fps, with I believe 266Mhz really doesnt give me much for
the depth of the loops... I worry i'll choke on the 307,200 loop
iterations * 15 times per second

thank you all!
-Chris

signature.asc

Dan Foisy

unread,
Apr 13, 2008, 8:30:43 PM4/13/08
to virtu...@googlegroups.com
Chris,

If you did everything in assembly, you should be able to get the
performance you need in terms of generating the average value of the RGB
colors across the entire frame. You can cheat a little and use the
resize engines in the "enhanced multimedia accelerator" (chapter 28 of
the reference manual) to generate averages over a maximum of 8 pixels
(sort of 8:1 binning). The eMMA will interface directly with the camera
interface, do the resizing and dump the resulting image into a buffer of
your choice - you would end up with a much smaller picture that you
could then run your algorithm on. Also you might want to consider doing
post-processing on smaller regions of interest rather than the entire image.

Dan

--
Daniel Foisy
Virtual Cogs Embedded Systems Inc.
Unit 4, 5694 Highway 7 East, Suite 311
Markham, Ontario, Canada L3P 1B4
www.virtualcogs.com
416-238-2231

"Your future is modular"

Reply all
Reply to author
Forward
0 new messages