Filter löschen
Filter löschen

Get image from figure

1 Ansicht (letzte 30 Tage)
Harshil Patel
Harshil Patel am 1 Mär. 2016
Kommentiert: Harshil Patel am 1 Mär. 2016
Hello,
I have an image and I would like to zoom in; I use the following code:
%First section
im = imread('mmx1.jpg');
imshow(im);
%%Second Section
figure
imshow(im)
zoom(2.5)
The 'first section' displays one image and the 'second section' returns a 'zoomed in' image. Could you please tell me how to retrieve this 'zoomed in' image in workspace?
Harshil
  2 Kommentare
Ram
Ram am 1 Mär. 2016
for second section use another variable which you are assigning to zoomed output image dont give same IM as given in first section
Harshil Patel
Harshil Patel am 1 Mär. 2016
I am sorry but I didn't understand what you mean by "use another variable". Could you write an example code?

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Jan
Jan am 1 Mär. 2016
The zoomed image contains exactly the same pixels values as the original image, because zooming concerns the view only. So what do you want to obtain exactly? I guess, that imresize will be more useful.
  1 Kommentar
Harshil Patel
Harshil Patel am 1 Mär. 2016
Jan,
Basically what I am looking for is zooming along the principal axis.
If I have a BW image (call it Image A) of an object, I will use SURF to find the strongest feature points of that object. After that, I will zoom into that image (which will give me a new zoomed image, B) and find the coordinates of those feature points in Image B.
Harshil

Melden Sie sich an, um zu kommentieren.


Florian
Florian am 1 Mär. 2016
Not sure if you can get the picture back from the image handle. Think of your problem a little bit different though:
A zoom factor of 2 is equivalent to throwing away 8/9 of the picture like this: x x x x 0 x x x x which is equivalent to throwing away half the rows to the left, right, top and bottom of the image. You can easily work your way forward from there for other factors. Regards, Florian

Kategorien

Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by