detectObjects
R2026bSyntax
Description
Add-On Required: This feature requires the Computer Vision Toolbox Model for Moondream Vision Language Model add-on.
detects objects of the specified categories bboxes = detectObjects(mdModel,I,classNames)classNames within the
image I, using the Moondream™ vision-language model (VLM)
mdModel. The function returns the locations of the objects detected
in the input image as a set of bounding boxes.
[
returns the labels assigned to the bounding boxes. The labels for object classes is an
M-by-1 categorical array whose categories are derived from bboxes,labels] = detectObjects(mdModel,I,classNames)classNames
argument.
detects objects within the images returned by the detectionResults = detectObjects(mdModel,imds,classNames)read function
of the input datastore imds.
[___] = detectObjects(___,
detects objects within the rectangular search region roi)roi, in addition
to any combination of arguments from previous syntaxes.
[___] = detectObjects(___,ExecutionEnvironment=
specifies the hardware resource on which to run the detector, in addition to any
combination of input arguments from previous syntaxes.executionEnv)
Examples
Input Arguments
Output Arguments
Tips
The quality of Moondream outputs can vary across different data domains. Validate its predictions using a data set from a domain similar to your intended application.
Extended Capabilities
Version History
Introduced in R2026b

