How can I enhance the image resolution?

59 visualizaciones (últimos 30 días)
Elena
Elena el 28 de Jul. de 2014
Comentada: Anindya Banerjee el 18 de Sept. de 2018
Hi,
I use the "imread" command to read an image from the file. The result is a two-dimensional matrix with M rows and N columns. For example my image has M = 2505 and N = 2713 by default. But I would like to decide the number of sample in which the image will be divided. Is it possible to set the M and N values, which will represent the image?
Many thanks in advance,
Regards,
Elena
  1 comentario
Patrik Ek
Patrik Ek el 28 de Jul. de 2014
There is some support for resampling in matlab. Eg resample it could be worth if the resolution is important

Iniciar sesión para comentar.

Respuesta aceptada

Joseph Cheng
Joseph Cheng el 28 de Jul. de 2014
Editada: Joseph Cheng el 28 de Jul. de 2014
Your question seems a bit confusing or misguided. You are saying you have 2505 by 2713 image file (lets just say *.bmp, *.jpg, *.tif, etc.)and you are trying to open it as a 5010 by 5426 as an example or magnification for enhancement? Then you would want to try imresize() that is used in the image processing toolbox.
I = imread('circuit.tif');
J = imresize(I,[100 150]);
imshow(I)
figure, imshow(J)
However you'll not get more data out of it for an enhancement of the resolution of the data. You'll have to take the image at a higher resolution. imresize will interpolate the data with different interpolation methods. in the documentation imresize will use the nearest neighbor interpolation to come up with the new image.
  9 comentarios
Joseph Cheng
Joseph Cheng el 28 de Jul. de 2014
Yup exactly, i don't think the G3 implemented it exactly like the Lytro is what i was saying.
Elena
Elena el 29 de Jul. de 2014
The command "imresize" solved my problem! Thank you very much!

Iniciar sesión para comentar.

Más respuestas (1)

Ben11
Ben11 el 28 de Jul. de 2014
Editada: Ben11 el 28 de Jul. de 2014
Yes you can. You can select the range of pixels like this:
A = imread('peppers.png');
size(A) % get the size of your image, in your case its 2505x2713
ans =
384 512 3
B = A(100:300,200:400,:); % select the part of the image you want to display. Note that it does not increase the resolution though.
subplot(2,1,1);imshow(A);subplot(2,1,2);imshow(B)
Giving this:
Is this what you meant?
  3 comentarios
Ben11
Ben11 el 28 de Jul. de 2014
ok then I don't understand sorry. You want to analyze to complete image, but without actually using all the pixels?
Anindya Banerjee
Anindya Banerjee el 18 de Sept. de 2018
@ben11 can you please tell me how you assigned the numbers to select the parts to be displayed?? ( B = A(100:300,200:400,:) )

Iniciar sesión para comentar.

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by