andrewssobral / lrslibrary

Low-Rank and Sparse Tools for Background Modeling and Subtraction in Videos
826 stars 376 forks source link

The library is difficult to use from outside it's main folder. #2

Closed shailesh1729 closed 9 years ago

shailesh1729 commented 9 years ago

I added the main folder on MATLAB path and tried to use process_matrix function from outside. In turn it internally calls commands like:addpath('algorithms/lrr/ALM'); This doesn't work if I am operating from a folder different from the lrslibrary folder. Consequently, I cannot run the algorithms. I bypassed by manually adding paths of the specific algorithms I wanted on MATLAB Path.

Further, adding the lrslibrary folder into MATLAB path is also not very clean. It contains too many scripts whose names may clash with similarly named scripts in other folders.

Basically an installation script is needed.

andrewssobral commented 9 years ago

Hi @shailesh1729, thank you for your suggestion, I'll check this issue.

shailesh1729 commented 9 years ago

For the add path thing, you can probably do it using

curfile = which(mfilename)

and then use fileparts and fullfile commands to create absolute paths. This will ensure that paths are picked up properly.

On Sun, Apr 5, 2015 at 11:27 PM, Andrews Sobral notifications@github.com wrote:

Hi @shailesh1729 https://github.com/shailesh1729, thank you for your suggestion, I'll check this.

— Reply to this email directly or view it on GitHub https://github.com/andrewssobral/lrslibrary/issues/2#issuecomment-89821197 .

andrewssobral commented 9 years ago

Hi @shailesh1729, please check the last version of LRSLibrary. I've added a setup script (lrs_setup), and now you can run the algorithms outsite. Best regards.

shailesh1729 commented 9 years ago

Thanks Andrews, I was travelling. Will check it out as soon as possible.

With regards,

On Thu, Apr 9, 2015 at 7:06 AM, Andrews Sobral notifications@github.com wrote:

Hi @shailesh1729 https://github.com/shailesh1729, please check the last version of LRSLibrary. Best regards.

— Reply to this email directly or view it on GitHub https://github.com/andrewssobral/lrslibrary/issues/2#issuecomment-91242793 .

shailesh1729 commented 9 years ago

Yeah it works after running the setup program. Thanks a lot.