MIPI camera very slow acquisition

Moderators: Oren.R, Eran.M

ingeln991
Posts: 15
Joined: Thu Apr 27, 2017 6:05 pm

MIPI camera very slow acquisition

Postby ingeln991 » Fri May 12, 2017 3:08 pm

Hi !

i built an opencv application that acquire video from camera. This is the code :

#include "opencv2/video/tracking.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"

#include <iostream>
#include <ctype.h>

using namespace cv;
using namespace std;

Mat image;
int main()
{
VideoCapture cap("imxv4l2src device=/dev/video0 ! imxvideoconvert_ipu ! appsink");
char keypressed;

if( !cap.isOpened() )
{
cout << "***Could not initialize capturing...***\n";
return -1;
}

namedWindow("Camera", CV_WINDOW_AUTOSIZE);
while(1)
{
cap >> image;

imshow("Camera", image);
keypressed = (char)waitKey(10);
if( keypressed == 27 )
break;
}
cap.release();
return 0;
}

When i mount the code on the board it works, but the frame acquisition is extremaly slowly , 1 frame every 5 seconds...can someone help me ?

Return to “Yocto”

Who is online

Users browsing this forum: No registered users and 2 guests