I am reading in an image with a face also im also reading reading second image that has face on it. Once I have read the both image, what i want to do is replace the face on the first image with the face on the second image. How can I do that?
    2 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Matias
 am 21 Nov. 2013
  
    
    
    
    
    Kommentiert: Image Analyst
      
      
 am 4 Dez. 2016
            So far in my code i can read in my files and store it. the problem is I do not know the commands to replace the face on first image with the face that is on the second image. If any one could please help on how to that, and what code can I use to to do this Thank You.
1 Kommentar
  Bruno Pop-Stefanov
    
 am 21 Nov. 2013
				
      Bearbeitet: Brewster
 am 21 Nov. 2013
  
			Are you trying to do automatic face swap like in that video? Or do you just want to detect the faces in the images and simply put on of them over the other?
Akzeptierte Antwort
  Image Analyst
      
      
 am 22 Nov. 2013
        See my demo attached below in blue. You'd need to adapt it to the shapes of the faces - I didn't do that in this general purpose demo (it's not developed with faces in mind).
2 Kommentare
  Image Analyst
      
      
 am 22 Nov. 2013
				These are the lines that you change:
% Read in a standard MATLAB gray scale demo image.
folder = fullfile(matlabroot, '\toolbox\images\imdemos');
baseFileName = 'eight.tif';
% Get the full filename, with path prepended.
fullFileName = fullfile(folder, baseFileName);
You can also use uigetfile() if you want to have the user browse for the file.
% Get the name of the file that the user wants to use.
defaultFileName = fullfile(startingFolder, '*.*');
[baseFileName, folder] = uigetfile(defaultFileName, 'Select a file');
if baseFileName == 0
  % User clicked the Cancel button.
  return;
end
fullFileName = fullfile(folder, baseFileName)
Weitere Antworten (1)
  Waleed Ahmed
 am 4 Dez. 2016
        i need a code for face swapping through face detection, anybody can help please
1 Kommentar
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!