try fix gray

This commit is contained in:
cyy_mac
2026-03-28 05:03:46 +08:00
parent 2ea8e25ec4
commit cb59f59277

View File

@@ -280,6 +280,10 @@ private:
// Apply ROI/offset before querying image info
applyRoiLocked();
// Set pixel format to RGB8 (try to force color output)
// PixelType_Gvsp_RGB8_Packed = 0x02100014
(void)MV_CC_SetEnumValue(camera_handle_, "PixelFormat", PixelType_Gvsp_RGB8_Packed);
// Set exposure / gain
(void)MV_CC_SetFloatValue(camera_handle_, "ExposureTime", static_cast<float>(exposure_time_));
(void)MV_CC_SetFloatValue(camera_handle_, "Gain", static_cast<float>(gain_));