Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Help with drawing multicam to the screen

$
0
0

@abocanegra wrote:

Hi, I need help once again. I am currently working with 2 Point Grey Grasshopper 3 cameras (4 soon). The system works perfectly with one, but once I plug both in the fps drops to 0. I am assuming the problem is in how you draw 4 cameras to the screen. Does anybody have any advice for this? I am working with updating the ofImage coming from each camera via threads, and have tried drawing from within the thread script as well as pulling the pixels into an ofImage object array in the ofApp.cpp file.

Here is my current draw code:

    for(uint64_t i=0; i<totalNumCameras;i++){
        if(camThread[i].isThreadRunning()){
            camThread[i].draw();
            camThread[i].yield();
            if(camThread[i].cam.isCamConnected){
                finalImage[i].setFromPixels(camThread[i].camImage);
                finalImage[i].draw(camThread[i].camCoord[camThread[i].TtotalNumCameras][camThread[i].TdeviceID][2],
                                   camThread[i].camCoord[camThread[i].TtotalNumCameras][camThread[i].TdeviceID][3],
                                   camThread[i].camCoord[camThread[i].TtotalNumCameras][camThread[i].TdeviceID][0],
                                   camThread[i].camCoord[camThread[i].TtotalNumCameras][camThread[i].TdeviceID][1]);
            }
        }
    }

Any direction would be great. Thank you.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles