Explainer Features

Dual Camera Lenses and Smartphone Photography

Smartphones have really transformed the way how people click pictures. Most importantly, they have made the entire process feel simple and easy. While some companies bank on the Megapixels, many went about using better sensors and other techniques to help produce great photographs.

The cameras had their limitations in smartphones; majorly because of the form factor and the desire of making thinner and sleek devices. Many have been trying to compensate this with software enhancements. Recently, we have started to see many companies bring in smartphones with dual camera lenses on them. It all started with HTC One M8 2 years ago; and then with LG G5 this year, followed by Huawei P9, Honor 8, Redmi Pro and few others.  The latest in the scene is the iPhone 7 Plus from Apple which was just unveiled yesterday. Every Company has implemented the Twin Lens in a unique way.

Huawei P9 and Honor 8: Monochrome Love

In this device, The Cameras has two 12MP sensors set at f.2.2 Aperture, where one of them shoots monochrome only. When you click a picture, the monochrome sensor analyses the picture in terms of the light thats hitting the sensor through the glass and different objects in the frame.

Using all these information available, the system then adds the colour onto the picture from the other RGB sensor. Using the colour and monochrome cameras simultaneously helps in producing a superior image with deeper blacks and vivid colours than a conventional one-sensor setup. Image information from both sensors makes these cameras 100% more light-sensitive than the competition.

Absolutely love the details on the #Honor8

A photo posted by Vijay (@iclickd) on

Huawei P9 Camera SampleThe Dual camera systems also enables you to take pictures with an adjustable depth of field to create background blurs.

LG G5 and V20: Wide Angle

The LG G5 uses the secondary 8MP module as a super-wide angle with a 135 degree angle of view. The main 16MP camera module has narrower field of view which works pretty well and also makes a good combination with the wide-angle.

If you are using the digital zoom the LG G5 switches automatically between both modules. To simplify, if you are using the wide-angle lens and zoom into your scene, digital zoom is applied to the wide-angle image until the angle of view of the other 16MP lens is reached. At this point the camera app switches modules.

Apple iPhones (plus), OnePlus 5, Samsung Note 8: Wide Angle and Optical Zoom

These devices has one wide angle lens and another a standard telephoto lens. The stand-out difference is that, The lenses which will be used for zooming isn’t just digital, but also offers optical zoom which uses the second telephoto lens to take sharp pictures. Apple released the phone with hardware-based 1x and 2x zoom, and a software zoom above 2x to 10x.

The two lenses collect data for the software to process. As shown in the demo yesterday during the launch event, These accomplishes this through machine-learning recognition of objects in a scene, which let it identify people, and by using images captured from the two cameras, to differentiate focal planes. The result is software processed DSLR quality images with Bokeh.

The dual lens also helps in the new “Depth Effect” feature in the camera app that allows you to put the subject in the forefront in focus and blur the background scene; ideal in portraits.

HTC was the first one to introduce a dual camera setup on Smartphones in 2014 with its HTC One M8

Honor 6X and Xiaomi Redmi Pro: Bokeh!

The Redmi Pro’s dual lens implementation is very similar to what HTC introduced. This device features a 13MP primary camera Sony sensor along with a 5MP Samsung sensor on the rear of the device. The camera gives users the ability to choose the focus point after a shot is taken. The hardware-level depth of field processing helps the RedMi Pro to add effects like blurred backgrounds natively. Keeping it simple, The first camera clicks the still images while the other one measures the depth in the scene.

Its interesting on how companies are introducing the secondary cameras without making the phones look bulky and adhering to what we call a good design. With so much of emphasis on photography, I am sure, dual lens on Smartphones are going to make the phones even more fantastic to click pictures; and maybe, open up more avenues for virtual reality!


Smartphone Photography Tips Worth Trying!

Smartphone photography is at a rise now. Companies have started to bring in some great innovations in camera department and its getting better. Few days ago, we wrote about the new trend of dual lenses in smartphones. Everyone loves clicking with their phones now; and sometimes its nice to understand the little nuances of photography. In this article, let us look at few smartphone photography tips that can help you transform your normal looking pictures great.

1. Know your camera settings:

Test your camera on your phone in various conditions. Do not just reply on Auto Modes. These days, most of the smartphones come with a variety of modes to help you shoot pictures in different scenes. Some of them do come with Manual Mode as well. This will help you control Aperture, Shutter Speed and ISO thereby altering the entire exposure of the image.

HDR mode, like the name says, High Dynamic Range gives you great punchy colours on your picture.HDR Mode takes two or more pictures of varying exposures almost simultaneously, then combines the best and brightest bits of both into one photo. You need to keep the camera super-steady, otherwise, your photo will come out blurred.

