1D data interpolation
I'm new to OpenCv, and trying to perform interpolation operation just like interp1 in Matlab would do. Given x,y,xi, find yi accordinly,like this interp1 example (http://www.thphys.nuim.ie/CompPhysics....).
I came aross and found this void cv::cuda::remap() function in OpenCV, which was documented for bilinear interpolation by
DST[x,y] = SRC[xmap[x,y],ymap[x,y]]
After went through the Opencv examples (https://docs.opencv.org/3.4/d1/da0/tu...), I'm still not clear how to implement the interp1 opeartion exactly. More specifically, I'm not sure how to match the x,y,xi of interp1 into xMap and yMap of remap(). Can anyone gives me some insights on using Remap() for 1d interpolation? Thanks.
which problem are you trying to solve ? what is the purpose of the interpolation ? what kind of data ?
also: https://docs.opencv.org/master/d1/da0...
I'm doing image processing, and the image I acquired is from wavenumber space, and i need to convert them to frequency space. The way I do it is through a 3rd degree polynomial function. In the interp1 example i mentioned above, the interp1 would have the following parameters: x(the polynomial value in wavenumber space), y(the image in wavenumber space), and xi(the polynomial value in frequency spaced), so i am trying to find the yi( image in frequency space). If you dont know what I'm talking about, it does not matter, because what I'm trying to do is just 1-d interpolation, again, just like the Interp1 would do in MatLab. I have seem ppl asked about interp2 vs. remap() but none asked about interp1 vs remap(), so I'm actually not sure if remap() can be used as interp1.