0% found this document useful (0 votes)
14 views2 pages

Python Joint Coordinate Analysis Scripts

The document describes a zip folder containing 8 Python files that handle various joint coordinate calculations and measurements. Each file includes specific classes and functions to retrieve coordinates for joints like elbows, eyes, nose, shoulders, and wrists, as well as to calculate angles and distances between these joints. The main.py file serves as a guide for using the functions across the other files.

Uploaded by

a.sharma.ats4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Python Joint Coordinate Analysis Scripts

The document describes a zip folder containing 8 Python files that handle various joint coordinate calculations and measurements. Each file includes specific classes and functions to retrieve coordinates for joints like elbows, eyes, nose, shoulders, and wrists, as well as to calculate angles and distances between these joints. The main.py file serves as a guide for using the functions across the other files.

Uploaded by

a.sharma.ats4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Code Structure:

1. This Zip folder Contains 8 python les.


2. [Link], [Link], [Link], [Link] and [Link] to get the coordinates for the respective
Joints from the CSV le.
3. [Link] le to get Angles of nose and eyes with respect to the wall.
4. [Link] to measure the distance between shoulder joint and the wrist
joint to nd if person is trying to approach any thing.
5. [Link] the le shows how function in between these les should be used.

a. [Link] :- class ElbowCoordinates contain two functions leftElbowCoordinates and


rightElbowCoordinates.
leftElbowCoordinates: Input value : “Cell value of lElbow in string format”, returns: tuple of
x and y coordinates for the left Elbow.
rightElbowCoordinates: Input value : “Cell value of rElbow in string format”, returns: tuple
of x and y coordinates for the right Elbow .

b. [Link] :- class EyeCoordinates contain two functions leftEyeCoordinates and


rightEyeCoordinates.
leftEyeCoordinates: Input value : “Cell value of lEye in string format”, returns: tuple of x
and y coordinates for the left eye.
rightEyeCoordinates: Input value : “Cell value of rEye in string format”, returns: tuple of x
and y coordinates for the right eye .

c. [Link] :- class EyeCoordinates contain one functions noseCoordinates.


noseCoordinates: Input value : “Cell value of nose in string format”, returns: tuple of x and
y coordinates for the nose.

d. [Link] :- class ElbowCoordinates contain two functions leftShoulderCoordinates and


rightShoulderCoordinates.
leftShoulderCoordinates: Input value : “Cell value of lShoulder in string format”, returns:
tuple of x and y coordinates for the left shoulder.
rightShoulderCoordinates: Input value : “Cell value of rShoulder in string format”, returns:
tuple of x and y coordinates for the right shoulder.

e. [Link] :- class WristCoordinates contain two functions leftWristCoordinates and


rightWristCoordinates.
leftWristCoordinates: Input value : “Cell value of lWirst in string format”, returns: tuple of x
and y coordinates for the left wrist.
rightWristCoordinates: Input value : “Cell value of rWirst in string format”, returns: tuple of
x and y coordinates for the right wrist .

f. [Link] :- class NoseAndEyeAngle contains one function EyeAndNoseAngle.


EyeAndNoseAngle: Input: “(x,y) coordinates of nose, left eye and right eye in tuple form
a. Calculations:
a. Point Nomenclature:
a. start point for the angle must be left eye.
b. nose must be the mid-point.
c. end point for the angle must be right eye.
fi
fi
fi
fi
fi
fi
b. Vector values:
a. Value for ba vector = a-b
b. Value for bc vector = c-b

c. Formula:
a. Cosine_angle = (dot product of vector ba and bc) divided by (vector normalisation
of ba multiplication with vector normalisation of bc).
b. convert the scalar value to radian.
c. Then return radian to degrees conversion.

g. [Link]: - Class ShoulderAndWristDistance contain two functions


LeftShoulderAndLeftWristDistance and RightShoulderAndRightWristDistance.
a. Calculations:
a. Distance “dist” = (x2 − x1)2 + (y2 − y1)2
Where : x2,y2 are x,y coordinates for shoulders and x1,y1 are x,y coordinates for
wrist.

You might also like