Hi Team,
I am working on a project which involves OpemMv M7 and NodeMCU. I Would like to capture image using OpenMv and Store It to Nodemcu SpiFFs memory using UART, So far I am Able To communicate with openmv and nodemcu using UART also when I try to send image to nodemcu using RXD And TXD Pins I am able to send some strange alphanumeric codes from openmv to nodemcu. Now what I want to do is to convert the image to array list and then send the values to nodemcu for storage so that I can upload it to web and then convert the array to image again but I am not able to convert the image to array using any function as I am not sure if there exist any function which can convert image to string array in micropython openmv library. Please Help me if someone can suggest how to do it.
Convert Image To Pixel Array Function
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Convert Image To Pixel Array Function
I have used both OpenMV cam and NodeMCU with Micro-Python.
All RAM is linear so any array including 2d image array is stored in memory as linear bytes. You should be able to send the image from OpenMV straight to the UART without any formatting then have the NodeMCU forward it on to the web before formatting it back there into a image.
something like this
Also do be aware that OpenMV can compress the image into a JPG that is much smaller to make sending it ot the web easier.
Also do be aware if your just trying to get an image to the web then the ESP32CAM can do it all for you in 1 hit see https://www.aliexpress.com/af/esp32-cam ... y&jump=afs
All RAM is linear so any array including 2d image array is stored in memory as linear bytes. You should be able to send the image from OpenMV straight to the UART without any formatting then have the NodeMCU forward it on to the web before formatting it back there into a image.
something like this
Code: Select all
img = sensor.snapshot()
uart.write(img)
Also do be aware if your just trying to get an image to the web then the ESP32CAM can do it all for you in 1 hit see https://www.aliexpress.com/af/esp32-cam ... y&jump=afs