Sunday, February 13, 2022

How to focus objects in mobile phone camera - II

Now trying to go a little deeper. Before that, I have to say these are a little hard to really describe. Lots of misunderstandings. Because the crystal is not as beautiful as we can see. I will try to explain it as simply as possible. Those who invented these technologies really deserve respect. Before going forward, please read our part-1 'How to focus objects in mobile phone camera' article.

  

CDAF - Contrast-Detection Auto Focus

This process involves moving the camera lens around and selecting the right position until an object visible to the camera reaches the maximum intensity (Crisp / Clear) that the camera sensor receives. This means that the sensor determines that what we want to take the photo is clear and focuses there. This is a Trial & Error process. From the CCD section mentioned in the previous article, the camera processes all the data coming to the camera at that time using its algorithms.

Trial and Error. Trying to be right. In other words, when we do manual focusing on a DSLR camera, we shoot and trial a few photos and test them one by one to see which focus range is best. That's how he does that part for us from the inside of the camera. 'I do not take photos but I try some frames and find the right focus'. Again, this method uses the highest intensity.

Advantages of CDAF

  • This method does not require any other hardware other than the camera. What is needed is a good algorithm. As the quality of the algorithm used by the camera maker increases, so does the quality of the photos. 
  • This method usually gives a good clear picture. CDAF can provide a very clear photo if it is focused exactly

Disadvantages

  • CDAF is a very slow mechanism. The reason for this is the use of the Trial & Error methodology. This mechanism takes about a second to focus on a photo. If the photograph you are trying to capture is a moving object, there is a good chance that what you want will not be there when you focus. 
  • This mechanism cannot function in semi-darkness or without light. Light is a mandatory factor because the focus of an object depends on the intensity relative to it. But if you have a flash on your cell phone, you can get some level of support from it. But it is not as successful as natural light.
  • The CDAF mechanism cannot hold the focus on moving objects. This is because, as I said before, the Trial & Error methodology does not allow it to continue to focus on something that is moving. Therefore, it is very difficult to make a good video recording with a camera that uses CDAF.
PDAF - Phase-Detection Auto Focus

This is a bit of a complicated but fast process. This works by using a phase-detection photodiode attached to the camera sensor. This photodiode converts the light received by the camera into an electrical signal (Light into an electric current). In this PDAF mechanism, a sample of 10% or less of the pixel data of the image received by the camera sensor is taken to the photodiode mentioned earlier. The resulting pixel sample data is collected in a scattered manner on the sensor.

The photodiode then separates the data from the right and left of the camera lens. This process is similar to the process by which our brain creates a single image from two images received by our right eye and left eye. Then this data and light locations are processed by an algorithm related to the photodiode and the position of the focus in the relevant region (Phase) is confirmed to be correct. If that focus is not right, the previous data will be used to adjust the camera lens to the correct position. Then the camera will get the correct focus. A trial & error story is therefore not needed here. The process is thought to be very long but it takes only a fraction of a second for it to work.

Advantages of PDAF
  • This method is very fast. It takes about 0.3 seconds. It can be activated three times faster than a CDAF. 
  • A moving object can be easily photographed through this. Also, when recording a video, you can continue to focus on the object (Continues Focus).
Disadvantages
  • Like CDAF, PDAFs are difficult to operate in semi-dark or light. Even in this method, light is a mandatory factor and the process is not correct. If you have a flasher you can get help. 
  • This is a slightly more expensive mechanism. A few years ago, a camera with PDAF was only available on high-end flagship phones. But now that size has been put aside and dropped a bit. However, PDAF is not yet seen in most budget ranges of mobile phones.

Dual Pixel Auto Focus (Dual Pixel PDAF)

An improvement on the PDAF mechanism itself, is the dual pixel PDAF mechanism itself. In this case, we use two instead of the photodiode we talked about earlier. Also, instead of the> 10% pixel sample used in PDAF, almost all the pixels received by the sensor are given to the two photodiodes. This allows the camera to capture faster, more accurate photos or frames. Here, using two photodiodes, each pixel data is used in two ways. One is to get the data in the photo as well as set the correct focus position. Therefore, the efficiency of taking a photograph increases with productivity.

The pros and cons are no different than PDAF. But because the resources used are more and more expensive, mobile phones with dual pixel PDAF are not cheap either. The story about Focus is not over yet. Today's article is longer than the previous article. Tried to explain quite a bit. If there is something you do not understand, please don't hesitate to comment.

Cheers! 

No comments:

Post a Comment