Camera integration
Camera integration
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
Adafruit has a Miniature TTL Serial JPEG Camera with NTSC Video
http://www.adafruit.com/products/1386?g ... oCCzrw_wcB
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
OpenMV
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.
Connecting a camera to the Pyboard is not really feasible as it lacks the necessary high speed interface.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Camera integration
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,
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,
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Camera integration
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.
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.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Camera integration
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.
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.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Camera integration
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.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Camera integration
Hi,
First, thank you for you feedback.
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
All the best,
First, thank you for you feedback.
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
All the best,
Re: Camera integration
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.pythoncoder wrote: ↑Tue Oct 23, 2018 6:19 amCircuitPython 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.
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Camera integration
CharlesFr wrote: ↑Mon Oct 22, 2018 8:25 pmHi,
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,
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.The OpenMV is for machine learning and I think this is why we need another card