Main page
List of articles

How do out-of-focus areas look like?
Theory of bokeh, ni-sen and other weird phenomena


Sometimes blurry twigs become double in photographs, making the entire picture quite unpleasant. Sometimes twigs are represented by tubules. In such cases, photographers often say that the lens displays very poor bokeh. This Japanese term serves to describe how out-of-focus areas are rendered in a picture. Bokeh is responsible for not only double images, but other interesting phenomena as well. Double-line twigs are just an example of bad bokeh. Sometimes this special case is also called ni-sen, which is another Japanese word commonly used in the theory of photography.

Some examples of poor bokeh can be found even in photographs by famous authors (see the portrait of Albert Camus (1947) by Henri Cartier-Bresson).

This article attempts at giving rather simple explanations to such kind of effects. The readers can not only learn the theory but also carry out simple experiments with the help of any suitable image processor, such as Adobe Photoshop or Paint Shop Pro.

The crucial role of the lens

Bokeh depends on many various factors. However lenses are major contributors to it.

If we take a picture of a small bright point located within the out-of-focus area, we will see that it will turn into rather a large disc that is called the circle of confusion. According to the theory, the appearance of that disc determines how out-of-focus objects are rendered in a picture. Figure 1 demonstrates the main types of such discs on the assumption that the lens aperture is perfectly round. Under each image, there is a curve that shows how brightness changes along the diameter of the spot. Such a curve is called "a point spread function" or PSF, but we are not going to use this term in this article in order to keep things simple.

Figure 1

1. Type A. An evenly illuminated disc. This case relates to almost perfect lenses without any signs of spherical aberration. Such lenses are sharp and artistic at the same time. Nevertheless they still can produce unpleasant backgrounds. We will discuss the related details a little bit later.

2. Type B. Discs with well-defined edges and spots in the center. Spherical aberration was not successfully corrected in such lenses. They can be pretty sharp; however their sharpness sometimes looks unnatural, because image points are rendered as doughnuts. The uneven structure of the Type B discs often causes bad-looking bokeh, including double-line streaks. By the way, the Unsharp Mask filter, which can be found in almost any image-processing software, also uses masks that are somewhat similar to the discs of Type B.

3. Type C. Discs with fuzzy edges. Brightness changes gradually along the disc. Such kind of unsharp circles are produced by soft lenses. However their softness is compensated by very pleasant bokeh. They never render double lines in the pictures.

It is very important to understand that there is always a trade-off between sharpness and good bokeh. On the one hand, sharp images consist of elementary points that look like tiny sharp peaks. On the other hand, those elementary points should be smooth and dome-shaped to produce good bokeh. Only soft lenses cannot split twigs in the background reliably. Thus, designers have to reach a successful compromise to produce a perfect lens. That is where professional skills become art.

Lenses may have different circles of confusion at different f-stops. Moreover, the type of the blurry disc may be different in the foreground and in the background. As an example, Harold Merklinger describes Rodenstock Imagon in his famous article [2]. This lens renders Type B circles in the foreground and Type C circles in background. Unsharp discs can also be different in different parts of the image. If a photographer wants to have pleasant-looking out-of-focus areas in his pictures, he has to learn all such details about his optical equipment.


Bokeh and visual illusions

Surprisingly, in some cases double-line streaks can be attributed to visual illusions. It is a fact that abrupt changes in brightness patterns can produce illusory curves in a picture.

Two examples of this phenomenon are shown in Figure 2. The graphs under the gradient rectangles show how brightness changes along the images.

Figure 2
  The eye perceives two dark vertical lines in the first image and two light vertical lines in the second. They are located at the points marked by the arrows. Those are the points where brightness abruptly starts or ceases to be constant. The perceived brightness is shown by the blue and yellow dashed curves correspondingly. However the actual curves are absolutely flat.

Generally speaking, unsharpness often produces gradients. In their turn, gradients often can be blamed for illusory effects. Figure 3 is an obvious illustration to this.

