如何在 MATLAB 中使用 imhist 绘制体积的直方图?
我有 TIFF 图像数组。我把它们叠起来做成一卷。如何在 MATLAB 中绘制体积直方图?函数“imhist”期望其输入是二维的。
我还尝试绘制各个 TIFF 的直方图并进行合并,但徒劳无功。
这是我尝试合并直方图的代码:
counter = 0;
for i = 1:numel(image_files)
[count, x] = imhist(vol(:,:,i));
counter = count + counter
end;
Is/are there any other way I canplot the histogram of avolume in MATLAB?
谢谢。
I have array of TIFF images. I have stacked them to make a volume. How can I plot the histogram of the volume in MATLAB? The function "imhist" expects its input to be two-dimensional.
I have also tried to plot the histogram of individual TIFFs and consolidate, but in vain.
Here is the code I tried to consolidate the histograms:
counter = 0;
for i = 1:numel(image_files)
[count, x] = imhist(vol(:,:,i));
counter = count + counter
end;
Is/are there any other ways I could plot the histogram of a volume in MATLAB?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
imhist
也接受一维输入。因此,您可以将体积重塑为向量,并像这样调用imhist
:imhist
also accepts one-dimensional input. Thus, you can reshape your volume into a vector, and callimhist
like this: