The code changes I posted basically reverse the meaning of the --bgr option 
on Apple systems - the first change makes g_bgr true by default for Macs 
(and also makes g_wideblend true by default for all systems), while the 
second change allows the --bgr and --wideblend command line options invert 
the value of the corresponding variables (T to F or F to T) rather than 
explicitly making them true.

So if you make these changes but still specify "--bgr" on the command line, 
then you will see the behavior that you got.

OTOH I only tested with 16-bit TIFF files, not 8-bit - so it may be that 
these don't order the color data the same way.
I guess I'll have to run some more tests...


On Monday, November 6, 2017 at 2:32:37 PM UTC-5, Mikko Kuutti wrote:
>
> Fixed it myself: seems the changes to --bgr shouldn't be done. Or at least 
> I could counteract this problem by passing --bgr to multiblend.
>
>
> On Monday, November 6, 2017 at 9:27:55 PM UTC+2, Mikko Kuutti wrote:
>>
>> I tried this. The compilation was uneventful with only two warnings. The 
>> newly compiled multiblend also seems quite fast
>> – only problem is the resulting file has quite weird colours: reds turns 
>> purple and yellows turn blue.
>>
>> I'm working with 8-bit tiffs.
>>
>> Any idea how to fix this?
>>
>> Mikko
>>
>>
>> On Saturday, November 4, 2017 at 6:03:42 AM UTC+2, Dr. Kurt wrote:
>>>
>>> Maybe all of the Mac users of Hugin have already figured out how to get 
>>> multiblend (http://horman.net/multiblend/) to work - if you haven't you 
>>> should really try it, it's *much* faster than enblend, at least for the 
>>> kind of panoramas I create.  But it's not optimized for OSX, and the build 
>>> instructions for Linux need some tweaking before they will work.  So if 
>>> you're a Mac user like me and want to get it running, here are a few notes 
>>> on what I did:
>>>
>>> I've made a few minor tweaks to the code to make it a bit easier to use:
>>>
>>> 1) In  globals.cpp  replace:
>>>     bool g_wideblend=false;
>>>     bool g_bgr=false;
>>>   with:
>>>     bool g_wideblend=true;
>>>
>>>     #ifdef __APPLE__
>>>
>>>         bool g_bgr=true;
>>>
>>>     #else
>>>
>>>         bool g_bgr=false;
>>>
>>>     #endif
>>>
>>> I admit I'm not sure whether changing the default for g_wideblend makes 
>>> any significant difference, but it seems to work well for me.  The 
>>> #ifdef eliminages the need to specify "--bgr" as a command line option 
>>> on Mac systems.
>>>
>>>
>>> 2) In  multiblend.cpp  replace:
>>>
>>>     else if (!strcmp(argv[i],"--bgr")) g_bgr=true;
>>>
>>>     else if (!strcmp(argv[i],"--wideblend")) g_wideblend=true;
>>>   with:
>>>     else if (!strcmp(argv[i],"--bgr")) g_bgr=!g_bgr;
>>>     else if (!strcmp(argv[i],"--wideblend")) g_wideblend=!g_wideblend;
>>>
>>> The help text for the --wideblend option should also be updated to 
>>> reflect the change.  Note that the changes in these two files are 
>>> independent; if you don't change globals.cpp then multiblend will 
>>> retain its current behavior for these two options.
>>>
>>>
>>> To compile multiblend, you must have libtiff, libjpeg and libpng installed 
>>> (typically in /opt/local/lib - there are several ways to get these if you 
>>> don't already have them).  You can then build multiblend with this command:
>>>
>>> g++ -L/opt/local/lib -I/opt/local/include -msse2 -O2 multiblend.cpp 
>>> -ltiff -ljpeg -lpng -o multiblend
>>>
>>>
>>> if you've installed libjpeg-turbo then change the "-ljpeg" to "
>>> -lturbojpeg" - you might need to add another -L option depending on 
>>> where it resides .
>>> If you've got the various libs and header files in /usr/local or other 
>>> places rather than (or as well as) /opt/local then you should add the 
>>> appropriate "-L" and "-I" options to the command line.
>>> There will be two "comparison of unsigned expression >= 0 is always true" 
>>> warnings generated, but these can be ignored.
>>>
>>> Once multiblend is built and tested (try the command "./multiblend 
>>> --help"), you can go into Hugin's preferences and add it as an alternative 
>>> to enblend.
>>>
>>>
>>> I haven't yet figured out how to propagate the ICC profile info from the 
>>> input files to the output file; enblend does this quite nicely, but I'm not 
>>> sufficiently fluent in C++ (I'm an old FORTRAN guy from way back...) to 
>>> know just what should be cut-n-pasted to add this to multiblend.  If anyone 
>>> else would like to give it a shot, I'd love to see this!
>>>
>>>
>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/c12d0ef6-52af-41df-b8dd-ee967c5b8fc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to