Questions tagged [bicubic]

Bicubic interpolation is an extension of cubic interpolation for interpolating data points on a two dimensional regular grid. The interpolated surface is smoother than corresponding surfaces obtained by bilinear interpolation or nearest-neighbor interpolation. Bicubic interpolation can be accomplished using either Lagrange polynomials, cubic splines, or cubic convolution algorithm.

80 questions
4
votes
1 answer

openCV bicubic imresize creates negative values

I noticed that when downsampling matrices in openCV using the bicubic interpolation I get negative values even though the original matrix was all positive. I attach the following code as an example: // Declaration of variables cv::Mat M, MLinear,…
CV_User
  • 1,183
  • 2
  • 12
  • 20
4
votes
3 answers

Explanation of Bicubic interpolation in Matlab?

I am confused by Matlab's example on Bicubic interpolation at http://www.mathworks.com/help/vision/ug/interpolation-methods.html#f13689 I think I understand their Bilinear example. It seems like they took the averages of the adjacent translated…
ThinkFlow
  • 161
  • 1
  • 3
  • 16
4
votes
1 answer

IE6 image scaling with bicubic filter

I have a project where I have to resize some images in the actual browser side. IE8, FF3 et al all apply a filter to smooth the resizing of the image, so in these browsers everything looks good. In IE7 I have applied the following fix which works…
rickhuby
  • 174
  • 10
3
votes
2 answers

How to convert kernel to matrix notation?

I'm trying to understand the bicubic convolution algorithm and haven't been able to understand how the kernel given as a piece wide function, is turned into this matrix: I understand to arrive at the matrix a was set to -0.5. No matter how I…
K Sco
  • 51
  • 7
3
votes
1 answer

Python: bicubic interpolation with GPU

In python, I was using scipy.ndimage.zoom to perform bi-cubic interpolation on an image but found that it is too slow on up-sampling. I would like to replace it with some other python libraries with GPU support but unfortunately I cannot find one…
chesschi
  • 666
  • 1
  • 8
  • 36
3
votes
0 answers

Bicubic Interpolation on Scattered Data in Matlab

I was wondering if there is a way to do bicubic interpolation on a scattered data set (2d)? I did some online searches and figured out that bicubic patches (not sure what these are) need to be fitted on scattered data. Not sure how to proceed from…
Prakhar Mehrotra
  • 1,215
  • 4
  • 16
  • 21
3
votes
1 answer

Massive artifacting in bicubic interpolation; how to fix?

I'm trying to implement a bicubic interpolation algorithm to reconstruct higher-resolution data from a heightmap. After some falstarts and sets of instructions containing nearly-incomprehensible math (it's been some years since I had calculus and I…
2
votes
0 answers

Positional embedding for larger images fed to ViT

Pre-trained ViT (Vision Transformer) models are usually trained on 224x224 images or 384x384 images. But I have to fine-tune a custom ViT model (all the layers of ViT plus some additional layers) on 640x640 images. How to handle the positional…
2
votes
2 answers

Bicubic Interpolation for Non-regular grids?

I am working on a project where I have a set of known measurements (x,y,z,a) and an input (z,a). I need to be able to interpolate the (x,y,z) so that I can get a list of possible (x,y) coordinates from a given z. I was looking at bicubic…
FlyingStreudel
  • 4,434
  • 4
  • 33
  • 55
2
votes
1 answer

In pillow library, BICUBIC is not working

This is my code. import sys, os import numpy as np import matplotlib.pyplot as plt from PIL import Image from scipy import * sys.path.insert(0, 'C:/research') im = Image.open('C:/research/1.jpg') hei, wei = im.height, im.width im_bicubic =…
ONION
  • 239
  • 1
  • 4
  • 13
2
votes
2 answers

Bi-cubic interpolation for image scaling

I'm trying to implement a very basic Bi-Cubic algo to use it for image scaling. I used other questions on stack overflow and tried to just translate the code into the Python. It executes correctly w/o any errors, I've checked the math a couple of…
Gtzzy
  • 519
  • 4
  • 18
2
votes
4 answers

How can I best improve the execution time of a bicubic interpolation algorithm?

I'm developing some image processing software in C++ on Intel which has to run a bicubic interpolation algorithm on small (about 1kpx) images over and over again. This takes a lot of time, and I'm aiming to speed it up. What I have now is a basic…
neuviemeporte
  • 6,310
  • 10
  • 49
  • 78
2
votes
2 answers

Java 2D Array Bicubic Interpolation

I have recently been playing around with Bicubic Interpolation, as I am wanting to generate the earth, based on real heightmaps inside Minecraft. The reason I am using the interpolation, is because I would like to make the world have more detail.…
user3853021
2
votes
1 answer

Java AWT/ImageIO: Bilinear and Bicubic scaling of a JPEG image result in completely black output

Nearest neighbor scaling works: The entire picture stays intact when I use TYPE_NEAREST_NEIGHBOR. Even though it is Scala code, all used libraries are standard Java libraries. Functions: def getBufferedImage(imageFile: java.io.File): BufferedImage =…
ideaboxer
  • 3,863
  • 8
  • 43
  • 62
2
votes
0 answers

Bicubic interpolation giving wrong results

I'm trying to implement bicubic interpolation for image transformation like scaling and skewing, but the image output seems inaccurate. The interpolated pixels are sometimes overflowing beyond 255. Here is the code: #include #include…
vito
  • 473
  • 1
  • 7
  • 17