Filter löschen
Filter löschen

Finding angle Between the bending of finger

3 Ansichten (letzte 30 Tage)
jari jafri
jari jafri am 3 Okt. 2023
Kommentiert: jari jafri am 4 Okt. 2023
I am trying to find out the bending angle of this finger. I have used the following matlab code and deducted the markers on the finger. but i am unable to get the bending angle as i cant find the cordinates or centroid of these markers. I will be thankful if you can please resolve this issue.
  2 Kommentare
jari jafri
jari jafri am 3 Okt. 2023
Bearbeitet: jari jafri am 4 Okt. 2023
This is my code that i used
clear all;
img1 = imread ('Picture1.png');
% Convert RGB image to chosen color space
I = rgb2hsv(img1);
% Define thresholds for channel 1 based on histogram settings
channel1Min = 0.889;
channel1Max = 0.001;
% Define thresholds for channel 2 based on histogram settings
channel2Min = 0.000;
channel2Max = 1.000;
% Define thresholds for channel 3 based on histogram settings
channel3Min = 0.000;
channel3Max = 1.000;
% Create mask based on chosen histogram thresholds
sliderBW = ( (I(:,:,1) >= channel1Min) | (I(:,:,1) <= channel1Max) ) & ...
(I(:,:,2) >= channel2Min ) & (I(:,:,2) <= channel2Max) & ...
(I(:,:,3) >= channel3Min ) & (I(:,:,3) <= channel3Max);
diskElem = strel('sphere',3);
IBWopen=imopen(sliderBW, diskElem);
%imshow(IBWopen )
hbobanalysis= vision.BlobAnalysis('MinimumBlobArea',200,...
[objArea, objCentrroid, bboxout] = step(hbobanalysis,IBWopen);
Ishape=insertShape(img1, "rectangle",bboxout,'LineWidth',4);
imshow(Ishape )
jari jafri
jari jafri am 3 Okt. 2023
Dear @Matt J the code is able deduct the red marks, but im ubale to find out the cordinates and therefore i can't find the bending angle. Is there any way that i can dind the angle between the 2 marker (red)

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 3 Okt. 2023
Try bwskel. Be careful though because some algorithm that works fine for a computer graphics image may fail miserably for a real world image, like a photo of a real finger.
  1 Kommentar
jari jafri
jari jafri am 4 Okt. 2023
Thanks @Image Analyst, can you please write a code using this bwskel command. I am also trying. but still unable to measure the bending angle for the finger

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by