hi I am working on gait analysis, frame based image processing. I am giving the code here someone please tell me how to do subtraction between the cell structure?

2 views (last 30 days)
j=1; idx=1; k=1; for i=1100:1120 a1=imread(strcat('',num2str(i),'.png')); a = imsubtract(a1(:,:,1), rgb2gray(a1)); [r,c]=size(a);
b=im2bw(a,.19); % b=im2bw(a,40/256); se = strel('disk',2); closeBW = imclose(b,se); % figure,imshow(closeBW); s1 = regionprops(closeBW, 'Centroid'); % centroids= cat(1,s1.Centroid); % centroids=floor(centroids);
centroids_temp= floor(cat(1,s1.Centroid)); centroids_temp1=randn(10,2);
% Display original image and superimpose centroids.
% hold(imgca,'on')
% plot(imgca,centroids_temp(:,1), centroids_temp(:,2), 'r*');
% impixelinfo;
% if length(centroids)==10
centroids{idx,1}=sortrows(centroids_temp,2);
end
in my code i first read the frames, subtract red components(which are my markers), find the coordinates. Then I am storing them all in a cell strcuture. now i need to find out which are the frames having less than 20 elements(where markers are missing). once i find them i need to subtract them with the previous frame coordinates to check if they fall within the threshold. If not that marker is missing. Than i have to go for interpolation. Now someone please help to do the subtraction part

Answers (0)

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!