I am currently involved with processing Hyperspectral Datacubes using CUDA (spatiotemporal x wavelengths). At one step of our problem we needed to interpolate (maybe inpainting would be a better choice of words) an image using known values measurement values and their subpixel accurate locations. Output will contain measurements at integer pixel positions.
I am aware that using texture memory I can interpolate values (i.e. intensities) at float subpixel positions, however, what I am asking is not this but it’s complement. Furthermore, there is not a useful tractable transformation which will map my (input) subpixel positions onto a regular grid (If such a thing was possible I would project my subpixel measurement positions alongside my regular grid positions and use texture memory interpolation methods to interpolate image on my regular grid which is mapped to float subpixel positions.).
(1) Is there a reference design/sample or an implementation in other GPU accelerated libraries?
(2) If there is none, I have the following two plans which are very reminiscent of each other. Do they make sense? Is there a reason to pick one over other?
(2.i) I will build a k-NN graph containing subpixel positions and regular grid positions as nodes. Nodes with subpixel positions would have a label (their measurement value) and I could use a Semi-Supervised Learning algorithm like Label propagation which simply boils down to inverting a non-sparse large matrix (O(N^3) ???) using cuBLAS.
(2.ii) I may divide my regular grid in bins and figure which bins include which subpixel measurements and use all subpixel measurements in the bin (or 3x3 bins) for lerp or NN interpolation. Hopefully, I will do this by myself in CUDA.
(3) Is there anything else you guys would like to mention or point me to?