Rotating an output image

3 vues (au cours des 30 derniers jours)
med-sweng
med-sweng le 22 Mai 2013
I have got a result for an image, and, when I compared the result to a ground truth, I noticed that the output is like a mirror to the groundtruth, such that, what is black in the ground truth in white in the output image, and vice versa.
Is there a way to `rotate` the output image or another solution? When I used `imrotate` it seems it just rotates them on a 2D scale, such that, when you insert `90 degrees` for example, it just rotates to right or left for example. but in my case, it seems I want the rotation to be performed in a circular manner. For example, if the face direction was to the front, I want it to be to the back, not to go right, left, up, or down,
Is there some function that can perform that in `matlab`?
Thanks.

Réponses (1)

Image Analyst
Image Analyst le 22 Mai 2013
I don't know if you have an intensity inversion (gray scales are inverted so that black = white and vice versa), or if you have a rotated image, or a flipped image. So I'll show you how to invert the image
invertedImage = 255-originalImage; % for uint8 images.
and if you want to rotate or flip an image:
rotatedImage = imrotate(originalImage, 180);
flippedIMage = fliplr(originalImage); % Or can use flipud().
  1 commentaire
med-sweng
med-sweng le 22 Mai 2013
Thanks for your reply. What I'm looking for is to rotate an image like 360 degree in a circle manner? Is that possible?
Imaging you have a face facing towards a wall, you want this face to turn around to face to you instead. This is the kind of movement I'm looking for.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by