필터 지우기
필터 지우기

Get subpixel resolution images of a high resolution image

조회 수: 10 (최근 30일)
Shweta
Shweta 2012년 9월 12일
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
Steffen B. Petersen
Steffen B. Petersen 2012년 9월 13일
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 2012년 9월 13일
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.

댓글을 달려면 로그인하십시오.

답변 (6개)

Image Analyst
Image Analyst 2012년 9월 12일
Use imcrop(), or just regular indexing:
subImage = fullImage(row1:row2, column1:column2);

Walter Roberson
Walter Roberson 2012년 9월 12일
imresize()

Steffen B. Petersen
Steffen B. Petersen 2012년 9월 13일
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 2012년 9월 13일
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 2012년 9월 24일
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
Image Analyst
Image Analyst 2012년 9월 24일
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 2012년 9월 24일
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
Eric 2012년 9월 24일
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

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by