fix MIPI 4K reading
This commit is contained in:
parent
a8a4cac3ad
commit
c46fe93dbb
|
@ -79,7 +79,6 @@ void Camera::openImpl()
|
||||||
else if (this->_type == CameraType::MIPI)
|
else if (this->_type == CameraType::MIPI)
|
||||||
{
|
{
|
||||||
char pipe[512];
|
char pipe[512];
|
||||||
this->_cap.open(this->_camera_id);
|
|
||||||
if (this->_width <= 0 || this->_height <= 0)
|
if (this->_width <= 0 || this->_height <= 0)
|
||||||
{
|
{
|
||||||
this->_width = 1280;
|
this->_width = 1280;
|
||||||
|
@ -90,7 +89,7 @@ void Camera::openImpl()
|
||||||
this->_fps = 30;
|
this->_fps = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(pipe, "nvarguscamerasrc framerate=(fraction)%d/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)%d, height=(int)%d, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink",this->_fps,this->_width,this->_height);
|
sprintf(pipe, "nvarguscamerasrc sensor-id=%d ! video/x-raw(memory:NVMM), width=(int)%d, height=(int)%d, format=(string)NV12, framerate=(fraction)%d/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)%d, height=(int)%d, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink", this->_camera_id, this->_width, this->_height, this->_fps, this->_width, this->_height);
|
||||||
this->_cap.open(pipe, cv::CAP_GSTREAMER);
|
this->_cap.open(pipe, cv::CAP_GSTREAMER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue