Comments (2)
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.
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)
- Raspberry Pi4 CM
- Could not find mmal libraries HOT 2
- Still working with OpenCV 4? HOT 2
- Images change in color HOT 1
- Unable to run simpletest_raspicam.cpp HOT 1
- Multiple cameras HOT 2
- When camera is disconnected on Rpi4, the open success, and the grab blocks. On Rpi3 the open fail correctly.
- On PI4 camera is work with raspistill, but simletest_raspicam freezes during grab
- raspicam_test: symbol lookup error: raspicam_test: undefined symbol: _ZN8raspicam8RaspiCam12setFrameRateEi
- The camera cannot be destroyed in Raspicam_Still!
- The CPU is fully loaded! HOT 1
- Use of raspicam in stereo mode
- issue with ENOSPC(but not the same one with in introduce)
- Unable to run simpletest_raspicam.cpp
- RAW image support
- Missed Private_Impl::getVideoStabilization
- Installation on Manjaro (RPi3B)
- Can't compile the library HOT 1
- Does this Work with the Raspberry Pi HQ Camera?
- error in compiling HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raspicam.