ContractViolation: with windows pictures, but not mac pictures?

92 views
Skip to first unread message

Brandan

unread,
Jun 22, 2014, 7:02:31 AM6/22/14
to hugi...@googlegroups.com
Hi all,

A friend has been taking the panos, putting them on her mac and then giving them to me on a flash drive. All has been well and I have stitched dozens of panos this way. She recently got a windows computer and sent me a new batch of photos to make panos out of and now I am getting this error a lot

ContractViolation: Precondition violation! Unable to open file

when I run the control point detector or send it to the assistant. This happens when I run hugin 2012 on windows 7

If I select a few and have it find control points it will do it. It is when I ask it to do more than a certain number (about 10) that the problem shows up.

Looking on here when people have the problem either no one has an answer, they are scripting and messing up or it is the extif data.

That got me wondering what is the difference?
Here is a copy that was put from the memory card directly to windows (when I work with it these there are lots of problems that I have not seen before)
http://www.kvtours.com/p/source/test/485.JPG
Same image but was removed from memory card with a mac then put on my windows with a flash drive. A full pano of these stitches just like I normally expect them to with no errors.
http://www.kvtours.com/p/source/test/DSC_0073.jpg

Here in a few minutes I will try my 2013 version and see if I have better luck. Even if it does work I am wondering why the problem and if there is a way around it(I like the older interface better as that is what we had when I started so if possible I would like to keep using what has been working.)

Thanks,

Brandan

unread,
Jun 22, 2014, 7:37:19 AM6/22/14
to hugi...@googlegroups.com
Ok further testing.

hugin 2013 will work with the windows pictures with out any errors, but the lighting is messed up. At this point I am wondering when a picture is on the camera is it not already a .jpg? The thought comes to mind because when I look at the two images, same file no editing from the same memory card, just transferred with different computers they actually do not look the same.

http://www.kvtours.com/p/source/test/DSC_0073.jpg
That is taken from a camera memory card by a mac. It is a slightly smaller file and a hair darker than

http://www.kvtours.com/p/source/test/485.JPG
Which was taken from the same memory card with windows 7

I would expect them to be identical in all ways, yet they are not.

Looks like it is not exactly a hugin problem, but what ever this is, it is likely something that other hugin users may benefit from knowing the answer to.

panostar

unread,
Jun 22, 2014, 11:05:20 AM6/22/14
to hugi...@googlegroups.com
How exactly are you performing the transfer of the files?  I would expect just doing drag/drop with Windows Explorer to move a file from a card reader to a hard drive would not change the file in any way apart from time stamps.. Your two files have different ppi settings. which suggests you are doing rather more than simply moving the file from one place to another.

John

Brandan

unread,
Jun 22, 2014, 12:22:33 PM6/22/14
to hugi...@googlegroups.com
I have emailed my friend and will get a full description on how she does it on the mac(I am not familiar with how she does that) On windows 7 she uses  "File Explorer " the same program that a person normally uses to find and move files around on a windows computer. She then either copy and pastes or drags and drops depending on if the source and destination are both open at the same time in two windows or not.
 
Looking at the file properties it is interesting to note that both have a property under origin called program name. On the windows picture it starts "Microsoft Windows Photo V..."
 
The same property on the mac says Quick Time 7.6.6 When I stop and think about it I would expect both to say Nikon D5000, which it does say later when talking about camera.
 
 
The other differences on the Properties that I see is that the mac does not put a Date acquired. Windows put the date that they were taken off the card as the date acquired.
 
There are different horizontal and vertical resolutions  windows put 300 and mac put 72 dpi
 
And last the EXIF version is different. Windows= 0221  mac=0220

Rogier Wolff

unread,
Jun 25, 2014, 8:51:57 AM6/25/14
to hugi...@googlegroups.com
On Sun, Jun 22, 2014 at 09:22:19AM -0700, Brandan wrote:

> The same property on the mac says Quick Time 7.6.6 When I stop and
> think about it I wou

I've looked quickly at both files, and both files do NOT look like
they are directly from the camera. Apparently on BOTH computers your
friend has an APP running that will intercept "incoming pictures" and
does something to them.

However, while the "workflow" is interesting to analyse, it should be
possible to run hugin on a file that has experienced either workflow.

So on the "hugin" end, for debuggin purposes we'd like you to create a
minimal set that shows the problem. Then others can test if it also
happens, say on a different operating system. Possibly a developer
will try it on his/her machine and see the problem be able to debug it
there-and-then and get it fixed.

I have a hunch that somehow, to hugin, a "required" or "expected" exif
field is missing.

Roger.

--
** R.E....@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

Stefan Peter

unread,
Jun 25, 2014, 11:20:43 AM6/25/14
to hugi...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Brandan

Am 22.06.2014 13:02, schrieb Brandan:
> Hi all,
>

> stitched dozens of panos this way. She recently got a windows
> computer and sent me a new batch of photos to make panos out of and
> now I am getting this error a lot
>
> ContractViolation: Precondition violation! Unable to open file

I would guess that this is a problem with the virus checker. Can you
try to disable the virus checker and retry?

> That got me wondering what is the difference?

The origins of the files, I'd guess. How exactly did you copy them?
According to the Software Exif entry, I suspect the you opened them
with the MS viewer and then saved them locally. And your friend seems
to have done something similar on her Mac. Not only the Software and
Resolution entries are different:

o The Exif Thumbnal Image Length differs
o Exif Image Widht and Exif Image Height are swapped
o The Y Cb Cr Sub Sampling are different
o The file from the MAC has a Input Device Profile embedded.

