How do slicing works
4 ビュー (過去 30 日間)
古いコメントを表示
How can i slice a tablet blister and do pre-processing on the sliced image. I mean, if i have a tablet like the below

And i want to slice the image like this:

Is there any method to achieve this?
0 件のコメント
採用された回答
Walter Roberson
2015 年 5 月 12 日
See mat2cell()
2 件のコメント
Walter Roberson
2015 年 5 月 13 日
What do you want the resulting image to look like? You are going to get out a cell containing 4 matrices each suitable for using image() on. You could paste them together in a different order and image() that if you wanted.
pieces = 2;
[r,c,p] = size(YourImage);
C = mat2cell(YourImage, r/pieces * ones(1,pieces), c/pieces * ones(1,pieces), p);
pastedBack = [C{:}];
image(pastedBack);
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!