import graphics/enblend-enfuse:

Enblend combines images that partially overlap into a single large
image with no seams (panorama generation). This is a command-line
tool which performs the actual composition; another tool is required
to line up the images ready for input (e.g. Hugin).

Enfuse combines images that overlap into a single image with good
focus and exposure (exposure stacking for high dynamic range, focus
stacking for extended depth-of-field).

will be hooked to the build after tests on additional arch.
big thanks to Emmanuel Viaud for rewriting some C++ to build with GCC 3.
This commit is contained in:
sthen 2009-04-19 11:14:37 +00:00
parent e3cca5ed8f
commit be2f7c5b97
13 changed files with 257 additions and 0 deletions

View File

@ -0,0 +1,52 @@
# $OpenBSD: Makefile,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
VMEM_WARNING = Yes
# and I'm not joking!
COMMENT = blend seams in panoramic image mosaics
DISTNAME = enblend-enfuse-3.2
CATEGORIES = graphics
HOMEPAGE = http://enblend.sourceforge.net/
MAINTAINER = Stuart Henderson <sthen@openbsd.org>
# GPLv2+, MIT
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB += GL GLU ICE SM X11 Xi Xmu c jpeg m pthread stdc++ z
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=enblend/}
BUILD_DEPENDS += ::devel/boost
LIB_DEPENDS = GLEW::graphics/glew \
glut.>=4::graphics/freeglut \
Half,Iex,IlmThread,Imath::graphics/ilmbase \
lcms::graphics/lcms \
xmi::graphics/libxmi \
IlmImf::graphics/openexr \
png::graphics/png \
tiff::graphics/tiff
CONFIGURE_STYLE = gnu
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC}
CPPFLAGS += -I${WRKSRC}/src/vigra_impex \
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/libpng \
-I${X11BASE}/include
LDFLAGS += -L${LOCALBASE}/lib \
-L${X11BASE}/lib
USE_X11 = Yes
CONFIGURE_ENV = CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}"
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (enblend-enfuse-3.2.tar.gz) = m2669nL1EDxjOlPJcj2Zww==
RMD160 (enblend-enfuse-3.2.tar.gz) = epsAN7ghrChzJ0d9UmZTctCFDbs=
SHA1 (enblend-enfuse-3.2.tar.gz) = 5EIm7GdZ3T5tz0a7NISLZFNq1JU=
SHA256 (enblend-enfuse-3.2.tar.gz) = hONnujEQLlyeQNVdH7RnLj/8iTYMP+JCNTtUX2xzxlM=
SIZE (enblend-enfuse-3.2.tar.gz) = 831504

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-configure,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- configure.orig Sat Oct 25 01:25:26 2008
+++ configure Sat Oct 25 01:25:46 2008
@@ -11378,7 +11378,7 @@ if test "x$enable_debug" = "xyes"; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
- CXXFLAGS="$CXXFLAGS -O3 -ffast-math -DNDEBUG -Wall"
+ CXXFLAGS="$CXXFLAGS -ffast-math -DNDEBUG -Wall"
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-configure_in,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- configure.in.orig Fri Jul 25 00:52:20 2008
+++ configure.in Fri Jul 25 00:52:27 2008
@@ -119,7 +119,7 @@ if test "x$enable_debug" = "xyes"; then
CXXFLAGS="$CXXFLAGS -g -DDEBUG -Wall"
AC_MSG_RESULT(yes)
else
- CXXFLAGS="$CXXFLAGS -O3 -ffast-math -DNDEBUG -Wall"
+ CXXFLAGS="$CXXFLAGS -ffast-math -DNDEBUG -Wall"
AC_MSG_RESULT(no)
fi

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-doc_enblend_texi,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- doc/enblend.texi.orig Sat Oct 25 15:10:09 2008
+++ doc/enblend.texi Sat Oct 25 15:11:19 2008
@@ -3,6 +3,10 @@
@c %** start of header
@setfilename enblend.info
@settitle Combining Multiple Images with Enblend
+@dircategory Enblend
+@direntry
+* enblend: (enblend). seamlessly combines overlapping images.
+@end direntry
@c %** end of header

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-doc_enfuse-focus-stacking_texi,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- doc/enfuse-focus-stacking.texi.orig Sat Oct 25 15:10:34 2008
+++ doc/enfuse-focus-stacking.texi Sat Oct 25 15:11:50 2008
@@ -2,6 +2,10 @@
@c %** start of header
@setfilename enfuse-focus-stacking.info
@settitle Focus Stacking with Enfuse
+@dircategory Enblend
+@direntry
+* Focus Stacking with Enfuse (enfuse-focus-stacking).
+@end direntry
@c %** end of header

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-doc_enfuse_texi,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- doc/enfuse.texi.orig Sat Oct 25 15:10:21 2008
+++ doc/enfuse.texi Sat Oct 25 15:12:01 2008
@@ -3,6 +3,10 @@
@c %** start of header
@setfilename enfuse.info
@settitle Fusing Multiple Images with Enfuse
+@dircategory Enblend
+@direntry
+* enfuse: (enfuse). combines overlapping images into one with good exposure and focus.
+@end direntry
@c %** end of header

View File

