flanggut / smvs

Shading-aware Multi-view Stereo
BSD 3-Clause "New" or "Revised" License
250 stars 75 forks source link

Is the result of evaluate_3_band reasonable compared with result of evaluate_3_band_exact #33

Closed philleer closed 2 years ago

philleer commented 5 years ago

Hi @flanggut , first of all, thank u for ur wonderful software. I have roughly explored your code recently, since I want to do some research combining MVS and shading cues. Well, in the lighting_optimizer.cc, in line 41 function _fit_lighting_to_image_ call sh::evaluate_4_band(*normal, *sh) Then my question is why can u use _evaluate_4band rather than _evaluate_4_bandexact? I was wondering whether it is reasonable. Just to minimize operations? Would you please explain it in more details? Thanks very much.

philleer commented 5 years ago

And when I generate mesh with the -m option, I can get the triangular mesh model. But then when I use fssrecon from MVE, I get the error as follows

Floating Scale Surface Reconstruction (built on Sep 29 2018, 09:56:41)
Loading: smvstest/temple_lighting/temple-201902231408/smvs-m-S0.ply...
WARNING: Skipped 16466734 samples with invalid scale.
Loading samples took 7971ms.
Octree does not contain any samples, exiting.

From FSSR-Users-Guide I find FSSR expects an input a point set which contains several required and some optional attributes per sample point. then why the generated mesh not supported by the FSSR? Due to different data structure or format? @flanggut Very appreciated to your reply.

flanggut commented 2 years ago

I just realized that I never replied here. Sorry about that! Not sure if it is still relevant but:

  1. The exact spherical harmonics form an orthonormal basis. However, for our optimization it is not necessary that they are actually normalized. To minimize the number of operations we can remove the constant factors for each element and they will be absorbed into the variables that we estimate. So the variables that our optimization produces are essentially just a scaled variant.
  2. You should not use the -m option if you want to feed the output into FSSR, it will not include the necessary information (like normals and scale). The -m option is just to generate a quick preview without really merging all of the depth maps into a consistent geometry.