2. Composition:

Composition is how you arrange your subjects in your frame. How visual appealing it gets is left to you on how you frame it. For example, while clicking portraits, Placing your subject in the centre of your frame can get a little boring after a while. Remember, the old school passport photos. it isn’t all that impressive. Make use of Law of Thirds. Imagine your frame is divided into a 3×3 grid, and place your subject along one of the resulting gridlines or where two gridlines intersect.

law of thirds grid

Use Space better. When you surround your subject with empty space, it simplifies your frame. Further, there are fewer things to distract from your subject, so that subject really pops to the viewer. Also, empty spaces creates curiosity in the picture.


Check your corners of the frame while you click. Ensure there is any distracting elements or things that is getting chopped off. I also like using leading lines to the end of the frame. That way, it gives the feel that the picture is a part of a scene.

While shooting landscapes, try to take photos with people in it. That adds life to a picture. It also gives you a sense of scale.

Understand where you plan to put up the pictures you click and then shoot accordingly. For example, If I am going to upload on Facebook, I would rather shoot in Landscape Mode.

Get to the level of the person or a scene. For example, while you shoot kids or pets, going on the floor and clicking them at the eye level would give you much better perspectives and pictures.

3. Metering the Picture:

Remember, in some cameras when you tap to focus it also exposes your images and calculates the right exposure for the image. You could tap and hold so that, the focus gets locked. You can then alter the exposure to adjust the right brightness and highlights for your images. For eg: If you are going to click a portrait at a beach (backlit scene), you will want to tap on the person to expose him right to the camera. Most of the times, the cameras look at brighter areas in the frame and adjust accordingly.

4. Understanding the Light Source:

The right amount of lighting can make pictures more expressive and environments more welcoming. As much as possible, try to take your photos under natural lighting. You can do this by going near windows or doors when taking photos indoors, moving yourself close to the candle on the table at a restaurent, and to sources of light like street lamps when shooting outdoors. While clicking portraits, using the light on the sides can capture depth giving a very candid feel to the pictures. 9 out of 10 times, I avoid using flash lights from the camera. They are too flat and spoil the depth of the image.

While shooting low-light, ensure that your cameras are stable. Either you hold it tight, or use a make-shift tripod. If you have option for manual control on your camera, increase the ISO so that, the camera can get more sensitive to light. Remember, more the ISO, the higher the amount of noise on the picture. However, you can always post-process to get rid of the noise to a certain extent. You would’ve got the shot nonetheless. Also, as mentioned above, Go close to the light source. Avoid back light when taking pictures of people unless you want to try the silhouette effect. If you shoot your subject using side light, it can capture texture and depth.

5. Avoid digital Zoom:

Most of the smartphones do not have an optical zoom, so when you zoom in while taking a picture, you are actually cropping in and that will definitely affect the quality. So, if you can, walk up few steps close to your subject and then click.

6. Watch your highlights and shadows:

image-graphThe sensor on the smartphones have improved to a great extent. Although, they do not have a great dynamic range when compared to that of a DSLR, they do the job pretty well in good lighting conditions. Further, The graph gives you some great insights on how your picture is exposed. Using the Torch to fill in light at the dark areas which are caused by shadows.

7. Shooting the right Monochromes:

Monochromes – Black and White Pictures as referred commonly is a favourite for many people. look for scenes that contain some strong blacks and whites. The best black and white photos usually have some portion of the photo that is near to pure white, and some portion of the photo that is near black. This increased contrast adds interest to the scene.

Long exposures (slower shutter speed) work really well in monochrome photography, especially where there’s moving water or clouds. The blurring of the movement also adds textural contrast with any solid objects in the frame. Pay attention to lines, shadows, and shapes in your frame. They add magic to your monochromes. While shooting portraits, ensure you focus on the eyes and with a tad sharp contrast, the picture would speak!

Smartphones have greater processing algorithms as well. I am using the Huawei P9 which has some great attention to details to Monochromes. Check out some of the samples below.

Oh yes, did I forget one important thing. Keep your lenses clean. Your pocket isn’t cleanest of the places your phone lives. So before you shoot, just wipe off some of the dust from the lens. I love seeing my pictures in prints. As much as you want to support going green, it feels great when you see your pictures in print.

Just because you can take a shot with your phone doesn’t mean you should. Understand the norms if you are shooting on streets, do not flash lights at a theatre performing arts etc. Your pictures should showcase the moment you’re living in. So first live the moment and then shoot pics. Happy Clicking!

Explainer Internet of Things (IoT)

IoT Basics: How to Install an OS on Raspberry Pi

