Get subpixel resolution images of a high resolution image

11 visualizaciones (últimos 30 días)
Shweta
Shweta el 12 de Sept. de 2012
Hi What is the better method to get sub-pixel images /low resolution images from ahigh resolution image? For example:I have a 4000x3000 image I want to get sub-pixel images of this image to be 2000x 1500 ,1000x750 and so on... Thanks Shweta
  2 comentarios
Steffen B. Petersen
Steffen B. Petersen el 13 de Sept. de 2012
You may try the standard function imresize - but this may not be as fast as you wish for. Alternatively, you may resample the two image dimensions using mesh grid and interp2. I am not quite sure what you mean with the phrase sub-pixel images.
Image Analyst
Image Analyst el 13 de Sept. de 2012
Yes, sub pixel resolution has a different meaning than I believe Shweta is using. See section 18.4.3 here: Subpixel Resolution. Usually it refers to getting increased "real-world" spatial resolution from the imagery. The number of pixels in the output image is unrelated to the resolution. I could get subpixel resolution over a small part of the input image,or the whole image, with some arbitrary number of pixels in the output image.

Iniciar sesión para comentar.

Respuestas (6)

Image Analyst
Image Analyst el 12 de Sept. de 2012
Use imcrop(), or just regular indexing:
subImage = fullImage(row1:row2, column1:column2);

Walter Roberson
Walter Roberson el 12 de Sept. de 2012
imresize()

Steffen B. Petersen
Steffen B. Petersen el 13 de Sept. de 2012
You may try the standard function imresize - but this may not be as fast as you wish for. Alternatively, you may resample the two image dimensions using mesh grid and interp2. I am not quite sure what you mean with the phrase sub-pixel images.

David Lieberman
David Lieberman el 13 de Sept. de 2012
In the examples you gave, the aspect ratio was the same as the original. Do not subsample. The output will likely suffer from aliaing artifacts. The function imresize mentioned above is the best way to go. It correctly low pass filters prior to subsampling, and does it optimally.

Shweta
Shweta el 24 de Sept. de 2012
Hi subpixel resolution is based on averaging. From statistics we know that the standard deviation of the mean is smaller than the standard deviation of a single observation. I want to get subpixel resolution images.Does this clarify? Thanks Shweta
  2 comentarios
Image Analyst
Image Analyst el 24 de Sept. de 2012
No it doesn't. All it clarifies is that you aren't really familiar with subpixel resolution. What I and all the others believe you're asking for is simple 2D interpolation - getting more samples in between your existing pixels. This only increases resolution according to the computer user's definition of resolution, which is essentially the number of rows and columns in the image matrix. It does not increase actual true spatial resolution according to an optical scientist (like me) definition. You are no better able to resolve very small details in your scene just because you interpolate more pixels. There are things you can do to get better resolution, like use very small actuators to nudge your CCD sensor fractions of a pixel, or some spatial filters.
Eric
Eric el 24 de Sept. de 2012
Image Analyst is right - this answer does not clarify what you're looking for. In my answer below I assumed you don't know what you mean when you say "subpixel resolution" and based my answer on your statements that
1. you're looking for "low resolution images from a high resolution image"
2. you're looking for a solution based on "averaging"
My answer uses spatial averaging to convert a single high resolution image into a number of distinct, low-resolution images.
-Eric

Iniciar sesión para comentar.


Eric
Eric el 24 de Sept. de 2012
Here's what I would do. Assume img is your image.
kernel = ones(N,N)/N^2;%Try N = 2, 3, or 4
all_imgs = conv2(img, kernel, 'same');
new_img = all_imgs(1:N:end,1:N:end);
This gives you the equivalent of pixel binning - as if you programmed the detector to sum NxN pixels and report that as the image.
There are actually N^2 possible images in this set. Rather than
new_img = all_imgs(1:N:end,1:N:end);
You could use
new_img = all_imgs(2:N:end,1:N:end);
or
new_img = all_imgs(2:N:end,2:N:end);
etc.
Good luck,
Eric

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by