[mousetrap/ng] BugFix MtpCapture.h
- From: Flavio Percoco <flaper src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mousetrap/ng] BugFix MtpCapture.h
- Date: Sun, 1 Nov 2009 09:44:15 +0000 (UTC)
commit ee5e57f80cb0863ca428ad697a1308d7db084d74
Author: Flavio Percoco Premoli <flaper87 gmail com>
Date: Sun Nov 1 11:59:32 2009 +0100
BugFix MtpCapture.h
src/mousetrap/ocvfw/dev/MtpCapture.cpp | 13 ++++----
src/mousetrap/ocvfw/dev/MtpCapture.h | 49 ++++++++++++++++---------------
2 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/src/mousetrap/ocvfw/dev/MtpCapture.cpp b/src/mousetrap/ocvfw/dev/MtpCapture.cpp
index 4a57102..48b21ad 100644
--- a/src/mousetrap/ocvfw/dev/MtpCapture.cpp
+++ b/src/mousetrap/ocvfw/dev/MtpCapture.cpp
@@ -24,7 +24,7 @@
#include "highgui.h"
#include "MtpCamera.h"
-#include "glib.h"
+#include <glib.h>
#include "MtpCapture.h"
@@ -32,12 +32,7 @@ int fps = 0;
bool async = false;
MtpCapture::MtpCapture() {
- webcam.startCamera();
-}
-
-void MtpCapture::init() {
- if(capture!=0)
- cvReleaseCapture( &capture );
+ webcam.startCamera(0);
}
void MtpCapture::set_async(int set_fps=100, bool set_async=false) {
@@ -56,3 +51,7 @@ bool MtpCapture::sync() {
return async;
}
+
+IplImage *MtpCapture::resize(int width, int height, bool copy=false) {
+ return image;
+}
diff --git a/src/mousetrap/ocvfw/dev/MtpCapture.h b/src/mousetrap/ocvfw/dev/MtpCapture.h
index 9b35760..bf4657c 100644
--- a/src/mousetrap/ocvfw/dev/MtpCapture.h
+++ b/src/mousetrap/ocvfw/dev/MtpCapture.h
@@ -25,41 +25,42 @@
#include "highgui.h"
#include "MtpCamera.h"
-#ifndef _INCL_GUARD_WEBCAM
-#define _INCL_GUARD_WEBCAM
-
/**
* OpenCV Webcam Class. This class wraps over the opencv Image Query Functions.
*/
class MtpCapture
{
public:
- /**
- *The Constructor
- *Currently does nothing
- */
+ /**
+ *The Constructor
+ *Currently does nothing
+ */
MtpCapture(void);
- /**
- * Synchronize the capture quering a new frame.
- */
- bool sync();
+ /**
+ * Resizes the image
+ */
+ IplImage *resize(int width, int height, bool copy=false);
+
+ /**
+ * Synchronize the capture quering a new frame.
+ */
+ bool sync();
- /**
- * Starts/Stops the asynchronous calls to the sync method.
- */
- void set_async(int set_fps, bool set_async);
+ /**
+ * Starts/Stops the asynchronous calls to the sync method.
+ */
+ void set_async(int set_fps=100, bool set_async=false);
private:
- /**
- *Opencv Capture Structure
- */
- IplImage* image;
+ /**
+ *Opencv Capture Structure
+ */
+ IplImage* image;
- /**
- * Camera Object
- */
- MtpCamera webcam;
+ /**
+ * Camera Object
+ */
+ MtpCamera webcam;
};
-#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]