Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: makaroni on May 23, 2011, 06:10:03 PM

Title: Axon grabbing image from CmuCAM
Post by: makaroni on May 23, 2011, 06:10:03 PM
Hi,

I recently found out about axon so I decide to join the forum. Can anybody tell me if it is possible to grab a whole image from CmuCam with axon and save it to a computer as jpg? I need to process the image automatically without using a Gui program. I need then to transfer the image to Matlab so I can process it further. I don't now much about programming a controller, but if this is possible I'll start to learn immediately. :) Also, any recommendation for literature or tutorials regarding controller programing would be very helpful. Thank you very much!
Title: Re: Axon grabbing image from CmuCAM
Post by: Admin on May 24, 2011, 08:42:54 PM
I'm not quite sure what you are trying to do.

The CMUcam is for vision processing *without* a computer, to use with a microcontroller such as the Axon on a robot.

If you'd like to grab an image from the CMUcam, you'll need to use a serial to USB adapter to connect to your PC. The CMUcam has a GUI you can use to do the image capture.
Title: Re: Axon grabbing image from CmuCAM
Post by: dunk on May 25, 2011, 03:20:49 AM
hi Makaroni,
if all you want is a jpg image from a camera on your PC don't use CMUcam.
just use a regular $10 webcam and use your research time looking for/writing a program that can automate grabbing the images for you.

dunk.
Title: Re: Axon grabbing image from CmuCAM
Post by: makaroni on May 25, 2011, 05:03:54 AM
First, thank you very much for the answer.

Here's the thing. I must use CmuCam, long story short. I cannot use web cam, although it would be much more easier, I agree.
I know about GUI, I used it numerous times. But, what I need is to use CmuCam within a robotic configuration. Since a robot communicate on a different protocol with a PC, I cannot use them both at the same time. In other words, camera can grab images independently, i.e. when it's not connect to a robot. I tried to solve this for months. I broke the GUI in Java and tried to acess the classes from matlab to grab a picture. However, there were no suceess.

So my next idea is to connect the CmuCam externally to other hardware (axon) that can grab a picture, and then via USB or some connection to transfer that picture to a PC. Then I can control these things completely independently. Ideas?

Thank you again.

makaroni
Title: Re: Axon grabbing image from CmuCAM
Post by: TrickyNekro on May 25, 2011, 05:34:26 AM
Hmmm, You know that an image has some hell of data to be transmitted, right?
And for that an 8bit microcontroller might just not be good enough.

Are you sending raw data, or with some kind of protocol, like jpeg?
I have never worked with CmuCAM to know, pardon me.


I don't know if it fits the deal but I would use an ARM based processor for this kind of work...

See the LPC1343 for that. There is also a low cost development board for that, called the LPCXpresso.
LPCXpresso dev. boards come with various microcontrollers, pick the one with LPC1343.
Note that the dev. board comes with a USB programmer.
The whole thing costs around 25$

Why LPC1343? Give a look at these specs ;)

* ARM Cortex-M3 processor, running at frequencies of up to 72 MHz.
* ARM Cortex-M3 built-in Nested Vectored Interrupt Controller (NVIC).
* 32 kB (LPC1343/13)/16 kB (LPC1342)/8 kB (LPC1311) on-chip flash programming
memory.
* 8 kB (LPC1343/13)/4 kB (LPC1342/11) SRAM.
* In-System Programming (ISP) and In-Application Programming (IAP) via on-chip
bootloader software.
* Selectable boot-up: UART or USB (USB on LPC134x only).
* On LPC134x: USB MSC and HID on-chip drivers.
* Serial interfaces:
* USB 2.0 full-speed device controller with on-chip PHY for device (LPC1342/43
only).
* UART with fractional baud rate generation, modem, internal FIFO, and
RS-485/EIA-485 support.
* SSP controller with FIFO and multi-protocol capabilities.
* I2C-bus interface supporting full I2C-bus specification and Fast-mode Plus with a
data rate of 1 Mbit/s with multiple address recognition and monitor mode.
* Other peripherals:
* Up to 42 General Purpose I/O (GPIO) pins with configurable pull-up/pull-down
resistors.
* Four general purpose counter/timers with a total of four capture inputs and 13
match outputs.
* Programmable WatchDog Timer (WDT).
* System tick timer.
* Serial Wire Debug and Serial Wire Trace port.
* High-current output driver (20 mA) on one pin.
* High-current sink drivers (20 mA) on two I2C-bus pins in Fast-mode Plus.
* Integrated PMU (Power Management Unit) to minimize power consumption during
Sleep, Deep-sleep, and Deep power-down modes.
* Three reduced power modes: Sleep, Deep-sleep, and Deep power-down.
* Single power supply (2.0 V to 3.6 V).
* 10-bit ADC with input multiplexing among 8 pins.
* GPIO pins can be used as edge and level sensitive interrupt sources.
* Clock output function with divider that can reflect the system oscillator clock, IRC
clock, CPU clock, or the watchdog clock.
* Processor wake-up from Deep-sleep mode via a dedicated start logic using up to 40 of
the functional pins.
* Brownout detect with four separate thresholds for interrupt and one threshold for
forced reset.
* Power-On Reset (POR).
* Integrated oscillator with an operating range of 1 MHz to 25 MHz.
* 12 MHz internal RC oscillator trimmed to 1 % accuracy over the entire temperature
and voltage range that can optionally be used as a system clock.
* Programmable watchdog oscillator with a frequency range of 7.8 kHz to 1.8 MHz.
* System PLL allows CPU operation up to the maximum CPU rate without the need for a
high-frequency crystal. May be run from the system oscillator or the internal RC
oscillator.
* For USB (LPC1342/43), a second, dedicated PLL is provided.
* Code Read Protection (CRP) with different security levels.
* Unique device serial number for identification.
* Available as 48-pin LQFP package and 33-pin HVQFN package.

Didn't tell you the best part, it has build in bootloader for the USB,
connect it to a PC and it is recognized as a USB flash drive.
Just replace the hex file in it, and you are good to go. hehehe...
If that's not good enough what might be?

Well... If the above aren't enough... I've haven't used any of the bigger guys yet, to tell you ;)
But there are ARM - M3 cores running up to 150MHz :D


Best Regards, Lefteris
GReece
Title: Re: Axon grabbing image from CmuCAM
Post by: Admin on May 25, 2011, 08:03:55 AM
So my next idea is to connect the CmuCam externally to other hardware (axon) that can grab a picture, and then via USB or some connection to transfer that picture to a PC. Then I can control these things completely independently. Ideas?
Have the Axon send a raw image command, then as the Axon is receiving the data from one UART port, have the Axon output the data to another port such as USB.

pseudocode:
Code: [Select]
char data=0;

send_command_CMUcam_rawImage();

while(data != return_character)
    {
    data = data_from_CMUcam();
    send_data_to_USB(data);
    }
Title: Re: Axon grabbing image from CmuCAM
Post by: makaroni on May 30, 2011, 09:38:36 AM
Ok, thanks. I will report on the progress. Any new idea is also welcome.