Measurements of thermally stratified pipe flow using image-processing techniques