Reputation: 951
Require image denoising. Try it with OpenCV and got very bad performance ~30s per image!
try to use:
cv::fastNlMeansDenoising
cv::fastNlMeansDenoisingColored
cv::xphoto::dctDenoising
images : maxsize(1024x1024) colred 3 channel
sample of calling:
Mat src;
cv::imread("myfileName.jpg", src); //assume it's 1024x768 photo
Mat trg(src.size(),src.type());
cv::xphoto::dctDenoising(src,trg,15); // sygma 15 got from algorithm's site as balanced value
All works well but VERY slow.
My configuration:
Lenovo T510, core i7
Windows 10
OpenCV 3.0.0 (sources - latest - stable)
TBB (latest bin from official site)
OpenCV built with VS2015 with default CMAKE setting without "world" module and WITH_TBB, all TBB dirs set well to (.../ia32/vc12)
(For first look i thought that problem is that my opencv built without TBB, but TBB not help with denoising)
Resources:
During execution CPU loaded up to 100% all cores (so multiprocessing in work)
Uses up to 14 threads (so mutithreading is in work)
Is where way to fix this performance issue or it's real speed of denoising with OpenCV?
May be it's some issues with C++ settings my console app built (i'm from .net world and C++ is not so familiar for me)?
Upvotes: 6
Views: 4150
Reputation: 9
The processing is slow because it has to handle many things. But if you reduce the search window or template window size, it will be faster. However, the accuracy may not be as good as before. One simple suggestion is to use the offline mode and save the results in a different file for later use. it works especially when you want to reduce noise from video frames.
Upvotes: 0
Reputation: 951
Answer was simple - i was using Debug version of opencv (how it's usual for .net) but for C++ performance vary dramatically between Debug and Release configuration.
After remapping to Release build i have duration nearby 5s per image. It's not so fast i was expected but it's usable.
Upvotes: 4