Coder Social home page Coder Social logo

Depth map accuracy about bpycv HOT 4 CLOSED

yushiangw avatar yushiangw commented on August 19, 2024
Depth map accuracy

from bpycv.

Comments (4)

hansongfang avatar hansongfang commented on August 19, 2024 2

The depth (z-buffer) of blender are orthogonal distance to lense's plane. Did you calculate depht like this?

Thank you for sharing this great tool. I observe that for blender 2.81, the cycles engine does not output z depth buffer as orthogonal distance to lense's plane. Actually, the z-buffer is the distance from the camera to pixels, as mentioned by @yushiangw. But on blender 2.93, it outputs orthogonal distance. For users using blender 2.8x with cycles engine, they should be careful with the depth map.

from bpycv.

yushiangw avatar yushiangw commented on August 19, 2024 1

It looks like switching to CYCLE + shift image coordinates by 0.5 help. I thought camera clip_end/start will make some difference but not much.
https://docs.blender.org/api/current/bpy.types.Camera.html#bpy.types.Camera.clip_end
some of my numbers :

BLENDER_EEVEE 
mean_dist  =2.75e-04
median_dist=2.56e-04
max_dist   =1.24e-03
min_dist   =1.94e-06

BLENDER_EEVEE + set clip start/end to (0.5,5)
mean_dist  =2.73e-04
median_dist=2.51e-04
max_dist   =1.24e-03
min_dist   =1.94e-06

CYCLE   
mean_dist  =7.46e-05
median_dist=3.34e-05
max_dist   =1.21e-03
min_dist   =8.67e-09

CYCLE + set clip start/end to (0.5,5) + add 0.5 pixel shift
mean_dist  =8.40e-08
median_dist=3.62e-08
max_dist   =1.31e-06
min_dist   =5.20e-12

CYCLE + add 0.5 pixel shift
mean_dist  =8.12e-08
median_dist=3.52e-08
max_dist   =1.35e-06
min_dist   =5.20e-12
```

from bpycv.

DIYer22 avatar DIYer22 commented on August 19, 2024

The depth (z-buffer) of blender are orthogonal distance to lense's plane. Did you calculate depht like this?

from bpycv.

DIYer22 avatar DIYer22 commented on August 19, 2024

I found the same error.
In my case, the depth should be 1.38831, but got 1.3876953125.
Which shorter 0.0006146875.
And I have no idea what is wrong. 😢

from bpycv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.