Home My Page Projects MPTK: The Matching Pursuit ToolKit
Summary Activity Forums Tracker Lists Docs News SCM Files

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: changing the dictionary doesn't seem to w [ Reply ]
By: RĂ©mi Gribonval on 2008-02-08 10:18
[forum:8214]
Dear Clothilde,

1)There is a first issue which comes from the fact that the MPTK_CONFIG_FILENAME variable is not set, which generates the error message
> mptk ERROR -- MPTK_Env_c::get_configuration_file() - Could not find MPTK Env
> variable with path to config file.
> mptk ERROR -- MPTK_Env_c::load_environnement() - couldn't load the MPTK

You can solve it by typing

setenv MPTK_CONFIG_FILENAME <foo>

where I guess that <foo> should be /usr/local/MPTK-0.5.4/bin/path.xml

2) The second issue comes from the fact that there is no 'default.xml' dictionary in the standard MPTK release, however there should be a file
/usr/local/MPTK-0.5.4/bin/reference/dictionary/dic_gabor_two_scales.xml

Here is what you could try, and let us know if it works:
a) duplicate this file to
/usr/local/MPTK-0.5.4/bin/reference/dictionary/default.xml
b) launch the InstallMat2MPTK script again and provide as Dict Path
'/usr/local/MPTK-0.5.4/bin/reference/dictionary'

I hope this works. If it does we will probably include the default.xml dictionary in a future release with the appropriate help.

Cheers,

Remi.

changing the dictionary doesn't seem to work [ Reply ]
By: Clothilde Melot on 2008-02-08 09:57
[forum:8213]
Hello

I started again to work on the MPTK toolbox and I still have a problem with the default dictionary. I change the path for the dictionary /path_to_sources/src/tests/signals/

(there is only one default.xml file)


It seems to me that I have done what you said I should do and it is still not working. Could you help me ?
Do I have to change the path for the dictionary again ? Which path should I choose ?

thank you very much by advance
with best
Clothilde

InstallMat2MPTK
Enter MPTK Path ['/usr/local/bin/']: ['/usr/local/MPTK-0.5.4/bin/']
Enter Dictionaries Path ['/home/melot/matlab/Matching_pursuit/Dict/']: ['/home/melot/matlab/Matching_pursuit/path_to_sources/src/tests/signals/']
>> Mat2MPTKdemo
mptk DEBUG -- MP_Msg_Server_c -- Entering the messaging server constructor.
mptk DEBUG -- MP_Msg_Server_c -- Exiting the messaging server constructor.
mptk DEBUG -- mpd - switch -D : optarg is [/home/melot/matlab/Matching_pursuit/path_to_sources/src/tests/signals/default.xml].
mptk DEBUG -- mpd - Read dictionary file name [/home/melot/matlab/Matching_pursuit/path_to_sources/src/tests/signals/default.xml].
mptk DEBUG -- mpd - switch -n : optarg is [1000].
mptk DEBUG -- mpd - Read numIter [1000].
mptk DEBUG -- mpd - switch -E : optarg is [tempdecay.txt].
mptk DEBUG -- mpd - Read decay file name [tempdecay.txt].
mptk DEBUG -- mpd - switch -R : optarg is [100].
mptk DEBUG -- mpd - Read report hit [100].
mptk DEBUG -- mpd - When exiting getopt, optind is [5].
mptk DEBUG -- mpd - (argc is [8].)
mptk DEBUG -- mpd - Read sound file name [tempin.wav].
mptk DEBUG -- mpd - Read book file name [tempbook.bin].
mptk DEBUG -- mpd - Read residual file name [tempres.wav].
mptk ERROR -- MPTK_Env_c::get_configuration_file() - Could not find MPTK Env variable with path to config file.
mptk ERROR -- MPTK_Env_c::load_environnement() - couldn't load the MPTK environmentmptk INFO -- mpd - ------------------------------------
mptk INFO -- mpd - MPD - MATCHING PURSUIT DECOMPOSITION
mptk INFO -- mpd - ------------------------------------
mptk INFO -- mpd - The command line was:
/usr/local/MPTK-0.5.4/bin/mpd -D/home/melot/matlab/Matching_pursuit/path_to_sources/src/tests/signals/default.xml -n1000 -Etempdecay.txt -R100 tempin.wav tempbook.bin tempres.wav
mptk INFO -- mpd - End command line.
mptk INFO -- mpd - Loading the dictionary...
mptk INFO -- mpd - (In the following, spurious output of dictionary pieces would be a symptom of parsing errors.)
mptk DEBUG -- MP_Dict_c::MP_Dict_c() - Constructing dict...
mptk DEBUG -- MP_Dict_c::MP_Dict_c() - Done.
mptk ERROR -- MP_Dict_c::load_xml_file(const char* fName) - Error while loading the dictionary file [/home/melot/matlab/Matching_pursuit/path_to_sources/src/tests/signals/default.xml].
mptk ERROR -- MP_Dict_c::load_xml_file(const char* fName) - Error ID: 7 .
mptk ERROR -- MP_Dict_c::load_xml_file(const char* fName) - Error description: Error reading Attributes. .
mptk ERROR -- MP_Dict_c::init(dictFileName) - The dictionary scanned from file [/home/melot/matlab/Matching_pursuit/path_to_sources/src/tests/signals/default.xml] contains no recognized blocks.
mptk DEBUG -- MP_Dict_c::~MP_Dict_c() - Deleting dict...
mptk DEBUG -- MP_Dict_c::~MP_Dict_c() - Done.
mptk ERROR -- mpd - Failed to create a dictionary from XML file [/home/melot/matlab/Matching_pursuit/path_to_sources/src/tests/signals/default.xml].
??? Error using ==> bookread
Can't open file [tempbook.bin]

Error in ==> mpd at 35
varargout{1} = bookread('tempbook.bin');

Error in ==> Mat2MPTKdemo at 2
[B, res, dec]=mpd(y, Fs, 'n', 1000, 'R', 100);%will run mpd with the 'default.xml' dictionary file.