53 votes
Accepted

How is Gaussian Blur Implemented?

In convolution, two mathematical functions are combined to produce a third function. In image processing functions are usually called kernels. A kernel is nothing more than a (square) array of pixels (...
user avatar
  • 646
16 votes

How is Gaussian Blur Implemented?

Here is the best article I've read on the topic: Efficient Gaussian blur with linear sampling. It addresses all your questions and is really accessible. For the layman very short explanation: ...
user avatar
14 votes

How is Gaussian Blur Implemented?

In general, a convolution is performed by taking the integral of the product of two functions in a sliding window, but if you're not from a math background, that's not a very helpful explanation, and ...
user avatar
13 votes

Changing image so it would look like through colorful glasses

(XYZ) can be the RGB colour you want to tint your scene by. For the above scene it can be a red colour (1.0, 0.0, 0.0) or something similar with a strong red component. Bear in mind that since you ...
user avatar
12 votes

How is Gaussian Blur Implemented?

The most important thing to consider when implementing the Gaussian blur is, as others have pointed out, to separate the 2D convolution filter into two 1D convolutions because it brings the complexity ...
user avatar
  • 1,369
10 votes
Accepted

Detect in-focus regions of an image

it is quite easy to measure the local max frequency in an image (at least as a low resolution mask, with some regularization). Several papers of the MIT graphics group have been around detecting and ...
user avatar
10 votes
Accepted

Seamless Textures

For these types of algorithms, you usually have to rely on multiple forms of texture synthesis. That doesn't mean you have to generate the whole texture from scratch. For example, you could regenerate ...
user avatar
  • 1,323
9 votes
Accepted

What is bilateral upsampling?

It seems like you're asking two things. I can't really speak technically about JBU, but I can give an overview of the necessary concepts and bilateral filtering generally. You'll probably need to ...
user avatar
  • 1,790
9 votes
Accepted

What's a proper way to clamp dither noise?

TL;DR: 2*1LSB triangular-pdf dithering breaks in edgecases at 0 and 1 due to clamping. A solution is to lerp to a 1bit uniform dither in those edgecases. I am adding a second answer, seeing as this ...
user avatar
7 votes

Algorithms to Remove High Frequency Noise from Path Tracing

There are, and I am looking forward to seeing the specifics of other answers, but one way to deal with this is to not have the noise (or as much noise) in the source data to begin with. The noise is ...
user avatar
  • 7,341
7 votes

Relationship between spatial frequency of an image and Aliasing

Like in any other kind of signal processing, the relationship is Nyquist's theorem. An image is a discrete sequence of samples of a continuous signal. If the original signal has frequency components ...
user avatar
  • 6,450
6 votes
Accepted

Changing image so it would look like through colorful glasses

Extending Kostas Anagnostou's answer, a commonly used formula for desaturation is float value = 0.3 * InputR + 0.59 * InputG + 0.11 * InputB; This accomodates ...
user avatar
  • 2,223
6 votes
Accepted

How to perform an image normalization after for example adding a constant to it?

I believe that Zrep is the output range. In 8-bit it would be 255. Let's say fmin was 25, ...
user avatar
  • 3,331
6 votes
Accepted

reducing image size increases file size?

JPEG is a lossy format and depends on both the 2d frequency components of the image and the user specified quality level. It is possible that down-scaling an image can increase the higher frequency ...
user avatar
  • 2,244
6 votes

Making low discrepancy sequence noise textures, not LDS sample positions

In theory, it is possible to stuff every sample distribution into a texture to "pre-bake" it for fast access. The question is whether any of the results might be useful. For blue noise, this makes a ...
user avatar
6 votes
Accepted

Why does an affine transform work only on three of the corners?

An affine transformation doesn't have enough freedom to do what you want. Affine transforms can be constructed to map any triangle to any other triangle, but they can't map any quadrilateral to any ...
user avatar
  • 23.6k
5 votes

Unwinding an image on a spiral to make it long and flat

A quickly formulated method, read first one that popped in my brain (not best), could be. Find the closest points on a parametric spiral for each sample (read A Pixel Is Not A Little Square3). Then ...
user avatar
  • 8,169
5 votes
Accepted

Converting raster shape/blob into displacement map

One way I can think of is to make a "signed distance transform" of the image where there is information for each pixel about how far the pixel is to the closest surface of the shape. Since it's ...
user avatar
  • 7,341
5 votes
Accepted

Image rescaling algorithm

Explanation With a non-linear scale, you apply different weights for each pixel (or whatever unit you are using). You can use Euclidean distance towards the closest pixels in both directions to ...
user avatar
  • 1,323
5 votes
Accepted

Instagram's fade effect

The effect in the photo is very close to a simple scale-bias per pixel. After a bit of tweaking, I found that applying the transformation: $x' = 0.77x + 38$ to the raw pixel values (as bytes) gives ...
user avatar
  • 23.6k
5 votes

Improved Laplacian smoothing of noisy surface meshes

This is a quite common property of smoothing in 3D. When you have some data and you smooth it out you get some kind of average of the local variation. And this works fine, and stably, in one ...
user avatar
  • 8,169
5 votes

Explanation of a the transparency of an .EXR file

In an EXR, the convention is to store associated alpha, also known as premultiplied. The latter term however doesn't do justice to the nuances of the alpha format as compared to its evil distant ...
user avatar
  • 283
5 votes
Accepted

What kind of image processing was used in the Facebook "Celebrate Pride" filter?

The top Zuckerberg image looks like you first convert your background Zuckerberg image to grayscale. Then you can add a second layer with the rainbow texture but use the 'Screen' blending mode, this ...
user avatar
  • 2,244
4 votes

Image rotation algorithm

It speed does not matter, I suggest to use a truncated sinc or a Lanczos isotropic kernel: to compute a target pixel, you back-rotate the filter and convolve it with the image. Since it is isotropic, ...
user avatar
4 votes

How to detect a screen in a photo

The first things I would try is to see if smartphone pixels are visible (if the photo is high res) or if strange aliasing occurs (your example image shows both). Another classical test (but not ...
user avatar
4 votes
Accepted

How linear interpolation works between mipmaps?

It's called trilinear interpolation. You first do a bilinear interpolation of the higher-res texture, then do a bilinear interpolation on the lower-res texture, then interpolate between the 2 results. ...
user avatar
  • 3,331
4 votes
Accepted

Pixel dispersion (dissolving) algorithms

A very simple low memory approach If you really want to use as little memory as possible, it can be done with not much more memory than that required to store a single image (the first frame) ...
user avatar
  • 5,882
4 votes

Algorithms to Remove High Frequency Noise from Path Tracing

One technique you could use is break the image into blocks and measure each blocks variance - this way you can apply more samples to blocks with higher variance. The variance can be estimated by ...
user avatar
  • 2,244
4 votes
Accepted

CrazyBump Shape Recognition

Based on the article, it seems like, when it adds "directional lighting information", the program tries to infer a location of a light source and base the normals on the colors with the ...
user avatar
4 votes
Accepted

Tone Mapping & Gamma Correction

This depends on your calculations really, since you can do it either way. However, probably when you reach tone mapping you will be in linear space (i.e. no gamma correction has been done yet and you ...
user avatar
  • 1,437

Only top scored, non community-wiki answers of a minimum length are eligible