mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
SCRIPT: wpiformat
This commit is contained in:
committed by
Peter Johnson
parent
ae6bdc9d25
commit
2109161534
@@ -15,7 +15,8 @@ int main() {
|
||||
camera.SetVideoMode(wpi::cs::VideoMode::kMJPEG, 320, 240, 30);
|
||||
wpi::cs::CvSink cvsink{"cvsink"};
|
||||
cvsink.SetSource(camera);
|
||||
wpi::cs::CvSource cvsource{"cvsource", wpi::cs::VideoMode::kMJPEG, 320, 240, 30};
|
||||
wpi::cs::CvSource cvsource{"cvsource", wpi::cs::VideoMode::kMJPEG, 320, 240,
|
||||
30};
|
||||
wpi::cs::MjpegServer cvMjpegServer{"cvhttpserver", 8083};
|
||||
cvMjpegServer.SetSource(cvsource);
|
||||
|
||||
@@ -27,8 +28,8 @@ int main() {
|
||||
wpi::util::print("error: {}\n", cvsink.GetError());
|
||||
continue;
|
||||
}
|
||||
wpi::util::print("got frame at time {} size ({}, {})\n", time, test.size().width,
|
||||
test.size().height);
|
||||
wpi::util::print("got frame at time {} size ({}, {})\n", time,
|
||||
test.size().width, test.size().height);
|
||||
cv::flip(test, flip, 0);
|
||||
cvsource.PutFrame(flip);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user