Hey Neil On Mon, Feb 13, 2012 at 8:44 PM, Neil Yager <yager.neil@gmail.com> wrote:
1. One thing that I think would be very useful is some simple interactive tools for examining with images. For example, 2 simple additions to the basic matplotlib's imshow would be to show the pixel intensity of the current mouse location (it already shows the x, y coordinates). Also, it would be nice to be able to click at 2 points and display the profile of intensities between them. Would adding functionality like this cause too many compatibility issues, or be moving too far away from skimage's core strength?
Not at all! Would you like to update the fancy viewer? It already does most of what you want: from skimage import io, data io.use_plugin('qt') io.imshow(data.camera(), fancy=True)
2. I'm currently working with large images and it often useful to work with down-sampled versions. A quick way to do this is using views:
im_small = im[::4, ::4]
Is there a quick way to do the inverse? i.e. something like:
im_big = im[::0.25, ::0.25]
Emmanuelle's suggestion (to use ndimage.zoom) is the right one. We should probably write a wrapper around our fast_homography code, though, because it yields better results (fewer boundary effects, it's a bit faster). Here's a start: import numpy as np from skimage import transform, img_as_float def zoom(image, s): H = np.array([[s, 0, 0], [0, s, 0], [0, 0, 1]]) output_shape = np.ceil(np.array(image.shape) * s) image = img_as_float(image) return transform.fast_homography(image, H, output_shape=output_shape) Stéfan
participants (1)
-
Stéfan van der Walt