Skip to content

v2.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Nov 21:02
c9ffa0c

2.5.0 (2026-11-27)

Headlines

New features

  • Histogram.compare(), with seven comparison measures
  • Image.ComboFeature joins any supported detector to any descriptor, for example FAST with BRIEF
  • SURF features (needs an OpenCV build that includes the non-free modules)
  • PointCloud and VoxelGrid draw in the notebook cell with disp(notebook=True); PointCloud also gains concatenate(), unpaint() and painting by color name
  • New notebooks: point clouds, and CNN segmentation and detection with Torch

Improvements

  • Depth images from a ROSBag, or any integer depth image with depth_units, come out as float32 metres, with 0 as NaN
  • Graphics options are tidier, and MATLAB-style shorthand such as "r:" and short Matplotlib names such as lw work consistently
  • idisp has a ? key that lists its keys, and plotting functions set window titles
  • Notebooks in the browser now behave like desktop Jupyter

Changes

  • name2color() no longer accepts wildcards. A name containing ., ? or * raises ValueError. To list the names that match a pattern, use the new color_names(), which takes a regular expression
  • Image.Read returns C-contiguous pixels, and drawing into a strided image raises an error
  • int_image() clips floats to 0 to 1
  • gamma_encode(), gamma_decode() and colorspace_convert() treat array shape and type consistently. The result has the type of the input unless the new dtype argument says otherwise, and 1D arrays work. An 8-bit image converted to HSV, Lab* or XYZ now gives float32 in natural units (hue in degrees, L* 0 to 100), where before it had OpenCV's 8-bit encoding. A 3-vector or Nx3 array of integers is scaled to 0 to 1, where before it gave silently wrong colors
  • A missing image file raises FileNotFoundError, not ValueError, with a short traceback and a message that suggests similar file names. Code that caught ValueError for a missing file must catch FileNotFoundError* pcd.normals(radius=..., max_nn=...), the old method call, still works but is deprecated and warns. Use estimate_normals(); normals is the property that returns the normals

Under the hood

  • mypy passes with no errors, py.typed is shipped, test coverage is much higher, Codacy rates the code A, and over 60 bugs were found and fixed

Compatibility

  • Python 3.10 is no longer supported. Python 3.11 to 3.14 are tested
  • The in-browser notebooks need a browser with JSPI support: Chrome 137 or later, Safari 27 or later, Firefox 153 or later
  • OpenCV 4 and 5 are both supported, including some OpenCV 5.1 edge cases