Due to a lot of requests, we’re introducing the ‘IoT Basics’ to our Explainer series covering all the important things you need to know to get started with a Raspberry Pi, aimed at newbies. We will be covering topics like – using a breadboard, the use of resistors, GPIO pins, among others. Let us look at how to install an OS on Raspberry Pi.

We all start pretty much in the same place; Buy a Raspberry Pi, unpack it, connect it to the power cable, install an Operating System and then may be start brainstorming for things to do with the Rpi, or start playing minecraft. (If you’re curious about the game, check pi store after installing the OS)

So, let’s begin with installing the OS.

First, select the Operating System. You can find the list of supported OS on ‘downloads’ page on the Raspberry pi website. You can download the OS from here.

IMPORTANT: Please note that the ‘dd’ tool can write over pretty much any partition on your machine, including the linux partition. So, please be careful when you specify the device name for writing over.

Preparing the SD card:

Run $ df -h to list all the currently mounted devices. Then insert the SD card and run the same command again. The newly appeared device on the list in the SD card that we are going to be writing the disk image to, so note the device id of the same. The device id on my machine is /dev/sdb

If your device id has a suffix like ‘p1’ or ‘1’ then it is referring to the partition. But remember that we need to write to the whole disk and not just the partition, so wherever we use the device id, drop the partition suffix and write unless specifically mentioned. For example, if the device id is /dev/mmcblk0p1 or /dev/sdb1, drop the last part ‘p1’ or ‘1’ respectively.

Now unmount the SD card, so that files can’t be read in or copied to the card while the image is being copied to the card.

Run $ sudo umount /dev/sdb1 including the partition number. If the list of devices showed up more than one device due to multiple partitions, unmount all of them. The command requires root permissions, so if you are not logged in as root, prefix all commands with sudo.

Now, run $ sudo dd bs=4M if=2016-05-27-raspbian-jessie.img of=/dev/sdb command to write the OS image to the card

Make sure you replace the ’if’ parameter value with the path to the OS image that needs to be written, and the ‘of’ parameter value needs to be replaced with the device id of the SD card. Please make sure to be careful to specify the right name for the device name, as mentioned earlier. The device name should be specified without the partition number.

This will roughly take up to 3 to 4 minutes and the terminal would look like the process is frozen. If you are using an SD card reader, then the LED on it would blink continuously. Otherwise just run $ sudo pkill -USR1 -n -x dd on another terminal, and the progress would be displayed in the original terminal window.

Note: The block size is mentioned as ‘4M’ in the command. If it does not work, then change it to as less as ‘1M’ but remember that this will slow down the process quite a bit.

$ sudo dd bs=4M if=2016-05-27-raspbian-jessie.img of=/dev/sdb
958+1 records in
958+1 records out
4019191808 bytes (4.0 GB) copied, 405.585 s, 9.9 MB/s

Finally, use $ sync to ensure that the write cache is flushed and it is safe to unmount the SD card.

If you are using windows, then check out Win32DiskImager utility.  Okay now that we’re done prepping the memory card, what next?

Booting for the first time:

For this you would require a USB keyboard, USB mouse, 5V USB power supply, HDMI monitor (I just connect the pi to my television), and of course the Raspberry Pi.

Installing OS on the Raspberry Pi3

Connect power and you should see the boot sequence on the TV. After first boot, the Raspberry Pi boots up in setup mode and if not, you can type the following command to get there:

$ sudo raspi-config

First things that need to be done are, resizing the file system to use the entire SD card, in my case it is 32GB. Check the first option on the setup menu. Then change the location and timezone to match yours. By default it is set to United Kingdom.

Now on rebooting the Raspberry Pi, it boots with the new configuration. The setup is now done and ready to use for any projects you’d like. For getting started with your first ever DIY project on the Raspberry Pi, check out this project.


Adoptable (Flex) Storage in Android Marshmallow

In the recent years, a lot of android smartphones started removing the support for external microSD storage and emphasised the usage of internal flash for user’s applications, data and images. The idea was simple – to have a better and fast IO when applications access data; thereby, providing a better user experience.

Recently, Google introduced adoptable storage as one of the features in Android 6.0 Marshmallow, also called Flex Storage. With Flex Storage, you can configure an external micro SD card to be used as an internal storage. This would certainly help in cases where you can buy an affordable phone with low internal storage and boost the storage by adding a microSD card. Also, with microSD cards currently available with storage of over 200GB now, it would help you carry all your entertainment content as well. Further, with more and more phones offering 4K video, this would be a great help to store videos right away without worrying about moving the content from internal to external card every-time to save space!

When you enable Flex storage, the device is formatted as a local, 128-bit AES encrypted EXT4 drive and mounted as part of the system. It’s then set as the preferred storage, and you will be prompted to move your data over.

