# Photogrammetric Measurement and Analysis of the Shape Profile of Pneumatic Artificial Muscles
## 3 Procedure
### Image Analysis  
Prior to analysis of the photogrammetric data, the scale of the PAM in the images must be determined for the camera settings and position used. First, a photograph is taken with a ruler placed adjacent to the PAM in the image scene (Figure 8). This image is rotated by 90 degreesl and then cropped to retain only the 1/8 inch hatch marks of the 305 mm (12 in) calibration ruler. The scale is then determined by finding the number of pixels between each 1/8 inch hatch mark of the ruler. The location of each hatch mark is pinpointed by using an edge detection method described in Section 2.2.2. The left and right edges of each hatch mark are located as the maximum and minimum points of the brightness gradient. The midpoint between the minimum and maximum gradient points is then identified as the center of each hatch mark. Figure 8c provides an example of this hatch mark identification; the maximum and minimum brightness gradient points are marked in blue and green, respectively, and the center of each hatch mark is marked in red. The distance between each hatch mark, measured in pixels, indicates the scale of the PAM in the image. The scale can be averaged along the ruler for the length of the PAM, or can be found as a function of the height along the ruler if distortion of the image is considered appreciable.  
Analysis of the photogrammetric test data begins with the original 5568 \(\times\) 3712 pixel images (Figure 8a). All images are then cropped to a size that cuts out the metallic surfaces of the MTS machine and fixtures while retaining the entire length of the PAM (Figures 8b and 9a). What remains in each image is the PAM (braid and end-fittings), the connecting rod (masked in black), and the background. This image is then analyzed to obtain the originally stated goal of outlining and measuring the shape profile of the PAM's braid. A sample image of the tested PAM is shown in Figure 9a to serve as an example of the developed method. The braid's profile is acquired from each image through the following five steps:  
Figure 8: Method of image scale calibration using ruler: (**a**) Original image view (5569 \(\times\) 3712 pixels). (**b**) Cropped image view (2650 \(\times\) 1100 pixels). (**c**) Identification of ruler 1/8 in increment hatch marks. (**Top**) Each hatch mark has its left (blue), right (green), and then center (red) located. (**Bottom**) Locating respective points of each hatch mark is performed through analysis of the brightness (\(V\)) gradient.  
1. Isolate the PAM in the image using a threshold on relative brightness, \(V\)
2. Trace the boundary of the PAM (braid and end-fitting) using the threshold segmented image
3. Within the traced outline of Step 2, isolate the end-fittings using a threshold on hue, \(H\)
4. Trace the boundary of the end-fittings from the threshold segmented image of Step 3
5. Using the outline of the PAM from Step 2, retain only the region between the outlined end-fittings from Step 4  
The process of isolating the braid's profile from each image is detailed below, and is accompanied with an illustration of each step of the analysis using a sample image of the tested PAM (Figures 9-11).  
Figure 10: Identification of the end-fittings in the image: (**a**) Image of PAM only. (**b**) Step 3a: Pixel segmentation histogram using [PERSON]’s method to set threshold on Hue (\(H\)). (**c**) Step 3b: \(H\) segmented binary image. (**d**) Step 4: End-fittings outline traced.  
Figure 9: Identification of the PAM in the image: (**a**) Initial image. (**b**) Step 1a: Pixel segmentation histogram using [PERSON]’s method to set threshold on brightness (\(V\)). (**c**) Step 1b: \(V\) segmented binary image. (**d**) Step 2: Traced outline of PAM.