How to rotate back a streched image?

I have an image which is stretched in one direction. How can I turn it back to normal plane, so it becomes again a circle? I know about the scaling and calibration in both directions. Suppose that the pixel size in left-to-right direction is two times the one in up-to-down direction.
Thanks so much.
Steven

 Risposta accettata

Image Analyst
Image Analyst il 13 Mar 2014
Modificato: Alex Taylor il 13 Mar 2014
[rows, columns, numberOfColorChannels] = size(originalImage);
scaledImage = imresize(originalImage, [rows, int32(columns/2)]);

4 Commenti

Thanks! How does this last command work and mean?
One more question:
How can I remove (subtract) the background?
Thanks so much
Steven
What is the background and what is the foreground? And what does "remove" mean? Does it mean subtract like you say? From everywhere, even the foreground? How would you estimate the background in the foreground locations? Why subtraction? Is that the theoretically best way, like you're doing radiography or fluorescence? Or would background division be best, like it is with most optical situations? Or do you really want to do masking instead of background "removal" where you keep the image the same size and keep the foreground untouched but you just blacken the background region?
my main object is the circle and by removing background, I mean making the background (region over which the circle lies!) say, white, so that I can more easily analyze the image. What I want finally is the area of circle, but in late sequences, they are not as clear and vivid as this circle, and so removing the background may help.
Thanks Steven
No, it probably won't. Once you've segmented the image into circle and non-circle (foreground and background) actually whitening or blackening is unnecessary. Just use the binary image in regionprops() - no whitening of background is needed to make any measurements.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by