Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to import .dat file to MATLAB memory?

Subject: how to import .dat file to MATLAB memory?

From: Ooi

Date: 22 Dec, 2012 02:36:24

Message: 1 of 7

i come across this link: http://cmp.felk.cvut.cz/~uricamic/flandmark/

it said the MATLAB code is workable, so i tried and modified:

% Load image and convert it to grayscale
I = rgb2gray(imread('DSCF5508.jpg'));
% Get face bounding box
bbox = [72, 72, 183, 183];
% Load flandmark_model file into MATLAB memory
model = flandmark_load_model('F:/Project/Face recognition/Installer/flandmark-master/data/flandmark_model.dat');
% Detect facial landmark calling the mex function
landmarks = flandmark_detector(I, int32(bbox), model);

But it comes out an error message:

Undefined function 'flandmark_load_model' for input arguments of
type 'char'.

Error in asd (line 7)
model = flandmark_load_model('F:/Project/Face
recognition/Installer/flandmark-master/data/flandmark_model.dat')

ps: asd is a script file name, named as asd.m

Can anyone help me to solve it??? I have totally no idea TT

Subject: how to import .dat file to MATLAB memory?

From: Steven_Lord

Date: 31 Dec, 2012 05:40:01

Message: 2 of 7



"Ooi " <negative1993@yahoo.com> wrote in message
news:kb36b7$2ae$1@newscl01ah.mathworks.com...
> i come across this link: http://cmp.felk.cvut.cz/~uricamic/flandmark/
>
> it said the MATLAB code is workable, so i tried and modified:

*snip*

> But it comes out an error message:
>
> Undefined function 'flandmark_load_model' for input arguments of
> type 'char'.

This is not a function included in MATLAB or any MathWorks toolbox; it
appears to be a function included in the toolbox available for download from
the site to which you linked. Download it and put it in a directory that's
on the MATLAB path (NOT a directory under the toolbox subdirectory!) and you
should be able to use that function just like you'd use a function in MATLAB
or a MathWorks toolbox.

http://www.mathworks.com/help/matlab/matlab_env/using-the-matlab-search-path.html

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: how to import .dat file to MATLAB memory?

From: Ooi

Date: 2 Jan, 2013 09:01:08

Message: 3 of 7

"Steven_Lord" <slord@mathworks.com> wrote in message <kbr8fh$bf5$1@newscl01ah.mathworks.com>...
>
>
> "Ooi " <negative1993@yahoo.com> wrote in message
> news:kb36b7$2ae$1@newscl01ah.mathworks.com...
> > i come across this link: http://cmp.felk.cvut.cz/~uricamic/flandmark/
> >
> > it said the MATLAB code is workable, so i tried and modified:
>
> *snip*
>
> > But it comes out an error message:
> >
> > Undefined function 'flandmark_load_model' for input arguments of
> > type 'char'.
>
> This is not a function included in MATLAB or any MathWorks toolbox; it
> appears to be a function included in the toolbox available for download from
> the site to which you linked. Download it and put it in a directory that's
> on the MATLAB path (NOT a directory under the toolbox subdirectory!) and you
> should be able to use that function just like you'd use a function in MATLAB
> or a MathWorks toolbox.
>
> http://www.mathworks.com/help/matlab/matlab_env/using-the-matlab-search-path.html
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com






I did what you have written, but it comes out with the same error too. I have no idea to solve it

Subject: how to import .dat file to MATLAB memory?

From: Michal Uricar

Date: 21 Jan, 2013 10:08:08

Message: 4 of 7

Hi,

have you compiled the flandmark successfully (and with BUILD_MATLAB_BINDINGS=ON)? If yes, then, please, try to run the enclosed script
flandmark_simple_example.m
which you can find in the matlab_toolbox directory.
It should work smoothly.

In case of troubles, don't hesitate to contact me on email.

"Ooi " <negative1993@yahoo.com> wrote in message <kc0t0k$f33$1@newscl01ah.mathworks.com>...
> "Steven_Lord" <slord@mathworks.com> wrote in message <kbr8fh$bf5$1@newscl01ah.mathworks.com>...
> >
> >
> > "Ooi " <negative1993@yahoo.com> wrote in message
> > news:kb36b7$2ae$1@newscl01ah.mathworks.com...
> > > i come across this link: http://cmp.felk.cvut.cz/~uricamic/flandmark/
> > >
> > > it said the MATLAB code is workable, so i tried and modified:
> >
> > *snip*
> >
> > > But it comes out an error message:
> > >
> > > Undefined function 'flandmark_load_model' for input arguments of
> > > type 'char'.
> >
> > This is not a function included in MATLAB or any MathWorks toolbox; it
> > appears to be a function included in the toolbox available for download from
> > the site to which you linked. Download it and put it in a directory that's
> > on the MATLAB path (NOT a directory under the toolbox subdirectory!) and you
> > should be able to use that function just like you'd use a function in MATLAB
> > or a MathWorks toolbox.
> >
> > http://www.mathworks.com/help/matlab/matlab_env/using-the-matlab-search-path.html
> >
> > --
> > Steve Lord
> > slord@mathworks.com
> > To contact Technical Support use the Contact Us link on
> > http://www.mathworks.com
>
>
>
>
>
>
> I did what you have written, but it comes out with the same error too. I have no idea to solve it

Subject: how to import .dat file to MATLAB memory?

From: Li

Date: 20 May, 2013 08:06:10

Message: 5 of 7

Hi, I can not compile this file in matlab.
I change the opencv2.3.0 path in the file "flandmark_compilemex", and get an error:

Warning: MEX could not find the library "flandmark_static" specified with -l option.
         MEX looked for a file with one of the names:
               flandmark_static.lib
               libflandmark_static.lib
         MEX looked for the library in the following directories:
               C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB\amd64
               C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\amd64
               C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\x64
               C:\Program Files\MATLAB\R2012a\extern\lib\win64
               C:\Program Files\MATLAB\R2012a\extern\lib\win64\microsoft
               ../bin7/libflandmark/Release
 
   Creating library C:\Users\lbsswu\AppData\Local\Temp\mex_LvgNQz\templib.x and object C:\Users\lbsswu\AppData\Local\Temp\mex_LvgNQz\templib.exp
flandmark_detector_mex.obj : error LNK2019: unresolved external symbol "int __cdecl flandmark_detect(struct _IplImage *,int *,struct model_struct *,double *,int *)" (?flandmark_detect@@YAHPEAU_IplImage@@PEAHPEAUmodel_struct@@PEAN1@Z) referenced in function mexFunction
E:\TDDOWNLOAD\flandmark\matlab_toolbox\mex\flandmark_detector.mexw64 : fatal error LNK1120: 1 unresolved externals
 
  C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Link of 'E:\TDDOWNLOAD\flandmark\matlab_toolbox\mex\flandmark_detector.mexw64' failed.
 
Error using mex (line 206)
Unable to complete successfully.

Error in flandmark_compilemex (line 79)
    eval(['mex -O -largeArrayDims ./mex/flandmark_detector_mex.cpp
    -I../libflandmark/' include libflandmark cvlibs ' -output
    ../matlab_toolbox/mex/flandmark_detector']);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Could you tell me what step to compile your code in matlab?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

"Michal Uricar" <uricar.michal@gmail.com> wrote in message <kdj428$pnl$1@newscl01ah.mathworks.com>...
> Hi,
>
> have you compiled the flandmark successfully (and with BUILD_MATLAB_BINDINGS=ON)? If yes, then, please, try to run the enclosed script
> flandmark_simple_example.m
> which you can find in the matlab_toolbox directory.
> It should work smoothly.
>
> In case of troubles, don't hesitate to contact me on email.
>
> "Ooi " <negative1993@yahoo.com> wrote in message <kc0t0k$f33$1@newscl01ah.mathworks.com>...
> > "Steven_Lord" <slord@mathworks.com> wrote in message <kbr8fh$bf5$1@newscl01ah.mathworks.com>...
> > >
> > >
> > > "Ooi " <negative1993@yahoo.com> wrote in message
> > > news:kb36b7$2ae$1@newscl01ah.mathworks.com...
> > > > i come across this link: http://cmp.felk.cvut.cz/~uricamic/flandmark/
> > > >
> > > > it said the MATLAB code is workable, so i tried and modified:
> > >
> > > *snip*
> > >
> > > > But it comes out an error message:
> > > >
> > > > Undefined function 'flandmark_load_model' for input arguments of
> > > > type 'char'.
> > >
> > > This is not a function included in MATLAB or any MathWorks toolbox; it
> > > appears to be a function included in the toolbox available for download from
> > > the site to which you linked. Download it and put it in a directory that's
> > > on the MATLAB path (NOT a directory under the toolbox subdirectory!) and you
> > > should be able to use that function just like you'd use a function in MATLAB
> > > or a MathWorks toolbox.
> > >
> > > http://www.mathworks.com/help/matlab/matlab_env/using-the-matlab-search-path.html
> > >
> > > --
> > > Steve Lord
> > > slord@mathworks.com
> > > To contact Technical Support use the Contact Us link on
> > > http://www.mathworks.com
> >
> >
> >
> >
> >
> >
> > I did what you have written, but it comes out with the same error too. I have no idea to solve it

Subject: how to import .dat file to MATLAB memory?

From: fargoodarzi@gmail.com

Date: 14 Jan, 2014 10:31:10

Message: 6 of 7

On Saturday, December 22, 2012 10:36:24 AM UTC+8, Ooi wrote:
> i come across this link: http://cmp.felk.cvut.cz/~uricamic/flandmark/
>
>
>
> it said the MATLAB code is workable, so i tried and modified:
>
>
>
> % Load image and convert it to grayscale
>
> I = rgb2gray(imread('DSCF5508.jpg'));
>
> % Get face bounding box
>
> bbox = [72, 72, 183, 183];
>
> % Load flandmark_model file into MATLAB memory
>
> model = flandmark_load_model('F:/Project/Face recognition/Installer/flandmark-master/data/flandmark_model.dat');
>
> % Detect facial landmark calling the mex function
>
> landmarks = flandmark_detector(I, int32(bbox), model);
>
>
>
> But it comes out an error message:
>
>
>
> Undefined function 'flandmark_load_model' for input arguments of
>
> type 'char'.
>
>
>
> Error in asd (line 7)
>
> model = flandmark_load_model('F:/Project/Face
>
> recognition/Installer/flandmark-master/data/flandmark_model.dat')
>
>
>
> ps: asd is a script file name, named as asd.m
>
>
>
> Can anyone help me to solve it??? I have totally no idea TT

True I cannot compile under matlab either get the same error .

Subject: how to import .dat file to MATLAB memory?

From: Steven Lord

Date: 14 Jan, 2014 15:02:42

Message: 7 of 7


<fargoodarzi@gmail.com> wrote in message
news:fbe53b22-6205-47ce-ad58-cfc509320ab3@googlegroups.com...
> On Saturday, December 22, 2012 10:36:24 AM UTC+8, Ooi wrote:
>> i come across this link: http://cmp.felk.cvut.cz/~uricamic/flandmark/

*snip*

>> Can anyone help me to solve it??? I have totally no idea TT
>
> True I cannot compile under matlab either get the same error .

Did you download and install the toolbox available from the Downloads
section of that page? The flandmark_load_model function is NOT part of
MATLAB but is implemented in this user-written toolbox. Without that toolbox
being installed, you would not be able to use this function.

If you did download the toolbox and install it, or if you need help
installing it, contact the authors (whose email addresses are at the top of
that page) for assistance.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us