Using OpenMV camera with normal python 3 ?

Discussion related to "under the hood" OpenMV topics.
devrup
Posts: 2
Joined: Fri May 25, 2018 1:21 am

Using OpenMV camera with normal python 3 ?

Postby devrup » Fri May 25, 2018 1:26 am

Hi,

I just got my OpenMV CAM M7 and played it for a while using IDE in Windows.

Specifically, HOW can I use openmv outside IDE ? Like through python3 scripts ?

THanks a lot.
User avatar
kwagyeman
Posts: 2121
Joined: Sun May 24, 2015 2:10 pm

Re: Using OpenMV camera with normal python 3 ?

Postby kwagyeman » Fri May 25, 2018 11:40 pm

We're a micropython board. So, all the tools here work:

https://github.com/micropython/micropyt ... pyboard.py
Nyamekye,
User avatar
iabdalkader
Posts: 503
Joined: Sun May 24, 2015 3:53 pm

Re: Using OpenMV camera with normal python 3 ?

Postby iabdalkader » Tue May 29, 2018 8:52 pm

We also have our own OpenMV Python module here:

https://github.com/openmv/openmv/blob/m ... yopenmv.py

Using this you can communicate with the camera in "debug mode" (meaning you can read the framebuffer and the text buffer and run/stop scripts etc..).

Here's an example using pygame:

https://github.com/openmv/openmv/blob/m ... enmv_fb.py
OutoftheBOTS
Posts: 87
Joined: Tue May 29, 2018 4:15 am

Re: Using OpenMV camera with normal python 3 ?

Postby OutoftheBOTS » Wed May 30, 2018 4:13 am

I just followed your links and have a question.

In pyopenmv_fb.py the line of code what is script? Is it a file containing the python script??

Code: Select all

pyopenmv.exec_script(script)
User avatar
kwagyeman
Posts: 2121
Joined: Sun May 24, 2015 2:10 pm

Re: Using OpenMV camera with normal python 3 ?

Postby kwagyeman » Thu May 31, 2018 12:59 am

Yes, this script allows you to send the OpenMV Cam a python script to run.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests