如何在 MATLAB 中使用 imhist 绘制体积的直方图?

发布于 2024-11-19 20:06:31 字数 368 浏览 3 评论 0原文

我有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

写下不归期 2024-11-26 20:06:31

imhist 也接受一维输入。因此,您可以将体积重塑为向量,并像这样调用 imhist

imhist(volume(:))

imhist also accepts one-dimensional input. Thus, you can reshape your volume into a vector, and call imhist like this:

imhist(volume(:))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文