How to increase number of rows and cols without changing the image size?

2 ビュー (過去 30 日間)
Yun Inn
Yun Inn 2012 年 7 月 11 日
Is there a function to increase the number of rows and cols without changing the image size?
Example: I have an image that is 301X301 with pixel size 1mm. How do I increase the number of pixels to 1024X1024 with pixel size (301/1024)mm? Effectively maintaining the image size.
imresize only change the number of pixels, not pixel size. Am i right?

採用された回答

Image Analyst
Image Analyst 2012 年 7 月 11 日
That's correct. How big you consider a pixel to be in "real world units" depends on the calibration you're using. It could be one micron, one kilometer, or one light year. If I have a length that is 1 meter long in MATLAB, and it happens to be 1000 pixels long, then I can multiply the number ob pixels by 1/1000 to get the distance in meters. If I resize the image so that that length is now 2000 pixels long, then my calibration factor will have to be 1/2000 now in order to still get a real world distance of one meter again.
  2 件のコメント
Yun Inn
Yun Inn 2012 年 7 月 11 日
I know for sure that the 'real world' pixel size is 1mm and I want the new pixel size to be 0.29mm, can i specify that without performing actual calibration?
I would like to do the following: # Imresize (data, (1024/301)) # Reduce pixel size from 1mm to 0.29mm
Image Analyst
Image Analyst 2012 年 7 月 11 日
You can't do that. The distance between landmarks in your scene is fixed. For example, if the distance between one edge of a hair and the other edge is 100 microns, you can't just declare it will be 290 microns, because it isn't 290 microns - the hair is still 100 microns wide. All you can do is to change the number of pixels that go between that distance.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by