- Scriptable in Python3.
- Sub-$15 BOM/1000's including 4-layer PCB.
- On board uSD or internal flash storage for storing scripts/images/video.
- 2MP RGB/YUV/JPEG sensor (OV2640).
- Recording/Streaming MJPEG: to SD or via external WiFi shield.
- Extension Header: breaks UART/PWM/SPI/I2C
- Friendly IDE: upload/execute scripts, upload templates, view the framebuffer.
- Image processing:
- Viola-jones object detection (comptatible with OpenCV's cascades)
- Template matching with NCC (normalized cross correlation)
- SURF: key-point extraction and matching (optional libopensurf port)
- Misc: RGB->LAB CLUT, kmeans clustering, histogram, median filter, scaling, sub-image and blitting.
- MCU: The MCU I choose is the STM32F4, an ARM Cortex-M4 micro running at 168-180 MHz which has a single precision FPU, some DSP capabilities and a DCMI (Digital Camera Interface).. Having a hardware camera interface along with the FPU/DSP made this particular MCU a perfect match for the project.
- PCB: A 4-layer PCB is used, which costs more but it's much better signal integrity/EMI wise, especially when both sides have components and not much reference planes left over, plus, using 4-layers made it possible to fit everything on a 1.0x1.3 inches board. The prototypes are all done by OSHPark.
- Image Sensor: The first sensor I choose was the cheapest one I could find a 1.3MP OV9650, which comes in a single package (lens/image sensor)...My rationale behind using a single package sensor, is to be able to replace and experiment with different sensors easily, and as far as I can tell it was a good decision, because I was able to try out a few compatible sensors, including a JPEG one.
- I/O Expansion: The first revision had serial and debugging (SWD) pins broken out on a 2.54mm header, after a few revisions, I moved the debugging pins to a dedicated 2mm header, and used the main header for more I/O on (SPI/I2C/USART/PWM), this an SPI LCD viewing the framebuffer, the driver is written in Python:
After that I wanted to build a wireless version, my initial thoughts was to use a single board, and I did, but that increased the cost/complexity of the design, so following in the footsteps of Arduino, I used the I/O header to extend the camera with tiny "shields" instead. And so I designed the first one, a WiFi shield using the CC3K wireless module from TI, and it has a LiPo battery connector to supply the camera:
I wrote a quick Android demo to view the camera stream from my phone, the CC3K module is fast enough (54Mbps) to stream live video from the camera:
OpenMV uses a lot of cool SW, for example, ChaN's FatFS, CC3K SDK, ARM's DSP/Math libraries etc.. And of course it's completely programmable in Python 3! Yes, you can write Python scripts that have access to peripherals (SPI/I2C/UART), uSD, wireless, and of course the image processing code.
OpenMV also has a nice IDE that I made with Python/Glade/PyGTK. The IDE has syntax highlighting, it can upload or run scripts on the camera, view the framebuffer, and can even help with some image processing tasks, for example using the IDE you can upload templates to the camera for template matching:
I plan on extending the IDE with more features, and make it able to communicate with the camera using sockets when WiFi shields are connected, this way the IDE will have remote access to the camera to stream images or upload scripts over the air :)
The second OpenMV uses the newer STM32F429 runing at 180MHz, with more built-in SRAM, an external 16MB SDRAM, an external lens for the sensor, 2xIR LEDs, 2xServo headers and 20 I/Os.. see full specs below:
Read more »