Could not decode image error in 2019.0 beta 1

156 views
Skip to first unread message

Abrimaal

unread,
Feb 4, 2019, 9:48:33 AM2/4/19
to hugin and other free panoramic software

hugin-could-not-decode-image-from-pto-file.png

While loading images from a .pto file, this error message is displayed.
The images have not been moved, not renamed, the are still in the same folder as the .pto file.
The filenames and paths to images stored in the .pto file did not change.


Luís Henrique Camargo Quiroz

unread,
Feb 4, 2019, 10:14:08 AM2/4/19
to hugi...@googlegroups.com

  By the message I understand that Hugin is trying to open an image file named 20180317_1735_c26-3s.pto 
  Please check if the project file is not included as image. The extension, ".pto", does not correspond to an image file ;)

 

--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hugin-ptx+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/af55809f-cb74-4342-9b72-b3e684514a76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Abrimaal

unread,
Feb 4, 2019, 1:27:47 PM2/4/19
to hugin and other free panoramic software
PTO files contain names and paths of images. This is all what is needed to open images.
With one click multiple images can be opened to:
correct a panorama
add images to these already open, to create a new panorama.

File paths and names are everything what is needed to merge images+pto or pto+pto+pto...
The rest of .pto file, projection, exposure data may be discarded.

zarl

unread,
Feb 6, 2019, 8:02:33 AM2/6/19
to hugin and other free panoramic software
The subject suggests that this is a new behaviour in the latest version, so did you try that earlier and what happend with earlier versions of hugin?

From what you write I get the feeling that you want to merge projects, or what do you try to do?

Carl

ps.
A .pto is a project file and thus not digested via an "add image(s)" command. Try opening a .doc (containing image names) in Photoshop...

Abrimaal

unread,
Feb 6, 2019, 1:10:00 PM2/6/19
to hugin and other free panoramic software
Well, a .doc file is formatted for printing, but it's a shame that Photoshop cannot open a plain .txt file and display the text, to copy and paste to an image.
.pto files are also plain text files and they can be simply opened by "Add images" button.
The same way images can be opened with File/Open menu. Reading a file header, the program will distinguish the file type.

This is not new behavior of this version, but it is definitely an unexploited potential worth introducing,
just like a few other features and repeating bugs I described here:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/hugin-ptx/eMSGRxdrpjM

Using the new version for a few days I haven't noticed any progress comparing to the 2018 release.
.jpg images with different color profiles still cannot be stitched,
the batch processor icon still locks the taskbar,
horizontal lines are not detected,
.tif workfiles are not cleaned at exit if they could not be deleted after finishing a panorama,
the editor background is white, what makes manual work with night scenes impossible,

Zoom in the mask editor has been introduced, thanks a lot for the useful feature. 
How could it be improved? Zooming by mouse wheel is what the intuition suggests.

A new behavior I noticed in the 2019 beta, that "Don't save project" is not working until we select "New"
For example when we open an incorrect image and we don't want to save this project.

dont-save-not-working-hugin-2019-0-beta.png

Abrimaal

unread,
Feb 6, 2019, 4:06:30 PM2/6/19
to hugin and other free panoramic software
This is a good example why .pto files should be allowed as images.
Making a multi field depth panorama by precise masking.
2nd attempt. Is this ok?
Quickly click on Load Images, right click to preview in Irfan View (or other viewer).
Yes, modern software must co-work. What cannot be done by one application, can be sent to another, then back to the main app.
Oh, no, again the masks must be corrected.
Quickly click on the .pto file to rearrange the masks.
Deadlock. The .pto file cannot be opened by Load.
Running around to the main menu,
File/Open,
Select "All Files" to see which .pto file refers to which panorama,
find the right .pto file among many files in the folder - about two minutes wasted.
Working again with masks and making another panorama.
If the panorama is finally perfect, after many attempts,
Click Load images, right click on the image, Send to HDR editor, to finalize the work.
Yes, modern software must co-work. 
BTW, I haven't noticed the Zoom selector in mask editor, because it was hidden by the taskbar icon of Batch processor.
Modern software may contain bugs, that's what the testers are for.
Many of the features are innovations, never used before in computer software.
However when someone says "you cannot write on wood with a ball pen, because the ball pen is designed to write on paper", we will not go further.

many-apps-working-together.png

Masks must be corrected many times to create a perfect panorama.

multi-field-depth-panorama-by-masking.jpg

Abrimaal

unread,
Feb 15, 2019, 7:09:18 PM2/15/19
to hugin and other free panoramic software
In beta2 Pre-Release 2019.0.0.75168618c648 the problem has grown.

There is no "All Files" filter in "Add Images". It means that it became impossible to right click a .pto file and open it in another instance of Hugin.
"Add Images" window is the fastest method for quick preview of a finished panorama, because it opens the folder, where the panoramas and .pto files are saved.
If the panorama did not look perfectly, it was very simple to send the .pto file to another Hugin instance and work on it without running around drives and folders.







