<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def show(self):
 """Display the image"""

        with_matplotlib = True
        try:
            import matplotlib.pyplot as plt
        except RuntimeError:
            import skimage.io as io
            with_matplotlib = False
            
        if with_matplotlib:
            equalised_img = self.equalise()
            
            _, ax = plt.subplots()
            
            ax.imshow(equalised_img, cmap='gray')
    
            import random
            
            for contour_set in self.as_contours.itervalues():
                r, g, b = random.random(), random.random(), random.random()
                [ax.plot(contour[:,1], contour[:,0], linewidth=2, color=(r,g,b,1)) for contour in contour_set]
            
            ax.axis('image')
            ax.set_xticks([])
            ax.set_yticks([])
            
            plt.show()
        else:
            io.imshow(self.equalise())
            io.show()