One-Shot M-Array Pattern Based on Coded Structured Light for Three-Dimensional Object Reconstruction
Algorithm 1
PETA.
ImgThinned image;
HImage height;
WImage width;
DO WHILE (j < H)
DO WHILE (i < W) {
pixelAInformation in the first object pixel;
//∗pixelA is a structured variable, including pixel value, pixel coordinates, number of layers, type of pattern element, order of pattern elements, and direction angle∗//
IF (pixelA is the layer 0 pixel) {
Track the pixels using layer 0 rule;
IF (The Euclidean distance of pixelA is the shortest)
pixleA is pushed into the chain sequence;
Look for the next pixel;
ELSE
Look for the next pixel;
}
ELSE {
Track the pixels using layer 1 rule;
pixleA is pushed into the chain sequence;
Look for the next pixel;
}
//∗ Complete first element tracking, continue looking for the second element∗//