OMX Camera & raspberryPi 3B+


I have the following setup:

  • raspberryPi 3B+
  • raspberryPi camera + ofxOMXCamera addon
  • raspbian stretch
  • openFrameworks 0.10.1

I’m grabbing the camera image as a texture and display it on a screen connected via hdmi using the following code where cam_texture is of type ofTexture :

void update(){
if (cam.isFrameNew())
        cam_texture = cam.getTextureReference();

void draw(){
    cam_texture.drawSubsection(0, 0, cam_draw_width, cam_draw_width, 420, 0, 1080, 1080); 

This works fine as long as i start my OF program via command line over ssh, but when i start it from a local command line or script the camera image won’t be shown.
I have no clue what causes this issue and how to fix it so any help is appreciated!

I could make it work but still don’t get what is the cause.
For investigating my problem I copied the command line output to a txt file by adding
> log.txt to the command, so it looked like this:
sudo /home/pi/openFrameworks/apps/myApps/test/bin/test > log.txt
and it worked just fine. Can anyone help me understanding what’s going on here?