cvlab-epfl / diff-nrsfm

18 stars 3 forks source link

Error running test.m #2

Closed Cartucho closed 3 years ago

Cartucho commented 3 years ago

Hello I tried running the test.m directly and got the following error:

Error using optimoptions (line 124)
Invalid solver specified. Provide a solver name or handle (such as 'fmincon' or @fminunc).
Type DOC OPTIMOPTIONS for a list of solvers.

Error in test (line 43)
options =
optimoptions(@lsqnonlin,'Algorithm','levenberg-marquardt','Display','off','UseParallel',true,'MaxIterations',2000,'FunctionTolerance',1e-10); 

Should I set up anything before or it should work right off-the-shelf? Or does it require a specific version of Matlab?

EDIT: I think it has to do with the Optimization Toolbox not being installed on my computer which is required to run that function, I will give it a try.

EDIT EDIT: Installing the Optimization Toolbox solved the error!

Cartucho commented 3 years ago

Now I am getting the following error:

Unrecognized function or variable 'bbs_create'.

Error in calculate_depth (line 10)
        bbsd = bbs_create(umin, umax, nC, vmin, vmax, nC, 1);

Error in recover_surfaces (line 24)
P_grid=calculate_depth(N_res,u_all,v_all,1e0);

Error in test (line 46)
[P_d,N_d,err_pd,err_nd] = recover_surfaces(k1_opt,k2_opt,num,a,b,c,d,u1,v1,u,v,I1u,I2u,I1v,I2v,idx,qgth,Pgth,Ngth);

Again, I will check if there are any other Toolboxes required for using these functions.

shaifaliparashar commented 3 years ago

As per the readme file, you need to download the bbs toolbox: http://www.brnt.eu/downloads.php#bbs Best, Shaifali

On Tue, 13 Apr 2021 at 11:29, Cartucho @.***> wrote:

Now I am getting the following error:

Unrecognized function or variable 'bbs_create'.

Error in calculate_depth (line 10) bbsd = bbs_create(umin, umax, nC, vmin, vmax, nC, 1);

Error in recover_surfaces (line 24) P_grid=calculate_depth(N_res,u_all,v_all,1e0);

Error in test (line 46) [P_d,N_d,err_pd,err_nd] = recover_surfaces(k1_opt,k2_opt,num,a,b,c,d,u1,v1,u,v,I1u,I2u,I1v,I2v,idx,qgth,Pgth,Ngth);

Again, I will check if there are any other Toolboxes required for using these functions.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cvlab-epfl/diff-nrsfm/issues/2#issuecomment-818593520, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTAJJGNXYULAQBYC7V5WGDTIQFHFANCNFSM422XP6FA .

shaifaliparashar commented 3 years ago

I would suggest to download the pre-complied version for windows/linux It is difficult to use this toolbox on mac.

Cartucho commented 3 years ago

Thank you, I had the BBS folder already since I cloned your entire Github repository. I needed to add it to the matlab path:

image

Cartucho commented 3 years ago

Adding to the path worked:

image

I was wondering if I was supposed to see something after running the code?