Help on 3D face showing

4 views
Skip to first unread message

童灿

unread,
Jun 22, 2009, 8:55:27 PM6/22/09
to face...@googlegroups.com
Hello everyone.
I want to show the pics of 3D images in FRGC. Since I use the database in windows. How can I show pics like the attached file?  Pics I draw is so ugly and not clear to understand. I was so depressed. And I turn to you for help!
Thank you for your time!
still another problem ,How to read the landmark files in FRGC database in windows. Thank you again.
All the best!
 


--
TONG Can
Tel:+81-080-3992-6328
Graduation of Information, Production and Systems, Waseda University
2-6-218 Hibikino, Wakamatsu-ku, Kitakyushu-shi,Fukuoka 808-0135, Japan
E-Mail:ton...@toki.waseda.jp



200万种商品,最低价格,疯狂诱惑你

Ye Pan

unread,
Jun 22, 2009, 9:00:55 PM6/22/09
to face...@googlegroups.com
  Try the following codes:
  % read number of rows
  r = fgetl(fid);
  row = sscanf(r, '%d');
  % read number of columns
  c = fgetl(fid);
  col = sscanf(c, '%d');
  % read junk line
  tmp = fgetl(fid); clear tmp;
  % get flags
  F = fscanf(fid,'%d',[col row])';
  % get x values
  X1 = fscanf(fid,'%f',[col row])';
  % get y values
  Y1 = fscanf(fid,'%f',[col row])';
  % get z values
  Z1 = fscanf(fid,'%f',[col row])';
  fclose(fid);
  len = 0;
  for i = 1:row
     for j = 1:col
          if(F(i,j))
            len = len + 1;
            X(len) = X1(i,j);
            Y(len) = Y1(i,j);
            Z(len) = Z1(i,j);
          end
     end
  end 
%
plot3(X,Y,Z,'b.');
%
[XI,YI] = meshgrid(-col/2:1:col/2,row/2:-1:-row/2);
ZI = griddata(X,Y,Z,XI,YI,'cubic');
figure,surfl(XI,YI,ZI);
shading interp
colormap(gray);


2009/6/22 童灿 <tongca...@163.com>

童灿

unread,
Jun 24, 2009, 12:30:38 AM6/24/09
to face-rec
Thank you. This is exactly what I want.


 

--
TONG Can
Tel:+81-080-3992-6328
Graduation of Information, Production and Systems, Waseda University
2-6-218 Hibikino, Wakamatsu-ku, Kitakyushu-shi,Fukuoka 808-0135, Japan
E-Mail:ton...@toki.waseda.jp

200万种商品,最低价格,疯狂诱惑你
Reply all
Reply to author
Forward
0 new messages