Giter Site home page Giter Site logo

Retrieve Speed about raspicam HOT 2 OPEN

cedricve avatar cedricve commented on August 10, 2024
Retrieve Speed

from raspicam.

Comments (2)

toddhlynch avatar toddhlynch commented on August 10, 2024

As a follow up. The retrieve function simply is:

/**
*Decodes and returns the grabbed video frame.
*/
void RaspiCam_Cv::retrieve ( cv::Mat& image ) {
//here we go!
    image.create ( _impl->getHeight(),_impl->getWidth(),imgFormat );
    _impl->retrieve ( image.ptr<uchar> ( 0 ));
}

Which creates a blank RGB image of the proper height and width and then _impl->retrieve calls...

        void Private_Impl::retrieve ( unsigned char *data,RASPICAM_FORMAT type ) {
            if ( callback_data._buffData.size==0 ) return;
            if ( type!=RASPICAM_FORMAT_IGNORE ) {
                cerr<<__FILE__<<":"<<__LINE__<<" :Private_Impl::retrieve type is not RASPICAM_FORMAT_IGNORE as it should be"<<endl;
            }
            memcpy ( data,callback_data._buffData.data,getImageTypeSize ( State.captureFtm ) );
        }

Which just copies the camera buffer data to the image Mat. Any ideas why it is taking so long?

from raspicam.

luntik2012 avatar luntik2012 commented on August 10, 2024

did you measured execution time of every single step inside the lib? possibly, the bottleneck is in rpi zero gpu encoding speed. i have 28.5 fps on rpi 3b with rgb format

from raspicam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.