Borrar filtros
Borrar filtros

How to zoom in to a particular point of an image?

122 visualizaciones (últimos 30 días)
Rahul
Rahul el 8 de Sept. de 2023
Respondida: Image Analyst el 8 de Sept. de 2023
Hi,
I'm trying to zoom in to a particular point of an image and not the full image.
In the above figure, I want to zoom in to the point n=4.9 only.
Kindly let me know as how it is to be done.
with regards,
rc
  2 comentarios
Shubham
Shubham el 8 de Sept. de 2023
Refer to this MATLAB Answer and see if it works out for you
Add your image path zoom_image.m file and then adjust the position and change the zoom percentage.
Rahul
Rahul el 8 de Sept. de 2023
Hi,
Thanks for your advice.
But the code as above in the shared link doesn't detect a matlab (.m) file. It can detect jpg file.
Actually, I want something like this as below where the magnified image is superimposed with the original
for my profile which I want to zoom in at n=4.9 and superimpose with my original profile.
Not sure if the shared code can do this.
with rgds,
rc

Iniciar sesión para comentar.

Respuesta aceptada

Dyuman Joshi
Dyuman Joshi el 8 de Sept. de 2023

Más respuestas (1)

Image Analyst
Image Analyst el 8 de Sept. de 2023
Try changing the axis limit by calling xlim and ylim to be the ranges you want.
help xlim
XLIM Set or query x-axis limits XLIM(limits) specifies the x-axis limits for the current axes. Specify limits as a two-element vector of the form [xmin xmax], where xmax is a numeric value greater than xmin. xl = XLIM returns a two-element vector containing the x-axis limits for the current axes. XLIM(limitmethod) specifies the method used to determine the x-limits for the current axes. Specify the limitmethod as 'tickaligned', 'tight', or 'padded'. This command sets the XLimitMethod property on the axes. m = XLIM('method') returns the current method for setting the x-axis limits, which can be 'tickaligned', 'tight', or 'padded'. By default, the method is 'tickaligned'. XLIM(limitmode) specifies automatic or manual x-limits selection. Specify the limitmode as either 'auto' or 'manual'. This command sets the XLimMode property on the axes. m = XLIM('mode') returns the current value of the x-axis limits mode, which is either 'auto' or 'manual'. By default, the mode is automatic unless you specify limits or set the mode to manual. ___ = XLIM(ax, ___ ) uses the axes specified by ax instead of the current axes. XLIM sets or gets the XLim, XLimMode, or XLimitMethod property of an axes. See also PBASPECT, DASPECT, YLIM, ZLIM, THETALIM, RLIM. Documentation for xlim doc xlim

Categorías

Más información sobre Visual Exploration en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by