Azzera filtri
Azzera filtri

How to shift a point parallel to X-axis to 2nd part of a superimposed image and calculate the indexing of that point on the 2nd image?

2 visualizzazioni (ultimi 30 giorni)
</matlabcentral/answers/uploaded_files/127259/fused.PNG> I am attaching here the code I used, all I want is to mark the two points in the side-view image of a person that can be useful for defining the dimensions of his neck. I am not able to shift the point marked in Cyan or Blue color to the other image and plot it there as well as get the indexing value for that point once marked on the 2nd image also. here is my code--->
if true
n1 = a2(:, 1 : end/2); %a2 is the binary image of side-view
n2 = n1(:, end/2 : end);
n3 = n2(:, end/2 : end);
[X2,Y2,x2,y2]=mysmooth(a2); %mysmooth function just smoothens the image using a filtering algorithm and mark boundaries of image, x2,y2 are inner boundaries and X2,Y2 are smoothened boundaries.
[X3,Y3,x3,y3]=mysmooth(n3);
%%omitted part of code
[~,nloc] = findpeaks(x2(xmin:head));
nxloc = min(nloc); %back neck point on image a2
[~,nloc2] = findpeaks(-x3(headn:basen));
nxloc2 = min(nloc2); %front neck point on image n3
N4 = imfuse(a2,n3);
figure, imshow(N4);
hold on
plot(x3,y3,'b-','linewidth',2);
plot(x3(nxloc2), y3(nxloc2),'c*'); %%concerned to map this point on the boundaries x2,y2 and get the indexing value at that point.
plot(x2,y2,'b-','linewidth',2);
%%plotting some other points as well
plot(x2(nxloc), y2(nxloc),'m*');
end
After reading my code and if you are able to understand what I actually want to do please suggest some method or a different algorithm to do the same work shall also be appreciated.
Thank You.

Risposte (0)

Prodotti


Release

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by