]> git.defcon.no Git - qopencamwidget/blobdiff - doc/man/man3/QOpenCamWidget.3
Removing the docs from svn. These are generatet using doxygen anyways.
[qopencamwidget] / doc / man / man3 / QOpenCamWidget.3
diff --git a/doc/man/man3/QOpenCamWidget.3 b/doc/man/man3/QOpenCamWidget.3
deleted file mode 100644 (file)
index 3758b7e..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-.TH "QOpenCamWidget" 3 "11 Jun 2009" "QOpenCamWidget" \" -*- nroff -*-
-.ad l
-.nh
-.SH NAME
-QOpenCamWidget \- 
-.SH SYNOPSIS
-.br
-.PP
-\fC#include <qopencamwidget.h>\fP
-.PP
-.SS "Public Slots"
-
-.in +1c
-.ti -1c
-.RI "void \fBgrabFrame\fP (void)"
-.br
-.RI "\fIGrabs a frame and causes an update() when triggered. \fP"
-.ti -1c
-.RI "void \fBstartSnap\fP ()"
-.br
-.RI "\fITrigger this slot to save a frame from the widget. \fP"
-.in -1c
-.SS "Signals"
-
-.in +1c
-.ti -1c
-.RI "void \fBimageReady\fP (QImage snapshot)"
-.br
-.in -1c
-.SS "Public Member Functions"
-
-.in +1c
-.ti -1c
-.RI "\fBQOpenCamWidget\fP (QWidget *parent=0)"
-.br
-.RI "\fIConsctructs a QWidget based widget for displaying video coming from an OpenCV capture source. \fP"
-.ti -1c
-.RI "\fB~QOpenCamWidget\fP (void)"
-.br
-.ti -1c
-.RI "void \fBpaintEvent\fP (QPaintEvent *event)"
-.br
-.RI "\fIA paint event is a request to repaint all or part of a widget. \fP"
-.ti -1c
-.RI "void \fBsetSnapshotVisible\fP (bool visible)"
-.br
-.RI "\fIChanges the visibility of the optional built-in 'Take snapshot' button. \fP"
-.ti -1c
-.RI "bool \fBgrabCapture\fP (int source)"
-.br
-.RI "\fIGrabs an OpenCV video capture source. \fP"
-.ti -1c
-.RI "void \fBstartCapture\fP (void)"
-.br
-.RI "\fIStarts up grabbing of video frames. \fP"
-.ti -1c
-.RI "QImage * \fBIpl2QImage\fP (const IplImage *img)"
-.br
-.RI "\fIConverts from the OpenCV IplImage data structure to a QImage. \fP"
-.in -1c
-.SS "Private Attributes"
-
-.in +1c
-.ti -1c
-.RI "CvCapture * \fBcapture\fP"
-.br
-.ti -1c
-.RI "QTimer * \fBframetimer\fP"
-.br
-.ti -1c
-.RI "QImage * \fBnextFrame\fP"
-.br
-.ti -1c
-.RI "QLabel * \fBcanvas\fP"
-.br
-.ti -1c
-.RI "QVBoxLayout * \fBlayout\fP"
-.br
-.ti -1c
-.RI "QPushButton * \fBtrigger\fP"
-.br
-.ti -1c
-.RI "bool \fBtrigger_active\fP"
-.br
-.in -1c
-.SH "Detailed Description"
-.PP 
-Definition at line 29 of file qopencamwidget.h.
-.SH "Constructor & Destructor Documentation"
-.PP 
-.SS "QOpenCamWidget::QOpenCamWidget (QWidget * parent = \fC0\fP)"
-.PP
-Consctructs a QWidget based widget for displaying video coming from an OpenCV capture source. 
-.PP
-Including webcam data in a Qt application can be problematic, at least as long as Phonon does not support webcams, and the Phonon GStreamer backend only supports simple pipelines.
-.PP
-This class solves the complexity of adding a webcam view, by using the cross-platform available OpenCV library.
-.PP
-Limitations, i.e. reasons to read this code and reimplement, are: saving or streaming video is not really available (unless you do repeated timer-triggered connections to the startSnap slot), the widget size is identical to the video source dimensions (it resizes the wodget using setMinimuSize to the video dimensions, and does not handle resizing to sizes above this dimension.
-.PP
-A brief summary of how to use this class: 
-.PP
-.nf
- QOpenCamWidget *cw = new QOpenCamWidget(this);
- if ( cw->grabCapture(-1) ) {
-   cw->setSnapshotVisible(true);
-   cw->startCapture();
- }
- connect( cw, SIGNAL(imageReady(QImage)), this, SLOT(saveImage(QImage)));
-
-.fi
-.PP
-.PP
-\fBParameters:\fP
-.RS 4
-\fI*parent\fP The parent widget containing this widget, defaults to NULL. 
-.RE
-.PP
-
-.PP
-Definition at line 60 of file qopencamwidget.cpp.
-.PP
-References canvas, frametimer, layout, nextFrame, trigger, and trigger_active.
-.SS "QOpenCamWidget::~QOpenCamWidget (void)"
-.PP
-Definition at line 88 of file qopencamwidget.cpp.
-.PP
-References canvas, capture, and trigger.
-.SH "Member Function Documentation"
-.PP 
-.SS "void QOpenCamWidget::paintEvent (QPaintEvent * event)"
-.PP
-A paint event is a request to repaint all or part of a widget. 
-.PP
-It can happen for one of the following reasons:
-.PP
-.PD 0
-.IP "\(bu" 2
-repaint() or update() was invoked, 
-.IP "\(bu" 2
-the widget was obscured and has now been uncovered, or 
-.IP "\(bu" 2
-many other reasons.
-.PP
-\fBQOpenCamWidget\fP uses the paintEvent to draw each frame onto the screen. The paintEvent itself is regularily triggered by explicit update() calls in \fBQOpenCamWidget::grabFrame()\fP. 
-.PP
-Definition at line 144 of file qopencamwidget.cpp.
-.PP
-References canvas, and nextFrame.
-.SS "void QOpenCamWidget::setSnapshotVisible (bool visible)"
-.PP
-Changes the visibility of the optional built-in 'Take snapshot' button. 
-.PP
-The widget contains a push-button that optionally can be displayed. When visible, this button is located at the bottom of the widget, and causes the SLOT \fBQOpenCamWidget::startSnap\fP to be triggered when clicked.
-.PP
-\fBParameters:\fP
-.RS 4
-\fIvisible\fP True makes the button display, and trigger, false turns the feature off. False, i.e. no button, is default. 
-.RE
-.PP
-
-.PP
-Definition at line 110 of file qopencamwidget.cpp.
-.PP
-References layout, startSnap(), trigger, and trigger_active.
-.PP
-Referenced by View::View().
-.SS "bool QOpenCamWidget::grabCapture (int source)"
-.PP
-Grabs an OpenCV video capture source. 
-.PP
-By grabbing a source, it is meant to open the capture source, and have it ready to start streaming/capturing frames. Returns true on success, false on error. The grabCapture is separated from the constructor and/or frame-grabbing, so that you may do the error-checking you really should do before proceeding.
-.PP
-\fBParameters:\fP
-.RS 4
-\fIsource\fP The OpenCV capture source enumeration index to open 
-.RE
-.PP
-
-.PP
-Definition at line 183 of file qopencamwidget.cpp.
-.PP
-References canvas, and capture.
-.PP
-Referenced by View::View().
-.SS "void QOpenCamWidget::startCapture (void)"
-.PP
-Starts up grabbing of video frames. 
-.PP
-The actual grabbing and displaying of video frames is performed by a QTimer triggering the SLOT \fBQOpenCamWidget::grabFrame()\fP. \fBstartCapture()\fP sets up the timer running this captureFrame loop.
-.PP
-The SLOT \fBQOpenCamWidget::startSnap()\fP is used to get image frames out from the widget for other uses, like saving or processing. This function relies on the timer created and configured by \fBstartCapture()\fP, and as such, this function is the only permitted way to start the actual capture/streaming of video from the source. 
-.PP
-Definition at line 217 of file qopencamwidget.cpp.
-.PP
-References frametimer, grabFrame(), and trigger.
-.PP
-Referenced by View::View().
-.SS "QImage * QOpenCamWidget::Ipl2QImage (const IplImage * img)"
-.PP
-Converts from the OpenCV IplImage data structure to a QImage. 
-.PP
-OpenCV uses a data strcuture calles IplImage, optimized for computer vision image processing tasks. This code was adapted from kcamwidget.cpp, part of the KDE SVN at playground/multimedia/kcam/kcamwidget.cpp
-.PP
-In regard that the IplImage can be forced into a format that aligns well with a RBG888-format, the conversion becomes one of the shortes, simples IplImage->QImage I've seen.
-.PP
-\fBParameters:\fP
-.RS 4
-\fI*img\fP The IplImage to be converted to a QImage. 
-.RE
-.PP
-
-.PP
-Definition at line 241 of file qopencamwidget.cpp.
-.PP
-Referenced by grabFrame().
-.SS "void QOpenCamWidget::grabFrame (void)\fC [slot]\fP"
-.PP
-Grabs a frame and causes an update() when triggered. 
-.PP
-This is the SLOT that actually reads the video source and causes the widget to display live video. Preferably this slot will never be called my any other signal that a timeout() on the frametimer, which is controlled by \fBQOpenCamWidget::startCapture()\fP 
-.PP
-Definition at line 266 of file qopencamwidget.cpp.
-.PP
-References capture, Ipl2QImage(), and nextFrame.
-.PP
-Referenced by startCapture().
-.SS "void QOpenCamWidget::startSnap (void)\fC [slot]\fP"
-.PP
-Trigger this slot to save a frame from the widget. 
-.PP
-When this slot is triggered, the widgets capture loop is temporarily stopped, and the last displayed frame is 'captured', and made available through the emitting of the class imageReady SIGNAL.
-.PP
-With the 'Take snapshot' button visible (setSnapshotVisible(true)), this SLOT is triggered when the user clicks on the trigger button. If you do not wish to use the internal trigger button, you will have to add a different mechanism to trigger this SLOT.
-.PP
-It is possible, though I would not recommend, to use repeated triggering of this slot to do repeated frame-capture, and thus make a form of 'Animation' or 'Video' capture. 
-.PP
-Definition at line 306 of file qopencamwidget.cpp.
-.PP
-References frametimer, imageReady(), and nextFrame.
-.PP
-Referenced by setSnapshotVisible().
-.SS "void QOpenCamWidget::imageReady (QImage snapshot)\fC [signal]\fP"
-.PP
-Referenced by startSnap().
-.SH "Member Data Documentation"
-.PP 
-.SS "CvCapture* \fBQOpenCamWidget::capture\fP\fC [private]\fP"
-.PP
-Definition at line 35 of file qopencamwidget.h.
-.PP
-Referenced by grabCapture(), grabFrame(), and ~QOpenCamWidget().
-.SS "QTimer* \fBQOpenCamWidget::frametimer\fP\fC [private]\fP"
-.PP
-Definition at line 36 of file qopencamwidget.h.
-.PP
-Referenced by QOpenCamWidget(), startCapture(), and startSnap().
-.SS "QImage* \fBQOpenCamWidget::nextFrame\fP\fC [private]\fP"
-.PP
-Definition at line 37 of file qopencamwidget.h.
-.PP
-Referenced by grabFrame(), paintEvent(), QOpenCamWidget(), and startSnap().
-.SS "QLabel* \fBQOpenCamWidget::canvas\fP\fC [private]\fP"
-.PP
-Definition at line 39 of file qopencamwidget.h.
-.PP
-Referenced by grabCapture(), paintEvent(), QOpenCamWidget(), and ~QOpenCamWidget().
-.SS "QVBoxLayout* \fBQOpenCamWidget::layout\fP\fC [private]\fP"
-.PP
-Definition at line 40 of file qopencamwidget.h.
-.PP
-Referenced by QOpenCamWidget(), and setSnapshotVisible().
-.SS "QPushButton* \fBQOpenCamWidget::trigger\fP\fC [private]\fP"
-.PP
-Definition at line 41 of file qopencamwidget.h.
-.PP
-Referenced by QOpenCamWidget(), setSnapshotVisible(), startCapture(), and ~QOpenCamWidget().
-.SS "bool \fBQOpenCamWidget::trigger_active\fP\fC [private]\fP"
-.PP
-Definition at line 42 of file qopencamwidget.h.
-.PP
-Referenced by QOpenCamWidget(), and setSnapshotVisible().
-
-.SH "Author"
-.PP 
-Generated automatically by Doxygen for QOpenCamWidget from the source code.