Calculating a new 3D point to align ocular implants in patient after orbital resection using facial landmarks

2 vues (au cours des 30 derniers jours)
i would like to calculate the position of a yet to determine point in a 3D space. This point should be calculated from four existing points, each with it's own coordinates (x,y,z).
the four points represent the nose tip, left mouth corner, right mouht corner and the pupil of the right eye. the goal is to calculate/determine the poisition of the pupil of the right eye in order to align the pupil of an ocular implant
Coordinates:
RightEye: [ 24.14, 27.52, -298.58 ]
NoseTip: [ 57.21, -3.42, -264.76 ]
LeftMouthCorner: [ 83.30, -42.86, -293.53 ]
RightMouthCorner: [ 28.69, -44.08, -297.36 ]
One condition is that the natural symetry axis of the face can not be used, becasue in the clinical cases this axis is heavily influenced by the consequenses of surgical intervention and radiation therapy. Also, the natural ratio's between the facial landmarks need to be respected as accurate as possible.
The known coordinates of the point that needs to be calculates is [ 89.37, 28.74, -296.97 ]. But i need a way that can approximate this point as close as possible.
My best guess is to write a code that creates a new point whilst taking several conditions in account like the distance from the new point to the existing points and their different ratios, but i can figure out how to start that kind of code dus to my severe lack of experience in matlab.
I know this community is not meant to aks someone to write a complete code for me, but i would appreciate the tips!
Many thanks in advance!

Réponses (1)

Kevin Holly
Kevin Holly le 3 Nov 2022
Modifié(e) : Kevin Holly le 3 Nov 2022
Here is a start. I found the euclidean distance between the new point and the other four points. I'm not sure what ratio constraints you were thinking about. Once you have some constraints in mind, you could create some conditions. Would you have an initial guess for the new point that would need to be fine tuned? Will there any user input? If not, you could systematically check different coordinates and chose the best. Or you could take a heuristic approach and optimize the new point step by step. It is kind of hard to determine without knowing what this new point is suppose to be. If you have good constraints, perhaps you could find an optimal position for the newpoint using a function like fmincon.
RightEye = [ 24.14, 27.52, -298.58 ];
NoseTip = [ 57.21, -3.42, -264.76 ];
LeftMouthCorner = [ 83.30, -42.86, -293.53 ];
RightMouthCorner = [ 28.69, -44.08, -297.36 ];
M = [RightEye;NoseTip;LeftMouthCorner;RightMouthCorner];
scatter3(M(:,1),M(:,2),M(:,3),'filled','r')
hold on
newpoint = [89.37, 28.74, -296.97];
scatter3(newpoint(:,1),newpoint(:,2),newpoint(:,3),'filled','g')
Distance from the new point to the existing points
pdist2(newpoint,RightEye,'euclidean')
ans = 65.2613
pdist2(newpoint,NoseTip,'euclidean')
ans = 55.7316
pdist2(newpoint,RightMouthCorner,'euclidean')
ans = 94.7891
pdist2(newpoint,LeftMouthCorner,'euclidean')
ans = 71.9391

Community Treasure Hunt

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

Start Hunting!

Translated by