Computing Valid p-values for Image Segmentation by Selective Inference