Info
此问题已关闭。 请重新打开它进行编辑或回答。
How can I save line 1 in all images
1 次查看(过去 30 天)
显示 更早的评论
I have an image directory consist I1, I2,....In same size I1=[1 1 1 0;1 1 1 0;1 1 1 0]; I2=[1 0 1 0;1 0 1 0;1 0 1 0]; .... In=[1 1 0 1;1 1 0 1;1 1 0 1]; how can I save data=[1 1 1 0; 1 0 1 0;....1 1 0 1]( 1 1 1 0: line 1 of image I1,....1 1 0 1: line 1 of image In)
回答(1 个)
Andrei Bobrov
2011-5-25
I1=[1 1 1 0;1 1 1 0;1 1 1 0];
I2=[1 0 1 0;1 0 1 0;1 0 1 0];
In=[1 1 0 1;1 1 0 1;1 1 0 1];
variant 1
I = [I1 I2 In];
data = reshape(I(1,:),size(I1,2),[]).'
variant 2
I = cat(3,I1,I2,In);
data = permute(I(1,:,:),[3 2 1])
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!