Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.

Headless jevois : frame to Serial

+1 vote

Hi,

I am confused as i try to make my A33 JeVois camera to base64 encode a single frame then send this base64 string to nodeMCU thru serial.

I made this python module :

import libjevois as jevois
import cv2
import base64

class img2serial2web:
    def __init__(self):
        self.frame = 0
        self.image_requested = True


    def processNoUSB(self, inframe):
        img = inframe.getCvBGR()

        if self.image_requested:
            retval, cnt = cv2.imencode('.jpg',img)
            bcnt = base64.b64encode(cnt)
            jevois.sendSerial(bcnt)
            self.image_requested = False

If i try this code with jevois-daemon (replacing processNoUSB(self, inframe) by process(self, inframe, outframe)) the module works great and print the base64 in my terminal. 

But when i import it to th camera and run it using serial commands i have no output at all, except the default jevois log (INF Engine::setFormatInternal: Module [img2serial] loaded, initialized, and ready). 

I really don't know what am i doig wrong.

My goal is to make my nodemcu get a single frame from jevois as a base64 encoded string and then send this string to a php webpage. Any suggestion ?

asked Apr 10 in Programmer Questions by opusr (480 points)

1 Answer

+1 vote
In no-USB on, you also need to issue a "streamon" command once your module is configured and ready to start work. Before that, it is just waiting idle. Please see

http://jevois.org/tutorials/ProgrammerPythonSaveImages.html

for example.
answered Jun 24 by JeVois (46,540 points)
...