how to obtain the gray level values of the image pixels??

76 views (last 30 days)
Meghashree G
Meghashree G on 19 Dec 2015
Commented: Meghashree G on 8 Jan 2016
I'm doing handwriting analysis,for that one feature is to identify the pressure.For the analysis of pen pressure, Mean gray level value is computed using the gray level values of the image pixels.But how to take these gray level values?? For reference i have attached the image.Please do help me.Thank you
if i use
meanIntensityValue = mean(grayImage(:));
is it that mean of both white and black pixels ? i want only mean of black pixels.

Answers (1)

Image Analyst
Image Analyst on 19 Dec 2015
You can get a mask of the letters using my attached demo.
Then do
meanGrayLevel = grayImage(mask);
  9 Comments
Meghashree G
Meghashree G on 8 Jan 2016
Thank you sir.And very sorry for asking after a long gap! I am now calculating meanGrayLevel,but its not displaying anything in the terminal.How do i get the value?please help me

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!