I find .dmap file in openmvs folder, It seem like a depth image of each image input. have anyway to convert this to .png file?
You’ll need to modify some internal settings and parameters passed to OpenMVS:
do you have anyway to read .dmap file in python?
I’m not aware of any, no.
The dmap data is a binary structure defined in OpenMVS. You can find the details of how it reads the data. Link
With the knowledge of how it’s structured, you can read the bytes with length and decode it into needed data type. python has struct and ctypes modules to help achieve this.
i meet this code in openMVS lib Depth map filenames · Issue #805 · cdcseacave/openMVS · GitHub
but i dont know value of deep map meanning. is this a value of distance from camera to pixel? i see nan, -nan, 0 and negative value ? it seem like very conflict?
help me explain this
i using c++ code to read .dmap gen from openMVS step. this code here: Depth map filenames · Issue #805 · cdcseacave/openMVS · GitHub . But after read depthmap of image, i reviced a 2D matrix have -nan, nan, 0 value. max value is 3.39e+38 and min value -3.4e+38.
anyone can help me explain this value?
This usually means that the data read is not at the correct location. There are camera matrices you need to read before reading the depth map. Just follow the
ImportDepthDataRaw function in the link I gave above and do the exact step it does and verify all the data read earlier is reasonable. The binary data is stored in order, if you don’t read it in the correct order or correct location, you will get the wrong results.
i dont think data read is not correct location.
fig 1 is data i visualize all 0, nan and -nan value to (0,0,0) and orther to (255,255,255) when i read a matrix using this c++ code.
fig 2 is depth map generation using option -v 4 in openMVS library. it make sence .
anyone have idea for my solution ?