happylun / SketchModeling

Source code for the Sketch Modeling project: reconstruct a 3D shape from line drawing sketches.
https://people.cs.umass.edu/~zlun/papers/SketchModeling/
GNU General Public License v3.0
143 stars 49 forks source link

running the reconstruction part with my own depth/normal maps #4

Open HenriMir opened 6 years ago

HenriMir commented 6 years ago

Hi, I am trying to use the mesh reconstruction from depth/normal maps part of your pipeline but with my own depth and normal maps, but I keep getting image format error in the C++ code (wrong byte per pixel amount) how do I have to save images for them to be computed by your C++ code?

Thank you

HenriMir commented 6 years ago

solved: just change the size of the images to 16 bit per channel, and save the resulting images with proper python library (I used write_png)

happylun commented 6 years ago

For your reference, if you have your own depth/normal data, you can load it in python and use tensorflow's built-in method to do the PNG encoding (that's what I did in my code). Note that in my code I encode normal data in RGB channel and depth data in alpha channel. Also for each channel I map the value from [-1,1] to [0,65535] and encode the image in 16-bit PNG.