2
\$\begingroup\$

I know of course, I can do it with the camera app on the phone if the "Aperture mode" has been activated. Is it possible to refocus such image once it's downloaded from the camera? How?

\$\endgroup\$

3 Answers 3

3
\$\begingroup\$

Pretty much, no. The Huawei P9's dual cameras are actually capturing two entirely separate images and then combining them, with a bit of software processing, to simulate the effect of adjusting focus. On the assumption that you're downloading a JPEG or similar from the camera, you've reduced yourself to just one image and thrown away the extra information you need do this kind of modification.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Complete rubbish, the data is all kept within the jpeg file, see below. \$\endgroup\$ Commented Aug 14, 2017 at 14:38
  • \$\begingroup\$ I had to do with two dual caamera smartphones (none of them was Huawei P9, but still one was a Huawei). If you download such a "3D" image from them, the size of it is up to 4 times greater than size of a regular jpeg. So I think that the needed information is still in the file, you just have to find some tool to make use of it. \$\endgroup\$
    – Zenit
    Commented Aug 14, 2017 at 15:50
3
\$\begingroup\$

If you save the original picture to your computer then the information is still there. Use this tool to refocus on your computer:

https://github.com/photomedia1/jpg-refocus-tool

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the link to the program, however, the quality of the output is much worse than produces the P9 phone (parts of background are sharp and the photo doesn't look natural). \$\endgroup\$
    – lopisan
    Commented Jan 15, 2018 at 8:58
2
\$\begingroup\$

Felix's suggestion is more user friendly, but if you want a simpler, command line solution which just separates out the various frames of data you can try:

https://github.com/jpbarraca/dual-camera-edof

\$\endgroup\$
1
  • \$\begingroup\$ Will give it a try. \$\endgroup\$
    – helcim
    Commented Aug 16, 2017 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.