Find a White area in image (face)
Show older comments

Hi, I need to draw a rectangle on my face using white pixels.
Accepted Answer
More Answers (2)
KALYAN ACHARJYA
on 30 Aug 2017
Total white area within the image
%
nWhite_pixels=sum(face_image(:));
[rows columns depth]=size(face_image);
percentage_of_white_area=(nWhite_pixels/(rows*columns))*100;
disp(percentage_of_white_area);
%
2 Comments
amala david
on 23 Feb 2018
what is face_image(:) and what is the function of this line.. can anyone explaining about it..
Image Analyst
on 23 Feb 2018
In that code, face_image is the binary image mask, where it's true if the pixel is considered a face pixel, and false if the pixel is not a face pixel.
Shahid Mandokhail
on 18 Mar 2019
0 votes
bro how you get this result of face which you uploaded?
3 Comments
Image Analyst
on 18 Mar 2019
Probably did it with color segmentation.
See the Color Thresholder app on the apps tab of the tool ribbon.
Shahid Mandokhail
on 18 Mar 2019
Okay Thaks sir.
Miguel Angel Antunez
on 18 Mar 2019
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!