6 Replies Latest reply on Sep 21, 2017 5:53 PM by breadbugs

    Get a single frame using R200




      I am using R200 to test SIFT detector in Ubuntu. I want to get a single frame from the rgb stream and pause the camera to process this frame and after processing resume the camera stream. The way I did it is by calling camera.stop() and camera.start() repeatedly. My question is that will the frequent use of stop and start steps burn some physical parts of the camera?


      Or is there a safe way to do that?




        • 1. Re: Get a single frame using R200

          Your approach in general is correct (pause stream, look at a frame, give permission to move on to looking at the next frame).  It is also consistent with the Intel tutorial script below, whose method of frame analysis is to pause the stream when the user left-clicks on the image.  In the case of that tutorial though, it closes the window and exits after the first frame is Stopped, instead of resuming the stream.


          Code Sample: Use LibRealSense and OpenCV* to stream RGB and Depth Data | Intel® Software


          In regard to your question about whether stopping and starting repeatedly could cause damage ... research of the Stop() function strongly suggests that it stops the camera, not just the stream.  This would suggest that the camera's projector component is turned on and off with each start and stop.  Overall though, unless you are stopping and starting many times during each run of your application, you are not likely to see degradation of the camera in the short term, since stopping and starting streams is part of its primary functions.  I have had an old F200 camera model in use for 3 years now and it is still working fine. 

          • 2. Re: Get a single frame using R200

            Really thanks for your reply. My understanding from your opinion is that there is the potential to damage the camera by doing that frequently. Sadly, I was once planning to stop and restart it before and after each frame.... I changed my mind now, maybe I can just keep it streaming and just ignore most frames in each 30 frames per second. This seems to have the same effect as to pause the camera to get that single frame.


            I am confused with the suggestion that it is better to stop the camera rather than the stream. Doesn't it have to use the function start() to enable the stream after I restart the camera? So stopping the camera or the stream seems to be the same in my view. I am new to this camera so I am not sure if there is some magic way to avoid starting the stream again after restarting the camera.

            • 3. Re: Get a single frame using R200

              The RealSense SDK for Linux (which installs Librealsense as a module) seems to handle stop and start a bit differently, pausing on Stop() and resuming on Start().


              • 4. Re: Get a single frame using R200

                Where can I see this information for the Linux users? Bty, I got great progress in grabbing a single frame from the stream without using any function. I just used a counter to do that. Now, the problem becomes how I can use the frame correctly....

                • 5. Re: Get a single frame using R200

                  Details of the RealSense SDK For Linux are here:


                  Intel® RealSense™ SDK for Linux: Getting Started


                  Glad you managed to find a new method for grabbing a frame.  Counters are useful things! 

                  • 6. Re: Get a single frame using R200

                    Thanks for the link. Yes, counters are great, which will certainly not damage my camera... Now I have almost finished the first big part of the project.