mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[cscore] CvSink: Allow specifying output PixelFormat (#5943)
This commit is contained in:
@@ -709,8 +709,9 @@ Image* Frame::GetImageImpl(int width, int height,
|
||||
return ConvertImpl(cur, pixelFormat, requiredJpegQuality, defaultJpegQuality);
|
||||
}
|
||||
|
||||
bool Frame::GetCv(cv::Mat& image, int width, int height) {
|
||||
Image* rawImage = GetImage(width, height, VideoMode::kBGR);
|
||||
bool Frame::GetCv(cv::Mat& image, int width, int height,
|
||||
VideoMode::PixelFormat pixelFormat) {
|
||||
Image* rawImage = GetImage(width, height, pixelFormat);
|
||||
if (!rawImage) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user