我有n个相同大小的图像需要沿Z轴堆叠,如图所示创建一种三维模型。我已经尝试过使用Z-Stack和不同的库(比如here)来实现这一点,然后我需要创建一个自顶向下的视图,其中包含将3D模型转换为2D图像的堆叠图像。在
我试过旋转每个切片,并用它制作一个TIFF-Z堆栈,但似乎无法使其工作。
n个图像的总数(ABCD),每个图像的大小为H x W像素,将沿着Z轴堆叠,如图所示,创建一个大小为W x n像素的自顶向下视图ABFE。在
ABFE是我想要达到的目标。在
由于我是新来的图像处理,任何帮助(也包括以后的研究术语)将不胜感激!在
Tags:
在numpy中,您将使用^{} :
这里的}是y轴,而第三个维度{}是z轴。在
axis
参数是关键,它告诉numpy连接数组的输入列表的轴(又称维)。维度从0开始,因此第一个维度axis=0
表示x轴,在这种情况下,第二个维度{OpenCV中的每个图像都是三维张量,最后一个维度是通道数,通常为3。将它们沿着另一个新的维度叠加需要一个4维张量。在
相关问题 更多 >
编程相关推荐