画像の関心領域部分を選択し、一定の輝度値以上の面積と水平面からの傾きを求める方法はありますか?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Naoki Hashiguchi
am 27 Okt. 2022
Kommentiert: Naoki Hashiguchi
am 1 Nov. 2022

この液滴内部に含まれる粒子の面積,水平面からの傾きを求める方法を教えて頂きたいです.
0 Kommentare
Akzeptierte Antwort
Hernia Baby
am 27 Okt. 2022
Bearbeitet: Hernia Baby
am 31 Okt. 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 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
