ucuapps / single-view-autocalib

Single-View Auto-Calibration from Lens-Distorted Images of Urban Scenes. In WACV (2021)
https://ylochman.github.io/sv-autocalib
BSD 3-Clause "New" or "Revised" License
38 stars 10 forks source link

Error while running autocalib_test.m #6

Open alexvbogdan opened 2 years ago

alexvbogdan commented 2 years ago

Hi I got this error while running autocalib_test.m

Error using  {} 
Subscripting into a table using one subscript (as in t(i)) is not supported. Specify a row subscript and a variable subscript,
as in t(rows,vars). To select variables, use t(:,i) or for one variable t.(i). To select rows, use t(i,:).

Error in KeyValDb/check (line 102)
            if v{1} == 1

Error in CidCache/put (line 142)
                    if (~this.imagedb.check(table,this.cid, [name ':' xor_key]))

Error in CidCache/put_chains (line 123)
                        this.put('dr',name(1:end-1),res{k}{k1});

Error in CidCache/get_chains (line 108)
                this.put_chains(chains,res,init_parents,is_found);

Error in DR.get (line 75)
        cid_cache.get_chains(dr_chains,'',@extract,img);

Error in get_rgns (line 12)
    dr = DR.get(img,cid_cache, ...

Error in autocalib (line 44)
            [rgns,Gapp] = get_rgns(img, arc_cfg{:},...

When I tried changing KeyValDb/check (line 102) it raised consecutive errors. What could be the solution to this? Thank you.

DaddyWesker commented 2 years ago

I've encountered same problem. AS i understand, those guys used older matlab version and something has changed in matlab since they pushed this code.

I've beat that problem by changing if v{1} == 1 to if v{1, 1} == 1 (v is the table and matlab asks to acces element of table using two indexes, not one). But that's not the only problem unfortunately...

alexvbogdan commented 2 years ago

I tried the same fix, but there are too many consecutive fixes you would have to apply. I tried using ubuntu 14.04 and an older version of MATLAB. Perhaps you guys could suggest a MATLAB version used at the time this code was created?

DaddyWesker commented 2 years ago

I was able to launch this autocalib_test.m using Linux Mint 20 and Matlab R2020a.

alexvbogdan commented 2 years ago

Oh, thanks a lot! Did you apply lots of fixes? And if you did, could you perhaps open a PR here with your version of the code or provide a link to another repo?

DaddyWesker commented 2 years ago

Actually, I've made no changes in the code. Just installed Matlab R2020a. I've though needed to do some changes in matlab libs. If you'll encounter problem with libstdc++.so.6 and just found this solution to fix this .