On Monday, February 4, 2019 at 3:48:33 PM UTC+1, Abrimaal wrote:
add-images-no-all-files-major-bug-8bit.png

Bart van Andel

unread,
Feb 21, 2019, 9:52:02 AM2/21/19
to hugin and other free panoramic software
This is not a bug. You're trying to load a .PTO file as if it were an image, which it is not. To take your .doc example: you can also not expect any image editor to just open a Word document because it may contain an image. Same with opening a Zip file, or any other file with some image data embedded. It just doesn't work like that.

What you're asking is (correct me if I'm wrong) the ability to import images from one project into another one. That is currently not supported without scripting I think. Still not the same as treating the PTO as an image though.

T. Modes

unread,
Feb 21, 2019, 11:04:14 AM2/21/19
to hugin and other free panoramic software

@Bart

Am Donnerstag, 21. Februar 2019 15:52:02 UTC+1 schrieb Bart van Andel:
What you're asking is (correct me if I'm wrong) the ability to import images from one project into another one. That is currently not supported without scripting I think. Still not the same as treating the PTO as an image though.
This is already possible (without scripting): in panorame editor: File>Merge project

Abrimaal

unread,
Feb 21, 2019, 11:56:51 AM2/21/19
to hugin and other free panoramic software
Please at least allow to display All files in the Load images window.
This way panoramas that must be quickly corrected can be sent to another instance of Hugin
Right click .pto file -> Send to -> Hugin.

Btw. filtering images by extension is not the best method, it excludes images without extension, or with extensions such as .jpg.bk
that could be created in mobile apps or other systems, and they are normal .jpg or .png files.
Take a look at the file header and the file type, for .jpg this is:
ÿØÿà JFIF
The Windows command Findstr may be used to determine the file type.

Bart van Andel

unread,
Feb 25, 2019, 12:06:29 PM2/25/19
to hugin and other free panoramic software
All the things you want are basically the job of a file manager. It isn't reasonable to assume that all tools should be able to perform file manager things. If you have images with a wrong extension, rename them.

Having said that, if you want to show all files in any regular "Open File" or "Save File" dialog in Windows, you can usually just enter "*" in the "File name" field and hit enter. Just verified, this works in Hugin too. Actually the drop down to the right of this file field already contains an option for showing "All files (*)", both in Hugin 2018.0.0 and the current 2019.0.0. I think we can conclude you've been served already a while ago ;-)

Bart van Andel

unread,
Feb 25, 2019, 12:07:26 PM2/25/19
to hugin and other free panoramic software
Thanks, didn't know! I haven't had a use for this yet though, so that may be why I never noticed. 

Abrimaal

unread,
Feb 25, 2019, 1:08:02 PM2/25/19
to hugin and other free panoramic software
It does not work in the 2019 beta 2 version, because the filter "All files" has been changed to "All images".
I typed:
*
"*"
*.*
"*.*"
in the filename field.
.pto files are among the images, but not accessible.


Abrimaal

unread,
Feb 25, 2019, 1:08:42 PM2/25/19
to hugin and other free panoramic software

file-filter-all-images-instead-of-all-files-pto-not-accessible.png



On Monday, February 25, 2019 at 6:06:29 PM UTC+1, Bart van Andel wrote:

Bart van Andel

unread,
Feb 25, 2019, 4:51:32 PM2/25/19
to hugin and other free panoramic software
Abrimaal wrote:
It does not work in the 2019 beta 2 version, because the filter "All files" has been changed to "All images".

Sorry, apparently I missed this. BTW I think 2018 version had both
 
I typed:
*
"*"
*.*
"*.*"
in the filename field.
.pto files are among the images, but not accessible.

Just * works for me to show all files. But this DOES NOT turn a PTO magically into an image, so it cannot be opened as an image, because it isn't an image. 

Abrimaal

unread,
Feb 25, 2019, 9:11:35 PM2/25/19
to hugin and other free panoramic software
>But this DOES NOT turn a PTO magically into an image, so it cannot be opened as an image, because it isn't an image.
Yes, I know. I use Load images button to preview how the panorama looks. (right click -> open in a default viewer)
The .pto file is saved just before the panorama in the same folder.
If the panorama requires corrections, then right click .pto -> Send to -> Hugin.
Now it became impossible. When there are a few hundreds partial images in a folder, it is not easy to find the proper .pto file from the standard menu File -> Open.

Bart van Andel

unread,
Feb 26, 2019, 5:53:34 AM2/26/19
to hugin and other free panoramic software
What prevents you from just using Windows Explorer to find your .pto between the images? I still don't see how this is Hugin's problem. You're basically "abusing" the Load Images button just to see the image previews so you can find the .pto file you want to work on, from what I gather.

Didn't check (no Hugin on my current machine) but can't you just show all files in the Open .pto dialog (whatever the name) if you really want to stay within Hugin? I'd really suggest just using Windows Explorer though, that's what it exists for.

Abrimaal