@ -0,0 +1,49 @@
$OpenBSD: patch-src_assemble_h,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- src/assemble.h.orig Sat Mar 8 23:16:23 2008
+++ src/assemble.h Fri Apr 17 20:18:16 2009
@@ -81,14 +81,18 @@ void checkpoint(pair<ImageType*, AlphaType*> &p, Image
Threshold<AlphaPixelType, ImagePixelComponentType>, AlphaAccessor>
ThresholdingAccessor;
+ AlphaType* alphaType = p.second;
+ ImagePixelComponentType alphaMaxValue = AlphaTraits<ImagePixelComponentType>::max();
+ ImagePixelComponentType alphaZeroValue = AlphaTraits<ImagePixelComponentType>::zero();
+ AlphaPixelType numericZeroValue = NumericTraits<AlphaPixelType>::zero();
+ Threshold<AlphaPixelType, ImagePixelComponentType> curThreshold =
+ Threshold<AlphaPixelType, ImagePixelComponentType>(numericZeroValue,
+ numericZeroValue,
+ alphaMaxValue,
+ alphaZeroValue);
ThresholdingAccessor ata(
- Threshold<AlphaPixelType, ImagePixelComponentType>(
- NumericTraits<AlphaPixelType>::zero(),
- NumericTraits<AlphaPixelType>::zero(),
- AlphaTraits<ImagePixelComponentType>::max(),
- AlphaTraits<ImagePixelComponentType>::zero()
- ),
- (p.second)->accessor());
+ curThreshold,
+ alphaType->accessor());
try {
exportImageAlpha(srcImageRange(*(p.first)),
@@ -118,12 +122,15 @@ void import(const ImageImportInfo &info,
// Threshold the alpha mask so that all pixels are either contributing
// or not contributing.
+ ImagePixelComponentType imagePixelMaxValue = AlphaTraits<ImagePixelComponentType>::max();
+ AlphaPixelType alphaPixelMaxValue = AlphaTraits<AlphaPixelType>::max();
+ AlphaPixelType alphaPixelZeroValue = AlphaTraits<AlphaPixelType>::zero();
ThresholdingAccessor ata(
Threshold<ImagePixelComponentType, AlphaPixelType>(
- AlphaTraits<ImagePixelComponentType>::max() / 2,
- AlphaTraits<ImagePixelComponentType>::max(),
- AlphaTraits<AlphaPixelType>::zero(),
- AlphaTraits<AlphaPixelType>::max()
+ imagePixelMaxValue / 2,
+ imagePixelMaxValue,
+ alphaPixelZeroValue,
+ alphaPixelMaxValue
),
alpha.second);

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_enblend_cc,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- src/enblend.cc.orig Fri Feb 15 10:18:21 2008
+++ src/enblend.cc Fri Jul 25 00:49:48 2008
@@ -61,8 +61,14 @@ extern "C" {
extern "C" char *optarg;
extern "C" int optind;
+#ifdef __OpenBSD__
+#include <ieeefp.h>
+#define fesetround(x) fpsetround(x)
+#define FE_TONEAREST FP_RN
+#else
#ifndef _MSC_VER
#include <fenv.h>
+#endif
#endif
#include <signal.h>

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_enfuse_cc,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- src/enfuse.cc.orig Thu Mar 13 20:34:35 2008
+++ src/enfuse.cc Fri Jul 25 00:49:41 2008
@@ -61,8 +61,14 @@ extern "C" {
extern "C" char *optarg;
extern "C" int optind;
+#ifdef __OpenBSD__
+#include <ieeefp.h>
+#define fesetround(x) fpsetround(x)
+#define FE_TONEAREST FP_RN
+#else
#ifndef _MSC_VER
#include <fenv.h>
+#endif
#endif
#include <signal.h>

View File

@ -0,0 +1,33 @@
$OpenBSD: patch-src_pyramid_h,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
--- src/pyramid.h.orig Sat Feb 2 21:30:51 2008
+++ src/pyramid.h Fri Apr 17 20:18:27 2009
@@ -641,7 +641,8 @@ inline void reduce(bool wraparound,
// Main pixels in first row
for (sx = sy, evenX = true, srcx = 0, dstx = 0; srcx < src_w; ++srcx, ++sx.x) {
- SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx)));
+ SKIPSMImagePixelType foo = SKIPSMImagePixelType(sa(sx));
+ SKIPSMImagePixelType icurrent(foo);
if (evenX) {
isc0[dstx] = isr1 + IMUL6(isr0) + isrp + icurrent;
isc1[dstx] = IMUL5(isc0[dstx]);
@@ -708,7 +709,8 @@ inline void reduce(bool wraparound,
// Main entries in row
for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x) {
- SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx)));
+ SKIPSMImagePixelType foo = SKIPSMImagePixelType(sa(sx));
+ SKIPSMImagePixelType icurrent(foo);
if (evenX) {
SKIPSMImagePixelType ip = isc1[dstx] + IMUL6(isc0[dstx]) + iscp[dstx];
isc1[dstx] = isc0[dstx] + iscp[dstx];
@@ -770,7 +772,8 @@ inline void reduce(bool wraparound,
// Main entries in odd-numbered row
for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x) {
- SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx)));
+ SKIPSMImagePixelType foo = SKIPSMImagePixelType(sa(sx));
+ SKIPSMImagePixelType icurrent(foo);
if (evenX) {
iscp[dstx] = (isr1 + IMUL6(isr0) + isrp + icurrent) * 4;
isr1 = isr0 + isrp;

View File

@ -0,0 +1,8 @@
Enblend combines images that partially overlap into a single large
image with no seams (panorama generation). This is a command-line
tool which performs the actual composition; another tool is required
to line up the images ready for input (e.g. Hugin).
Enfuse combines images that overlap into a single image with good
focus and exposure (exposure stacking for high dynamic range, focus
stacking for extended depth-of-field).

View File

@ -0,0 +1,8 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2009/04/19 11:14:37 sthen Exp $
@bin bin/enblend
@bin bin/enfuse
@info info/enblend.info
@info info/enfuse-focus-stacking.info
@info info/enfuse.info
@man man/man1/enblend.1
@man man/man1/enfuse.1