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.scm275
1 files changed, 94 insertions, 181 deletions
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index b27a80a1a7..93fe384aa8 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -18,6 +18,7 @@
;;; 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.
;;;
@@ -57,6 +58,7 @@
#:use-module (gnu packages fontutils)
#:use-module (gnu packages geo)
#:use-module (gnu packages ghostscript)
+ #:use-module (gnu packages gimp)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
@@ -104,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
@@ -161,7 +163,7 @@ licences similar to the Modified BSD licence."))))
("maxflow" ,maxflow)
("niftilib" ,niftilib)
("nlopt" ,nlopt)
- ("openexr" ,openexr)
+ ("openexr" ,openexr-2)
("python-lxml" ,python2-lxml)
("vtk" ,vtk)))
(native-inputs
@@ -224,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)
- ("tinyxml" ,tinyxml)))
+ (list lcms openexr-2 tinyxml))
(home-page "https://opencolorio.org")
(synopsis "Color management for visual effects and animation")
(description
@@ -333,7 +332,7 @@ many popular formats.")
("mesa" ,mesa)
("netcdf" ,netcdf)
("png" ,libpng)
- ("proj" ,proj.4)
+ ("proj" ,proj)
("python", python)
;("pugixml" ,pugixml)
("sqlite" ,sqlite)
@@ -343,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
@@ -461,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
@@ -635,7 +543,7 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
("libwebp" ,libwebp)
("zlib" ,zlib)
("gtkglext" ,gtkglext)
- ("openexr" ,openexr)
+ ("openexr" ,openexr-2)
("ilmbase" ,ilmbase)
("gtk+" ,gtk+-2)
("python-numpy" ,python-numpy)
@@ -681,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)
- ("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
@@ -743,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)
- ("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
@@ -780,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+)))
@@ -801,6 +706,22 @@ including 2D color images.")
(assoc-ref %build-inputs "gmic") "/lib")))))
(synopsis "Krita plugin for the G'MIC image processing framework")))
+(define-public gmic-qt-gimp
+ (package
+ (inherit gmic-qt)
+ (name "gmic-qt-gimp")
+ (inputs
+ ;; GIMP and its dependencies.
+ (modify-inputs (package-inputs gmic-qt)
+ (prepend gimp gdk-pixbuf cairo gegl)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments gmic-qt)
+ ((#:configure-flags flags)
+ '(list "-DGMIC_QT_HOST=gimp" "-DENABLE_DYNAMIC_LINKING=ON"
+ (string-append "-DGMIC_LIB_PATH="
+ (assoc-ref %build-inputs "gmic") "/lib")))))
+ (synopsis "GIMP plugin for the G'MIC image processing framework")))
+
(define-public nip2
(package
(name "nip2")
@@ -840,13 +761,11 @@ including 2D color images.")
("matio" ,matio)
("lcms" ,lcms)
("libwebp" ,libwebp)
- ("openexr" ,openexr)
+ ("openexr" ,openexr-2)
("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
@@ -886,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++
@@ -976,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
@@ -1233,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)
@@ -1276,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
@@ -1312,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
@@ -1326,7 +1235,7 @@ segmentation.")
(define-public labelme
(package
(name "labelme")
- (version "4.5.9")
+ (version "4.5.13")
(source
(origin
;; PyPi tarball lacks tests.
@@ -1336,11 +1245,17 @@ segmentation.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "12wn291516kdv0wqngz4l04j95g3rwc6cvkcb0gw8rrv4wgc7c66"))))
+ (base32 "0cmi2xb4dgh7738l259rgwhn9l134f0vnaaqc2gflc5yr3lqhrv2"))))
(build-system python-build-system)
(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")))
@@ -1362,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")