Page 1 of 2

Camera integration

Posted: Wed Oct 07, 2015 10:33 pm
by JimTal001
Has anyone had success integrating a camera to the pyboard? It would be nice to find something like the pi camera.

Adafruit has a Miniature TTL Serial JPEG Camera with NTSC Video
http://www.adafruit.com/products/1386?g ... oCCzrw_wcB

Re: Camera integration

Posted: Thu Oct 12, 2017 6:40 am
by cagiva
Check the OpenMV cam.

https://openmv.io/

OpenMV

Posted: Thu Oct 12, 2017 6:49 am
by pythoncoder
Indeed, as far as I know OpenMV is the only game in town. I briefly experimented with their newest board. It runs a rather old version of MicroPython. Some of the more advanced features like face recognition were a bit flaky when I tested but the basic product works OK.

Connecting a camera to the Pyboard is not really feasible as it lacks the necessary high speed interface.

Re: Camera integration

Posted: Mon Oct 22, 2018 8:25 pm
by CharlesFr
Hi,

It seems to be you can make what you want with the CircuitPython of Adafruit. If it's possible with this card, I think you can make it with the pyboard? With the same resolution (low). The OpenMV is for machine learning and I think this is why we need another card. (for image processing)

I don't think Circuit python is more powerful than the pyboard? so so.

You can maybe wire the adafruit camera to the pyboard in the same way. But the firmware is only available to the CircuitPython. I'm quite a newbie... but someone have an Idea?

https://learn.adafruit.com/ttl-serial-c ... thon-usage

All the best,

Re: Camera integration

Posted: Tue Oct 23, 2018 6:19 am
by pythoncoder
My comments above were intended to relate to video. That Adafruit board is for still images only and could be interfaced to the Pyboard. It would need someone to port the CircuitPython driver to MicroPython - as far as I know nobody has done this. At a glance it looks straightforward but it probably isn't a task for a novice.

CircuitPython is Adafruit's modified version of the MicroPython software. It isn't "more powerful" - its intention is to be easier for newbies. Where performance is paramount it's probably best to use mainline MicroPython.

Re: Camera integration

Posted: Tue Oct 23, 2018 7:08 am
by OutoftheBOTS_
OpenMV have a new camera about to be realsed that is built around the STM32H7, I think the kickstarter might be finished now and they r in the processing of producing the boards.

The cameras most commonly used for these type of purposes are the sensors from Omni Vision see https://www.ovt.com/

These cameras have a I2C type interface for the settings of the camera and then a 8 bit parallel interface with a number of control lines for the data transfer.

Many of the STM32 chips do have a digital camera interface (DCMI) that is a hardware peripheral designed to interface with these cameras. I have used this peripheral on a STM32F407VET black board but I programmed it in C not micro python.

I am not sure if any of the pyboards have this peripheral or if the needed pins r broken out.

I have seen the Arduino guys bit bang in software these cameras on a STMF103 (blue pill). I do believe there is way in MicroPython to do the same thing by reading 8 pins in parallel on A port in Viper mode by reading the GPIO->IDR register.

Re: Camera integration

Posted: Tue Oct 23, 2018 7:22 am
by pythoncoder
For the benefit of @CharlesFr the Adafruit still camera he wants to use employs a serial UART interface only. Electrical connection is therefore simple, it's just the driver software which may need a little work.

Re: Camera integration

Posted: Tue Oct 23, 2018 7:41 am
by CharlesFr
Hi,

First, thank you for you feedback. :D

I have found this github with python scripts. Maybe I can take the getimage.py and rewrite it with MicroPython? What do you think about?

https://github.com/oskarirauta/Adafruit ... ra-Library

If I draw a while loop with this image maybe I will have a basic video camera with a low resolution at the beginning.

By the way, I will test it as soon as possible. I let you know if I found something bigger :D

All the best,

Re: Camera integration

Posted: Tue Oct 23, 2018 9:15 am
by deshipu
pythoncoder wrote:
Tue Oct 23, 2018 6:19 am
CircuitPython is Adafruit's modified version of the MicroPython software. It isn't "more powerful" - its intention is to be easier for newbies. Where performance is paramount it's probably best to use mainline MicroPython.
Where performance is paramount it is best to steer clear from MicroPython and all its versions, and implement it in C or assembly. Having said that, CircuitPython is not more or less performant (though it does avoid memory fragmentation better) than MicroPython, it simply has more and better libraries for everything, mostly because the project encourages and helps the people who write them, as opposed to mainline.

Re: Camera integration

Posted: Tue Oct 23, 2018 9:52 am
by OutoftheBOTS_
CharlesFr wrote:
Mon Oct 22, 2018 8:25 pm
Hi,

It seems to be you can make what you want with the CircuitPython of Adafruit. If it's possible with this card, I think you can make it with the pyboard? With the same resolution (low). The OpenMV is for machine learning and I think this is why we need another card. (for image processing)

I don't think Circuit python is more powerful than the pyboard? so so.

You can maybe wire the adafruit camera to the pyboard in the same way. But the firmware is only available to the CircuitPython. I'm quite a newbie... but someone have an Idea?

https://learn.adafruit.com/ttl-serial-c ... thon-usage

All the best,
The OpenMV is for machine learning and I think this is why we need another card
This isn't correct OpenMV is for image processing the latest additions to OpenMV funtoins does allow NN image processing but it retains all the other image processing functions. It is designs to do high frame rate image processing from the camera, it both has the 8bit parallel interface to the camera but also the image processing functions implemented in C then wrapped up to call in Python. You will also find they offer really great support on their forums too.