Background subtraction is a big problem in machine vision. The ability to somehow figure out which objects in an image are closer than other objects has many application. The simplest is in object segmentation and subsequent detection/recognition.
Object detection refers to detecting a known object in a scene, whereas recognition refers to determining what a given object in the scene is.
Of course there are multiple approaches on solving the background subtraction problem. One approach is graph cut in case you are interested. However, if leaks and rumours are to be believed, the new HTC One will use a cool idea which can be applied here.
As the article mentions, the camera uses two camera to calculate the distance to an object (a person) and then uses some filters to blur everything else, in essence, faking good bokeh.
Which brings me to what this article is about. 🙂
Bokeh refers to the quality of the blur of an image.
But Faisal, why are we interested in blur, don’t we want perfectly sharp images?
Good question. We do want the subject of a picture (a person) to be in focus but having a blurred background makes the subject more prominent, a technique used by photographers to take dramatic portrait shots for ages. It further has the advantage to remove the viewer’s attention from what would be otherwise a distracting background.
Such as in the images below:
But bokeh itself does not refer to the blurriness of the image, but rather to the quality of the blur. Essentially, if the blur is pleasing to the eye, its good boke, otherwise.. bad. Sounds quite vague.
As it happens… there are some ways to define this. What most people find pleasing is a situation where we have a soft blur. Such that points of light in out-of-focus area seems to blend into each other, as opposed to be seen as donuts with brighter circumference. If they appear as perfect circles (or some sort of polygon), then that is neutral bokeh.
The polygon you might see is actually the shape of the opening defined by the disks controlling the aperture.
How is blurred effect achieved? It is achieved by taking the picture with a large aperture. This reduces area of the image which is in focus: the depth of field. I talked about this in these two articles: Image Stacking, Aperture Control.
What does one have to do to achieve this?
Buy a camera with large aperture, or a large zoom; since increasing magnification reduces the depth of field as demonstrated in Image Stacking. However, the quality of lens maatters a lot as well. HTC One, for instance, does have a very large aperture, but the results are no way near as good as from a proper camera. However, it still does make rather awesome portraits.
But portraits are just one idea where good bokeh is desired. You can do a lot of artistic and fun effects using the shallow depth of focus. I recently tried my hand at one such idea, and here are the results:
This result is achieved by doing this to my lens:
I was inspired by this post. Actually, I was a little skeptic expecting to see the outline of the shape I had cut on the paper to act as a filter in the image. In fact, my first attempt led to exactly such results.
But a little bit of tweaking and viola! In the end, I was using Nikon AF-S DX Nikkor 35 mm 1:1.8G lens (for those of you who know something about lens), a hard black carton and tape. Unfortunately, cutting a heart shape was quite difficult so I screwed it up a tiny little bit. But as you can see, the results are pretty good.
I was presently surprised, until I thought about how the circle shapes are made. The out of focus points appear as circles due to phenomenon known as spherical aberrations. So all the useless light coming around the lens is what gives it the circular (or a polygonal shape in case the aperture forms a polygon) appearance. Hence, adding a heart would make a heart shape appearance. At least in the center of the image.
And since the new HTC One / HTC OneUp / HTC One 2 does not fake such effects, the two camera feature would not be the main reason I would buy the phone… unless the post is completely wrong and the two cameras have a totally different and awesome function. 🙂
you have finally learned how to take a selfie :-p
Not really a selfie when you use a remote to take it.. 😀