LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Projecting a facial image into a new face-space.

Dear all,

I am working on face recognition using Principle Component Analysis (PCA) using LabVIEW. I have been successful uptil sorting eigenvectors by their corresponding eigen-values but now can't get any clear ideas on how to project my training images in database into a new space to reduce the dimension. I had done the same using Matlab. The script for this operation in Matlab goes like this:

projectedimages = [];
number_of_images = size(eigenfaces,2);
for i = 1 : number_of_images
vector = eigenfaces'*A(:,i);
projectedimages = [projectedimages vector];
end

 

This part of Matlab code actually projects the training images into a new space by calculating the DOT product between image and each of the eigen-vectors. So far what I have been successful in is how to calculate eigen-vectors, sorted. Any idea how should I project my images into new space by applying precisely the aforementioned Matlab technique?


Untitled.png

Regards.

 




0 Kudos
Message 1 of 11
(4,248 Views)

I don't see any DOT product function. Are you sure you are not overflowing by doing a elementwise multiplication of two U8 arrays?

0 Kudos
Message 2 of 11
(4,237 Views)

I have no idea. What do you suggest? 


0 Kudos
Message 3 of 11
(4,217 Views)

The actual algorithm suggests me to use a DOT product. But in most of the codes people have multiplied the transpose eigenvectors with the average face. 


0 Kudos
Message 4 of 11
(4,189 Views)

Multiplying the transpose of the eigenvector is the dot product.  The code you posted in the first post is too small for me to see what nodes you're using, so I can't see what you're doing in LabVIEW.  What are you trying to project your eigenvectors onto?

Julian R.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 11
(4,166 Views)

I am working on face recognition using Principle component analysis where you reduce the dimensions of all training images and extract important features of FACES by taking first few eigenvalues and their corresponding eigenvectors.
Now that I have my eigen vectors, I need to project the original 8-bit images ( 48 in my case ) into the face space i.e. I need to project the eigen vectors over all the images such that each image has now reduced dimension. For that I need to take dot product of the sorted eigen-vectors with every image one-by-one ( will utilize FOR loop ). 

 

Image attached.


0 Kudos
Message 6 of 11
(4,157 Views)

OMG,
I was simply multiplying the matrices all the time when I had to take a cross product.


0 Kudos
Message 7 of 11
(4,134 Views)

@Spicy_Mystery wrote:

The code you posted in the first post is too small for me to see what nodes you're using, so I can't see what you're doing in LabVIEW.


You should be able to click on the attachment and see it at full resolution.

0 Kudos
Message 8 of 11
(4,119 Views)

Dear all,
I ahve attached a zip folder containing my VI, a matlab script for same application and few data base images. I have tried everything in labVIEW but not getting required results. Please have a look.

Regards


0 Kudos
Message 9 of 11
(4,108 Views)

Hi NapDynamite (great movie if I interpreted the reference correctly),

 

If you do not have to implement the algorithm only in LabVIEW and since you already have a working algorithm that you developed in the MathWorks, Inc. MATLAB® software, you could alternatively just run the m-file in LabVIEW using either the MathScript script node or the MATLAB® script structure. The difference being that one uses the MathScript engine and the other runs the code through MATLAB®. There are also some functions that might not work in the MathScript node.

 

I am not overly familiar with facial tracking in LabVIEW, but if it works to use one of these options, then you should not have to implement the algorithm again.

 

MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.

------------------------------
Bill E. | Applications Engineer | National Instruments
0 Kudos
Message 10 of 11
(4,073 Views)