Features

  • a missing image file raises FileNotFoundError, with a short traceback and suggestions (#328) (06d2e95)
  • add a ? key to idisp that prints the list of keys (#215) (3e5dcab)
  • add a notebook on CNN segmentation and detection with torch (#206) (4de883f)
  • add color_names and remove the wildcard from name2color (#249) (031611f)
  • add Histogram.compare with seven comparison methods (#203) (9dae5d0)
  • add Image.SURF and SURFFeature (#201) (09042f4), closes #113
  • add text_style to plot_labelbox, and make the label background follow the box edge color (#273) (dd6decc)
  • compute the Hough accumulator by voting (#228) (90e21b4)
  • consistent array shape and data type handling in gamma and color conversion (#204) (860ae3f)
  • depth_units turns 0 into NaN in an integer depth image (#188) (4150231), closes #151
  • Image.ComboFeature joins any supported detector to any descriptor (#286) (2c58570)
  • iwrite creates missing folders in the output path (#200) (eb34023)
  • make sum() work on feature sets and raise clear TypeErrors (#243) (cb30d19)
  • plane() and planes() take copy=True for an independent, C-contiguous result (#310) (79ec26c)
  • PointCloud unknown names raise AttributeError with a helpful message (#297) (55a5b9f)
  • PointCloud.concatenate, unpaint, paint by color name, and sum() of point clouds (#287) (58deb9e)
  • PointCloud.disp(notebook=True) draws in the notebook cell with Plotly (#279) (829668b)
  • PointCloud.segment_plane tries 1000 iterations by default, and is documented (#289) (aebb259)
  • ROSBag depth_units returns depth images as float32 metres (#187) (156d787)
  • run the JupyterLite notebooks with ipympl and follow the plotting recipe (#193) (fa8de87)
  • scale, orientation and strength raise for features that do not have them (#275) (dbe8b4a)
  • style the label of Blobs.plot_centroid and each axis of Blobs.plot_axes (#269) (d972f53)
  • use spatialmath's set_window_title and remove MVTB's own (#190) (df755a4), closes #147
  • VoxelGrid.disp(notebook=True) draws in the notebook cell with Plotly (#282) (b967cb3)
  • window titles for plotting functions (#191) (14d0fb3)

Bug Fixes

  • accept the short Matplotlib option names (lw, c, ...) in mpl_styling (#266) (7387141)
  • add a dtype argument to convolve and keep the sign of gradients (#246) (bc0f1b3)
  • add py.typed marker and make the package pass mypy (#176) (49f4606)
  • adding an empty feature set no longer discards the descriptors (#288) (a550c18)
  • allow a minimum disparity of zero in stereo_simple (#231) (312e12d)
  • attach the release zips with gh release upload (#218) (e1a89fb)
  • Blobs.plot_labelbox and plot_box say when a format string has a marker (#270) (bb4db62)
  • Camera recognises JupyterLite using spatialmath's isnotebook (#185) (bbe8342), closes #166
  • CannyHistogram.plot shows the figure once, not twice (#278) (1432117)
  • compute the distance between feature sets correctly (#234) (b3eaf64)
  • consume Matplotlib format markers (#144) (bcf63e4)
  • disp(notebook=True) names an option that Plotly cannot draw (#303) (9f4cdf2)
  • do not change the template in similarity with a z metric (#237) (08d7184)
  • draw the orientation hand of a feature in its direction (#235) (764cc15)
  • drop Python 3.10 (end of life Oct 2026) (#174) (8eb814f)
  • EarthView reads GOOGLE_MAPS_API_KEY first (#149) (d48a8df)
  • EstPose_p passes its frame argument to estpose (#210) (3594254)
  • examples may open any number of figures in the docs build (#302) (a4ddb29)
  • exclude endpoint peaks in findpeaks (#285) (7b7fc66)
  • FeatureMatch.estimate keeps only an inlier mask as the inlier status (#272) (6055f56)
  • fetch the monalisa example image from GitHub (#197) (de3cb1c)
  • give rankfilter a default rank of median (#241) (de734f9)
  • gridify keeps the descriptors and flags, and copes with features at the far edge (#277) (0f404f4)
  • Harris(scale=...) reaches the detector instead of being taken as a flag (#276) (b17c481)
  • Histogram.plot(type="cf") works for a greyscale histogram (#281) (aee8333)
  • idisp clipboard keys v and V copy plain numbers (#214) (b36ffc4)
  • Image.Read returns C-contiguous pixels; drawing into a strided image raises (#162) (dee5e1b)
  • Image.tensor and Image.Tensor get distinct pages in the docs (#304) (7d745c9)
  • Image[...] with a list of planes raises, and a plane index works on a greyscale image (#309) (70b33bb)
  • import mat_struct from the public scipy.io.matlab namespace (#262) (ae7edef)
  • index and print MSER features correctly (#229) (0d4d6c8)
  • install Open3D when building the docs (#294) (efc147b)
  • int_image clips floating point data to 0 to 1 instead of letting it wrap (#325) (b9e42ed)
  • JupyterLite bootstrap installs the bundled wheel, using the shared template (#180) (f0584af)
  • keep the defaults a MATLAB-style format string does not set in mpl_styling (#267) (1dda16e)
  • keep the inlier status of a FeatureMatch an array when it is indexed (#265) (c75544b)
  • keep the type of the result of blend (#238) (fa85a7c)
  • label the x axis of the Canny histogram "gradient magnitude", and add xlabel to Histogram.plot (#280) (95daa06)
  • LabelMeReader raises on unreadable input instead of returning None (#208) (81daa6a), closes #150
  • make canny use its sigma and threshold arguments (#239) (d5ad31a)
  • make filter(minstrength=) keep the stronger features (#233) (6112160)
  • make morphdemo work with immutable images and Image.Random(size=) (#195) (586b78b)
  • make stereo_simple return outputs the size of its inputs (#240) (ce37ae3)
  • make the stdisp cross-hair cursor work (#225) (61f7916)
  • mvtbtool --backend sets the Matplotlib backend instead of stopping with NameError (#324) (9e831ea)
  • narrow file picker data fallback errors (#146) (77a3da9)
  • narrow window title exception handling (#141) (715af60)
  • ocrtool -l no longer crashes when it finds no words (#300) (ac3d867)
  • pickpoints with matplotlib=True no longer raises NameError (#213) (4ddd9f9)
  • PointCloud.normals(radius=..., max_nn=...) still works, with a deprecation warning (#283) (60e13e6)
  • preserve unexpected peak refinement failures (#140) (ca5ee04)
  • print a FeatureMatch that holds a single match (#227) (c2244e1)
  • raise for an unknown colorspace in name2color and plot_spectral_locus (#248) (2ec0f6d)
  • raise NotImplementedError for VISJAC_P depthest=True (#252) (833eb61)
  • raise when the pose estimate of ESTPOSE_P fails (#264) (7eb53fb)
  • refuse a wildcard in Image.Read with its own error (#226) (a90deaa)
  • remove the errors and warnings found by running the notebooks (#205) (af799b1)
  • replace DSI_refine drange with dmin and ignore NaN planes (#247) (56d26b4)
  • report valid color lookup values clearly (#138) (637a787)
  • report video file initialisation failures (#153) (0138f72)
  • return None from the descriptor property when there are none (#230) (7950cce)
  • ROSBag detects the ROS release by default (release="auto") (#164) (60ef838)
  • ROSBag does not try the ROS 1 wire format on a ROS 2 bag when it detects the release (#316) (c3ab74e)
  • ROSBag finds the end of image data from the message layout, not a guess (#163) (20c6efe)
  • ROSBag keeps the BGR color order of a CompressedImage unless told otherwise (#315) (e862924)
  • ROSBag skips a truncated message with a warning, instead of stopping with a struct.error (#319) (5de13cd)
  • say what is wrong with the marker string of draw_point (#268) (86a6592)
  • say why an OpenCV contrib module is missing (#182) (e7c2ae5)
  • sources: read EarthView key from GOOGLE_MAPS_API_KEY first (d48a8df)
  • stop sad, ssd and ncc wrapping around on uint8 images (#236) (df7ab0a)
  • stop the Hough accumulator looping forever with OpenCV 5.1 (#224) (8e38010)
  • the blocks module docstring writes the arrow, not an undefined |rarr| (#301) (6c721c6)
  • the docs build installs libegl1 and libgl1 so Open3D imports (#313) (3437b52)
  • the notebook display of a point cloud or voxel grid uses the same scale on all axes (#284) (d4256c9)
  • the notebooks index links to homography.ipynb, not homographies.ipynb (#291) (748c963)
  • treat any non-zero pixel as foreground in distance_transform (#242) (5c51cf2)
  • undefined names in IBVS_sph.Example and the camera block (#198) (ab53a94)
  • unpin the Pyodide kernel and warn browsers that lack JSPI (#181) (1e935a1), closes #170
  • update ImagePlane to the bdsim 1.5 graphics block interface (#251) (76e6d2a)
  • use Colormap.with_extremes instead of set_bad, set_under and set_over (#263) (8e4c7b9)
  • use the primaries argument of shadow_invariant (#232) (c7277b9)

Documentation

  • add the point clouds notebook (#326) (11bd36f)
  • bare >>> examples get an Examples heading, code-block and plot (#306) (7516838)
  • bring AGENTS.md in line with RTB's (#179) (5e2e6d1)
  • describe the PointCloud wrapper of Open3D on the point cloud page (#298) (c53ceb2)
  • explain the JupyterLite sidebar and that its files are volatile (#184) (f73b3cb), closes #168 #173
  • fail the docs build when a runblock example fails (#175) (3f6897f), closes #159
  • fix broken runblock examples; showwindow defaults to current axes (#161) (d770ddd)
  • fix Sphinx warnings and resolve cross-references (#177) (8f265d9)
  • fix the broken bdsim logo on the blocks page (#183) (7e7b736), closes #169
  • Image() says that integer arrays are narrowed to the smallest type that holds them (#318) (51c7ee7)
  • Image() says that integer arrays are narrowed to the smallest type that holds them, and how to keep the dtype (51c7ee7)
  • JupyterLite troubleshooting section, linked from the README (#134) (97c3eb3)
  • remove black from CONTRIBUTING, it is no longer configured (#178) (5c57843)
  • say what Image keys are valid, and when indexing gives a view or a non-contiguous result (#308) (17b2b80)
  • the name2color example uses a color name that exists (#299) (b0b2059)
  • the VideoFile examples use traffic_sequence.mp4, the file that exists (#305) (7b3aed7)
  • tidy the notebooks index logo and copyright line (#189) (fd5e3a4)
  • uniform notebook header and Bootstrap alert boxes (#192) (d0ac8da)
  • use .. rubric:: Examples in place of Example: headings (#295) (d02e955)
  • use .. rubric:: References in place of the :references: field (#296) (20e21ec)
  • use the .. seealso:: directive in place of the :seealso: field (#293) (8346c35)