필터 지우기
필터 지우기

Finding angle Between the bending of finger

조회 수: 4 (최근 30일)
jari jafri
jari jafri 2023년 10월 3일
댓글: jari jafri 2023년 10월 4일
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
jari jafri
jari jafri 2023년 10월 3일
편집: jari jafri 2023년 10월 4일
This is my code that i used
clc;
clear all;
clear;
img1 = imread ('Picture1.png');
%subplot(1,3,1)
%imshow(img1);
% 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);
%subplot(1,3,2)
%imshow(sliderBW)
diskElem = strel('sphere',3);
IBWopen=imopen(sliderBW, diskElem);
%subplot(1,3,3);
%imshow(IBWopen )
%%
hbobanalysis= vision.BlobAnalysis('MinimumBlobArea',200,...
'MaximumBlobArea',3000);
[objArea, objCentrroid, bboxout] = step(hbobanalysis,IBWopen);
bboxout
%%
Ishape=insertShape(img1, "rectangle",bboxout,'LineWidth',4);
figure
subplot(1,2,1);
imshow(Ishape )
%%
%%
release(hbobanalysis)
jari jafri
jari jafri 2023년 10월 3일
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)

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2023년 10월 3일
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
jari jafri
jari jafri 2023년 10월 4일
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

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by