00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00040 #include <stdio.h>
00041 #include <stdlib.h>
00042 #include <iostream>
00043 #include <QDebug>
00044
00045 #include <QVApplication>
00046 #include <QVMPlayerCamera>
00047 #include <QVDefaultGUI>
00048 #include <QVImageCanvas>
00049
00050 #include <QVPolyline>
00051 #include <QVMatrix>
00052
00053 #include <qvdta/qvdta.h>
00054 #include <qvip/qvip.h>
00055 #include <qvippworkers.h>
00056
00057
00058
00059 #ifndef DOXYGEN_IGNORE_THIS
00060
00061 #define IMAEG_ROISIZE(Image) ((IppiSize){ Image.getROI().width(), Image.getROI().height() })
00062
00063 class TestWorker: public QVWorker
00064 {
00065 public:
00066 TestWorker(QString name): QVWorker(name)
00067 {
00068 addProperty< QVImage<uChar,1> >("Input image", inputFlag);
00069 addProperty<int>("Input value", inputFlag, 4, "", 0, 255);
00070
00071 addProperty< QVImage<uChar,1> >("Output image", outputFlag);
00072 addProperty<int>("Output value", outputFlag, 4, "", 0, 255);
00073 }
00074
00075 void iterate()
00076 {
00077 setPropertyValue< QVImage<uChar,1> >("Output image", getPropertyValue< QVImage<uChar,1> >("Input image"));
00078 setPropertyValue< int >("Output value", getPropertyValue< int >("Input value"));
00079 }
00080 };
00081
00082 int main(int argc, char *argv[])
00083 {
00084 QVApplication app(argc, argv,
00085 "Example program for QVision library. Obtains several features from input video frames."
00086 );
00087
00088 qvippCopyP3C3Worker("P3C3");
00089 TestWorker testWorker("Test Worker"), testWorker2("Test Worker 2");
00090 QVMPlayerCamera camera("Video");
00091
00092 camera.link(&testWorker,"Input image");
00093 testWorker2.linkProperty("Output image", &testWorker, "Input image", QVWorker::SynchronousLink);
00094 testWorker2.linkProperty("Output value", &testWorker, "Input value", QVWorker::AsynchronousLink);
00095
00096 QVDefaultGUI interface;
00097
00098
00099
00100
00101 QVImageCanvas testCanvas("Alberto");
00102 testCanvas.linkProperty(testWorker,"Output image");
00103
00104 return app.exec();
00105 }
00106
00107 #endif