0

Let be an image that has white background and three objects.
 The first object fills up 25% of the image pixels and is black;  The second object fills up 10% of the image pixels and has a gray level of 64;  The third object fills up 20% of the image pixels and has a gray level of 200.
How can i draw the histogram in matlab? i'm trying to use this as an example for a more complex one i got to do in matlab

  • I'm voting to close this question as not only is it a "do my homework for me" question, it involves no programming whatsoever and as such is off-topic for Stackoverflow. – beaker Jan 10 '16 at 21:26
  • it's not a "do my homework for me".how does it not involve any coding? – Gheorghe Bogdan Jan 10 '16 at 21:31
  • It's getting closer, now that you've mentioned MATLAB (you should really add the tag for the language you're using), but there's still no indication that you've attempted to write any code, just a problem statement. – beaker Jan 10 '16 at 21:36
  • oh sorry, forgot about that.i've been surfin around here and saw other posts and saw other tutorials but mosts of them were implying that you start with an image and you see/modify the histogram.i can't find a point to start in creating my own image from scratch – Gheorghe Bogdan Jan 10 '16 at 21:44
  • I'm not sure if im missing the point of this question but it seems just like 25% has value 64, 20% 200 and 10% has 64 and thus remainder 45% has value 255(white). Can you assume that the overal number of pixels is say 100 and plot a value of 25 as for the grey value(x-axis) 64, etc. ? – User404 Jan 11 '16 at 01:38

0 Answers0