[~, lowMap] = histeq(grayImage(binaryImageLow));
6 次查看(过去 30 天)
显示 更早的评论
what does the above code do ? and what is ~ ? can i've a simple example
0 个评论
采纳的回答
Walter Roberson
2013-7-3
In that context, the ~ means to throw away the result that would normally go into that position. It is almost identical to saying
[TEMP17393, lowMap] = histeq(grayImage(binaryImageLow)); clear TEMP17393
except with no possibility of clashing variable names.
0 个评论
更多回答(1 个)
Image Analyst
2013-7-3
grayImage(binaryImageLow) takes all the pixels that are "true" (white) in the binary image (mask) and strings them together into a 1D array - essentially a list of all the gray levels in the masked area.
histeq() then does histogram equalization on that 1D array. In my experience, histogram equalization is rarely helpful or even needed at all. It returns the lookup table that tells what input gray level should be mapped to what output gray level.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!