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
25
votes
5 answers

Android: Bitmap resizing using better resampling algorithm than bilinear (like Lanczos3)

Is there any way or external library that can resize image using Lanczos (ideally) or at least bicubic alg. under Android? (faster is better of course, but quality is priority, a processing time is secondary) Everything what I've got so far is…
Jolinar
  • 866
  • 8
  • 16
22
votes
6 answers

How do you do bicubic (or other non-linear) interpolation of re-sampled audio data?

I'm writing some code that plays back WAV files at different speeds, so that the wave is either slower and lower-pitched, or faster and higher-pitched. I'm currently using simple linear interpolation, like so: int newlength =…
MusiGenesis
  • 74,184
  • 40
  • 190
  • 334
18
votes
2 answers

How to draw and scale a bitmap on a canvas using bicubic interpolation in Android?

I want to draw a bitmap on a canvas with bigger size than it is. I can use canvas.drawBitmap(bitmap, null, destRect, null); but that gives a poor quality, as the result is pixelated, if the source image is sightly smaller than the destination…
user301895
18
votes
1 answer

Pixel art in HTML5 canvas is blurry when scaled up

I am trying to make a pixel art themed game in HTML5 canvas, and as part of that I take 10x20 or so sized images and draw them onto the canvas with the following code: ctx.drawImage(image, 20, 20, 100, 200); However the canvas uses bicubic image…
dagronlund
  • 1,612
  • 3
  • 13
  • 15
15
votes
8 answers

Efficient Bicubic filtering code in GLSL?

I'm wondering if anyone has complete, working, and efficient code to do bicubic texture filtering in glsl. There is…
Vern Jensen
  • 3,449
  • 6
  • 42
  • 59
14
votes
3 answers

Cubic/Curve Smooth Interpolation in C#

Below is a cubic interpolation function: public float Smooth(float start, float end, float amount) { // Clamp to 0-1; amount = (amount > 1f) ? 1f : amount; amount = (amount < 0f) ? 0f : amount; // Cubicly adjust the amount value. …
Rob
  • 1,687
  • 3
  • 22
  • 34
11
votes
4 answers

Bi-Cubic Interpolation Algorithm for Image Scaling

I'm trying to write a basic bicubic resize algorithm to resize a 24-bit RGB bitmap. I have a general understanding of the math involved, and I'm using this implementation from Google Code as a guide. I'm not using any external libraries here - I'm…
Channel72
  • 24,139
  • 32
  • 108
  • 180
8
votes
1 answer

Bicubic interpolation artifacts (image upscale)

I am using a bicubic interpolation algorithm in order to upscale an height map, and I am noticing some artifacts around the pixels boundaries. However, these artifacts don't seem to appear when I use a simple cubic interpolation (spline). Could it…
deck
  • 343
  • 2
  • 11
7
votes
4 answers

Bicubic Interpolation?

I looked through the internet, and in terms of Bicubic Interpolation, I can't find a simple equation for it. Wikipedia's page on the subject wasn't very helpful, so is there any easy method to learning how Bicubic Interpolation works and how to…
Nicholas Pipitone
  • 4,002
  • 4
  • 24
  • 39
5
votes
1 answer

How to compute inner control points for C2 continuous bicubic Bezier surface patches

I am trying to compute control points for a bicubic Bezier surface of smoothly joining tubes. This example gives 16 control points for a respective Bezier patch (in the syntax of OpenSCAD): [[[ 2 , 2 , 0], [2.5, 1.5, 0], [3.5, 1 , 0], [4, 1 ,…
Barvarian
  • 51
  • 2
5
votes
1 answer

How does bicubic interpolation work?

After reading text about this said topic, i found out that it considers 16 of the original neighboring pixels. What i want to know is how does it compute the color value of the new pixel. If the color values of the 16 pixels are known, how could you…
aidriiyan
  • 59
  • 1
  • 1
  • 3
5
votes
1 answer

Implementation of Bi-Cubic resize

I've been attempting to code a Bi-Cubic resize algorithm for in-memory bitmaps. I'm familiar with how bi-cubic interpolation works, and I've used both the Wikipedia article and existing implementations as a guide towards coding my own version. The…
Channel72
  • 24,139
  • 32
  • 108
  • 180
5
votes
4 answers

Java 2D Image resize ignoring bicubic/bilinear interpolation rendering hints (OS X + linux)

I'm trying to create thumbnails for uploaded images in a JRuby/Rails app using the Image Voodoo plugin - the problem is the resized thumbnails look like... ass. It seems that the code to generate the thumbnails is absolutely doing everything…
madlep
  • 47,370
  • 7
  • 42
  • 53
4
votes
2 answers

Bicubic interpolation in C

im trying to deal with the bicubic image interpolation in c. Therefore i've built this small script. 1. the "resize_image"-function: void resize_image(PPMImage *source_image, PPMImage *destination_image, float scale) { uint8_t…
Felix K.
  • 101
  • 2
  • 6
4
votes
0 answers

Bicubic Interpolation - Correct Separation

I am trying to implement Bicubic image interpolation using cubic splines and the generalized formula for interpolation. I was able to implement this by using all 16 surrounding pixels and calculate the interpolation coefficients from these 16…
M0rgenstern
  • 411
  • 1
  • 6
  • 18
1
2 3 4 5 6