added detection of trays and pots
correct output of distortion coefficients