Added TcpRequest tool (ask a running find_object to process an image and wait results over TCP)

Refactored CameraTcpClient to CameraTcpServer (to send images we connect to find_object, instead of connecting find_object to an image server), removed parameter CameraIP

git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@364 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
matlabbe
2014-08-02 06:09:27 +00:00
parent b28ca440e8
commit 167aeee4bc
18 changed files with 359 additions and 250 deletions
+3 -2
View File
@@ -12,7 +12,7 @@
#include <QtCore/QTimer>
#include <QtGui/QImage>
class CameraTcpClient;
class CameraTcpServer;
class FINDOBJECT_EXP Camera : public QObject {
Q_OBJECT
@@ -27,6 +27,7 @@ public:
void pause();
int getTotalFrames();
int getCurrentFrameIndex();
int getPort();
void moveToFrame(int frame);
Q_SIGNALS:
@@ -45,7 +46,7 @@ private:
QTimer cameraTimer_;
QList<std::string> images_;
unsigned int currentImageIndex_;
CameraTcpClient * cameraTcpClient_;
CameraTcpServer * cameraTcpServer_;
};
#endif /* CAMERA_H_ */
+1 -2
View File
@@ -65,8 +65,7 @@ class FINDOBJECT_EXP Settings
PARAMETER(Camera, 4imageRate, double, 2.0, "Image rate in Hz (0 Hz means as fast as possible)."); // Hz
PARAMETER(Camera, 5mediaPath, QString, "", "Video file or directory of images. If set, the camera is not used. See General->videoFormats and General->imageFormats for available formats.");
PARAMETER(Camera, 6useTcpCamera, bool, false, "Use TCP/IP input camera.");
PARAMETER(Camera, 7IP, QString, "127.0.0.1", "The images server's IP to connect when useTcpCamera is checked.");
PARAMETER(Camera, 8port, int, 5000, "The images server's port to connect when useTcpCamera is checked.");
PARAMETER(Camera, 8port, int, 5000, "The images server's port when useTcpCamera is checked. Only one client at the same time is allowed.");
PARAMETER(Camera, 9queueSize, int, 1, "Maximum images buffered from TCP. If 0, all images are buffered.");
//List format : [Index:item0;item1;item3;...]