1. Read a line from the depth file
2. Initialize the pattern
3. last_pixel = depth_line[0]
4. Loop through the depth_line j=0, width
5. this_pixel = depth_line[j]
6. If this_pixe l> last_pixel
shorten the pattern
7. If this_pixel < last_pixel
lengthen the pattern
8. Perform no change to the pattern
9. Save the processed pattern
10. Perform random substitution
11. Save the random pattern
12. go back to 1 until you've read the entire depth file