How can i detect faces and censor(pixelate) it ?

3 views (last 30 days)

I have a school project and i have 5 days to go to do it.We need to detect faces vision.CascadeObjectDetector and after that we need to censor out the faces.The result should be an image which i add there.

But insted of blurring the face i need to pixel the detected face like this. https://www.google.sk/search?q=censored+face&tbm=isch&source=iu&ictx=1&fir=0Spj2NSDFA1zfM%253A%252Ci7J8rMBqEz4lSM%252C_&usg=__kBDLl6DT7K38L5fdOtn5MfSWjGQ%3D&sa=X&ved=0ahUKEwi3tPfb1MbaAhWEEywKHViBAh0Q9QEIKTAA#imgrc=oZLGM0rP5tnKtM: .My problem is that i dont know how to pixel out the face i have found a source code for detect the faces clear all clc %Detect objects using Viola-Jones Algorithm

%To detect Face FDetect = vision.CascadeObjectDetector;

%Read the input image I = imread('lena512c.bmp');

%Returns Bounding Box values based on number of objects BB = step(FDetect,I);

figure, imshow(I); hold on for i = 1:size(BB,1) rectangle('Position',BB(i,:),'LineWidth',5,'LineStyle','-','EdgeColor','r');

end title('Face Detection'); hold off;

It s the second part.It need to be figured into the same image.That red rectangle need to be pixeld. I hope that someone should help me to solve this issue. Thank you very much.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!