Get subpixel resolution images of a high resolution image
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Steffen B. Petersen
il 13 Set 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
il 13 Set 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.
Risposte (6)
Image Analyst
il 12 Set 2012
Use imcrop(), or just regular indexing:
subImage = fullImage(row1:row2, column1:column2);
0 Commenti
Steffen B. Petersen
il 13 Set 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.
0 Commenti
David Lieberman
il 13 Set 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.
0 Commenti
Shweta
il 24 Set 2012
2 Commenti
Image Analyst
il 24 Set 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
il 24 Set 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
Eric
il 24 Set 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
0 Commenti
Vedere anche
Categorie
Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!