ImageCases

ImageCases[image]

gives an association of lists of subimages for each identified category of objects in image.

ImageCases[image,category]

gives a list of subimages identified as an instance of the specified category.

ImageCases[image,categoryprop]

gives the specified property prop for each identified subimage.

ImageCases[image,{category1,category2,}]

gives an association with lists of subimages identified as being instances of each of the categoryi.

Details and Options

  • ImageCases attempts to find instances of an object category present in an image and returns a list of subimages per category.
  • Possible forms for category include:
  • "concept"named concept, as used in "Concept" entities
    "word"English word, as used in WordData
    wordspecword sense specification, as used in WordData
    Entity[]any appropriate entity
    category1|category2|any of the categoryi
  • The property prop can be any of the following:
  • "BoundingBox"the bounding box given as a Rectangle
    "Dimensions"width and height of the subimage
    "Image"the identified subimage (default)
    "Position"center of the identified bounding box
    "Probability"probability of the identification
    {prop1,prop2,}a list of properties
  • The following options can be given:
  • AcceptanceThresholdAutomaticidentification acceptance threshold
    MaxFeaturesAutomaticmaximum number of subimages to return
    MaxOverlapFractionAutomaticmaximum bounding box overlap
    TargetDevice"CPU"the target device on which to compute
  • ImageCases uses machine learning, and its training set and methods may change in different versions of the Wolfram Language, yielding different results.
  • ImageCases may download resources that will be stored in your local object store at $LocalBase, and can be listed using LocalObjects[] and removed using ResourceRemove.

Examples

open all close all

Basic Examples  (2)

Find identified subimages of an image:

In[1]:=
Click for copyable input
Out[1]=

Find subimages identified as a dog:

In[1]:=
Click for copyable input
Out[1]=

Scope  (7)

Options  (4)

Applications  (1)

Introduced in 2019
(12.0)