How to convert an image frame of Facial extracted features to a 0-1 matrix...????

1 次查看(过去 30 天)
How to convert an image frame of Facial extracted features to a 0-1 matrix...????
Here 0-1 means , wherever the extracted features are plotted on the image , there the matrix value should be 1, otherwise 0 anywhere else.....
Like in this link, the detected features are plotted on the image.....
So, how can I change the facial features wherever in the image to 1 and except it, the other values should be zero.....
  2 个评论
FARAH ANSARI
FARAH ANSARI 2013-4-17
Actually Sir, After running this code, it is generating only a matrix of my image Frame size of zeros.... But I want to make a matrix of those feature values, which I detect from an image and mark those features on that given previous image..... The detected features should be marked as '1' and the other values should be '0' in the matrix.... Now please try to write another code....thank U..... like if the features detected are giving the value in Frame as: - 132 234
234 223
234 55
54 67
76 98
65 244
it should give the value like
1 0
0 1
0 0
0 1
1 0
1 1
1 0
where all '1s' are the detected feature values and the rest value should be '0' in matrix....
Image Analyst
Image Analyst 2013-4-17
I don't understand what those numbers are. Are they x,y coordinates of salient points? What is the 1,0 matrix? It's not an image, so what is it? What if the features are the area of the head, the length of the nose, the mean color of the face, and the distance between the eyes. How would you handle that?

请先登录,再进行评论。

回答(1 个)

Image Analyst
Image Analyst 2013-4-17
Obviously, first, you must have a list of the x,y coordinates of the features. So then just make a matrix and assign them
featureLocations = zeros(size(grayImage));
for k = 1 : length(y)
featureLocations (y(k), x(k)) = 1;
end
It's as simple as that.

类别

Help CenterFile Exchange 中查找有关 Feature Detection and Extraction 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by