A pattern-matching joining machine for joining two sheets (e.g., sewing two cloths) having the same patterns with the patterns matching. The pattern-sensing photo-sensor generates intensity data for three different colors and the color data processed to correctly discriminate elements of a pattern having colors of similar brightnesses, and to accurately pick out pattern elements with faint colors from behind outstanding pattern elements. One way of processing the data includes calculating differences between intensity data for different colors. Another way includes selecting the color that has the largest intensity change.