update video_io/sv_video_base.cpp.
Signed-off-by: Daniel <1367240116@qq.com>
This commit is contained in:
parent
e4e6ef1fd8
commit
5e0077bec0
|
@ -1133,22 +1133,6 @@ void CameraBase::openImpl()
|
||||||
// this->_cap.open(pipe); // cv::CAP_GSTREAMER
|
// this->_cap.open(pipe); // cv::CAP_GSTREAMER
|
||||||
this->_cap.open(pipe, cv::CAP_GSTREAMER);
|
this->_cap.open(pipe, cv::CAP_GSTREAMER);
|
||||||
}
|
}
|
||||||
else if (this->_type == CameraType::MIPI)
|
|
||||||
{
|
|
||||||
char pipe[512];
|
|
||||||
this->_cap.open(this->_camera_id);
|
|
||||||
if (this->_width <= 0 || this->_height <= 0)
|
|
||||||
{
|
|
||||||
this->_width = 1280;
|
|
||||||
this->_height = 720;
|
|
||||||
}
|
|
||||||
if (this->_fps <= 0)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
this->_cap.open(pipe, cv::CAP_GSTREAMER);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
void CameraBase::open(CameraType type, int id)
|
void CameraBase::open(CameraType type, int id)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue