I have been trying to replicate same results given in the following git repos,
- https://github.com/cw1204772/depth_from_focus/tree/master
- https://github.com/sangminwoo/Depth_from_Focus/tree/master
- https://github.com/iSarmad/Depth-From-Defocus-Matlab/tree/master
I have cloned these repos, but for some reason, I can not generate same depth map as given in the results (in readme) of those repos. Only different thing is my python environment. I am using latest python libs. but I do not get any errors using latest lib. so I am guessing it is fine. Only 1 weird thing is that when I am using these images/datasets https://github.com/cw1204772/depth_from_focus/tree/master/data/keyboard (I am guessing it is pre-processed) I get expected results. but if I used different images such as https://github.com/iSarmad/Depth-From-Defocus-Matlab/tree/master/PA1_dataset2_keyboard. I do not get correct depth map.
What I have tried,
- tried changes Laplacian and gaussian kernel size
- tried sharpening input images
- tried normalizing images
- tried resizing PA1_dataset2_keyboard image to the same as https://github.com/cw1204772/depth_from_focus/tree/master/data/keyboard -> 640x360
I have spent 1 week playing with this repos. but I could not get proper depth map. Please help me with this issue. I think I am making some silly error.
my all-in-focus image looks ok, but depth map is looking like following,
Thank you very much in advanced.
from How to do image pre-processing for depth from focus/defocus using Laplacian using python and opencv?
No comments:
Post a Comment