Raspberry Pi and OpenMV IDE

Hi,

I’m building a robot that follows a line on the ground. It’s a very simple two wheels robot controller with NodeMCU and Raspberry Pi with OpenMV Camera module. Now I’m trying to connect these two components (NodeMCU and RPi). I managed to install OpenMV IDE on Raspberry Pi without any problems. The camera and python scripts (written for OpenMV) work without any problems as well.

Here are my questions:

  1. Is it possible to run python scripts written for OpenMV IDE outside this IDE, e.g. from console? Of course, this means excluding IDE specific commands.
  2. If not, is there any other way to communicate with camera without IDE?
  3. How to connect OpenMV IDE with Raspberry Pi?
  4. How to forward simple two bit information from python script (OpenMV IDE) to Raspberry Pi GPIO (in order to make wheels move)?

Thanks in advance!

1: Yes - openmv/pyopenmv.py at master · openmv/openmv · GitHub

I’ll put some time in to update that script to do everything OpenMV IDE does so it’s more robust.

2: OpenMV IDE only controls the OpenMV Cam. The point of the IDE is to provide an Arduino like experience for machine vision work. So, you can’t use it with the Pi. Yes, the IDE is great and it would be awesome if you could use the Pi with it. However, the OpenMV Cam project would have never gotten as far as it’s gotten if I did that. No one cares to pay for IDEs. I tried doing something called OmniaCreator before to provide data visualization for the Arduino and it didn’t take off.

Anyway, OpenMV is going to be pivoting hard into supporting CNN stuff on the camera and low power neural networks. This is where I see a big future in the tech. That is to say… the IDE will stay as just an IDE for the OpenMV Cam.

However, if someone were to make a linux install package to make the Pi look like an OpenMV Cam then you could use the IDE with it.

Thanks for the fast reply.

I’ve checked the script and it seems very helpful.
One additional question I have is how to “catch” data from this script and redirect it to another py script? I guess this is Python related question. Can I use check_output() function? get_value(34)?
To give you some context, my script (OpemMV py) outputs directions (stop, left, right and forward) which I need to represents as 2x2b and just output them to RPi GPIO.

Thank you providing some insights into OpenMV future. I appreciate it. I work in Academia and CNN and GAN are the “hottest” topic right now. I believe we can expect very high demand for low power MV/CV applications in the near future.

Call the tx_buf_len() method to get the number of bytes stuck in the camera’s print() buffer and then tx_buf() to get the actual data. Call fb_dump() to get the image as a numpy array. The exec_script method tells the camera to run a python file.