An object which owns some sort of input video stream, manages running it (and any tracking, etc) and emits cv::Mat frames and tracked objects.
More...
|
void | start (int cam=0) |
| Start a stream with a camera input.
|
|
void | start (QString fname) |
| Start a stream with a filename input.
|
|
void | stop () |
| Terminate the video stream.
|
|
void | pauseStream () |
| Pause the current video stream.
|
|
void | changeProjectorCorners (std::vector< cv::Point2f > corners) |
| Set the location of projector corners in the image.
|
|
void | changeClipTrack (bool checked) |
| Set whether or not tracking is clipped to projector.
|
|
void | predictionBall (KFPrediction pred) |
| Alert the stream to a predicted ball.
|
|
void | setFov (int fov) |
| Set the camera FOV.
|
|
void | changeProjWidth (int width) |
| changeProjWidth sets the width of the projector screen (in inches) More...
|
|
void | changeProjHeight (int height) |
| changeProjHeight sets the height of the projector screen (in inches) More...
|
|
void | changeBallZ (double z) |
| changeBallZ sets the z-plane that the ball is thrown in (in inches) More...
|
|
void | changeBlurSize (double blurSize) |
| Set the strength of blur in preprocessing step. More...
|
|
void | changeThreshVal (double thresh) |
| Set the threshold in preprocessing step. More...
|
|
void | changeMinRadius (double radius) |
| Set the min viable radius of a ball blob. More...
|
|
void | changeMaxRadius (double radius) |
| Set the max viable radius of a ball blob. More...
|
|
void | changeGravConstant (double g) |
| Set the accel due to gravity g. More...
|
|
void | changeXYCovariance (double sigma) |
| Set the covariance in predicted X, Y (a KF parameter) More...
|
|
void | processThresh (const cv::Mat &, enum ColorSpace=TS_GRAY) |
| Process a "thresholded" frame, with white blobs.
|
|
void | processBlur (const cv::Mat &, enum ColorSpace=TS_BGR) |
| Process a "blurred" frame.
|
|
void | processContour (const cv::Mat &, enum ColorSpace=TS_GRAY) |
| Process a "contour" frame, which marks contours.
|
|
void | processVideoFrame (const cv::Mat &mat, ColorSpace=TS_BGR) |
| Process a "video" frame, which is raw video input.
|
|
void | changeDisplayFrameType (QString s) |
| Set the type of video frame to actually be emitted.
|
|
|
QBasicTimer | mTimer |
| Timer for processing frames.
|
|
QScopedPointer< cv::VideoCapture > | mVideoHandle |
| The handler for the input video stream.
|
|
int | mFov |
| The FOV of the camera. More...
|
|
QSize | mVideoSize |
| The dimensions of the video stream.
|
|
QSize | mProjSize |
| The dimensions (in real world units) of the projector screen.
|
|
double | mBallZ |
| The distance of the ball plane from the projector plane (in real world units)
|
|
cv::Mat | mProjCornersCamera |
| The location of projector coordinates in world (real units) More...
|
|
std::vector< cv::Point2f > | mCorners |
| The location of projector coordinates in the image. More...
|
|
std::vector< cv::Point2f > | mBallPlane |
| The bounding polygon of image coordinates which project to ball coordinates that live in the projector screen.
|
|
cv::Mat | mCameraMatrix |
| The intrinsic camera matrix.
|
|
cv::Mat | mRMatrix |
| The camera's extrinsic(?) rotation matrix.
|
|
cv::Mat | mTVector |
| The camera's extrinsic(?) translation vector.
|
|
cv::Mat | mFrame |
| The present frame received from the video stream.
|
|
DisplayFrameType | mEmitFrameType |
| The type (e.g. More...
|
|
bool | mStarted = false |
| Whether the video stream is started.
|
|
bool | mProjReady = false |
| Whether there is enough projector data for transform.
|
|
bool | mStreamPaused = false |
| Whether the stream is currently paused.
|
|
int | mFps |
| The FPS of the video stream (=0 for webcam stream)
|
|
KFBallTracker | mTracker |
| The ball tracker; we give it frames, it gives us ball predictions.
|
|
bool | mDisplayVideo = true |
| Whether we should display video or not.
|
|
QPolygonF | mProjScreen |
| Region to crop to if mClipTrack is on.
|
|
bool | mClipTrack = false |
| Whether we should clip tracking to the proj screen.
|
|
An object which owns some sort of input video stream, manages running it (and any tracking, etc) and emits cv::Mat frames and tracked objects.
cv::Point2f TrackingStream::imageToProjector |
( |
cv::Point2f |
imP, |
|
|
double |
z = 0 |
|
) |
| |
Convert image coordinates to projector coordinates.
Like most things, converting image coordinates (i.e. what the camera sees) to projector coordinates (world coordinates, where the top left corner of the projector is the origin) is just linear algebra.
This is the inverse of projectorToImage
The players:
- Parameters
-
imP | image point (x,y) to translate to world coordinates |
z | a priori known world z-coordinate of the point to find |
- Returns