Contenido principal

ImageSensor

R2026b

Image sensor for optical system

Since R2026b

Description

Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

An ImageSensor object represents the geometrical layout of an image sensor for an optical system, including resolution and pixel size.

Creation

You can create an ImageSensor object in these ways:

  • Add an image sensor directly to the end of an optical system by using the addImageSensor function.

  • To create an image sensor without adding it to an optical system, or to modify the properties of an image sensor already in an optical system, use the optics.detector.ImageSensor function described here.

Description

sensor = optics.detector.ImageSensor creates a default ImageSensor object.

sensor = optics.detector.ImageSensor(Name=Value) specifies one or more property values. For example, Resolution=[1080 1920] specifies a sensor with a resolution of 1080-by-1920 pixels.

Name-Value Arguments

expand all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: sensor = optics.detector.ImageSensor(Resolution=[1080 1920]) specifies a sensor with a resolution of 1080-by-1920 pixels.

Sensor name, specified as a string scalar or character vector.

This argument sets the Name property.

Data Types: char | string

Sensor resolution in pixels, specified as a 1-by-2 numeric vector. The vector is of the form [width height], where width and height are the number of pixel columns and rows of the image sensor, respectively.

This argument sets the Resolution property.

Data Types: double

Individual pixel size, specified as a 1-by-2 numeric vector. The vector is of the form [width height], where width and height are the physical width and height of a single pixel of the image sensor, respectively. Units are in micrometers.

This argument sets the PixelSize property.

Data Types: double

Physical sensor size, specified as a 1-by-2 numeric vector of the form [width height]. Units are in millimeters.

Note

If you specify Size, you must specify either Resolution or PixelSize. The function computes the unspecified property from the other two. If Size and PixelSize result in a noninteger resolution, the function reduces Size to ensure the number of pixels is an integer.

Data Types: double

Properties

expand all

Sensor name, specified as a string scalar or character vector.

Data Types: char | string

Sensor resolution in pixels, specified as a 1-by-2 numeric vector. The vector is of the form [width height], where width and height are the number of pixel columns and rows of the image sensor, respectively.

Data Types: double

Individual pixel size, specified as a 1-by-2 numeric vector. The vector is of the form [width height], where width and height are the physical width and height of a single pixel of the image sensor, respectively. Units are in micrometers.

Data Types: double

Physical sensor size, represented as a 1-by-2 numeric vector. The vector is of the form [width height], where width and height are the physical width and height of the image sensor active area, respectively. Units are in millimeters. The object computes this value using Resolution and PixelSize.

Data Types: double

Area of an individual pixel, represented as a positive scalar. Units are in square meters. This value is computed as the product of the PixelSize dimensions.

Data Types: double

Version History

Introduced in R2026b