diff options
author | Kevron Rees <tripzero.kev@gmail.com> | 2013-03-14 17:33:38 -0700 |
---|---|---|
committer | Kevron Rees <tripzero.kev@gmail.com> | 2013-03-14 17:33:38 -0700 |
commit | aacfcec158cbb7411be7c337e0c8f51f0ba2ccfe (patch) | |
tree | 8a834e4540537cd7fea8abed023c57d5d03ba6aa | |
parent | f474f51e8352768f8e8af9136060e53b61d25e17 (diff) | |
download | automotive-message-broker-aacfcec158cbb7411be7c337e0c8f51f0ba2ccfe.tar.gz |
fix for opencv plugin
-rw-r--r-- | plugins/examplesink.cpp | 3 | ||||
-rw-r--r-- | plugins/opencvlux/opencvluxplugin.cpp | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/plugins/examplesink.cpp b/plugins/examplesink.cpp index 659771c3..86b3a8d9 100644 --- a/plugins/examplesink.cpp +++ b/plugins/examplesink.cpp @@ -54,7 +54,8 @@ void ExampleSink::supportedChanged(PropertyList supportedProperties) velocityRequest.property = VehicleProperty::VehicleSpeed; velocityRequest.completed = [](AsyncPropertyReply* reply) { - DebugOut()<<"Velocity Async request completed: "<<reply->value->toString()<<endl; delete reply; + DebugOut()<<"Velocity Async request completed: "<<reply->value->toString()<<endl; + delete reply; }; routingEngine->getPropertyAsync(velocityRequest); diff --git a/plugins/opencvlux/opencvluxplugin.cpp b/plugins/opencvlux/opencvluxplugin.cpp index 18f231c1..e5ee9fc9 100644 --- a/plugins/opencvlux/opencvluxplugin.cpp +++ b/plugins/opencvlux/opencvluxplugin.cpp @@ -186,15 +186,15 @@ static int grabImage(void *data) { OpenCvLuxPlugin::Shared* shared = static_cast<OpenCvLuxPlugin::Shared*>(data); -/* if(kinect) + cv::Mat m_image; + + if(shared->kinect) { - m_capture->grab(); - m_capture->retrieve( m_image, CV_CAP_OPENNI_GRAY_IMAGE ); + shared->m_capture->grab(); + shared->m_capture->retrieve( m_image, CV_CAP_OPENNI_GRAY_IMAGE ); } - else*/ + else { - cv::Mat m_image; - *(shared->m_capture) >> m_image; uint lux = evalImage(m_image,shared); @@ -218,7 +218,7 @@ static uint evalImage(cv::Mat qImg, OpenCvLuxPlugin::Shared *shared) cv::Scalar avgPixelIntensity; - if(useOpenCl) + if(shared->useOpenCl) { #ifdef OPENCL cv::Scalar stdDev; @@ -227,7 +227,7 @@ static uint evalImage(cv::Mat qImg, OpenCvLuxPlugin::Shared *shared) } else { - cv::Scalar avgPixelIntensity = cv::mean(qImg); + avgPixelIntensity = cv::mean(qImg); } |