jaccardSimilarity: Jaccard similarity between two sets of boxes.

View source: R/ssdUtilities.R

jaccardSimilarityR Documentation

Jaccard similarity between two sets of boxes.

Description

Function for determinining the Jaccard or iou (intersection over union) similarity measure between two sets of boxes.

Usage

jaccardSimilarity(boxes1, boxes2)

Arguments

boxes1

A 2-D array where each row corresponds to a single box consisting of the format (xmin,xmax,ymin,ymax) or (xmin,xmax,ymin,ymax,zmin,zmax)

boxes2

A 2-D array where each row corresponds to a single box consisting of the format (xmin,xmax,ymin,ymax) or (xmin,xmax,ymin,ymax,zmin,zmax)

Value

the Jaccard simliarity

Author(s)

Tustison NJ

Examples

vec2d = c(1, 10, 1, 10)
vec2d_2 = c(1, 8, 1, 5)
jaccardSimilarity(vec2d, vec2d_2)
vec3d = c(1, 10, 1, 10, 1, 10)
vec3d_2 = c(1, 8, 1, 5, 1, 10)
jaccardSimilarity(vec3d, vec3d_2)

ANTsX/ANTsRNet documentation built on Nov. 21, 2024, 4:07 a.m.