How i can save all values of segmented image?
1 回表示 (過去 30 日間)
古いコメントを表示
Muhammad Hammad Malik
2018 年 12 月 11 日
コメント済み: Muhammad Hammad Malik
2018 年 12 月 11 日
i have extracted the tomato, now i want to know x,y, RGB, all values regarding this.how i can do it?thanks
see image.![tomato.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/198768/tomato.png)
![tomato.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/198768/tomato.png)
0 件のコメント
採用された回答
その他の回答 (1 件)
KSSV
2018 年 12 月 11 日
I = imread('download.png') ;
I1 = rgb2gray(I) ;
[y,x] = find(I1) ; % this igves you (x,y)
%
[nx,ny,nz] = size(I) ;
[X,Y] = meshgrid(1:ny,1:nx) ;
R = I(:,:,1) ;
iwant = zeros(length(x),nz) ;
for i = 1:nz
iwant(:,i) = interp2(X,Y,double(I(:,:,i)),x,y) ;
end
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!