High Quality Image Magnification on GPU - c++

I'm looking for interesting algorithms for image magnification that can be implemented on a gpu for real-time scaling of video. Linear and bicubic interpolations algorithms are not good enough.
Suggestions?
Here are some papers I've found, unsure about their suitability for gpu implementation.
Adaptive Interpolation
Level Set
I've seen some demos on the cell processor used in TVs for scaling which had some impressive results, no link unfortunately.

lanczos3 is a very nice interpolation algorithm (you can test it in the GIMP or virtualDub). It generally performs better than cubic interpolation and can be parallelized.
A GPU based version is implemented in Chromium:
http://code.google.com/p/chromium/issues/detail?id=47447
Check out chromium source code.
It may be still too slow for realtime video processing but maybe worth trying if you don't use too high resolution.

You may also want to try out CUVI Lib which offers a good set of GPU acceleration Image Processing algorithms. Find about it on: http://www.cuvilib.com
Disclosure: I am part of the team that developed CUVI.

Still slightly 'work in progress' but gpuCV is a drop in replacement for the openCV image processing functions implemented in openCL on a GPU

Prefiltered cubic b-spline interpolation delivers good results (you can have a look here for some theoretical background).
CUDA source code can be downloaded here.
WebGL examples can be found here.
edit: The cubic interpolation code is now available on github: CUDA version and WebGL version.

You may want to have a look at Super Resolution Algorithms. Starting Point on CiteseerX

Related

Dense optical flow for real time on hardware for 4K resolution #30fps

I am working on a hardware-based solution ( without GPU) for dense optical flow to get real-time performance # 30fps with decent accuracy. Something comparable to or better than NVIDIA’s optical flow SDK. Can someone please suggest good algorithms other than Pyramidal Lukas Kanade and horn Schunck. I found SGM as a good starting point but it’s difficult to implement on FPGA or DSP core. The target is to measure large displacements with occlusion as well as similar to real-world videos.
It would be great if someone could tell what exactly algorithm NVIDIA has used.
For dense optical flow estimation in real-time setup, FlowNet is a good option. It can achieve optical flow estimation at a higher FPS. You can take their trained model to perform inference. Since you want to run the estimation in a non-GPU environment, you can try converting the model to ONNX format. A good implementation of FlowNet is available in NVIDIA's Github repo. I am not sure exactly which algorithm NVIDIA is using in its SDK for optical flow.
The FlowNet2 is built upon previous work of FlowNet to compute large displacement. However, if you are concerned about occlusion then you may check out their follow up work on FlowNet3. Another alternative to FlowNet is PwC-Net.

Surface approximation based on RBF

I am looking for a way of approximating a surface based on a set of 3D data points. For this purpose I would like to use a method based on radial basis functions but I cannot find a free implementation in C++.
I looked in ITK, VTK and open CV but I did not find anything...
Does anyone knows a free implementation of such an algorithm ?
Any suggestion about the reconstruction of a surface based on a set of 3D data points is also more than welcome ! :)
3D surface reconstruction can be challenging. I would first recommend taking a look at PCL. The Point Cloud Library has grown into a nice set of tools for 3D point management and interpretation, and its license and API sound compatible with your needs. The surface reconstruction features of the library appear to be most applicable. In fact, RBF reconstruction is supported.
If PCL doesn't work, there are other options:
MeshLab,
This SO post provides a nice summary, and
of course, Wikipedia provides some links
Finally, you might search CiteSeerX, Google Scholar, etc. for papers like this one. As an example, a search for "3D Surface Reconstruction" at CiteSeerX yields many hits. RBF-based reconstruction is just one of many methods: is your application truly limited to radial basis functions? If not, there are many choices, (i.e. Ball Pivoting Algorithm). See this survey paper for some comparisons.

Best stereo correspondence algorithm in opencv