Figure 3
  The square is filled with regular gradients from the center to the sides. The most surprising fact is that bright diagonals do not exist! If we measure illumination along the A-A line, we will fail to detect any bright spots at the intersection points.

This phenomenon is also described by Harold Merklinger (see Figure 5 in [2]).

Please keep in mind the described illusion while reading the rest of the text.


Studying ni-sen with the help of image processing software

Some rigorous scientific approaches to bokeh and ni-sen will be described in the next section. Here we will discuss a couple of approximate but obvious methods. I hope that even those of you who hate math and physics will be able to catch on to the basic ideas.

Our main instrument will be the blur filters that can be found in many image processing programs, such as Photoshop, Paint Shop Pro, and many others. Personally I used Photoshop 6.0 for this article.

Experiment #1

In our experiments we are going to use three objects (see Figure 4):

- rather a long vertical rectangle to represent a twig (in the center);
- a triangle to represent a twig of variable width (on the right);
- a curved figure to make our demonstration more obvious (on the left).

Figure 4

To simulate blurring with an evenly illuminated circle of confusion (Type A), Motion Blur filter was selected. Since it works only in one direction, Angle should be set to zero. The Distance parameter corresponds to the diameter of the circle of confusion.

Now let us apply this filter to our images. If Distance is not zero, the upper part of the side images doubles. When Distance is big enough (e.g. D = 17, see Figure 4), two distinct streaks within the central rectangle become visible.

Feel free to copy the picture to your image processing program and carry out your own experiments.

Please pay attention to the fact that if we measure brightness along the A-A' line with the Eyedropper tool, we will not be able to detect any trace of splitting. Thus, we can say that we deal with visual illusions in this case.


Conclusion #1: Even Type A circles of confusion can result in visual splitting of lines in a picture. The thinner the line, the smaller the circle is required to produce double streaks. This effect can be mainly attributed to illusions related to peculiarities of visual perception.


Experiment #2

Figure 5

Now let us modify our initial test images. The shapes will remain unchanged. All we are going to do is to add white edges to them (see Figure 5).

Apply the Motion Blur filter to our new test images. The comparison of Figure 5 to Figure 4 shows that splitting became more distinct. It is little wonder, because double streaks can be technically detected now (see the brightness curve at the bottom of Figure 5).

The conclusion #2 is quite simple: some objects are more susceptible to splitting than the others. According to our terminology, objects can also be of Type A, Type B or Type C. Objects with highlighted edges or aureoles are more likely to be split in the out-of-focus area. Such Type B objects can be poorly rendered even by high quality lenses with circles of confusion of Type A.


Conclusion #3: Any additional accessories that are attached to the lens can produce halo effects, so they can spoil bokeh. Photographers should avoid using cheap accessories of low quality.


Experiment # 3 

Let us apply the Gaussian Blur filter to our test objects (Figures 4 and 5). As you can find out during your experiments, double streaks do not appear in this case. This is a natural result, because the Gaussian curve is quite smooth. It is similar to circles of confusion of Type C.

Conclusion #4: This experiment proves that lenses with the circles of confusion of Type C are very unlikely to cause splitting if twigs in a picture.


Additional Experiment #4

We saw that blurring may produce additional lines in a picture. Strangely enough, sometimes blurring can also decrease the number of lines in an image. Our next experiment will demonstrate this effect.

Figure 6

Let us apply the Motion Blur filter to the target shown at the top of Figure 6 (Angle = 0).

When Distance = 23, strange changes happen to our image. Now we can see only four dark strips instead of five. One strip has disappeared!

Moreover, the black and white strips have switched places. Now the four dark strips are located where we could see white gaps in the initial picture.

If we increase Distance again (i.e. make the image more blurry), we will see that the number of strips continues decreasing. When Distance = 39, only three dark strips are left (see Figure 6).

This phenomenon can be obtained in actual photography as well. Please read Chapter 6 in [3] to learn the details.


Mathematical models of bokeh
(brief notes for those who likes physics and mathematics)

