pliman 4.0.0
Major Release: Next-Generation Computer Vision & Deep Learning Ecosystem
pliman 4.0.0 represents a transformative milestone, establishing an end-to-end, zero-Python deep learning and computer vision framework directly in R. Key innovations include:
Breaking changes and licensing
image_line_segment()andimage_contour_line()are now defunct (they throw an informative error). They relied on the Line Segment Detector and the sub-pixel contour detector by R. Grompone von Gioi, distributed under the GNU Affero General Public License; that code (src/lsd.c,src/smooth_contours.c) was removed so that pliman stays under GPL (>= 3). Useimage_canny_edge()instead.plot_line_segment()is kept and works with any list of segments.Bundled third-party code is now credited in
inst/COPYRIGHTSand as copyright holders (cph) inDESCRIPTION.Removed the unused
BiocManagersuggestion and the emptybiocViewsfield.mosaic_extract()was rewritten (native C++ engine): it now returns raw pixel values by default (fun = NULL) and a data frame (return = "df"). To get the pliman < 4.0 behaviour (median per polygon bound to the shapefile) usemosaic_extract(mosaic, shp, fun = "median", return = "shapefile"); with a single statistic the columns are named after the layers (e.g.NDVIinstead ofmedian.NDVI).
Bug fixes
-
plot_index_shp(viewer = "mapview")failed withcould not find function "compute_downsample"when the image had more pixels thanmax_pixels(#7).compute_downsample()is now a single internal helper instead of local copies inside other functions. -
plot_index_shp(viewer = "mapview")andmosaic_view()with animageobject failed with[setValues] values must be numeric..., because 8-bit images are stored as raw bytes since 4.0.0; they are now converted to the 0-1 scale before building the raster. -
contour()(and thereforeobject_contour()) returns the list of contours named by object label again ("1","2", …), as in pliman < 4.0. Note that the contour matrices now have columnsxandy(they were unnamed, i.e.V1/V2in a data frame), and that objects may be numbered differently from pliman < 4.0 because of the new labelling engine. -
image_to_mat()returns 0-1 numeric values again for 8-bit images (raw bytes brokeimage_palette()andimage_segment_kmeans()). -
image_palette()andimage_expand()usedimage_combine(..., along =), which no longer concatenates images; they now use an internal helper. -
shapefile_build(controlpoints =)accepts ansfobject again (e.g. read withshapefile_input()), besides the result ofmosaic_view(edit = TRUE). -
mosaic_analyze(segment_plot = TRUE)failed with[mask] extents do not matchwhen the analysis was cropped to the shapefile extent, and passedsummarize_quantiles = NULLtomosaic_extract(), which rejected it. -
plot_index()gives the colour bars an absolute width, fixing “figure margins too large” with several indexes on small devices. -
mosaic_chm_extract(),mosaic_segment_pick()andmosaic_draw()referenced variables that did not exist in the function (shp,mind_temp,summarize_quantiles) and always failed. These names were listed inglobalVariables(), which hid the problem fromR CMD check; they were removed from the list. -
mosaic_chm_extract()names the height quantilesmin,q05,q50,q95andmaxagain (as documented and as in pliman < 4.0), instead ofq0,q0.05, … -
mosaic_aggregate()(also used bymosaic_view()) falls back toterra::resample()whengdal_translatefails, e.g. on a mosaic read from a URL. -
poly_area()andplot_polygon()report empty elements in a list of polygons (e.g. a name that does not exist) instead of failing in compiled code.
Deep Learning Architecture & Foundation Models
- Segment Anything 2.1 (SAM 2.1): Full ONNX Runtime C++ execution for sub-pixel instance segmentation masks, zero-shot polygon extraction, and interactive exemplar prompting.
- PerSAM (Personalized Segment Anything): One-shot visual exemplar segmentation and high-density counting via multi-prototype max-pooling, dense stride-1 convolutional ZNCC matching, and ViT semantic guidance.
- Grounded-SAM & Open-Vocabulary Detection: Zero-shot text-prompted instance segmentation and bounding box proposals combining Grounding DINO with SAM 2.1.
-
Optical Character Recognition (OCR): High-throughput scene text detection and recognition via
image_ocr_dl()powered by DBNet and PaddleOCRv4/v5 (Latin, English, multilingual), plus Microsoft TrOCR transformer decoders. -
Automated Batch OCR Renaming:
image_rename_ocr()with regex-based tag extraction, automatic folder restructuring, and collision-freeimage_rename_undo()rollback logs. -
Low-Light Image Restoration & Enhancement:
image_restore_dl()featuring Zero-DCE (Zero-Reference Deep Curve Estimation) and NAFNet for noise removal and deblurring. - Deep Feature Embeddings & Visual Discovery: High-dimensional semantic feature representations via OpenAI CLIP ViT-B/32 (512-D) and Meta DINOv2-S (384-D), with spatial PCA false-color mapping.
-
Real-ESRGAN Super-Resolution: Neural upscaling (
2xand4x) viaimage_superres_dl()for enhancing low-resolution plant imagery and similarity heatmaps. -
Zero-Shot World Detection:
image_detect_world()enabling open-vocabulary object localization across arbitrary text prompts. -
Keypoint Pose Estimation:
image_pose_dl()andyolo_dataset_label_pose()for joint detection, skeleton analysis, and custom pose dataset annotation.
YOLO Dataset Curation, Annotation & Training Pipeline
-
Interactive Manual Bounding Box Labeling:
yolo_dataset_export(model = "manual")(or"box","boxes") allows instant, lightweight 2-click bounding box drawing (zero AI downloads or GPU required) with live interactive review, undo, and multi-class support. -
Automated Dataset Export & Active Learning:
yolo_dataset_export()supports PerSAM one-shot exemplars, Grounded-SAM text prompts, pre-trained YOLO pseudo-labeling, classical contour extraction, and pure manual labeling with automatictrain/val/testsplitting anddata.yamlgeneration. -
Few-Shot Fitting & Rapid Propagation:
yolo_fewshot_fit()andyolo_fewshot_predict()for fitting compact visual prototype memories from 1-5 sample images and propagating labels across thousands of images in seconds. -
Interactive Dataset Review & Correction:
yolo_dataset_review()(andyolo_dataset_edit()) provides visual auditing, one-click false positive deletion (r), 2-point box addition (a), threshold tuning (t), and live annotation synchronization. -
Dataset Auditing, Hygiene & Manipulation: Comprehensive suite for dataset lifecycle management:
-
yolo_dataset_audit(): Validates label syntax, detects out-of-bounds coordinates, empty annotations, and missing image pairs. -
yolo_dataset_dedup(): Identifies duplicate or near-duplicate frames via perceptual and feature hashing. -
yolo_dataset_merge()&yolo_dataset_split(): Merges multiple datasets with automated class ID remapping and splits datasets into balanced partitions. -
yolo_dataset_augment(): Rich offline data augmentation (photometric jitter, perspective shifts, cutouts, rotations, noise). -
yolo_dataset_copypaste(): Automated foreground object copy-paste augmentation for expanding rare object classes. -
yolo_dataset_tiling(): Ultra-resolution image slicing for small object detection. -
yolo_dataset_balance(): Balances class distributions via selective oversampling or undersampling. -
yolo_dataset_anonymize(): Automated blurring/pixelation of sensitive objects (faces, license plates, badges). -
yolo_dataset_convert()&yolo_dataset_to_segment(): Converts between detection bounding boxes and instance segmentation polygons. -
yolo_dataset_zip()&yolo_dataset_unzip(): Lossless compression and sharing of YOLO datasets.
-
Model Training, Testing & Diagnostics
-
Integrated YOLO Training Workflow:
yolo_train()andyolo_train_workflow()provide complete training management with automated dependency setup, tensorboard tracking, checkpoint recovery, and hyperparameter tuning. -
Model Evaluation & Error Analysis:
yolo_model_test()andyolo_error_analysis()generate detailed confusion matrices, precision-recall breakdowns, and diagnostic error classifications (background confusion, localization errors, false positives). -
Model & Pipeline Comparison:
image_compare_dl()(withplot.image_compare_dl()) compares two detection or segmentation outputs (image_detect_dl()orimage_segment_dl()) via IoU instance matching, supporting intersection (mode = "intersection"), symmetric or one-sided difference (mode = "difference","only_x","only_y"), and union (mode = "all"), with automatic status color-coding, legend, and Jaccard/Dice metrics. -
Dedicated Plot Methods & Enriched Geometry:
- Added S3 methods
plot.image_segment_dl()andplot.image_detect_dl()for re-rendering segmentation and detection overlays with customizable visual parameters and seamlessimage_combine()integration. -
image_detect_dl()andimage_segment_dl()now report bounding-box geometry (width,height,box_area) alongside polygon maskareaandbox_fill(area / box_areamask-to-box fill ratio), and consistently attachattr(x, "labels")andattr(x, "semantic_map")(including-semsemantic segmentation models).
- Added S3 methods
-
Publication-Ready Grid Headers in
image_combine(): Addedrow_labels,col_labels,strip_bg,strip_col,strip_cex, and automatic device-aspect-ratio-fittedstrip_sizefor multi-row and multi-column image panels. -
Quantization & Edge Optimization:
model_to_int8(),model_to_fp16(),onnx_quantize(), andyolo_export_engine()for deploying lightweight INT8/FP16 models and TensorRT engines.
3D Reconstruction & Video Analytics
-
Gaussian Splatting & 3D Phenotyping:
gs_create(),gs_render(),gs_measure(), andgs_segment_sam()for 3D point cloud generation, volumetric plant reconstruction, and novel view synthesis.-
gs_fit()now follows Kerbl et al. (2023): anisotropic Gaussians (scales + rotations), SH up to degree 3, L1 + D-SSIM loss, extent-relative densification, opacity reset and exact analytical gradients. The GPU back end (PyTorch + CuPy runtime-compiled CUDA kernels) bins splats into tiles correctly (previously each tile received an arbitrary slice of Gaussians). - COLMAP reconstructions with lens distortion (e.g.
"OPENCV") are undistorted withimage_undistorterbefore training; point clouds are initialized with opacity 0.1 and k-NN scales. -
gs_viewer()renders true anisotropic, depth-sorted splats (WebGL2) and opens trained splats in"splats"mode; fixed a duplicatedletdeclaration that prevented the viewer script from running, plus crop/export errors. -
gs_export_ply()writes the full 3DGS PLY layout (f_rest_*), andgs_import_metashape()reads trained 3DGS PLY files back. -
gs_viewer()gains the GS Studio panel (tools = TRUE; code ininst/viewer/):- Render: view-dependent color from the spherical harmonics (bands 1-3, 8-bit quantized), floater filter (minimum opacity and maximum splat size), exposure/contrast/saturation/gamma and background color.
-
Edit: rectangle, lasso and brush selection with delete, keep-selected, invert and undo; a section (clipping) plane along X, Y, Z or the view direction; export of the visible splats as a full 3DGS PLY (SH, opacity, scales, rotations), readable by
gs_import_metashape(). -
Measure: scale calibration from two points of known distance (new argument
unit_scale; COLMAP reconstructions are shown in model units until calibrated), polyline, angle and area measurements (live value while drawing; finish with double-click, Enter, right-click, the Finish button or by leaving the tool), and voxel volume plus principal dimensions of the selection. - Output: camera animations recorded as WebM (turntable, spiral/helix, vortex spiral zoom-in, zoom in-out, orbit with zoom pulses, wiggle and fly-through along the training cameras, with turns, height, zoom, direction and easing controls), high-resolution and transparent PNG snapshots, and a blend/split comparison of the render with the original photo of a training camera.
- New arguments
focus_subject = TRUE(opens with the Focus on Subject region, 35%) andmin_opacity = 0.2(initial floater filter; skipped when it would hide more than 90% of the splats). Area measurements are drawn as filled polygons (salmon, alpha 0.5). - Picking (ruler, coordinates, measurements) now snaps to the front-most visible splat and works in model coordinates, fixing misplaced ruler markers and coordinates when the model is rotated; measurement labels are drawn on top of the splats.
-
gs_filter_outliers()gainsmethod = "density"(now the default), the same voxel-grid density filter as the Online Noise Filter ofgs_viewer()(density = "light","medium","strong"or a percentile;cell_size). The SOR cut-off (mean + std_ratio * sd) is inflated by a few very distant tie points and left most floating noise in SfM clouds; it remains available withmethod = "sor"(or"both"). The viewer now uses the same voxel grid as R, so both filters agree.
-
-
High-Throughput Video Analytics:
video_detect_dl()with multi-object tracking (ByteTrack/SORT), C++ state management, and real-time bounding box and mask rendering. -
Image Stitching & Focus Stacking:
image_stitch()for seamless panoramic mosaic construction andfocus_stack()for extended depth-of-field macro photography.
pliman 3.2.0
New Functions
- New
yolo_benchmark()to measure YOLO inference speed (raw C++ inference, the fullimage_detect_dl()pipeline and, optionally, SAHI) with warm-up iterations excluded from the timings. - New
pliman_session_info()andpliman_max_sessions()to inspect and size the cache of ONNX Runtime sessions. - New
pliman_gpu_provider()andonnx_available_providers(): GPU sessions can now use the NVIDIA CUDA and TensorRT execution providers (Windows and Linux, withonnx_install(engine = "cuda")), CoreML (macOS) and OpenVINO, besides DirectML. The default ("auto") keeps the previous behaviour; a provider that cannot start falls back to CUDA, DirectML and then the CPU.pliman_session_info()reports the provider actually used. - New
pliman_onnx_profiling()andonnx_profile_summary()to trace which execution provider ran each operator (finds CPU fallbacks inside GPU sessions). - New
pliman_onnx_graph_cache()(opt-in): saves ONNX Runtime’s optimized graphs to disk so later CPU sessions start faster (SAM 2.1 encoder 3.3 s -> 0.18 s, Grounding DINO 1.7 s -> 0.7 s), with identical predictions. - New
pliman_build_model_variant()to build INT8/FP16 SAM 2.1 encoders and a mixed-precision FP16 Grounding DINO, selectable withoptions(pliman.sam_encoder = )and used automatically for Grounding DINO under CUDA/TensorRT. Speed depends on the hardware (see its documentation). - Modernized
get_card_colors()with perspective-aware Bilinear Homography, dynamic Negative Buffering (buffer = 0.45), outer margins, multi-statistic extraction (mean,median,sd,n_pixels), automated reference matching, calculations, and modern overlay/swatch plotting. - Modernized
image_correction()to support industry-standard CCM (Color Correction Matrix 3x3) with Ridge Regularization, Affine (4x3), White Balance, Cubic (9-term), and Root-Polynomial (20-term) models with native C++ acceleration and direct integration withget_card_colors(). - New
colorchecker_ref()providing standard reference sRGB coordinates for 24-patch ColorChecker Classic (Macbeth) charts. - New
order_quad_corners()helper for topological quadrilateral vertex sorting. - New
pick_rgb_area()to pick RGB mean values of an area drawn by picking points in the image. - New
object_scatter()function to plot object thumbnails at x-y coordinates derived from image features. - New functions for geometric operation on shapefiles.
- New
mosaic_classify()function to classify orthomosaics based on break values defined by users. - New
image_contour_line()function allows users to detect smooth contour lines in an image. - New
image_canny_edge()function, which implements Canny Edge detection. - New
image_line_segment()function that enables automatic line segment detection using the Line Segment Detector (LSD) algorithm. - New
measure_injury()function to compute injury. - New
image_alpha()function to create or manipulate alpha channels. - New
get_uuid()function for generating unique identifiers.
Minor Improvements
-
Faster deep-learning inference (outputs unchanged unless noted):
- ONNX Runtime sessions: a single process-wide environment, cached input/output metadata, up to 8 cached sessions (was 3) and no eviction of other thread/device variants of the same model, so Grounded-SAM, PerSAM and feature extraction no longer reload models on every call. GPU sessions with static input shapes are warmed up at creation.
- YOLO decoding reads class scores contiguously (class-major) in parallel, and non-maximum suppression runs per class. Instance masks are decoded in parallel across detections.
-
image_detect_sahi()runs all slices (and the full-image pass) in one C++ call (run_yolo_tiles_cpp()) for detection and pose models instead of callingimage_detect_dl()per slice.video_detect_dl()withsahi = TRUEuses the same path. -
video_detect_dl(): object tracking state is kept in C++ (only per-frame results return to R), the nested-box filter runs in C++, the model is warmed up before the first frame, per-frame records are bound column-wise at the end, and video frames are converted from BGRA to RGB in parallel. - Model lookups are cached: alias table built once, directory listings and failed lookups cached,
pliman_download_model()returns cached paths, model input sizes come from a static table, and GPU and Python environment checks run once per session. - Grounded-SAM no longer clears all cached sessions on GPUs with less than 6 GB of memory. Grounded-SAM and PerSAM process each instance mask in a window around its box instead of the full image.
-
.preprocess_nchw()(U2Net, RMBG, BEN2, SAM, Grounding DINO, StarDist, DINOv2, CLIP, depth) runs in C++ with identical results. - Parallel batch functions give each CPU worker
physical cores / workersONNX threads, cap concurrent GPU workers atgetOption("pliman.gpu_workers", 2), and no longer serialise the whole input list with every chunk. -
save_image = TRUEinimage_detect_dl_batch()andimage_detect_sahi_batch()draws and encodes annotated images natively instead of through the R graphics device (falls back to it for other formats or withoptions(pliman.native_save = FALSE)). - SAHI tiles of batch-dynamic YOLO exports run in batches of 8 under CUDA/TensorRT (
PLIMAN_YOLO_TILE_BATCH), with the same post-processing per tile. - Grounding DINO accepts FP16 exports; with an FP16 model the pixel tensor is converted and the outputs widened automatically.
- Grounded-SAM / PerSAM in
image_segment_dl()no longer default to the CPU on GPUs with less than 6 GB of memory; any dedicated GPU is used. On such GPUs Grounded-SAM keeps Grounding DINO on the GPU and runs SAM 2.1 on the CPU (options(pliman.gsam_sam_device =)overrides), instead of releasing and rebuilding DINO for every image: about 3 s per image after warm-up on a 4 GB GTX 1650, versus ~50 s with the former release policy and ~13 s on the CPU. - GPU memory guard (Windows): idle GPU sessions are released before a new one is built when the process is above 80% of its video-memory budget, and a session built over budget is rebuilt once memory frees up. A YOLO model loaded after Grounded-SAM on a 4 GB GPU ran at 145-390 ms per image (part of its memory demoted to system RAM, permanently) and now runs at ~50 ms.
- A GPU session that fails to build (e.g. GPU memory held by another process) now warns, records the reason in
pliman_session_info()$fallback_reasonand is retried on the GPU after 30 s, instead of silently staying on the CPU for the rest of the R session. - Opt-in
options(pliman.video_pipeline = TRUE)overlaps YOLO inference of the next video frame with tracking/drawing of the current one (identical detections).
- New
max_detargument inimage_detect_dl()andvideo_detect_dl()(maximum detections kept after NMS;0keeps all). Newfilter_nestedargument invideo_detect_dl(). - Documented inference-speed guidance and hardware dependence of FP16, INT8 and TensorRT (Tensor Cores;
.enginefiles cannot be run by pliman) inimage_detect_dl(),video_detect_dl(), batch and SAHI functions,yolo_export_engine(),onnx_quantize()and the README. Added deep-learning groups to the pkgdown reference. - Reduced external package dependencies by replacing heavy external imports (such as EBImage`) with native, standalone C++ algorithms for image processing and segmentation.
- Removed dependencies on future, foreach and doFuture in favour of the new mirai background engine. This simplifies installation and delivers faster, more reliable parallel processing across all image-based functions.
- Added cli-based messages (rules, progress steps and alerts) throughout both parallel and sequential workflows to provide clear, informative status updates during long-running image processing tasks.
- Include morphologic operation when
foregroundandbackgroundarguments are used inanalyze_objects(). - Include option to draw circles in
shapefile_build(). - Remove dependency on
lwgeompackage to compute perimeter. -
mosaic_crop()now have atypeargument, that allows returning a cropped or masked raster. -
image_autocrop()now hasthresholdandinvertarguments. - Include option to compute leaf area using sample images.
- Add
smoothargument to allcompute_measures()calls. - Add prefix and suffix options to measures.
- Include opening/closing in top of morphological operations.
- Update
mosaic_analyze()to avoid generating basemap when shapefile is available. - Include shapefile transform and update
shapefile_build(). - Include curvilinear layout and color correction.
- Update
cccfunction. - Clear progress bar after finishing batch processing.
- Include erode and dilate options.
- Added
return_exact = TRUEtoimage_opening()andanalyze_objects()to remove noise (including noise touching large objects) while preserving 100% of exact original object boundaries.
Bug fixes
-
image_detect_dl()now processes every path of a character vector (previously only the first) and forwardsfilter_nestedwhen given a list of images. -
image_detect_sahi()reportscx/cyin global image coordinates (they were left in slice coordinates). - YOLO segmentation: where instance masks overlap, the pixel now belongs to the highest-scoring instance (previously the lowest-scoring one overwrote it).
-
update_tracker_cpp()no longer modifies vectors returned for previous frames in place. - ONNX Runtime library lookup now honours
enginein YOLO and StarDist inference. -
src/Makevarsno longer defines self-referencing linker variables that break builds on Linux/macOS. - Fix bug with
mosaic_chm()with lat/lon projection. - Fix error in
mosaic_chm_extract(). - Fix bug with
as_sf = FALSE. - Fix bug with
get_measures()whenverbose = FALSE. - Fix bug when importing mosaics with blocks.
- Fix bug when using palettes with reference.
pliman 3.1.1
CRAN release: 2025-08-23
New Functions
- New
object_scatter()function to plot object thumbnails at x-y coordinates derived from image features
Minor Improvements
Include morphologic operation when foreground and background arguments are used in analyze_objects().
pliman 3.0.0
CRAN release: 2024-11-06
New Functions
- Added the
image_label()to label binary images with options to control amax_gap, ie., the maximum allowable gap (in pixels) between connected components to be considered as part of the same object. # pliman 3.0.0 - Introduced the
mosaic_*()family of functions for high-throughput phenotyping, enabling efficient analysis of large-scale image data. - Added the
shapefile_*()functions for handling and manipulating shapefiles, providing streamlined spatial data management.
pliman 2.2.0
New functions
-
mosaic_analyze()to analyze orthomosaics.
Minor improvements
Imports the poorman package for data manipulation. # pliman 2.1.0 ## New functions
A new
mosaic_*()family of functions to handle orthomosaics from RGB and multispectral images.object_export()andobject_export_shp()to export objects from single images to multiple images.image_augment()to augment an image by rotating it multiple times.
Bug fixes
- Setting
save_image = TRUEinmeasure_disease_byl()now exports the processed images to a local directory, allowing the use ofsad()call to the created object.
Minor improvements
- Arguments r, g, b, re, and nir now included in
analyze_objects(),analyze_objects_shp(), andimage_view(), allowing to correctly choose the image band. -
image_segment_mask()now has acol_backgroundargument. - Argument
width_atincluded inanalyze_objects().
pliman 2.0.1
CRAN release: 2023-09-11
New functions
-
object_export_shp()andobject_export()to export objects from an image to multiple images in the current working directory. -
plot_index_shp()to plot rectangles on top of an RGB image, where each rectangle is colored based on a quantitative variable.
Bug fixes
- Fix bug in
poly_center()by calling the column position instead column name (X1)
pliman 2.0.0
CRAN release: 2023-07-15
New functions
analyze_objects_iter()to execute an interactive section ofanalyze_objects().measure_disease_byl()to measure disease severity ‘byleaf’ in an image with several leaves.object_split()to split multiples objects of an image into a list of images.pca(),plot.pca(),get_biplot()as helper functions to perform Principal Component Analysis.rownames_to_column(),column_to_rownames(),separate_col(),round_cols()as helper functions to manipulate data.A set of
poly_*()function to analyze polygons. All of them are based on a set of coordinate points describing the edge of the object(s). See ?utils_polygonfor more details.get_wd_here()andset_wd_here()to deal with working directories.apply_fun_to_imgs()to apply a function (or functions) to a set of images stored in the working directory.make_brush(),make_mask(), andimage_segment_mask()to create masks and segment images based on such a mask.image_segment_manual(),image segment kmeans(), andimage_segment_mask()to perform image segmentation in different ways.-
A new family of
efourier_*()functions to performs Elliptical Fourier Analysis.-
efourier(): Elliptical Fourier Analysis -
efourier_coefs(): Get Fourier coefficients -
efourier_error(): Erros between the original and reconstructed outline -
efourier_inv(): Inverse Elliptical Fourier Analysis -
efourier_norm(): Normalized Fourier coefficients -
efourier_power(): Power in Fourier Analysis -
efourier_shape(): Draw shapes based on Fourier coefficients
-
-
A new family of
landmarks_*()functions to handle landmarks-
landmarks(): Create image landmarks -
landmarks_add(): Artificially inflates the number of landmarks -
landmarks_angle(): Angles between landmarks -
landmarks_dist(): Distances between landmarks -
landmarks_regradi(): Pseudolandmarks with equally spaced angles
-
object_edge()to detect edges in images using Sobel-Feldman Operator.-
A new family of
*_shp()functions to analyze shape files.-
image_shp()to construct a shape file from an image. -
object_split_shp()to splits image objects based on a shapefile. -
analyze_objects_shp()to analyze objects using shapefiles. -
measure_disease_shp()to measure disease using shapefiles.
-
New
plot_index()function to plot an image index using raster package, and optionaly using the mapview package to show the image index.New
image_view()function to create an interactive map view of an image. This function allows users to interactively edit and analyze an image using mapview and mapedit packages.New
image_prepare_mv()function to prepare an image to be analyzed foranalyze_objects_shp(). This function aligns and crops the image using either base or mapview visualization.
New features
New
vieweroption added. Now, iterative functions such aspick_palette()andmeasure_disease_iter()have an argumentviewer. If not provided, the value is retrieved usingget_pliman_viewer(). This option controls the type of viewer to use for interactive plotting. The available options are “base” and “mapview”. If set to “base”, the base R graphics system is used for interactive plotting. If set to “mapview”, the mapview package is used, allowing the users to draw shapes like points and polygons with mapedit package. To set this argument globally for all functions in the package, you can use theset_pliman_viewer()function. For example, you can runset_pliman_viewer("mapview")to set the viewer option to “mapview” for all functions.Haralick’s features that quantify pixel texture for image objects were included.
Several measures were added in
analyze_objects(). The function now wraps somepoly_*()functions to compute shape measures such as width, length, elongation, circularity. Haralick’s features are now computed by default. . This improvement was at cost of a slight increase in computation time.analyze_objects(),measure_disease(), andmeasure_disease_byl()have now afilterargument that applies a median filtering in the binary mask. This is useful to reduce the noise in the segmentation of objects.Arguments
reference_largerandreference_smallerwere included inanalyze_objects()indicating when the larger/smaller object in the image must be used as the reference object.Arguments
efourierandnharmincluded inanalyze_objects(). Ifefourier = TRUE, Elliptical Fourier analysis is computed for each object depending on the number of harmonics (nharm).Logical arguments
reference_largerandreference_smallerincluded inanalyze_objects(). Those indicates when the larger/smaller object in the image must be used as the reference object. This only is valid whenreference = TRUEandreference_areaindicates the area of the reference object. IMPORTANT. Whenreference_smalleris used, objects with an area smaller than 1% of the mean of all the objects are ignored. This is used to remove possible noise in the image such as dust. So, be sure the reference object has an area that will be not removed by that cutpoint.-
RcppandRcppArmadillodependencies were included, allowing the implementation ofC++code. This will dramatically reduce the time computing of some functions/procesures. As an example, we wave.- Reduction in time processing from more than 5 minutes to less than 1 second using the new
object_rgb()function to extract the RGB values from an image (1445 x 1084) with ~1400 objects. - Reduction in time processing of the set of
*_poly()functions.
- Reduction in time processing from more than 5 minutes to less than 1 second using the new
Minor changes
-
get_measures()now remove known objects from the results when using theidargument. - The right-hand of argument
measureinget_measures()now accepts a numeric object stored in the global environment. -
analyze_objects()now returns the objectsobject_indexandobject_rgbwhen the argumentpatternis used. Thanks to João Paulo Oliveira Ribeiro for alerting me regarding this issue. - New argument
referenceinanalyze_objects()to adjust measures using a reference object in the image. - Argument
object_indexinanalyze_objects()now recognizes the names of built-in indexes (see ?pliman_indexes()). -
plot.image_index()not limits the number of pixels to reduce plotting time. -
show_imageargument changed withplotto standardize the argument across functions. -
rgb_to_hsb()optimized usingC++. - Change
rowsandcolswithnrowandncol, respectively, in functionsanalyze_objects_shp(),image_shp(),measure_disease_shp(), andobject_split_shp(), to standardize the arguments across functions.
pliman 1.1.0
CRAN release: 2021-12-10
New functions
-
measure_disease_iter()to measure disease in an interactive section. -
pick_count()to count objects in an image manually. -
pick_palette()to create an image palette by picking up color point(s) from the image -
pick_rgb()to pick up the RGB values from selected point(s) in the image. -
summary_index()to summary the index either between and within objects. -
plimannow exports the foward-pipe operator%>%. Code from poorman package.
Minor changes
- Deprecated functions in the last version (
count_objects(),image_show(),leaf_area(),objects_rgb(),prop_segmented(), andsymptomatic_area()) were removed. - Use Bootstrap 5 from pkgdown 2.0.0 in the package site.
pliman 1.0.0
CRAN release: 2021-11-09
New functions
-
analyze_objects()is now used as the main function to compute the number and shape of objects. -
measure_disease()is now used as the main function to perform phytopatometry studies. The function can compute symptomatic area, as well as the number and shape of lesions. -
image_segment_iter()is used to performs iterative image segmentation. -
conv_hull(),poly_area(),poly_mass(),poly_spline(),plot_contour(), andplot_ellipse()as utilities for analyzing polygons. -
dpi()to compute the resolution (dots per inch) of an image. -
tune_tolerance()for tunning thetoleranceparameter.
Deprecated functions.
-
objects_rgb()will be depracated in the future. Now, to compute an index for each object use theobject_indexargument inanalyze_objects(), for example,analyze_objects(object_index = "B"). -
leaf_area()will be depracated in the future. Now, combineanalyze_objects()withget_measures()to obtain the area and shape of objects (leaves). -
prop_segmented()is now deprecated in favour ofimage_segment_iter(). -
count_lesions()is now deprecated. Now, to compute the number and shape of lesions, use the argumentshow_features = TRUEinmeasure_disease(). -
image_show()is now deprecated in favour ofplot().
Minor improvements
- Include
fill_hullargument insymptomatic_area()andcount_lesions() - Improve
image_contrast()function to avoid error regarding image resolution. - New argument
subfolderinimage_export()to export an image to a subfolder. - Now
EBImageinstallation is checked when pliman is installed. -
image_pliman()now returns the image object instead of the path to the image. So, it is not necessarily to call it withinimage_import().
pliman 0.3.0
CRAN release: 2021-06-10
New functions
-
image_autocrop()for automatic image cropping. -
image_filter()to perform median-based filtering. -
image_contrast()to improve contrast by performing adaptive histogram equalization -
object_coord()to get the object coordinates and (optionally) draw a bounding rectangle around multiple objects in an image. -
object_id()to get the object identification in an image. -
object_isolate()to isolate an object from an image. -
prop_segmented()to perform (iterative) image segmentation with pixels proportion.
