Questions tagged [bilinear-interpolation]

89 questions
1
vote
1 answer

logical error in Linear interpolation in python

My linear interpolation has some logical error, it works for certain cases but not completely working. I have tried to use different way to write the logic for the cases of extrapolation. def interpolate(x, y, x_test): for i in range(len(x)): …
BCKN
  • 191
  • 1
  • 2
  • 12
1
vote
1 answer

OpenCV bilinear downsampling with non-integer scaling

I need help in figuring out the algorithm/implementation OpenCV is using for image-downsampling with non-linear scaling factors. I know the question was already ask a few times, but most answers seem to not match OpenCV's implementation (for…
1
vote
1 answer

Does bilinear/bicubic interpolation operate on each color channel independently?

I'm using scipy.ndimage.interpolation.zoom with either bilinear interpolation or bicubic interpolation (order=1 or 3, if I'm correct). https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.ndimage.interpolation.zoom.html When working…
David Parks
  • 30,789
  • 47
  • 185
  • 328
1
vote
0 answers

How is bilinear interpolation implemented in OpenCV?

I was going through OpenCV remap() implementation. I am particularly interested in bilinear interpolation. I am bit overwhelmed with the complexity of the implementation. I couldn't find any documentation which explains the implementation. Where can…
1
vote
1 answer

bilinear interpolation for angles

I have a 2d array of directional data. I need to interpolate over a higher resolution grid however the ready made functions like scipy interp2d, etc don't account for the discontinuity between 0 and 360. I have code for doing this for a single grid…
RH_data_maths
  • 333
  • 3
  • 12
1
vote
1 answer

2d Dictionary or lookup table?

I'm not entirely sure what to call what I need. I have this data in a CSV file and in an SQL database. What I need to do is to be able to use the table to bilinear interpolate. So when say d = 2.5 and HVL = 1.6 what is the best way to solve this?…
James
  • 73
  • 1
  • 12
1
vote
0 answers

Using cv.remap (mexopencv) instead of interp2 (MATLAB)

I am experimenting with the mexopencv project that allows using the OpenCV library from MATLAB .m files in order to compare the performance of the native MATLAB functions with the OpenCV functions I would like to substitute a call to the MATLAB…
Florian Wolters
  • 3,820
  • 5
  • 35
  • 55
1
vote
1 answer

Error when doing bilinear interpolation with `interp2 {pracma}`; any better way for 2D interpolation?

I am trying to perform 2d interpolation on a table named vol_coarse. install.packages("install.load") install.load::load_package("pracma", "data.table") vol_coarse <- data.table(V1 = c(3 / 8, 1 / 2, 3 / 4, 1, 1 + 1 / 2, 2, 3, 6), V2 = c(0.50, 0.59,…
iembry
  • 962
  • 1
  • 7
  • 23
1
vote
2 answers

What is wrong with my bilinear interpolation algorithm?

I am using PHP to test out my bilinear algorithm. The code is un-optimized for clarity. Here is what the code below is doing: Plot the original pixels from the 2x2 image to the 10x10 destination image. These will leave blank pixels. Note: The…
kosinix
  • 1,779
  • 1
  • 18
  • 22
1
vote
1 answer

Draw heat map (or similar) of 2D population distribution

I am wondering how I can draw an image of the population proportion (pop.prop) at these locations (x and y) so that I can see the population distribution clearly? The data is shown below: pts.pr = pts.cent[pts.cent$PIDS==3, ] pop =…
1
vote
1 answer

Bilinear Image Sampling Non-Reproducible Access Violation

I have a template 2D image buffer class that can be used with many values types. The values are stored as a 1D dynamic array of T, accessed by a Row method to get a pointer to the correct row. One of the methods of the class is used to sample a…
1
vote
1 answer

Bilinear and bicubic interpolation of 2D matrix in matlab

I am trying to apply Bilinear and bicubic interpolation on my data set which is stored in text files. These text files are in a folder and are named output_00.text to output_23.text. Each text file consist of three columns. First is Latitude, second…
0
votes
1 answer

How do you implement bilinear interpolation of colors using JavaScript?

I need help understanding if there is a better way to do a bilinear interpolation than that I've tried below. I used the Culori library's interpolate() function. I want to bilinearly interpolate colors but I'm not sure if its really correct to first…
0
votes
1 answer

How can I interpolate 3D data (a z-value at each point defined by coordinates x, y) to make it higher-resolution?

I have surface radiation values (z, sw_radiation ) on a grid of longitude (x, longitude) and latitude (y, latitude) coordinates. The coordinates are 1-degree resolution. I want to interpolate the data to increase it to 0.5-degree resolution,…
0
votes
0 answers

Bilinear interpolation & modifying and reversing

I'm working on some software that's for performance tuning Subaru's. The software takes logged parameters from the vehicle, graphs it on a scatter plot against the X axis (engine RPM), and allows for drag/drop adjustment. The adjustments are made on…