← Back to team overview

hugin-devs team mailing list archive

[Bug 695068] [NEW] pano_trafo doesn't flush output, mixed use of C i/o and streams

 

Public bug reported:

Hi all!

I've had an issue with pano_trafo: The output of the transformed
coordinates wasn't flushed after each line, so I couldn't use it with a
pipe on the output end from a Python process; the output just wouldn't
come. I noticed that the source mixed C-style calls to fprintf() etc.
with C++ stream i/o, which, if I am not mistaken, is considered prone to
malfunction. Replacing the C-style i/o with stream i/o solved the
problem for me.

At the same time I found it problematic to be limited to working on only
one image at a time, since I wanted to work on control points. I
extended pano_trafo to also work without the image number passed on the
command line: If it doesn't receive the image number on the command
line, it expects input in the form of triplets <image nr> <x> <y>

My hugin version is Pre-Release 2010.5.0.687a025dd22f, self-built on
Kubuntu 10.10.

Find enclosed a patch which reflects my modifications; I hope I did it
right ;-)

With regards
Kay

** Affects: hugin
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/695068

Title:
  pano_trafo doesn't flush output, mixed use of C i/o and streams

Status in Hugin - Panorama Tools GUI:
  New

Bug description:
  Hi all!

I've had an issue with pano_trafo: The output of the transformed coordinates wasn't flushed after each line, so I couldn't use it with a pipe on the output end from a Python process; the output just wouldn't come. I noticed that the source mixed C-style calls to fprintf() etc. with C++ stream i/o, which, if I am not mistaken, is considered prone to malfunction. Replacing the C-style i/o with stream i/o solved the problem for me.

At the same time I found it problematic to be limited to working on only one image at a time, since I wanted to work on control points. I extended pano_trafo to also work without the image number passed on the command line: If it doesn't receive the image number on the command line, it expects input in the form of triplets <image nr> <x> <y>

My hugin version is Pre-Release 2010.5.0.687a025dd22f, self-built on Kubuntu 10.10.

Find enclosed a patch which reflects my modifications; I hope I did it right ;-)

With regards
Kay





Follow ups

References