How do you deal the third dimension of a 3-d array to individual 2-d arrays?
조회 수: 1 (최근 30일)
이전 댓글 표시
Right now I have
m =imread(image);
red = im(:,:,1);
green = im(:,:,2);
blue = im(:,:,3);
How do I combine the red = ... green =, blue =... steps into one online?
댓글 수: 1
Stephen23
2018년 5월 6일
"How do I combine the red = ... green =, blue =... steps into one online?"
Why do you want to do this? Your code now is simple, neat, and efficient: what is your aim?
답변 (1개)
Ameer Hamza
2018년 5월 5일
편집: Ameer Hamza
2018년 5월 5일
Here is a possible way to do that,
im = num2cell(imread(image), [1 2]);
[red, green, blue] = im{:};
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!