RPI CAMERA

Is there another way to run access the Rpi Camera rather than putting it to draw() ?

Answers

  • Can you elaborate more on why you want to do this or why draw() is not a good option for you? You can change the behavior of draw() by using noLoop() in setup() for example. Then you can trigger draw() manually calling redraw().

    Kf

  • edited December 2016

    http://pastebin.com/3uy0F8ez

    putting noLoop() will make the background image a black. I want to avoid that.

  • This was a suggestion. It is not clear why draw() is not good for you. What exactly do you want to do?

    kf

  • Thanks I appreciate the suggestion

    my problem with draw is that... my image background was being drawn there. the problem here is that I want to display my camera without putting it to my draw..

    or let's say I put it on the draw() function, but I must isolate the process of drawing the image background and the code of using the camera. I hope you understand what am I saying..

  • edited December 2016

    I want to display my camera without putting it to my draw

    This doesn't make sense to me. draw() is how you display things -- anything. You can't display your camera without displaying it.

    I must isolate the process of drawing the image background and the code of using the camera. I hope you understand what am I saying.

    Do you mean that you want to organize your code with functions?

    void draw(){
      drawBackground();
      drawCamera();
    }
    void drawBackground(){
      // background code here
    }
    void drawCamera(){
      // camera code here
    }
    

    ...or do you mean that you want the camera in a separate thread? I'm not sure that a camera thread would be a good idea -- you would still need to synchronize in order to draw().

Sign In or Register to comment.