Image package

The image package is part of the octave-forge project. See its homepage for the latest release.

Development

Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, search and report them on the bug tracker instead.

Roadmap

The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).

  • add ellipse properties to regionprops (see bug #44100) (done)
  • speed up regionprops for large images with many small objects (probably work around for loop with labeled == labelid)
  • support passing bwconncomp output to regionprops (and then fix bwpropfilt to use that instead of a labeled image)
  • ND support on imfilter
  • check if normxcorr2 is Matlab compatible and investigate making use of fftconvn since it's likely to receive large input
  • investigate implementing the missing deconvolution functions (see patch #8571)
  • anything else that is done or submitted before the above are done

Missing functions

this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the development sources before adding it.
  • activecontour
  • adapthisteq
  • affine2d
  • affine3d
  • applycform
  • axes2pix
  • bwconvhull
  • bwdistgeodesic
  • bwlookup
  • bwpack
  • bwtraceboundary
  • bwulterode
  • bwunpack
  • convmtx2
  • corner
  • cornermetric
  • cpcorr
  • cpselect
  • cpstruct2pairs
  • dct2
  • dctmtx
  • deconvblind
  • deconvlucy
  • deconvreg
  • deconvwnr
  • decorrstretch
  • demosaic
  • dicomanon
  • dicomdisp
  • dicomuid
  • dpxread
  • dpxinfo
  • fan2para
  • fanbeam
  • fliptform
  • freqz2
  • fsamp2
  • ftrans2
  • fwind1
  • fwind2
  • gabor
  • getimage
  • getimagemodel
  • getline
  • getpts
  • getrect
  • gradientweight
  • graycoprops
  • grayconnected
  • graydiffweight
  • hdrread
  • hdrwrite
  • houghlines -- (see hough_line)
  • houghpeaks
  • iccfind
  • iccread
  • iccroot
  • iccwrite
  • idct2
  • ifanbeam
  • im2java2d
  • ImageAdapter
  • imageinfo
  • imapplymatrix
  • imapprox
  • imbinarize
  • imboxfilt
  • imboxfilt3
  • imcolormaptool
  • imcontour
  • imcontrast
  • imdisplayrange
  • imdistline
  • imellipse
  • imextendedmax
  • imextendedmin
  • imfindcircles
  • imfreehand
  • imfuse
  • imgaborfilt
  • imgaussfilt
  • imgaussfilt3
  • imgca
  • imgcf
  • imguidedfilter
  • imhandles
  • imhistmatch
  • imhmax
  • imhmin
  • imimposemin
  • imline
  • immagbox
  • immovie
  • imoverview
  • imoverviewpanel
  • impixelinfo
  • impixelinfoval
  • impixelregionpanel
  • impixelregion
  • implay
  • impoint
  • impoly
  • improfile
  • imrect
  • imref2d
  • imref3d
  • imregconfig
  • imregcorr
  • imregdemons
  • imregister
  • imregtform
  • imroi
  • imscrollpanel
  • imsegfmm
  • imseggeodesic
  • imshowpair
  • imtool
  • imwarp
  • integralBoxFilter
  • integralBoxFilter3
  • integralImage
  • integralImage3
  • interfileinfo
  • interfileread
  • iptaddcallback
  • iptcheckhandle
  • iptgetapi
  • iptGetPointerBehavior
  • iptgetpref
  • ipticondir
  • iptPointerManager
  • iptprefs
  • iptremovecallback
  • iptSetPointerBehavior
  • iptsetpref
  • iptwindowalign
  • isicc
  • isrset
  • makecform
  • makeConstrainToRectFcn
  • makehdr
  • makeresampler
  • multithresh
  • nitfinfo
  • nitfread
  • openrset
  • otsuthresh
  • para2fan
  • projective2d
  • regionfill
  • roifill
  • roifilt2
  • roipoly
  • rsetwrite
  • ssim
  • tformarray
  • tonemap
  • truesize
  • visboundaries
  • viscircles
  • warp
  • whitepoint
  • wiener2
  • xyz2double
  • xyz2uint16

Different functions

  • with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.

Missing options

  • @strel
    • missing SE decomposition for the diamond shape
    • approximation argument for the ball and disk shapes are not implemented
    • the translate method is not yet implemented
  • blockproc
    • The name-value input arguments have not yet been implemented.
  • colfilt
    • the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.
  • impixel
    • interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.
  • imcrop
    • messing around with alternative coordinate systems (XData and YData) are not yet implemented.
  • imwrap
    • no supports for SmoothEdges option
  • hough
    • no RhoResolution option

Contributing

  • It'd help to group the missing functions above, as per [1] (similar to what was done in the signal package wiki page); please keep the original alphabetical list intact.

Open Bugs

bug bug title status
#38085 image package: fails to build with --enable-64 (entropyfilt) Confirmed
#38087 image package: graycomatrix incompatibilities with matlab None
#38345 image package: __spatial_filtering__() always returns class double Confirmed
#41674 image package: temporary arrays in imresize are doubles None
#43218 image package: imshear causes more signal spread than expected and inconsistent vertical offset None
#44396 image package: bwmorph shrink does not preserve Euler number Confirmed
#44799 image package: imrotate chrashes when using 'spline' as interpolation method Confirmed
#44831 image package: imrotate - different dimensions of output matrix Confirmed
#45088 image package: rangefilt requires domain and image to have equal number of dimensions Patch Reviewed
#46745 image package: imresize default method (bicubic) Matlab incompatible for the border pixels None
#48529 image package: compilation warnings under Mac OSX None
#50071 OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa None
#50151 image package: normxcorr2 is not compatible with Matlab None
#50188 image package: poly2mask does incompatible rounding None
#50257 image package: imtranslate is not Matlab compatible Confirmed
#50341 Missing Function imrect in image package None
#50429 image package: xyz2lab changed slightly in Matlab (and other color conversion functions) None
#50656 image package: bwerode does not return right size when there's more dimensions on conn None
#50708 image package: add demosaic.m Patch Submitted
#50732 Image package: infinite error loop when assigning a strel (class) object to a vector Confirmed
#50783 image package: imlincomb is not compatible with Matlab none
#50874 bwdist call causes application crash Confirmed
#51420 [octave forge] (image) imrotate is less tolerant to missing argument than Matlab None
#51719 [octave forge] (image) watershed unit test failure None
#51724 [octave forge] (image) imregionalmax misbehaves on float images Confirmed
#51769 [octave forge] (image) imresize bilinear interpolation inaccurate Patch Submitted

Patches

  • #8059: [new function for image package] ranktf.m
  • #8060: [image package new function] whitepoint.m
  • #8722: implement impixelinfo and impixelinfoval
  • #8813: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images
  • #8866: image package: add metainfo.xml file for Gnome Software
  • #8571: image package: three deconvolution routines (Wiener, RL, RLTV)
  • #8824: added affine2d class
  • #9235: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)
  • #9244: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity

Image Processing Functions (this section is under construction)

This is a list of Image Processing functions by topic, including missing functions, related bugs and patched, and some alternatives.

Note: This section is under construction so this list is still incomplete

Basic Read and Write Image Files

Function Octave Package Version Related Bugs and Patches Alternatives Notes
imfinfo 2.6.1
imread 2.6.1 cv.imread from mexopencv

in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA

imwrite 2.6.1 cv.imwrite from mexopencv

in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA

Type Conversion

Function Octave Package Version Related Bugs and Patches Alternatives Notes
adaptthresh - cv.adaptiveThreshold from mexopencv
demosaic - #50708 cv.demosaicing from mexopencv
gray2ind 2.6.1
grayslice 2.6.1
graythresh 2.6.1 Octave version has more methods
im2double 2.6.1
im2int16 2.6.1
im2java2d -
im2single 2.6.1
im2uint16 2.6.1
im2uint8 2.6.1
imbinarize - imbinarize (I) is equivalent to im2bw(I, graythresh(I)),

another option is cv.threshold from mexopencv ||

imcast 2.6.1 Octave Only
imquantize 2.6.1
ind2gray 2.6.1
ind2rgb 2.6.1
label2rgb 2.6.1
mat2gray 2.6.1
multithresh -
otsuthresh - graythresh otsuthresh(hist) is equivalent to graythresh (hist)
rgb2gray 2.6.1
rgb2ind 2.6.1

Image Filtering

Function Octave Package Version Related Bugs and Patches Alternatives Notes
bwareafilt 2.6.1
bwpropfilt 2.6.1
convmtx2 -
entropyfilt 2.6.1 #9235
fibermetric -
freqz2 -
fsamp2 -
fspecial 2.6.1
ftrans2 -
fwind1 -
fwind2 -
gabor -
imboxfilt -
imboxfilt3 -
imfilter 2.6.1
imgaborfilt -
imgaussfilt -
imgaussfilt3 -
imguidedfilter -
imsmooth 2.6.1 Octave only
integralBoxFilter -
integralBoxFilter3 -
integralImage - cv.integral from mexopencv
integralImage3 -
medfilt2 2.6.1 #9235
medfilt3 -
nlfilter 2.6.1
normxcorr2 2.6.1 #50151
ordfilt2 2.6.1 #9235
padarray 2.6.1
rangefilt 2.6.1 #45088 #9235
stdfilt 2.6.1 #9235
wiener2 dev