“FM technology: that stands for F’ing Magic…” So said the old Navy radio repair trainer, and it comes to mind reading about how the Google camera team used machine learning plus a dual-lens setup to deliver beautiful portraiture on the Pixel 4:
https://ai.googleblog.com/2019/12/improvements-to-portrait-mode-on-google.html
With the Pixel 4, we have made two more big improvements to this feature, leveraging both the Pixel 4’s dual cameras and dual-pixel auto-focus system to improve depth estimation, allowing users to take great-looking Portrait Mode shots at near and far distances. We have also improved our bokeh, making it more closely match that of a professional SLR camera.