Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: how to extract and save data from histogram

$
0
0
"Wan Nurul Wahidah Wan Mustaffa Fikri" wrote in message <k76aol$8e1$1@newscl01ah.mathworks.com>...
> I already plotted the histogram from my image after convert it to grayscale mode by using 'rgb2gray' and 'imhist' function. The x-axis refer to 'Intensity Value' and y-axis refer to 'Distribution of Pixel'.
> The problem now is, how do I extract and save data from histogram into a table which can display both data of x-axis and y-axis? Which function should i use? Please help me..

while the hist figure is open:

xdata = get(findobj(gcf,'type','patch'),'xdata');
ydata = get(findobj(gcf,'type','patch'),'ydata');

don.

Viewing all articles
Browse latest Browse all 19628

Trending Articles