From f01eba78f1288c0934b76a46239d8e47e408b2c4 Mon Sep 17 00:00:00 2001 From: Ugo Pattacini Date: Wed, 27 Aug 2014 19:12:07 +0200 Subject: [PATCH] clean-up --- karmaLearn/main.cpp | 7 ++++--- karmaToolFinder/main.cpp | 13 ++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/karmaLearn/main.cpp b/karmaLearn/main.cpp index 76b0ccf..538807e 100644 --- a/karmaLearn/main.cpp +++ b/karmaLearn/main.cpp @@ -144,7 +144,7 @@ class KarmaLearn: public RFModule Semaphore mutex; RpcServer rpcPort; - Port plotPort; + BufferedPort > plotPort; /************************************************************************/ IMachineLearner *createLearner() @@ -361,7 +361,8 @@ class KarmaLearn: public RFModule if (predict(plotItem,input,output,variance)) { - ImageOf img; img.resize(320,240); + ImageOf &img=plotPort.prepare(); + img.resize(320,240); for (int x=0; x > imgInPort; - Port imgOutPort; + BufferedPort > imgOutPort; Port dataInPort; - Port logPort; + BufferedPort logPort; /************************************************************************/ bool read(ConnectionReader &connection) @@ -511,7 +511,9 @@ class FinderModule: public RFModule, public PortReader if (logPort.getOutputCount()>0) { - Vector log=p; + Vector &log=logPort.prepare(); + + log=p; for (int i=0; i