Moving to adoptable storage is simple, but there are some things you need to be aware of. You cannot use your card from other phone right away. The microSD card will have to be formatted before use for the first time, so all existing content will be wiped. Most importantly, as the card is encrypted, you won’t be able to hot swap your card into another phone and read the data from it. It will only work in the phone you set it up on.

You wont see any significant performance drop when you use a good UHS-1 or a class 10 card. Choosing a high performance card will give you a seamless experience in moving files and media around. Also, with card being encrypted – in a case where the phone is stolen, no one would be able to read the data out of your card by connecting it via a card reader or from another phone.

Once enabled, these settings are not permanent.  One can change it back by heading to Settings>Storage & USB, select the card, head to the top right menu and then select ‘Format as portable. Remember, this will wipe the data again.

With a new range of Android Marshmallow devices expected in the market, companies now have started to bring back the support for microSD card on phones. Today, all the 2016 flagships have microSD card options. However, at this moment, the only flagship which allows adoptable storage is the HTC 10. Both Samsung and LG haven’t yet enabled this feature citing users may want to hot-swap cards and which Flex Storage currently does not allow.

Recommendations: The built-in flash storage is the fastest option you have on the phone today. Its definitely better than a high performance external microSD card. With portable microSD card, you generally may not find any lags or issues when you read or write data on daily usage scenario.

If you have a phone with good enough 32GB flash storage, we recommend you, not to use adoptable storage – rather use the MicroSD card as portable (with hot swap options) so that the microSD card is used for Media & other contents and internal memory for applications. If you have a phone with a very low internal memory say, 8GB or 16GB, then an adoptable storage option would be ideal.

For further reading, check this piece from an Android Developer (StereoMarch) on Reddit where he explains on what happens when you choose Adoptable storage.



How PDAF Technology helps Cameras to focus fast.

The camera has become more and more important in smartphones and people have higher requirements for its focusing speed. A lot of methods to assist focusing are available in the current market, including laser, infrared, and phase focusing. Focusing is the process whereby a motor moves to bring the subject into focus. Focusing algorithms are divided into contrast detection and phase detection auto focus (PDAF). Let us look into detail on how PDAF Technology works.

Nexus 6P

In contrast focus (traditional auto focus systems), the moment you start your camera app, a lot of calculations are done by the processor to achieve the correct focus. First, the camera software triggers the lens to move and scan through its entire range of possible focus points, then it returns to whichever settings that provides the sharpest focus. Contrast detection requires the motor to move to different positions until the image displayed on the viewfinder shows the highest contrast. Contrast detection achieves precise focusing but takes a long time because the motor has to keep moving to find the highest contrast.

Phase detection is the process whereby the phase difference of the subject at the imaging plane is calculated to determine the distance between the motor’s current position and the position required for bringing the subject into focus. The motor then moves to this position.

Phase detection takes a short time, but the phase difference is easily affected by various factors such as noise. Therefore, phase detection is not suitable for focusing at low luminance, in a flat area, and on parallel patterns.

PDAF Technology uses paired masked pixels on the image sensor that are engineered to work just like your eyes; your left and right eye are separated by a distance, just like these paired pixels.

As shown above, the dark points represent the PD pixels. The phase information read using the PD pixels can be used to determine the corresponding focal length. After the GPU receives the focal length information, it can swiftly drive the lens to move to a position with the optimal focus.

PDAF Technology increases the focusing speed using planar image phase detection. This technology was first applied to the Interchangeable Lens Digital Camera, which allows the user to keep taking HD photos of fast-moving objects (children, pets, or cars) using autofocus. Compared to traditional focusing technology, the PDAF focusing speed has been greatly improved.

Traditional focusing technology had to detect image quality step by step until it achieves the clearest possible image with an optimal focus. PDAF focusing can detect the phase difference in an image and enable the motor to reach the correct position for the optimal focus in a single movement, eliminating the need to repeatedly check the image quality.

While PDAF technology is particularly effective in bright environments, for darker environments, Laser Auto Focus can save the day. As the name suggests, the smartphone has an infrared laser emitter and receiver built in. When you aim at an object, the smartphone blasts out a series of laser beam pulses. When the beam bounces off the object, the processor can then calculate the time of travel to the object and back, and then determine the distance. Laser Auto Focus is especially effective for shooting in low light since it’s usually too dark for the image sensor to see anything.

PDAF focusing technology, however, is not applicable to all scenarios because there is a lot of room for error. Therefore, hybrid focusing systems are commonly adopted with phase focusing used to find the correct position and contrast focusing used to achieve the optimal focus.