[hugin-ptx] Re: GSoC2009 Students: Next Steps

2009-04-05 Thread Lukáš Jirkovský

2009/4/4 Faruq writefa...@gmail.com:

 Hi,

 Here is my patch just to fix a simple compiler warning...

 Hope this completes my GSoC application. Pls let me know if you need
 anything else.
 Also hope to do some research on VIPS to propose a easy route for
 Hugin integration.

 Br,
 Faruq


 Index: src/hugin1/ptbatcher/ProjectListBox.cpp
 ===
 --- src/hugin1/ptbatcher/ProjectListBox.cpp     (revision 3775)
 +++ src/hugin1/ptbatcher/ProjectListBox.cpp     (working copy)
 @@ -251,7 +251,7 @@
        wxString str;
        switch(i){
                case 0:
 -                       return wxString::Format(_T(%d),project-id);
 +                       return wxString::Format(_T(%ld),project-id);
                case 1:
                        return project-path;
                case 2:

 


Hi,
you should take a look at the:
src/hugin1/tools_vips/*
src/hugin1/tools/img2vips.cpp

these are unfinished results from the Google Summer of Code project to
integrate VIPS several years ago.

Lukáš

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
hugin and other free panoramic software group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2009 Students: Next Steps

2009-04-05 Thread Pablo d'Angelo

Lukáš Jirkovský schrieb:
 2009/4/4 Faruq writefa...@gmail.com:

 Hi,
 you should take a look at the:
 src/hugin1/tools_vips/*
 src/hugin1/tools/img2vips.cpp

These are some toy programs I wrote some time ago.

 these are unfinished results from the Google Summer of Code project to
 integrate VIPS several years ago.

Actually, the GSoC code is here:
http://hugin.svn.sourceforge.net/viewvc/hugin/libpanorama/trunk/src/

ciao
  Pablo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
hugin and other free panoramic software group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: Hugin OSX Paths after Compiling

2009-04-05 Thread Harry van der Wolf
Hi all,

It's something I always forget. Osx has the terrible behavior to use a
separate PATH where (bundle) applications can find their stuff.

In your home directory you will find a file in a hidden directory:
~/.MacOSX/environment.plist
The directory .MacOSX is hidden. The file inside isn't.
This file should contain the following:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd;
plist version=1.0
dict
  keyPATH/key
  string/usr/local/bin:/opt/local/bin:/bin:/sbin:/usr/bin:/usr/sbin/string
/dict
/plist

This will become active after logout/login.
You can find about this at http://railsbros.blogg.de/eintrag.php?id=4

I will add this to the wiki on 
http://wiki.panotools.org/Hugin_Compiling_OSX

hoi,
Harry


2009/4/4 Yulia k jab...@gmail.com

 Actually, that same thing happens to me. Same PATH, same error, except I've
 noticed it when I ran app from the debugger.
 yulia

 On Apr 4, 2009, at 2:12 PM, Seth Berrier wrote:

 Ya know, that's what I was thinking too but /usr/local/bin is in my path.
 Here's what it looks like at the moment:


 PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin

 Furthermore, if I just run nona from the terminal it finds it just fine.

 On another note, I discovered that if I run Hugin fromn the terminal (by
 directly executing the program inside the app bundle) then it works.  It
 finds nona and enblend and all the others.

 So, this problem only happens when I run it like a normal user would (i.e.
 double-clicking the Hugin.app bundle).

 Curious.

 Seth

 On Sat, Apr 4, 2009 at 1:45 AM, Harry van der Wolf hvdw...@gmail.comwrote:

 Hi Seth,

 Normally /usr/local/bin should be in you PATH. For whatever reason it is
 not in your case. Open a terminal window and in your own user directory open
 the .profile file. (note: this is a hidden file. Finder won't show it to
 you).
 If you're comfortable with vi us vi .profile. Otherwise type open
 /Applications/TextEdit.app .profile and add /usr/local/bin to your PATH
 statement.
 Mine contains:
 PATH=/opt/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
 export PATH

 The other option for enblend  is to just go into the preferences: (Menu)
 Hugin- Preferences. Choose the enblend tab and select the proper path for
 enblend and enfuse.
 Note that nona still needs the path statement.

 Hoi,
 Harry


 2009/4/4 Seth Berrier seth.berr...@gmail.com

 I've got libpano, Hugin and enblend/enfuse building on my computer now
 and the Hugin GUI seems to be working properly so far but there are some
 packaging/path issues that I need some help with.


 - The default cmake setup places the backend apps (nona, nona_gui, fulla,
 hugin_hdrmerge, align_image_stack, celeste_standalone, etc) and enfuse and
 enblend in /usr/local/bin
 - Hugin.app is placed in /usr/local/Application

 When I try and do a final stitch however it seems that it cannot find
 nona or enblend or anything else.  Here's what the terminal window says:
 ===
 Checking nona...Checking enblend...Checking enfuse...Checking
 hugin_hdrmerge...Checking exiftool...[FAIL]
 Checking rm...[FAIL]
 nona -z PACKBITS  -r ldr -m TIFF_m -o test -i 0
 /var/folders/IT/ITEyv9KTElqoDbE3qOUovTI/-Tmp-/huginpto_nkYsjS
 make: [test] Error 127 (ignored)
 make: [test] Error 127 (ignored)
 make: [test] Error 127 (ignored)
 make: [test] Error 127 (ignored)
 make: nona: Command not found
 make: *** [test.tif] Error 127
 ===

 Any quick suggestions?  All the newly compiled binaries are there but
 Hugin.app just doesn't seem to find them.

 Seth

 --
 seth.berr...@gmail.com
 Graduate Research Assistant
 University of Minnesota
 Digital Technology Center








 --
 seth.berr...@gmail.com
 Graduate Research Assistant
 University of Minnesota
 Digital Technology Center

 My Calendar:
 http://www.google.com/calendar/render?cid=seth.berr...@gmail.com





 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
hugin and other free panoramic software group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] GSOC acceptance patch for GEGL: weighted_blend operation

2009-04-05 Thread James Legg
Since I am proposing to make Enblend and Enfuse operations for The Gimp
as a Summer of Code project, and I have previously worked with Hugin, I
felt it would be wise to make a qualifying patch for Gegl rather than
Hugin.

Gegl is the new graphical operations library that The Gimp will be using
when it is ready. It supports a range of pixel formats, and it will add
HDR capabilities to The Gimp.

Attached is a patch for Gegl which adds an operation which composes two
images by blending them using the alpha values as weights. Where the
alpha value of a source image is 0, that image has no effect on the
output. It is a symmetrical operation, so the order of the images makes
no difference.

To use it, you can write an XML file like this:
?xml version='1.0' encoding='UTF-8'?
gegl
  node operation='gegl:weighted_blend'
  node operation='gegl:load'
  params
param name='path'image1.png/param
  /params
  /node
  /node
  node operation='gegl:load'
  params
param name='path'image2.png/param
  /params
  /node
/gegl
Replacing image1.png and image2.png with the filenames of the images
you wish to blend. They should both contain an alpha channel.
Then use the gegl program like this:
gegl xml_file.xml -o output.png
ouptut.png will contain an image which is a blend between the two source
images.


James

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
hugin and other free panoramic software group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---

Index: operations/common/weighted_blend.c
===
--- operations/common/weighted_blend.c	(revision 0)
+++ operations/common/weighted_blend.c	(revision 0)
@@ -0,0 +1,126 @@
+
+/* This file is an image processing operation for GEGL
+ *
+ * GEGL is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * GEGL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GEGL; if not, see http://www.gnu.org/licenses/.
+ *
+ * Copyright 2006 Øyvind Kolås pip...@gimp.org
+ *   2008 James Legg
+ */
+#include config.h
+#include glib/gi18n-lib.h
+
+
+#ifdef GEGL_CHANT_PROPERTIES
+
+gegl_chant_double (value, _(Value), -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, _(global value used if aux doesn't contain data))
+
+#else
+
+#define GEGL_CHANT_TYPE_POINT_COMPOSER
+#define GEGL_CHANT_C_FILE   weighted_blend.c
+
+#include gegl-chant.h
+
+static void prepare (GeglOperation *operation)
+{
+  Babl *format = babl_format (RGBA float);
+
+  gegl_operation_set_format (operation, input, format);
+  gegl_operation_set_format (operation, aux, format);
+  gegl_operation_set_format (operation, output, format);
+}
+
+static gboolean
+process (GeglOperation*op,
+  void*in_buf,
+  void*aux_buf,
+  void*out_buf,
+  glongn_pixels,
+  const GeglRectangle *roi)
+{
+  gfloat *in = in_buf;
+  gfloat *out = out_buf;
+  gfloat *aux = aux_buf;
+  ginti;
+
+  if (aux == NULL)
+{
+  // there is no auxilary buffer.
+  // output the input buffer.
+  // gfloat value = GEGL_CHANT_PROPERTIES (op)-value;
+  for (i=0; in_pixels; i++)
+{
+  gint j;
+  for (j=0; j4; j++)
+{
+  out[j]= in[j];
+}
+}
+}
+  else
+{
+  for (i=0; in_pixels; i++)
+{
+  gint   j;
+  gfloat c;
+  gfloat value;
+  gfloat total_alpha;
+  // find the proportion between alpha values
+  total_alpha = in[3] + aux[3];
+  if (!total_alpha)
+  {
+// no coverage from any source pixel.
+for (j=0; j4; j++)
+{
+  out[j] = 0.0;
+}
+  }
+  else 
+  {
+// the total alpha is non-zero, therefore we may find a colour from a weighted blend.
+gfloat in_weight = in[3] / total_alpha;
+