This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Image Acquisition using SPI or I2C or USB on Different ARM families

Hi all..

I have MCBSTM32c and LPC2478 based development boards.
I need to perform an image processing algorithm on an image of resolution 640 x 480 size 30Kb.
Is this image acquisition possible through USB camera (we have iball webcam), Please note that we don't have processing time constraints and we don't want to store the image and display the image. There is no fixed rate of image acquisition either. so our problem narrows down to taking one image from SPI, I2C or USB and Processing it.

Please suggest any camera used previously with these boards interfaced by SPI or I2C. Also for USB camera will we need to flash a device driver on to our microcontroller.

Will we be able to process 16 bit or 24 bit images acquired by SPI or I2C camera.

  • Sorry - too little information given.

    640x480 is 307,200 pixels. So the full image is about 300k - not 30k - when decompressed. Assuming 8-bit grayscale or paletted colors. It will be two or three times larger if 16-bit 5:6:5 color or 24-bit color.

    Can your image processing manage, seeing only a part of the image at a time or does the image processing require that you have full access to all pixels for random access?

    Device driver? Sorry, but for this kind of microcontrollers you don't have any operating system that makes use of any device drivers. Whatever interface you use, you must program the controller with a program that contains both the communications code and the image processing code. If using USB, then there are USB code available that you can start modifying.

  • Our image is 320 x 240 pixel with 16 bit color, so its size is approx 150Kb uncompressed.
    The image processing algorithm requires the whole image hence will it be possible to interface a SPI or I2C compliant camera module with MCBSTM32C and process one image at a time.
    We dont want to store or display the image.

  • Reading the first page of information for MCBSTM32c, the text says "On-Chip Memory: 256KB Flash & 64KB RAM".

    Not sure what LPC2478-based board you have, but the processor itself seems to have 98 kB RAM, according to NXP. Don't ask _us_ if your unknown board happens to have extra, external, memory to fit the 150kB of the image + the stack and variables of your program + any transfer buffers etc.

    What does it look like, based on your own evaluations of your needs?

    By the way - how come the image size suddenly becamse 320x240, while the original post did specifically claim a _need_ to be able to handle 640x480 pixels? The word "need" represents a hard "must" requirement. Not a soft "it would be nice to" requirement.

  • I am sorry if i seemed unclear about my problem earlier. However this is my problem. If this image on its own is 150 Kb and the code + its buffers take up around 20-25 Kb would it advisable to either :
    (a) transfer captured image to a USB or MMC/SD data card and then access this memory to process it.
    (b) look for a micro-controller which has sufficient RAM
    It would help if you could also suggest a camera (even if of a lower resolution) that is compatible with mcbstm32c.

    The Main problem to which we are looking a solution for:
    We have 2 development boards of which MCBSTM32C is one and the other is embedded artists LPC2478 OEM QVGA BaseBoard.. Can we interface any camera to these boards so that one image can be acquired and processed. the results obtained from this processing will then be used for actuation or decision of when the next image is to be taken.

    If anybody has worked on a similar problem and found the right solution can you please send us a link to their webpage.

  • You still haven't said what "processing" you need to do on this image.

    Image processing does tend to be a memory- and processing-intensive task - so not generally something for small(-ish) microcontrollers.

    Wouldn't you be better off with something like a Raspberry-Pi...?

  • You can connect cameras.

    And you can transfer the image to secondary memory - like a memory card. But since you claim your image processing requires direct access to all of image, the image processing will be very slow if you then need to constantly read in different blocks of the image from the memory card.

    Space for code isn't an issue - the code shouldn't be stored in RAM.

    But it would probably be better to get a very cheap Raspberry Pie card running Linux with 512 MB RAM and a serial camera interface (and also USB host, I2C, ...) if you really want to do something interesting.

    Or you need to get a development board where the ARM chip have internal or external RAM of enough quantity. But probably at least 256 kB RAM if your image is 150 kB.

  • Raspberry pi would also give you the capability to use the opencv library for image processing and make your problem very easy to implement

  • Thank you for your replies.
    We have purchased a BeagleBone for our problem statement.