These files definitely have not been copied but modified. Another tell
tale for this is that in both files the Modify Date entry differs from
the Create Date entry.

With kind regards

Stefan Peter

- --
In theory there is no difference between theory and practice. In
practice there is.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTqujGAAoJEBgqi52L7+L/sPQH+QHpgiGqVCN0VJYMKXuRC3OV
2iFcYG3Ob2tdxIyts0hU9Bn85Ax37VXMCq4nKZRuMt/g0blnT8HNs6jAzr9VVxp3
FAEJmwV8Q/5nPQKLTblIihKIpnJ2v0JFOv4YmJkKZWBGiZqDsyw7Nmx5lo6gc67E
F3lbUTUyN1yWT2spuuSzEE+oiYkN3JSC49hSDXaNUeFXROjsJIHcwkACc1vqimVK
YyPIbPriDHT860YW5Q2ZNJtN2+f71+xBzBorICANSV1HSGXI2sQp4qoDRvaxSo+M
Oqp/37U+aDbHSa8muklr2IvQaRxb92oj4P3UWMoQvG2ILI0xcwe9IejdAuN2FLc=
=FwW9
-----END PGP SIGNATURE-----

Brandan

unread,
Jun 26, 2014, 2:27:56 PM6/26/14
to hugi...@googlegroups.com
This morning I have been trying to get hugin to repeat the ContractViolation
and I am unable to make it do it, which is kind of odd as these images were
doing it on two different computers and near as I can tell I have not
changed anything that should have fixed it.

There is still a problem with the windows images, if I just load the images
and send them to the assistant. it gives me a 'make: *** [all] Error 2' I
have not tried to figure out what would cause that yet. If I do it step by
step, from the image tab it works just fine now.(Earlier the control point
finder was giving me the ContractViolation )

The idea of a virus checker is an interesting one. avast! Internet Security
is installed on both Windows computers. It updates all of the time so it may
have fixed itself, though that seems overly hopeful.

I think I have figured out what was going wrong with the images and why they
were different. It turns out that when you put in a memory card my friend
was clicking import instead of doing as I described above(open folder copy
and pasting). On the mac she is likely doing some thing similar with Iphoto.
When you import images it does not actually copy the image, it goes through
a program for some reason and then is saved. Why Mac and Microsoft both
think it is a good idea to not actually copy it but to instead resave it
after changing the data and picture a little bit, I have no clue. Now that
she is doing as described above I am pretty sure it is copying the image
exactly as the camera made it, as the program that created it is listed as
the camera.

The moral of the lesson. NEVER IMPORT. Instead copy and paste from the
folder. You should get a better image as it has not been resaved and the the
Exif data will not be changed which could prevent some errors.

Give me another day to see if I can get it to repeat the ContractViolation .
Either way I will then make a zip with resized photos that people can
experiment with.

Thank you all for your help.

David Haberthür

unread,
Jun 27, 2014, 3:06:36 AM6/27/14
to hugi...@googlegroups.com
Dear Brandan

On 26 Jun 2014, at 20:27, Brandan <bra...@flyingtsalers.com> wrote:

The moral of the lesson. NEVER IMPORT. Instead copy and paste from the folder. You should get a better image as it has not been resaved and the the Exif data will not be changed which could prevent some errors.

I’ve *never* done anything different than importing my photos into either iPhoto or Aperture [1] prior to using them for making panoramas.

One thing that might be important though is that you don’t drag-and-drop the photos from iPhoto/Aperture to hugin, since that can grab the thumbnails or smaller versions of your photos (depending on your settings). I’ve always chose “show originals in Finder” (or something like this) to grab the original photos for hugin. Or today I anyways export the photos first, since I’m shooting only RAW…

Greetings,
Habi

signature.asc

Brandan

unread,
Jun 29, 2014, 4:12:25 AM6/29/14
to hugi...@googlegroups.com
I apologize for the delay in getting images for you guys to work with.
I have resized the images to 1000 pixels on the long side and uploaded all 3 sets here
 
 
 
Windows Copy. This one I open the memory card with windows file explorer and copy it from a folder on the card to a folder on my computer.
 
Windows import. When the card is put in the computer I click on import instead of opening with file explorer and copying.
 
Mac. Images imported into a mac with iphoto.
(the zipped versions are the same as what is in the respective subfolders, just easier to download)
 
 
 
In there I have a single full resolution picture from each copy for people to look at the EXTIF data, or to compare the images. Open the images in different tabs and flip back and forth and it is clear that they are not the same. In particular look at the shadows and the pano head. The two windows versions(import vs copy) are almost the same size and flipping back and forth I am not able to say there is a difference in this photo(I thought I saw differences in other photos, but could be mistaken about which copies of the photos I was viewing at the time). The mac version is 800 KB smaller. The darks are a touch darker and have a bit less detail than the one that is just copied from the memory card.
 
The resized photos I batch resized. I made no other changes. The image comparison photos I made NO changes. That is what the respective work flows created and they are not the same.
 
It is interesting to look at the exif data with a  tool that can look at it in depth such as
 
To make it easy for people here are direct links to the exif data for the respective photos. A lot of the settings to not mean anything to me. I would be interested in what other people think of the settings that have different values for the different copies and what those settings may do.
 
 
 
 
 
As far as stitching problems go, they seem to have resolved themselves. I may play around and see if I can recreate the error in the windows import version, but at this time I have no idea what I where to start as I have no idea why it works now, when it did not earlier despite all that I was trying to do to correct it.
 
 
Reply all
Reply to author
Forward
0 new messages