For the full changes, please check the git history and the release page
Update to ImageMorphology 0.4, a major upgrade compared to v0.3.
Update to ImageCore 0.10 which has minor breaking changes in
clamp01andabs2(via ColorVectorSpace).Add ImageBinarization, which contributes many new options for binarization compared to previous releases of Images.
As part of the ongoing work to make Images.jl purely a "meta package" that bundles functionality from focused packages, migrate corner-related algorithms to ImageCorners.
This release introduces a few major changes that everyone should be aware of:
- drops compatibility to Julia 1.0. Julia at least 1.3 is required.
- drops compatibility to ImageCore 0.8. ImageCore at least 0.9.3 is required.
- revisited RGB-related operations to provide non-ambiguous implementation. See also the "abs and abs2" section in the ColorVectorSpace README.
- revisits and moves a lot of legacy codes in
src/algorithms.jlof Images to sub-packages, e.g., ImageBase, ImageFiltering, and ImageMorphology. - for a large number of legacy functions, positional arguments are deprecated in favor of their keyword alternatives.
Because there are a lot of deprecations introduced in this release, we recommend people to run under
julia --depwarn=yes mode and fixes the deprecations.
There are also a lot of compatibility changes and probably would make this version incompatible with
other ecosystem. Check the result of git diff v0.24.1 v0.25.0 -- Project.toml for more
information.
The following list summarizes some note-worthy changes for things that used to live in Images:
for
RGBinput,maximum_finiteand the deprecatedmaxabsfinitenow returns RGB instead of numerical scalar value. (Images#971)deprecate
backdiffx,backdiffy,forwarddiffx,forwarddiffyin favor of the generic and GPU-readyfdifffromImageBase.FiniteDiff. (ImageBase#11, Images#971)deprecate non-exported
divin favor offdivfromImageBase(Images#971)deprecate
minfinite/maxfinite/maxabsfinitein favor ofminimum_finiteandmaximum_finite. (Images#971)For RGB types
stdandvarare deprecated in favor ofstdmultandvarmult. For other colorful types (e.g.,HSV),stdandvarsupport for them will be removed in future releases with no substitutes. (Images#971)bilinear_interpolationis deprecated in favor ofimresizefromImageTransformations. (Images#971)imROFis deprecated in favor of the generic and GPU-readysolve_ROF_PDfromImageFiltering.Models(ImageFiltering#233, Images#971)deprecate
ColorizedArrayin favor ofmappedarrayfrom MappedArrays. (Images#927)deprecate
imaveragein favor ofKernel.boxfrom ImageFiltering. (Images#971)deprecate
imlaplacianin favor ofimlaplacian2Dfrom ImageFiltering. (Images#971)deprecate
integral_imageandboxdiffin favor of IntegralArrays. (Images#971)
-
add
OffsetArraytoREQUIRE -
add
OffsetArraysupport togaussian_pyramid.
New features:
- added
Percentileto disambiguate the interpretation of thresholds. A raw numberxwill now be interpreted as an absolute threshold, whereasPercentile(x)(with0 <= x <= 100) will choose an absolute threshold based on the distribution of values in the input array.
API changes:
-
cannypasses the threshold as a 2-tuple and usesPercentilerather than apercentilekeyword. It now issues a deprecation warning when used with default arguments. -
imcornernow usesPercentile. The old syntax issues a deprecation warning.
Breaking changes:
- Return type of
cannyis now anArray{Bool}
Feature additions:
convexhull- MIME"text/html" output for arrays-of-images
Add feature_transform and distance_transform
Images has been rewritten essentially from scratch for this release. The major goals of the release are:
- More consistent treatment of spatial orientation
- Preserve key properties upon indexing
- Intuitive handling of indexed (colormap) images
- Better support for a wider range of array types
- Improvements in type-stability of many operations
- Improvements in the user experience through easier interfaces, more informative error messages, and improved printing/display
- Improvements in documentation
- For users of former releases of Images, as smooth an upgrade path as can be practically provided, through deprecations or informative error messages
Key changes (of which many are breaking):
-
Many properties that were formerly in the dictionary (colorspace, spatial orientation, pixel spacing, and the presence/absence of a time dimension) are now encoded by the type system. The
ImageAxespackage (a small extension ofAxisArrays) is now used for several of these properties. This fixes the former loss of information like spatial orientation when images were indexed (img[5:20, 5:20]). -
The
Imagetype (an array + dictionary) has been renamedImageMeta, and should be much less needed now that most properties can be encoded withAxisArrays.ImageMetais still useful if you need to encode information like date/time at which the image was taken, sky coordinates, patient IDs, or experimental conditions. Otherwise, it's recommended to use regularArrays, orAxisArraysif you need to endow axes with "meaning." -
Full commitment to the use of
Coloranttypes (as defined by theColorTypesandColorspackages) for encoding color images. Arrays are no longer allowed to declare that they use one axis (dimension) to store color information, i.e., am×n×3 Float32array would be displayed as a 3d grayscale image, not an RGB image. This choice facilitates efficient and type-stable indexing behavior and enhances consistency. "Lazy" interconversion between arbitrary numeric arrays and color arrays are provided by two new view types,colorviewandchannelview, defined in theImageCorepackage. These types hopefully remove any awkwardness from the new requirement. -
For an indexed (colormap) image
imgi, indexing withimgi[i,j]used to return the index, not the pixel value. This operation now returns the pixel value, with the consequence that indexed images largely act like the array they represent. Indexed images are defined and handled by theIndirectArrayspackage. -
Image filtering has been greatly improved.
imfilter_fftandimfilter_gaussianhave both been rolled intoimfilter. FFT/FIR filtering is chosen automatically (though a choice can be specified) depending on kernel size, aiming for the best performance in all cases and a consistent interface for specifying defaults. The main filtering algorithms have been considerably improved, particularly for separable kernels, and feature cache-efficient tiling and multithreading. The performance enhancement is as large as 10-fold in some cases, particularly when starting Julia with multiple threads. Certain constructs for specifying boundary conditions have been deprecated and replaced with dispatch-leveraging alternatives. Specification of standard kernels has been changed considerably, and has been split out into two modules,KernelandKernelFactors, both defined in theImageFilteringpackage. In particular note theIIRGaussiantypes which contain the functionality that was formerly inimfilter_gaussian. -
Nonlinear filtering operations have been added with
mapwindow. Among the supported functions ismedian!, thus providing an implementation of median-filtering. -
Previous versions of Images used
reinterpretfor several operations, butreinterpretfails for mostAbstractArrays other thanArray. This release implements alternative mechanisms (e.g., based on theMappedArrayspackage) that work for anyAbstractArraytype. (When it would help performance,reinterpretis still used when applicable.) Consequently, this release features better support for a wider range of array types. -
Several improvements have been made to the handling of fixed-point numbers, which permit the use of 8- and 16-bit types that act similarly to floating-point numbers and which permit a consistent criterion for "black" (0.0) and "white" (1.0) independent of storage type. Specifically:
- Trying to convert out-of-bounds values now gives an informative
error message rather than just
InexactError - Several bugs in FixedPointNumber operations have been fixed, and such operations are more consistent about return types
- FixedPointNumbers are now printed more compactly
- Trying to convert out-of-bounds values now gives an informative
error message rather than just
-
A new package,
ImageTransformations, is underway for rotation, resizing, and other geometric operations on images. -
Many deprecation warnings were designed to help users of the current Images package transition to the new framework.
Other changes (all of which are breaking):
-
The gradient components returned by
imgradientsmatch the dimensions of the input; ing1, g2, ... = imgradients(img, ...),g1corresponds to the gradient along the first dimension,g2along the second, and so on. -
sobeland other filters have been normalized so that the returned "gradient components" are scaled to estimate the actual derivatives. For example, forsobelthe normalization factor is 1/8 compared to earlier releases. -
extrema_filterhas been deprecated in favor ofmapwindow(extrema, A, window). However, this returns an array of(min,max)tuples rather than separatemin,maxarrays. This is intended to transition towards a future API where one can passminormaxin place ofextremato obtain just one of these. Currently, you can retrieve theminarray withfirst.(mm)and themaxarray withlast.(mm). -
The old
extrema_filterdiscards the edges of the image, whereas the new one (based onmapwindow) returns an array of the same size as the input. -
The output of
blob_LoGis now aVector{BlobLoG}, a new exported immutable, rather than the old tuple format. -
findlocalextremanow returns aVector{CartesianIndex{N}}rather than aVector{NTuple{N,Int}}. This makes it ready for use in efficient indexing.
Changes in related packages:
- NRRD.jl has been extensively revamped. The NRRD format lacks an
official test suite, and hence it was always uncertain how well the
package supported "the standard" (to the extent that there is
one). However, it was discovered that
unu makecan generate files that can serve as a test suite, and using this strategy several incompatibilities in our former version were noted and fixed. It is possible that old .nrrd files written by julia might not be readable without making manual edits to the header.
For earlier history, please see the git revision history.