Comments (15)
Found it at the end of the DensifyFrame function, when copying the solver disparities back into the depth map.
depth[col,row] = 1.0 / x[col + row * w]
Will push a fix shortly.
from ar-depth.
After looking further into the problem, I haven't come up with a solution yet, but I've diagnosed the source. it appears the issue arises when applying the TemporalMedian function. For frame 14, the input and outputs are below.
FILTERED DEPTH (after applying TemporalMedian)
from ar-depth.
Thanks for bringing this to my attention. I'm looking into this now...
from ar-depth.
I'm not able to reproduce your error. Running the code as-is produces the following filtered depth map for frame 14:
Have you changed the code somehow in your version? If so, can you share the specific changes you've made?
from ar-depth.
Hm. Interesting. The only thing I did was to copy the code from an Jupyter notebook to a Python script. I am also running it in a conda environment too. Perhaps one of those two factors is playing a role? I will take a further look as well and report back too.
from ar-depth.
Are you able to produce the correct output from within the Jupyter notebook?
from ar-depth.
No, I can't. It must be something to do with the conda environment I guess? It runs with no errors, but the filtered depth is still empty for some reason (when running in a Jupyter notebook). I am using opencv 4.1
, opencv-contrib-python 4.1.0.25
, and pyquaternion 0.9.5
, running on a Ubuntu 18.04 server with Python 3.7.3.
from ar-depth.
Here's my setup:
OSX 10.14.3
Python 3.7.2 (via conda)
OpenCV 4.0.0
SciPy 1.2.1
PyQuaternion 0.9.5
NumPy 1.15.4
To open and run the code, I start a Python kernel with jupyter notebook
, and then navigate to the notebook, and press "Run All".
If indeed there is an issue within the TemporalMedian function, I'm not sure what would cause it, apart from a change in the np.median
function. Could you tell me the size of the array (depth_maps
) passed to the TemporalMedian function?
Just to double check -- you do mean frame 000014.png, and not the 14th frame which is saved, correct? This is first frame which is saved if skip_frames
is set to 0.
Also, for sanity -- you haven't modified the COLMAP files, right?
from ar-depth.
I do mean frame00014 and I haven't modified the COLMAP files at all. It is odd though, because you're right, TemporalMedian is basically just a numpy function and that's a fairly boilerplate operation that's unlike to be the cause. Interestingly, the subsequent solver initialization images all look great. I'm thinking there's a visualization issue somewhere for me.
Solver initialization of frame000015.png after frame000014.png's output was blank
from ar-depth.
Ah, that's definitely possible. Let me look into that code.
from ar-depth.
Can you inspect the min/max values of the filtered depth map, and compare it to that of the solver initialization?
It could be an issue with the automatic scaling.
from ar-depth.
Hm, results below:
==>Processing frame000014.png
Initialization min: 0.5802239
Initialization max: 1.266863
Raw depth min: 0.80136484
Raw depth max: Inf
Filtered depth min: 0.80136484
Filtered depth max: Inf
==>Processing frame000015.png
Initialization min: 0.5802239
Initialization max: 1.266863
Raw depth min: 0.80864733
Raw depth max: Inf
Filtered depth min: 0.81061256
Filtered depth max: Inf
I believe you are right. It's the Inf
's that are screwing it up it seems--throwing off the scale. I haven't found the specific source of those yet, but it's I'm fairly sure there's a divide-by-zero error somewhere.
from ar-depth.
Yep - very likely a divide-by-zero. I've actually seen debug warnings on my end for a while, but never had the time to investigate. Let's see if I can find it now.
from ar-depth.
Found it at the end of the DensifyFrame function, when copying the solver disparities back into the depth map.
depth[col,row] = 1.0 / x[col + row * w]
Will push a fix shortly.
Did you have time to fix this yet? I ran into the exact same problem as described in this issue.
from ar-depth.
Found it at the end of the DensifyFrame function, when copying the solver disparities back into the depth map.
depth[col,row] = 1.0 / x[col + row * w]
Will push a fix shortly.
Did you have time to fix this yet? I ran into the exact same problem as described in this issue.
NVM, can be fixed by simply adding a condition if x[col + row * w] != 0.0
from ar-depth.
Related Issues (9)
- run the sample data, has a keyerror HOT 4
- Error (Keyframe, refframe, wrong translation info ...) HOT 15
- Wrong results when value is negative using maximum in GetImageGradient function HOT 5
- Missing depth reprojection
- current code is slow, will you release a faster python code? HOT 14
- What if the camera intrinsics is unknown
- How to get the 3d points and image points HOT 1
- Get Sparse Depth map
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ar-depth.