画像の関心領域部分を選択し、一定の輝度値以上の面積と水平面からの傾きを求める方法はありますか?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Naoki Hashiguchi
le 27 Oct 2022
Commenté : Naoki Hashiguchi
le 1 Nov 2022
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1170648/image.bmp)
この液滴内部に含まれる粒子の面積,水平面からの傾きを求める方法を教えて頂きたいです.
0 commentaires
Réponse acceptée
Hernia Baby
le 27 Oct 2022
Modifié(e) : Hernia Baby
le 31 Oct 2022
clear,clc;
I = imread('image.bmp');
I = imcrop(I,[150 175 300 inf]);
輝度で物体を白抜きしてみます
idx = I < 50;
I(idx) = uint8(255);
imshow(I)
白抜きの部分は以下の通りです。
I_sum = sum(idx,"all")
角度については少し自信ありません…
物体の各座標最大(いちばん下&いちばん右)
[r,c] = find(idx);
T = [r c];
[~,idx1]=max(T)
T1 = [T(idx1,:), zeros(2,1)]
theta = rad2deg(subspace([1,0,0]',diff(T1)'))
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur ライティング、透明度、およびシェーディング dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!