Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Camera API - Starting with esp32-camera  #15753

Closed
@cnadler86

Description

@cnadler86

Description

As far as I searched the discussions and issues, I couldn't find any attempt to implement an interface to the esp32-camera driver in the oficial micropython repo. It should be not so difficult to implement these, since there are already some repos either having custom firmware with it, or also having an interface as source code (e.g. this one). I would take these as reference.

My propose would be the following:

  • Add the official esp32-camera driver from esp to the respective idf_component.yml as dependency.
  • Add a Compiler Flag to include the c interface module or not in the build, depending if the board definition (mpconfigboard.h) includes this flag,
  • In the board definition the respective default pins should be defined then,
  • The basic look and feel of the module in micropython for the user could be something like the actual implementations:
import camera
if camera.init(<keyword arguments>):
   img = camera.capture()
else:
   print('error')
  • Camera parameters would be get/set with camera methods.

Another possibility would be to handle the camera as python object. In this case properties could be used to get/set camera parameters. I guess in this case I would implement the camera as described above and build a frozen Micropython module on top.

What do you think?

Code Size

The code size would increase only in boards / variants that support camera from a HW-perspective (like this one: ESP32S3 XIAO SENSE)

Implementation

I intend to implement this feature and would submit a Pull Request if desirable, but I am happy on support from others

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests, new feature implementations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions