How do slicing works

조회 수: 5 (최근 30일)
varsha
varsha 2015년 5월 12일
댓글: Walter Roberson 2015년 5월 13일
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?

채택된 답변

Walter Roberson
Walter Roberson 2015년 5월 12일
See mat2cell()
  댓글 수: 2
varsha
varsha 2015년 5월 13일
편집: varsha 2015년 5월 13일
I'm not able to display the resultant image after the 'mat2cell()' function. How to achieve this?
Walter Roberson
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!

Translated by