I’m using the example multi_color_blob_tracking_1.py and would like to send the main values frame size for red, green and blue to a serial port. The idea is to communicate with another program called csound (an audio processing software) which can receive serial data.
Which functions do I need for this?
Hi, for serial port sending please see the pixy emulation examples. They show off how to send data via the serial port.
Thanks for your answer. I was wondering if once the OpenMV Cam is connected via USB to the computer, if there is a simpler way to grab data from the camera. If so, could you give me an example? Thank you in advance.
Hi, literally just use the print() method on objects. The output will then appear in the terminal in OpenMV IDE. A y program on a the computer can open the OpenMV Cam’s serial port and read the print output while the script is running.
Thanks for your kind reply! I’ll try that.
Note you cannot use OpenMV IDE with the camera if another program is reading the serial port at the same time. To make your script permanent on the OpenMV Cam use Tools → Save script to the OpenMV Cam.
That’s it! Thank you very, very much! Now csound is receiving data from OpenMV!
And thanks for creating this wonderful project!
Hi!! I am trying to do the same. But while Save script to the OpenMV cam, I am getting an error Error: Cannot write file D:\main.py. Disk full?!
Hi, please verify your drive is writable.
is there a very simple solution to send the image of the camera to an external monitor? Do I need to run an external python script or is it possible to send a stream directly from the OpenMV IDE?
What kind of monitor ?
I mean one of the screens of the computer.
Hi, the Microcontroller can’t do that. It doesn’t have the hardware to do so.
Thanks for you replies.
I think I might have led you to a misunderstanding.
My idea is to stream the images of the camera to a beamer in full screen. Instead of having the camera images in the OpenMV IDE, I would like to stream it to a beamer for an audio and video performance.
Is there a simple way to do this?
Thank you in advance and for your pacience.
Yes, as mentioned we just have a USB port. We don’t have HDMI so we can’t stream to a TV. You can fullscreen OpenMV IDE and resize the viewing window to make that fullscreen.
OK, I see. Thank you for your reply.
It seems like it is not ideal for the application I want to have of the camera. I need the images to be projected to an external screen and I need to send the image tracking information via serial port.
So, we will have a solution for this soon that let’s the camera transmit the image over the 5ghz spectrum using an NTSC transmitter. But, we don’t have what you need now.
Sorry for this newbie post but I am kind of stuck. I am also trying to send values to the serial without success. The script runs properly, the camera serial receive the values, I save the script to the camera, close the camera IDE and then try to read it with Processing (or CoolTerm) but it doesn’t read anything. I don’t get it because I used to make it work.
Is there any recent update I should be making? Or another (new) step I have missed?
Thanks for your help.
HI, I’m almost done with a new interface library that will be the new gold standard for anyone want to move data from the camera to anything else.
Is it possible you can wait till next week on this? I should be done by then. The interface library I’ve been writing allows you to do RPC calls on the camera. I.e., you call a method on the camera, pass some data structure, and you get some data structure back. It’s rather high performance so you can move raw images, jpeg images, processed outputs, etc. Whatever you want.
I will have an example script for USB VCP control and WiFI control on the PC.
Of course! Looking forward to play with it.