Skip to content

Commit 9cedec2

Browse files
committed
update cam config
1 parent c2a3c9c commit 9cedec2

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

camera-config/MastCameraCalibration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: "mast"
44
description: "Camera located on the mast of the rover."
55
# Make sure that this camera_id matches the one defined in the udev rules.
66
camera_id: 4
7-
format: "image/jpeg"
7+
format: "video/x-h264"
88
image_width: 1280
99
image_height: 720
1010
framerate: 30

camera-config/WristCameraCalibration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ description: "Camera located on the wrist of the rover arm."
55
# Make sure that this camera_id matches the one defined in the udev rules.
66
camera_id: 0
77
format: "video/x-h264"
8-
image_width: 1280
9-
image_height: 720
8+
image_width: 640
9+
image_height: 360
1010
framerate: 30
1111
opencv_enabled: 1 # 0 for true, 1 for false
1212
# calib_info:

src/camera/Camera.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ std::string Camera::getGSTPipe(CameraID camera_id) {
9999
gstr_ss << ",height=" << static_cast<int>(fs[KEY_IMAGE_HEIGHT]);
100100
gstr_ss << ",framerate=" << static_cast<int>(fs[KEY_FRAMERATE]) << "/1 ! ";
101101

102-
if (formatLower.find("jpeg") != std::string::npos) {
102+
if (formatLower.find("h264") != std::string::npos) {
103+
gstr_ss << "h264parse ! avdec_h264 ! ";
104+
} else if (formatLower.find("h265") != std::string::npos ||
105+
formatLower.find("hevc") != std::string::npos) {
106+
gstr_ss << "h265parse ! avdec_h265 ! ";
107+
} else if (formatLower.find("jpeg") != std::string::npos) {
103108
gstr_ss << "jpegdec ! ";
104109
}
105110

0 commit comments

Comments
 (0)