Well, I have got a stereo setup where it computes the disparity of stereo image pairs using SGBM(Semi-global block matching), BM(Block matching) and Variational matching algorithm using the OpenCV library. But the disparities are not so good as that of the ground truth disparities.
All I wanted to know is, whether opencv provides any function or a program that could compute the ground truth disparity. As per some papers like "A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms" by Daniel Scharstein and Richard Szeliski says that Belief Propagation algorithm is the best stereo correspondence algorithm.
Is there any existing code that computes disparities using graph-cut algorithm or belief propagation algorithm in opencv.
I don't think that there is in OpenCV, but you do have alternatives. There is C++ code available, and it wouldn't be hard to make it interact with OpenCV:
In the Middlebury stereo website that include graph cut and
belief propagation for stereo
There is also Graphcut code from the
University of Western Ontario which is really good.
I think Semi Global Block Matching algorithm by Hirshmuller is one of the best stereo correspondence algorithm.
This algorithm is provided in OpenCV library.
The OpenCV implementation of belief propagation is only offered for GPU (CUDA and OpenCL), not for CPU implementations. They also have the constant space variant of believe prop.
The Middlebury website keeps an updated state of the art on these algorithms, so keep an eye for new entries.
yeah, TSGO is not open sourced, and its article("Accurate Stereo Matching by Two-Step Energy Minimization") is not free either. Has anyone evaluated it?
There is an opencv implementation for GraphCut one and seems quite good, it deserves a try. http://daily-tech.hatenablog.com/entry/2016/06/25/233203

Speedup Image comparison

I'm looking for an algorithm, that would do image comparisons at real time, basically on images acquired from a webcam (like 30 frames/second). My current implementation is pretty slow, tired to improve it by dropping a few frames and reducing the resolution -- but with no success.
So, I'm exploring options like using better algorithms like Key-point Matching etc. And on a different note, I'm also looking for a GPU based image comparison sample implementations (either DirectX or OpenGL APIs).
Have you tried Perceptual Image Diff?
I didn't read the entire thread but it may help you somehow
Image comparison - fast algorithm

SIFT, HOG and SURF c++, opencv

I have a simple question, which I want to know, what kind of libraries are available and can give good results for implementing SIFT, HOG(Histogram Oriented Gradient) and SURF in c++ or opencv?
Hence: 1- Give me the link for the code if you can, which I will be so appreciated.
2- If you know one of them or any kind of information to lead me to what I want, I will be so appreciated as well.
Thanks
check these:
surf
- great article
http://people.csail.mit.edu/kapu/papers/mar_mir08.pdf
sift
- great source, I tried it on the iPhone
http://blogs.oregonstate.edu/hess/
- fast - fast corner detection library
http://svr-www.eng.cam.ac.uk/~er258/work/fast.html
Example of surf code in openCV
https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/cpp/matching_to_many_images.cpp
Not sure if this is still relevant, but you also get two implementations of computing HOG descriptors in opencv i.e. both GPU and CPU versions of the HOG code.
for the CPU version you can check this blog post
however in the CPU version you would need to write your own logic for sliding windows.
and the GPU version is fairly straightforward you can read the documentation here
Might help you to know that SIFT and SURF implementations are already integrated into OpenCV.
http://opencv.willowgarage.com/documentation/cpp/features2d__feature_detection_and_descriptor_extraction.html
Be careful about OpenCV implementations, because latest versions of OpenCV have classified SIFT and SURF implementations as nonfree http://docs.opencv.org/modules/nonfree/doc/nonfree.html.
Now you can use them, but probably they are subject to licensing and cannot be used for commercial solutions.
This one uses descriptors based on HoG, Sobel and Lab channels for detection Class-Specific Hough Forests for Object Detection (opencv/c source code).
Rather then performing detection at every possible location this approach calculates a vote for each descriptor, then when putted together they produce a voting cloud where maximum will correspond to most probable location of the target. When combined with cvGoodFeaturesToTrack can produce very good results, even with a small training database.