MATLAB Answers


Face recognition in simulink using eigen face method. Loading eigen faces matrix to simulink.

Asked by METHUKU
on 21 May 2012
Latest activity Commented on by Jorge
on 7 Mar 2014

I have to do face recognition in simulink , matlab would have been lot easier for me. I aim to do it using eigen face method. In that i have to load the eigen faces matrix, and a mean column vector(pre calculated in matlab). i have to load these into simulink workspace. I have checked the simulink from workspace block it inputs the values in time format.but these are one time inputs and i ll be using them in embedded matlab function block.i have tried loading them to model workspace by importing the mat file in model explorer. But i am lost here i dont know how to call them in embedded matlab function block.I ll have to update values of the loaded can you please help me with loading the mat file to simulink and using their values in embedded matlab function block. and update them during the simulation.

Thanks in advance


Log in to comment.

1 Answer

Answer by Kaustubha Govind on 22 May 2012

If you have time-varying data, you need to use either the From Workspace block or the Data Import/Export Pane to import the data via an Inport block - both blocks will let you bring your MATLAB data as a Simulink signal into your model.

Since it appears you have Constant inputs (ie. same data is used at every time step), you can simply use the Constant block, and enter the name of your workspace variable as the "Constant value" in the dialog.

  1 Comment

I'm trying to do my own object detector but using the function vision.cascadeojectdetector,this function is not supported by simulink and I want to know if there is a way to import this variables from matlab to simulink, this is part of the code that i need to implement in the raspberry pi

meDetector = vision.CascadeObjectDetector('Data_90_HOG_FAR_0.2.xml'); bbox = step (meDetector, out); detectedImg = insertObjectAnnotation(out, 'rectangle', bbox, 'Data_90');

Log in to comment.

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today