You want to compare two images, so you must hold both in RAM. They may be two consecutive images or a base image plus another taken some time in the future. Each image has 5,000,000 pixels. A grayscale image uses one byte per pixel, a color image uses two bytes per pixel. So a grayscale image needs 5,000,000 bytes of RAM and a color image needs 10,000,000 bytes of RAM. Thus the figures, 10MB for grayscale images and 20MB for color images. For capturing, each pixel is read once and stored, but the comparison algorithm may need to do several passes over the captured data. Isaac Em 23/5/2012 13:19, Andre Abelian escreveu: > Isaac, > > You mentioned 10mb for grayscale and 20 mb for color. is't single reading= of=20 > each pixel has all information? if I scan twice image may change. my unde= rstanding was > single scan of each pixel will give all information but I am not sure thi= s is my first project > to learn. > > what do you think? > > AA =20 > > > ________________________________ > From: Isaac Marino Bavaresco > To: Microcontroller discussion list - Public. =20 > Sent: Wednesday, May 23, 2012 3:48 AM > Subject: Re: [PIC]: PIC32 for camera capture > =20 > Em 22/5/2012 23:47, Andre Abelian escreveu: >> Hi Isaac, >> >> I didn't see your replay for some reason. the purpose of this camera is = to capture >> a person and send email as attachment. the quality is important. in your= case how pic is=20 >> communicating with CPLD? > I implemented a bit-banged 8-bit bus. It can transfer 8MB/s. > > >> in my case the only part I am not clear is I have to sense a motion. > > You need to store at least two images (10MB for B/W images, 20MB for > color images) and compare them. > The biggest problem I see is that you cannot simply bytewise compare the > images, you must use some intelligent algorithm to detect real movement, > not noise or small changes in lighting. > Prepare to scan both images several times (read each pixel more than > once) and do a lot of math (FFT, filtering, wavelet, etc.). > I think that this task is up to a much larger processor (ARM9 @ 400MIPS, > etc). > > >> if old picture and new are not same > > They will never be the same, always there are a lot of noise, moving > shadows, difference in lighting, vibration, etc. > > >> then I have to send new picture out thru >> wireless to pc. what about PIC24EP?=20 > > They can do 60MIPS. Just to scan two 5MP images and compare them would > take 0.25s *IF* you could access each pixel in one cycle and do the > compare in one cycle. > As far as I know, no PIC or dsPIC have external bus interface that can > access such a large memory (not even they have SDRAM controllers), and > surely not at one transfer per clock. > If you implement your own bus, it will be much slower. My implementation > takes 5 instructions to do a transfer and it is optimized as hell, and > the address generation is done by the CPLD, The dsPIC just needs to > mange the data and control lines. > > > As I said, you need a large MPU (100's of MIPS) with some MB of SDRAM > and a large cache. > > > Best regards, > > Isaac > > >> thanks >> >> Andre >> =20 >> >> >> >> ________________________________ >> From: Isaac Marino Bavaresco >> To: Microcontroller discussion list - Public. =20 >> Sent: Monday, May 21, 2012 3:14 PM >> Subject: Re: [PIC]: PIC32 for camera capture >> =20 >> SUPPOSING that the PIC can DMA transfer data from the sensor to an >> external memory in one cycle (it can't), the maximum frame rate you >> could accomplish would be 16fps at 80MHz, and you would have no time to >> process it. >> Usually, image processing is much more intensive than the capture (that >> is, you will need to access each pixel several times). >> >> Your external memory needs to be at least 10MiB (16MiB is the logical >> choice) for color images (YCbCr) or 5MiB (8MiB being the logical choice) >> for gray scale images, just to hold one frame. >> >> Do you really need such a large image? We do fingerprint recognition >> with VGA sensors (640x480) cropped to 440x380. >> We use a dsPIC to pre-process the image but the capture is done with a >> Xilinx CPLD coupled to a 256KiBx8 static RAM. >> We can capture approx. 13 frames per second and can determine if a valid >> fingerprint is present in less than 1/2 second. >> >> >> Best regards, >> >> Isaac >> >> >> >> Em 21/5/2012 18:13, Andre Abelian escreveu: >>> Hi all, >>> >>> does any one know if pic32 will have enough speed to capture a camera d= ata? >>> I am thinking to use 5 mp camera directly connected to pic and of cours= e there is >>> a RAM too for a buffer. main purpose of the camera is to sense a motion= change and=20 >>> send the data thru wireless when change detected. I am originally picke= d altera cyclone3 FPGA >>> part for some how I believe PIC32 may do the job. once the motion is de= tected we can stop it >>> send it out then continue. I do not need to do continues live video tra= nsmit or some thing. >>> >>> any idea or suggestion will appreciate >>> >>> thanks >>> >>> Andre =20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .