mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Update for wpi::Now() change to microseconds. (#113)
Also be explicit in docs about what timebase and step are used.
This commit is contained in:
@@ -122,6 +122,8 @@ class VideoSource {
|
||||
std::string GetDescription() const;
|
||||
|
||||
/// Get the last time a frame was captured.
|
||||
/// This uses the same time base as wpi::Now().
|
||||
/// @return Time in 1 us increments.
|
||||
uint64_t GetLastFrameTime() const;
|
||||
|
||||
/// Is the source currently connected to whatever is providing the images?
|
||||
@@ -578,13 +580,15 @@ class CvSink : public VideoSink {
|
||||
/// Times out (returning 0) after timeout seconds.
|
||||
/// The provided image will have three 8-bit channels stored in BGR order.
|
||||
/// @return Frame time, or 0 on error (call GetError() to obtain the error
|
||||
/// message);
|
||||
/// message); the frame time is in the same time base as wpi::Now(),
|
||||
/// and is in 1 us increments.
|
||||
uint64_t GrabFrame(cv::Mat& image, double timeout = 0.225) const;
|
||||
|
||||
/// Wait for the next frame and get the image. May block forever.
|
||||
/// The provided image will have three 8-bit channels stored in BGR order.
|
||||
/// @return Frame time, or 0 on error (call GetError() to obtain the error
|
||||
/// message);
|
||||
/// message); the frame time is in the same time base as wpi::Now(),
|
||||
/// and is in 1 us increments.
|
||||
uint64_t GrabFrameNoTimeout(cv::Mat& image) const;
|
||||
|
||||
/// Get error string. Call this if WaitForFrame() returns 0 to determine
|
||||
|
||||
Reference in New Issue
Block a user