summaryrefslogtreecommitdiff
path: root/gnu/packages/image-processing.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/image-processing.scm')
-rw-r--r--gnu/packages/image-processing.scm268
1 files changed, 80 insertions, 188 deletions
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 9becd530b6..93fe384aa8 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Andy Tai <atai@atai.org>
;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;;
;;; This file is part of GNU Guix.
@@ -105,15 +106,15 @@
(base32 "13j5yf3p6qj3mr17d77r3kcqchf055hgvk1w15vmdr8f54mwcnb8"))))
(build-system cmake-build-system)
(inputs
- `(("icu4c" ,icu4c)
- ("libjpeg" ,libjpeg-turbo)
- ("libpng" ,libpng)
- ("libtiff" ,libtiff)
- ("libxml2" ,libxml2)
- ("openssl" ,openssl)
- ("zlib" ,zlib)))
+ (list icu4c
+ libjpeg-turbo
+ libpng
+ libtiff
+ libxml2
+ openssl
+ zlib))
(native-inputs
- `(("doxygen" ,doxygen))) ; for HTML documentation
+ (list doxygen)) ; for HTML documentation
(home-page "https://dcmtk.org")
(synopsis "Libraries and programs implementing parts of the DICOM standard")
(description "DCMTK is a collection of libraries and applications
@@ -225,15 +226,12 @@ of external libraries that provide additional functionality.")
(("/bin/sh") (which "bash")))
#t)))))
(native-inputs
- `(("git" ,git)
- ("pkg-config" ,pkg-config)))
+ (list git pkg-config))
(inputs
;; XXX Adding freeglut, glew, ilmbase, mesa, and openimageio for
;; ocioconvert fails: error: conflicting declaration ?typedef void
;; (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)
- `(("lcms" ,lcms)
- ("openexr" ,openexr-2)
- ("tinyxml" ,tinyxml)))
+ (list lcms openexr-2 tinyxml))
(home-page "https://opencolorio.org")
(synopsis "Color management for visual effects and animation")
(description
@@ -344,98 +342,7 @@ many popular formats.")
(propagated-inputs
;; VTK's 'VTK-vtk-module-find-packages.cmake' calls
;; 'find_package(THEORA)', which in turns looks for libogg.
- `(("libogg" ,libogg)))
- (home-page "https://vtk.org/")
- (synopsis "Libraries for 3D computer graphics")
- (description
- "The Visualization Toolkit (VTK) is a C++ library for 3D computer graphics,
-image processing and visualization. It supports a wide variety of
-visualization algorithms including: scalar, vector, tensor, texture, and
-volumetric methods; and advanced modeling techniques such as: implicit
-modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
-triangulation. VTK has an extensive information visualization framework, has
-a suite of 3D interaction widgets, supports parallel processing, and
-integrates with various databases on GUI toolkits such as Qt and Tk.")
- (license license:bsd-3)))
-
-;; freecad needs an old version of VTK, because VTK's API changed from 8 to 9
-(define-public vtk-8
- (package
- (name "vtk")
- (version "8.2.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://vtk.org/files/release/"
- (version-major+minor version)
- "/VTK-" version ".tar.gz"))
- (sha256
- (base32
- "1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl"))
- (patches
- (search-patches "vtk-8-fix-freetypetools-build-failure.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (for-each
- (lambda (dir)
- (delete-file-recursively
- (string-append "ThirdParty/" dir "/vtk" dir)))
- ;; ogg, pugixml depended upon unconditionally
- '("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
- "glew" "hdf5" "jpeg" "jsoncpp" "libproj" "libxml2" "lz4"
- "netcdf" "png" "sqlite" "theora" "tiff" "zlib"))
- #t))))
- (build-system cmake-build-system)
- (arguments
- '(#:build-type "Release" ;Build without '-g' to save space.
- #:configure-flags '(;"-DBUILD_TESTING:BOOL=TRUE"
- ;"-DVTK_MODULE_USE_EXTERNAL_vtkogg:BOOL=TRUE" ; not honored
- "-DVTK_USE_SYSTEM_DOUBLECONVERSION:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_EIGEN:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_EXPAT:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_FREETYPE:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_GL2PS:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_GLEW:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_HDF5:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_JPEG:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_JSONCPP:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_LIBPROJ:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_LIBXML2:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_LZ4:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_NETCDF:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_PNG:BOOL=TRUE"
- ;"-DVTK_USE_SYSTEM_PUGIXML:BOOL=TRUE" ; breaks IO/CityGML
- "-DVTK_USE_SYSTEM_SQLITE:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_THEORA:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE")
- #:tests? #f)) ;XXX: test data not included
- (inputs
- `(("double-conversion" ,double-conversion)
- ("eigen" ,eigen)
- ("expat" ,expat)
- ("freetype" ,freetype)
- ("gl2ps" ,gl2ps)
- ("glew" ,glew)
- ("glu" ,glu)
- ("hdf5" ,hdf5)
- ("jpeg" ,libjpeg-turbo)
- ("jsoncpp" ,jsoncpp)
- ;("libogg" ,libogg)
- ("libtheora" ,libtheora)
- ("libX11" ,libx11)
- ("libxml2" ,libxml2)
- ("libXt" ,libxt)
- ("lz4" ,lz4)
- ("mesa" ,mesa)
- ("netcdf" ,netcdf)
- ("png" ,libpng)
- ("proj" ,proj.4)
- ;("pugixml" ,pugixml)
- ("sqlite" ,sqlite)
- ("tiff" ,libtiff)
- ("xorgproto" ,xorgproto)
- ("zlib" ,zlib)))
+ (list libogg))
(home-page "https://vtk.org/")
(synopsis "Libraries for 3D computer graphics")
(description
@@ -462,8 +369,8 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
(base32
"0pla1r5mvkgl4sl213gfdhzrypdgai0h3z5mfgm6p9jz9hsr794j"))))
(inputs
- `(("jsoncpp" ,jsoncpp-for-tensorflow)
- ,@(alist-delete "jsoncpp" (package-inputs vtk))))))
+ (modify-inputs (package-inputs vtk)
+ (replace "jsoncpp" jsoncpp-for-tensorflow)))))
(define-public opencv
(package
@@ -580,10 +487,8 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
(mkdir "../opencv-contrib")
(copy-recursively (assoc-ref inputs "opencv-extra")
"../opencv-extra")
- (invoke "tar" "xvf"
- (assoc-ref inputs "opencv-contrib")
- "--strip-components=1"
- "-C" "../opencv-contrib")))
+ (copy-recursively (assoc-ref inputs "opencv-contrib")
+ "../opencv-contrib")))
(add-after 'set-paths 'add-ilmbase-include-path
(lambda* (#:key inputs #:allow-other-keys)
@@ -591,10 +496,11 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
;; the CPATH to satisfy the dependency on "ImathVec.h".
(setenv "CPATH"
- (string-append (assoc-ref inputs "ilmbase")
- "/include/OpenEXR"
- ":" (or (getenv "CPATH") "")))
- #t))
+ (string-append
+ (string-drop-right
+ (search-input-file inputs "include/OpenEXR/ImathVec.h")
+ 11)
+ ":" (or (getenv "CPATH") "")))))
(add-before 'check 'start-xserver
(lambda* (#:key inputs #:allow-other-keys)
(let ((xorg-server (assoc-ref inputs "xorg-server"))
@@ -683,30 +589,29 @@ vision algorithms. It can be used to do things like:
(base32 "0vjsh3i0861f6h9as3bch956cidz824zz499pvhjs3lfjn6hhs14"))))
(build-system gnu-build-system)
(native-inputs
- `(("gobject-introspection" ,gobject-introspection)
- ("pkg-config" ,pkg-config)))
+ (list gobject-introspection pkg-config))
(inputs
- `(("expat" ,expat)
- ("fftw" ,fftw)
- ("giflib" ,giflib)
- ("glib" ,glib)
- ("hdf5" ,hdf5)
- ("imagemagick" ,imagemagick)
- ("lcms" ,lcms)
- ("libexif" ,libexif)
- ("libgsf" ,libgsf)
- ("libjpeg" ,libjpeg-turbo)
- ("libpng" ,libpng)
- ("librsvg" ,librsvg)
- ("libtiff" ,libtiff)
- ("libxml2" ,libxml2)
- ("libwebp" ,libwebp)
- ("matio" ,matio)
- ("niftilib" ,niftilib)
- ("openexr" ,openexr-2)
- ("orc" ,orc)
- ("pango" ,pango)
- ("poppler" ,poppler)))
+ (list expat
+ fftw
+ giflib
+ glib
+ hdf5
+ imagemagick
+ lcms
+ libexif
+ libgsf
+ libjpeg-turbo
+ libpng
+ librsvg
+ libtiff
+ libxml2
+ libwebp
+ matio
+ niftilib
+ openexr-2
+ orc
+ pango
+ poppler))
(home-page "https://libvips.github.io/libvips/")
(synopsis "Multithreaded image processing system with low memory needs")
(description
@@ -745,18 +650,18 @@ due to its architecture which automatically parallelises the image workflows.")
"-Wl,-rpath="
(assoc-ref outputs "out") "/lib")))))))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ (list pkg-config))
(inputs
- `(("curl" ,curl)
- ("fftw" ,fftw)
- ("graphicsmagick" ,graphicsmagick)
- ("libjpeg-turbo" ,libjpeg-turbo)
- ("libpng" ,libpng)
- ("libtiff" ,libtiff)
- ("libx11" ,libx11)
- ;;("opencv" ,opencv) ;OpenCV is currently broken in the CI
- ("openexr" ,openexr-2)
- ("zlib" ,zlib)))
+ (list curl
+ fftw
+ graphicsmagick
+ libjpeg-turbo
+ libpng
+ libtiff
+ libx11
+ ;;("opencv" ,opencv) ;OpenCV is currently broken in the CI
+ openexr-2
+ zlib))
(home-page "https://gmic.eu/")
(synopsis "Full-featured framework for digital image processing")
(description "G'MIC is a full-featured framework for digital image
@@ -782,12 +687,10 @@ including 2D color images.")
(add-after 'unpack 'qt-chdir
(lambda _ (chdir "gmic-qt") #t))))))
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("qttools" ,qttools)))
+ (list pkg-config qttools))
(inputs
- `(("gmic" ,gmic)
- ("qtbase" ,qtbase-5)
- ,@(package-inputs gmic)))
+ (modify-inputs (package-inputs gmic)
+ (prepend gmic qtbase-5)))
(synopsis "Qt frontend for the G'MIC image processing framework")
(license license:gpl3+)))
@@ -809,11 +712,8 @@ including 2D color images.")
(name "gmic-qt-gimp")
(inputs
;; GIMP and its dependencies.
- `(("gimp" ,gimp)
- ("gdk-pixbuf" ,gdk-pixbuf)
- ("cairo" ,cairo)
- ("gegl" ,gegl)
- ,@(package-inputs gmic-qt)))
+ (modify-inputs (package-inputs gmic-qt)
+ (prepend gimp gdk-pixbuf cairo gegl)))
(arguments
(substitute-keyword-arguments (package-arguments gmic-qt)
((#:configure-flags flags)
@@ -865,9 +765,7 @@ including 2D color images.")
("poppler" ,poppler)
("gsl" ,gsl)))
(native-inputs
- `(("flex" ,flex)
- ("bison" ,bison)
- ("pkg-config" ,pkg-config)))
+ (list flex bison pkg-config))
(home-page "https://github.com/libvips/nip2")
(synopsis "Spreadsheet-like GUI for libvips")
(description "This package provide a graphical user interface (GUI) for
@@ -907,11 +805,7 @@ recalculates.")
#t))))
(build-system cmake-build-system)
(inputs
- `(("libgeotiff" ,libgeotiff)
- ("libtiff" ,libtiff)
- ("libjpeg" ,libjpeg-turbo)
- ("libpng" ,libpng)
- ("zlib" ,zlib)))
+ (list libgeotiff libtiff libjpeg-turbo libpng zlib))
(home-page "https://github.com/vxl/vxl/")
(synopsis "Collection of C++ libraries for computer vision")
(description "VXL (the Vision-something-Libraries) is a collection of C++
@@ -997,8 +891,7 @@ libraries designed for computer vision research and implementation.")
("vxl" ,vxl-1)
("zlib" ,zlib)))
(native-inputs
- `(("googletest" ,googletest)
- ("pkg-config" ,pkg-config)))
+ (list googletest pkg-config))
(home-page "https://github.com/InsightSoftwareConsortium/ITK/")
(synopsis "Scientific image processing, segmentation and registration")
(description "The Insight Toolkit (ITK) is a toolkit for N-dimensional
@@ -1254,7 +1147,7 @@ substituted by matching images.")
"0kixwjb2x457dq7927hkh34c803p7yh1pmn6n61rk9shqrcg492h"))))
(build-system qt-build-system)
(native-inputs
- `(("qttools" ,qttools)))
+ (list qttools))
(inputs
`(("boost" ,boost)
("libjpeg" ,libjpeg-turbo)
@@ -1297,9 +1190,7 @@ and Scan Tailor Enhanced versions as well as including many more bug fixes.")
(base32 "14m92dskzw7bwsr64ha4p0mj3ndv13gwcbfic3qxrs3zq5353s7l"))))
(build-system gnu-build-system)
(inputs
- `(("libtiff" ,libtiff)
- ("zlib" ,zlib)
- ("libjpeg-turbo" ,libjpeg-turbo)))
+ (list libtiff zlib libjpeg-turbo))
(home-page "https://www.astromatic.net/software/stiff")
(synopsis "Convert scientific FITS images to TIFF format")
(description
@@ -1333,11 +1224,8 @@ purposes.")
(invoke "pytest" "-v" "tests"))
#t)))))
(propagated-inputs
- `(("python-matplotlib" ,python-matplotlib)
- ("python-numpy" ,python-numpy)
- ("python-pillow" ,python-pillow)
- ("python-pyyaml" ,python-pyyaml)))
- (native-inputs `(("python-pytest" ,python-pytest)))
+ (list python-matplotlib python-numpy python-pillow python-pyyaml))
+ (native-inputs (list python-pytest))
(home-page "http://github.com/wkentaro/imgviz")
(synopsis "Image Visualization Tools")
(description "Python library for object detection, semantic and instance
@@ -1362,6 +1250,12 @@ segmentation.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'loosen-requirements
+ (lambda _
+ ;; Don't require an outdated version of matplotlib.
+ (substitute* "setup.py"
+ (("matplotlib<3\\.3")
+ "matplotlib"))))
(add-before 'check 'start-xserver
(lambda* (#:key inputs #:allow-other-keys)
(let ((xorg-server (assoc-ref inputs "xorg-server")))
@@ -1383,17 +1277,15 @@ segmentation.")
(setenv "MPLBACKEND" "agg")
(invoke "pytest" "-v" "tests" "-m" "not gpu")))))))
(propagated-inputs
- `(("python-imgviz" ,python-imgviz)
- ("python-matplotlib" ,python-matplotlib)
- ("python-numpy" ,python-numpy)
- ("python-pillow" ,python-pillow)
- ("python-pyyaml" ,python-pyyaml)
- ("python-qtpy" ,python-qtpy)
- ("python-termcolor" ,python-termcolor)))
+ (list python-imgviz
+ python-matplotlib
+ python-numpy
+ python-pillow
+ python-pyyaml
+ python-qtpy
+ python-termcolor))
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-pytest-qt" ,python-pytest-qt)
- ("xorg-server" ,xorg-server-for-tests)))
+ (list python-pytest python-pytest-qt xorg-server-for-tests))
(home-page "https://github.com/wkentaro/labelme")
(synopsis
"Image Polygonal Annotation")