unread,
Feb 28, 2019, 8:44:52 AM2/28/19
to hugin and other free panoramic software
Theory, raw theory. When stitching 40 panoramas daily, every second counts. "Add images" already opens Windows explorer, a second Explorer window will only take space on the screen and it will not follow the current work folder.

I started to write a command line script to get filenames from .pto files, to be interpreted as images, but as I see, it will certainly fail. Command line is tough for multiple file operations and loops (and extremely slow) (and I don't know any other language).
The initial goal is only to get filenames from .pto files and load these images to Hugin. All the parameters may be added later.

Why it is so important to me: I have already photographed almost the whole town in panoramas, from 3 to 20 photos. Then gradually merge one pano with another, to create a street, then a street with another street and so on...

Bart van Andel

unread,
Mar 15, 2019, 10:32:38 AM3/15/19
to hugin and other free panoramic software
On Thursday, 28 February 2019 14:44:52 UTC+1, Abrimaal wrote:
"Add images" already opens Windows explorer, a second Explorer window will only take space on the screen and it will not follow the current work folder.

The "Open file" and "Save file" look much like Windows Explorer (they use the same view components) but it's not the same thing. The dialogs are basically aimed at opening of saving files (hence their name), and because Windows, do indeed offer some of the functionality that the full blown Explorer does. This is however not the same in every operating system (for Linux it depends on your desktop environment).

Surely an external Explorer window takes up some space, but if you have that, you don't need the "Add images" thing either. You can just drag images from Explorer onto Hugin.

I'm not sure what you mean by "doesn't follow the current work folder".

I started to write a command line script to get filenames from .pto files, to be interpreted as images, but as I see, it will certainly fail. Command line is tough for multiple file operations and loops (and extremely slow) (and I don't know any other language).
The initial goal is only to get filenames from .pto files and load these images to Hugin. All the parameters may be added later.


Doesn't the merge functionality that was mentioned by T. Modes in this thread do what you want?
 

Why it is so important to me: I have already photographed almost the whole town in panoramas, from 3 to 20 photos. Then gradually merge one pano with another, to create a street, then a street with another street and so on...


Intriguing! Can you share some results? Sound like you are creating multi-viewpoint panorama's, (i.e., one long strip showing an entire street), no?

Abrimaal

unread,
Mar 17, 2019, 3:35:02 PM3/17/19
to hugin and other free panoramic software




Yes, I try to use a single window of Explorer, select photos and "Open with Hugin" or "Send to Hugin". It works, at least I see both images and .pto files.
I always used a dedicated photo viewer (FastStone), but there was a conflict. Hugin could not delete temporary .tif images, because FastStone was generating thumbnails in the same moment. The same with other photo viewers, for example Machinery HDR explorer.

However the simplest and fastest way is opening "Add images" to see how the stitched panorama looks and start a new project right after preview (or correct the recent one).
The image below is an example: This panorama must be corrected, because the white balance is not good. 
Since when the access to .pto files has been blocked, it is impossible to click the .pto and send to Hugin again, to correct it quickly.

why_open_from_load_images.jpg



I do not use Merge projects, I merge final panoramas.

Creating a multiview pano is possible on a 2D screen, but except a lot of masking,
it would require a rectangular (planar) projection to be introduced, such as is used for stitching maps and flat documents.
As the rectilinear projection matches images by remapping and rotating, it preserves straight lines and bases mainly on the camera field of view,
the rectangular matches images by resizing and rotating.
It preserves straight lines and angles and completely discards the camera lens parameters and field of view.
For merging panoramas into a 2D video (or other animation), some morphing software may be useful.

After the first attempt, such panoramas usually look like this one.
Mainly because loaded panoramas have the same field of view, set by default to 50 °
Both buildings are the same height (to the roof line), but the left one is longer (in pixels) than the right one.
The same horizontal field of view made the right building much smaller.
This is why the field of view should be ignored when stitching images that are independent from a lens and field of view.

multiview-pano.jpg

Bruno Postle

unread,
Mar 18, 2019, 3:14:41 AM3/18/19
to hugi...@googlegroups.com


On 17 March 2019 19:35:01 GMT, Abrimaal wrote:
>
>Creating a multiview pano is possible on a 2D screen, but except a lot of masking,
>it would require a rectangular (planar) projection to be introduced, such
>as is used for stitching maps and flat documents.

You can absolutely stitch these street elevations in Hugin, this picture (attached) is created in Hugin without using any other tools.

I used saved lens parameters, optimised X,Y&Z positions, then added r,p&y rotation. This is a lot of parameters, so the optimisation can get unstable, but with practice, by introducing one parameter at a time, it works well.

I also find that I get better results if I don't shoot the photos straight on, for the buildings on the left I turn the camera slightly to the left, then gradually turn to the right for the rest.

--
Bruno
IMG_20190318_065853.jpg

Abrimaal

unread,
Mar 18, 2019, 4:08:23 PM3/18/19
to hugin and other free panoramic software
Excellent. I always forget that I can manually modify X Y Z positions.
Reply all
Reply to author
Forward
0 new messages