Page 1 of 2

image rotation

Posted: 2018-03-03T11:42:14-07:00
by dav1988
hi,
i use imagemagick 7.0.7.21 for windows
i should verify if an image was rotated of an angle from the original one. the two pics may have different quality because of manipulation. my question is: is it possible to veryfy if the manipulated one was rotated?

thanks

Re: image rotation

Posted: 2018-03-03T11:53:43-07:00
by fmw42
What kind of images are they - what is the subject matter? Can you post an example set of images? You can upload to some free hosting service such as dropbox.com and put the URLs here. See http://im.snibgo.com/whatrotscale.htm

Re: image rotation

Posted: 2018-03-03T12:07:15-07:00
by dav1988
Hi,
for example this: http://oi67.tinypic.com/rkdgyr.jpg
and a manipulated copy of this image. I just need to check id the manipulated one was rotated of a small angle.

thanks in advance

Re: image rotation

Posted: 2018-03-03T12:11:50-07:00
by fmw42
What I am trying to find out is if the rotated one has background fill or if it was a crop of a rotated image and has no fill.

Are you just trying to find out if the two images are of the same original picture vs whether the two images are of different scenes?

Re: image rotation

Posted: 2018-03-03T12:38:55-07:00
by dav1988
I will explain better. I have for example two images, the previous one : http://oi67.tinypic.com/rkdgyr.jpg and a manipulated version of the previous one: http://oi64.tinypic.com/x3ekr8.jpg . If i use compare it shows red points because the second one has a minor quality compared to the original. But i just want to know if the second one, that has been manipulaed and has a minor quality, was rotated of a small angle from the original.

Re: image rotation

Posted: 2018-03-03T13:20:12-07:00
by fmw42
I am not sure I see your images. The main images in those links are identical (The club). Please tell us how to download your uploaded images or use some other hosting service.

Re: image rotation

Posted: 2018-03-03T14:19:15-07:00
by dav1988
yes it is correct. the images look identical. but the second one has a minor quality. i want to estabilish if the second one has a little rotation (that could not be visible to the naked eye)

Re: image rotation

Posted: 2018-03-03T15:08:05-07:00
by fmw42
If it is not visible to the naked eye, why bother.

Re: image rotation

Posted: 2018-03-03T15:26:40-07:00
by snibgo
dav1988 wrote:i want to estabilish if the second one has a little rotation
Then rotate the second image, and see if the match (eg the RMSE difference) is improved.

Re: image rotation

Posted: 2018-03-03T15:30:55-07:00
by fmw42
If the rotation is not visually noticeable, then I do not know of an process that would identify if it was rotated. Furthermore, you probably would not see much difference from compare even if you did rotate it perfectly.

Re: image rotation

Posted: 2018-03-03T17:25:31-07:00
by dav1988
hi. i think i solved the problem using GIMP. I used layer mode difference applied to the two images and the result is total black. so i think there is no rotation.

i have just one more question. GIMP says that the two images are identical, that is the pixel values are identical. But imagemagick COMPARE says there are differences between the original and the manipulated one, as you can see here: http://oi68.tinypic.com/opxvkk.jpg . I think because the manipulated one has a minor quality.

My question is: if it is not a difference in the colors, what kind of difference is the one that imagemagick is showing ?

thanks and sorry for my english

Re: image rotation

Posted: 2018-03-03T18:40:56-07:00
by snibgo
One file has an embedded profile, and the other doesn't. So how are you comparing them?
dav1988 wrote:I used layer mode difference applied to the two images and the result is total black.
It may look black, but it isn't, even using just 8-bit Gimp, whether or not we convert them to the same profile.

Re: image rotation

Posted: 2018-03-03T18:58:37-07:00
by dav1988
One file has an embedded profile, and the other doesn't. So how are you comparing them?
i am not sure i am understanding what you mean... anyway i used the syntax compare file1.jpg file2.jpg diff.jpg...
It may look black, but it isn't, even using just 8-bit Gimp, whether or not we convert them to the same profile.
so even if it seems all black using gimp, the second image could be rotated?

Re: image rotation

Posted: 2018-03-03T19:18:38-07:00
by dav1988
this is whats happens using difference in GIMP: http://oi63.tinypic.com/28b7lud.jpg

Re: image rotation

Posted: 2018-03-03T19:42:22-07:00
by snibgo
Yes, it looks black. But how do you know it is black? When I open your images in Gimp as layers, mode Difference, the result looks black. But I make a new layer from visible, then Colors > Auto > Stretch contrast, I see where the differences are.

You can do the same trick with ImageMagick:

Code: Select all

convert rkdgyr.jpg x3ekr8.jpg -compose Difference -composite -auto-level d.png
d.png isn't black. This means your images are different. But the differences are very small.

d.png doesn't show obvious signs of rotation, so I doubt that is the cause.