This section deals with some general ideas related to the strict mathematical description of bokeh. If you consider math to be boring, simply skip this part of the article or read it selectively.

If we want to see how a blurry image looks like at a certain distance from the focusing point, we have to substitute its elementary points with their respective circles of confusion. In mathematics this operation is known as convolution:

In this formula g(x,y) stands for the object, h(x,y) is a function that describes how brightness changes within the circle of confusion, f(x,y) is the resulting image.

It may be quite difficult to make exact calculations based on this formula. In many cases computer simulations give quicker and more convincing results. The simplest approach is to use the Customs Filter from Photoshop (Filter -> Other -> Custom). It provides the 5 x 5 matrix to describe circles of confusion. A slightly bigger matrix (7 x 7) can be found in the free Custom Convolution Filter, produced by Reindeer Graphics Inc. The results of computer simulations carried out with the help of this filter are shown in Figure 7.

Figure 7

The initial target (the leftmost frame) consisted of two wedges, one of which is surrounded by the white contour. On the black strip you can see various types of the circles of confusion used during experiments. If you want to see the details please download the picture to your favorite image processing program and analyze it at a convenient magnification.

Here again we see that the A(4) shape, which is very close to the circle, is the best performer among peers of the A group. It produces the minimal splitting of the thin lines. The B shape gives the worst picture with distinct double-line streaks. The C disc is the absolute winner, since it blurs the lines smoothly without any trace of doubling.

The wedge with the white contour tends to split to a greater extent, other things being equal. This result is easy to predict, if we recall that convolution is a commutative operation.

g * h = h * g.


1. The appearance of blurred images in the out-of-focus area depends on many factors, the most important of which are:

— properties of the lens,
— properties of the object,
— qualities of additional optical accessories,
— peculiarities of human visual perception.

As appears form the above, even a very expensive high-quality lens may produce a bad-looking images in the out-of-focus area.

2. To be sharp and to produce a good-looking bokeh, lenses should render bright points as evenly painted circles. If blurry points are shown as doughnuts or any other shapes with distinct contours, bokeh is very unlikely to be pleasant.

3. If a lens renders bright points as shapes within which brightness changes very smoothly, such a lens will also produce a good bokeh. However, such lenses tend to be quite soft. Special soft lenses practically never produce double-line streaks in pictures.



1. Learn the properties of the lenses you use! It is very useful to know how your lenses show blurry bright points in a picture.

2. The shape of the lens opening should be as close to the circle as possible.

3. Never use cheap filters and other optical accessories of low quality. Various defects in manufacturing may give rise to additional spots of light and bright contours that surround objects in your pictures. As a result bokeh may be spoiled.

4. Sometimes unpleasant bokeh can also be attributed to misalignment of optical elements in a budget lens. Although this important phenomenon was not described in this article, you should be aware of it. If a lens is stopped down, the harmful effects of misalignment diminish.

5. If double-line streaks are predictable and unavoidable, only one thing can be done. You should change the f-stop. In other words, you should try to make split twigs either sharp or completely unsharp.



1. I. Yefremov. Blurring the background. A scientific approach. (Yet another my article on this web site)
2. H. Merklinger. A Technical View of Bokeh. Published in Photo Techniques Magazine, May/June 1997. (This article can be found at Luminous Landscape or downloaded as a pdf-file from
3. H. Merklinger. The INs and OUTs of Focus. Chapter 6. (The book can be dowloaded from
4. Ken Rockwell. Bokeh Explained
5. Peter Zimmerman. About Bokeh
6. Daniel Wexler. Bokeh Rendering

* * *


Adobe Photoshop , Jasc Paint Shop Pro are trademarks of their respective owners.


Main page
List of articles - Russian Photo Links

Igor Yefremov, 2002, all rights reserved

You must obtain a written permission from me to use any materials of this site for any commercial or non-commercial purposes, unless there is an explicit statement to the contrary.

Hosted by uCoz
Ювелирные изделия с жемчугом.