uricamic / clandmark

Open Source Landmarking Library
http://cmp.felk.cvut.cz/~uricamic/clandmark
GNU General Public License v3.0
199 stars 111 forks source link

Missing 'CLandmarkConfig.h' on MATLAB wrapper #48

Closed meirela closed 8 years ago

meirela commented 8 years ago

Hey, me again...

Now I'm trying to compile to MEX in MATLAB, and I get the following error: clandmark

As I can see in the corresponding folder (/\libclanmark) - there is only a CLandmarkConfig.h.in file, and no "real" .h file.

Maybe I should CMake it all over with BUILD_MATLAB_BINDINGS set to ON?

uricamic commented 8 years ago

Hi @meirela,

you can try, but it seems there is some problem with this approach of propagation of the DOUBLE_PRECISION define on windows. Maybe it was generated but somewhere else then expected.

If you can't find that file, I think the following trick should do the job: comment out this line https://github.com/uricamic/clandmark/blob/master/libclandmark/CTypes.h#L17

meirela commented 8 years ago

Yep, it seems to be much of a problem building with BUILD_MATLAB_BINDINGS set to ON... Can't really say if that's connected to DOUBLE_PRECISION or not.

Won't it disturb the proper run of the system if CLandmarkConfig.h won't get in?

meirela commented 8 years ago

BTW - great support, I'd wish even my commercial software would give me such a service ;)

uricamic commented 8 years ago

The ClandmarkConfig.h serves so far only for propagation of the DOUBLE_PRECISION define, so it shouldn't cause any problems, as long as you provide the define by yourself, which if I see correctly, you do.

Thanks, it depends when the question is posed and how difficult the problem is to solve, though :)

meirela commented 8 years ago

Well, that worked....

A few stuff I needed to change (perhaps fixing it in the repo would be a good idea - let me know if you wanted me to do so):

in flandsmark_simple_example.m the model variable which get the path+xml model is both wrong (none of the models can be found in the models' folder, which is data and not models as specified in the file) as well as relative to the %clandmark_folder%/clandmark/matlab_interface folder.

The relative path is fine, but people should notice that the scripting of the MATLAB wrap have to be when your current path is %clandmark_folder%/clandmark/matlab_interface

but I got great result, 1 out of 1 with good accuracy: capture

uricamic commented 8 years ago

Hi @meirela,

yeah, the examples could be updated, I moved the models files out of the repository, since there is now more of them and they are quite big already, so it is better to store them separately. Apart from that, what exactly you had to modify? Maybe it is just platform specific, if not you can create pull request with the changes and I will check it.