The advances in camera technology in today’s phones have replaced our ordinary phones. We have started to build an app to count annual rings on drill cores on your iPhone. The first step is to test the camera and learn more about how to get the best images.
To get great pictures of the drill core, they need to be:
- Have high resolution
- Have even lighting
By having many sharp pixels per mm that are under even light conditions will give us good opportunity to count the annual rings.
|Model||Lens||Minimum focus distance|
|Minimum focus distance |
|Aperture||FoV||Pixel per mm|
|Pixel per mm
|iPhone 13 Pro||Ultrawide||-||20 mm||1.8||101,9||89,6||96,0|
|iPhone 12 Pro Max||Ultrawide||Not sharp at close Dist.||--||2.4||102,9||-||-|
|Wide||120 mm||150 mm||1.6||67,7||32,3||21,5|
|Tele||Hard to get close||2.2||30,1||32,3||15,1|
|iPhone 12 Pro||Ultrawide||Not sharp at close Dist.||-||2.4||102,9||-||-|
|Wide||100 mm||120 mm||1.6||67,1||40,3||26,8|
|Tele||Hard to get close||2.0||37,0||-||-|
|iPhone 11||Ultrawide||Not sharp at close Dist.||--||2.4||102,9||-||-|
|iPhone XR||Wide||120 mm||1.8||36|
Table 1. Camera specifications for different iPhone models. The results are taken from official specifications, data from Apple’s APIs and images taken by the Camera app Halide, an app that we highly recommend.
In general, the wide-angle cameras are the best to use except possibly the ultra-wide-angle camera on the iPhone 13 Pro. Newer wide-angle cameras have not led to higher resolution at close range if you look at Table 1. Changes in focal length and aperture have led to greater minimum focal distance during the years. For example, the resolution pixel per mm was better iPhone 7 than iPhone 13 Pro (Wide-angle)
However, the quality of the photos has improved significantly in recent years, there is a big difference in the photos from, for example, iPhone 7 and 11 (see examples at the bottom of the page). We still have 12 Megapixel sensors, but the pixels are much sharper today.
It is interesting to compare the number of pixels per millimiter and compare to the technology that were used to count the annual rings in Kristin Norells dissertion (2010). She had a resolution of about 3.3 pixels per mm. She managed to count annual rings with that resolution and it feels promising for this project.
If you shoot with the wide-angle camera, you can take pictures that are between 90-120 mm wide with maximum resolution. Then you can photograph trees with diameters of about 20 cm because the drill core only has the length of the radius of the tree. To photograph trees with a larger diameter, you must combine several images with overlap or take the photo from some distance and get a lower resolution. We need to test if a merging feature in the app could be useful.
We have tried to photograph an old drill core with different phones and we see a big difference in quality between iPhone 7/8 and iPhone 11. The wide-angle lenses from 11 onwards seem to produce very good images. We had a slightly worse picture from the iPhone 13 Pro, 12 Pro Max than from the 11 and 12 Pro. This may be because the pixel per millimeter is lower for the wide angle camera of this phone. We attached some images on the lower part of this page.
The resolution is very good when shooting with the ultra-wide-angle camera on the iPhone 13 Pro, but there is a challenge to get sharp images at the edges and shades from the phone when you are very close.
We will try to solve that challenge, but we may not solve it in the first version of the app.
Right now it seems that you get the best pictures of drill cores with 11, 12, 12 mini, 12 Pro, 13 and 13 mini. But even phones that are iPhone XR or newer will give good results.
We have the following challenges when we will create the camera feature in the app:
- Make sure we get sharp images. If the user are to close to the drill core he/she needs to get noticed.
- Blurring in the outer edges, can we use the whole image or do we have to use the middle of the image?
- Merge multiple images into one in order to get images of the whole drill core.
Want to know more about the app?
Macro mode on iPhone 13
The latest generation iPhone has a macro mode that allows you to take photos very close. This is possible through a combination of the ultra-wide angle camera being able to shoot at a distance of 20 mm from the subject and through an AI technique to sharpen the images.
When shooting at a distance of 20 mm, you often obscure the light source and it is difficult to get even lighting on the object. The AI technology that sharpens the images is a technology called “Super-resolution imaging“. By training a neural network on sharp images that later are blurred, the AI can succeed very well in making sharp images.
Apple seems to create its macro images by digitally zooming in a bit with the ultra-wide angle and then sharpening them with the above technology. As a regular developer, you do not have access to their methods and it is also not likely that they have trained the neural network on drill cores or similar images. This AI technology adds information that did not exist from the beginning and it is probably better to analyze the raw data.
We will not work with “Super-resolution-imaging” in the beginning.