Histogram to image
이전 댓글 표시
Hi, I'm a Matlab newbie and I desperately need your help. I need to enhance image by performing operations on its histogram. But how can I apply that changes to the image? It's easy to extract histogram form the image but how to transform histogram back into image after performing e.g. histogram smoothing?
답변 (2개)
Image Analyst
2011년 12월 24일
0 개 추천
I suppose you could maybe use the intlut() function. But why don't you tell us what you want to do and we can tell you the best way to achieve it? You can upload your image to tinypic.com.
M W
2011년 12월 24일
0 개 추천
댓글 수: 6
Image Analyst
2011년 12월 24일
Who said anything about removing noise from the image? I don't think you need to. Just follow their algorithm. After smoothing you just continue on and you'll get the expected image.
M W
2011년 12월 25일
Image Analyst
2011년 12월 25일
It seems like they want to perform a histogram equalization on grayscale regions between those specific ranges rather than the full 0-255. The way to do this is to do it just like you'd do it for the full 0-255 range but just in that range. The "dumb" but standard way is to compute the cumulative distribution function of the histogram, but just within that small range, and then use intlut to redistribute the gray levels, but again JUST WITHIN THAT RANGE, not over the whole 0-255. (If you did it piecewise over the whole 0-255 I'm sure it would look bizarre with many false edges popping up.) To me it seems like this piecewise method would produce a subtle effect but maybe that's what they're after since they seem to say that the standard way of doing it produces images that are too harsh (which is true and is why global histogram equalization is almost never used in practice and is usually just to illustrate concepts for beginners in image processing).
If you want a more sophisticated and better way that produces a flatter, more evenly distributed output distribution, at the expense of a more complicated algorithm, then check out my histogram shaping File Exchange submission at http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 You could use this in the small ranges instead of the standard CDF way.
M W
2011년 12월 25일
Image Analyst
2011년 12월 25일
It may take you a while, as it would for me, but I think is something that you could handle.
M W
2011년 12월 25일
카테고리
도움말 센터 및 File Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!