Method UseROI
UseROI<TColor, TDepth>(Image<TColor, TDepth>, Rectangle)
Temporarily sets the region of interest (ROI) of the given image and provides a IDisposable object to revert the changes.
Declaration
public static IDisposable UseROI<TColor, TDepth>(this Image<TColor, TDepth> image, Rectangle roi) where TColor : struct, IColor where TDepth : new()
Parameters
| Type | Name | Description |
|---|---|---|
| Image<TColor, TDepth> | image | The Image object for which the ROI is set. |
| Rectangle | roi | The rectangle that defines the ROI. |
Returns
| Type | Description |
|---|---|
| IDisposable | An IDisposable object which resets the ROI to its previous value upon disposal. |
Type Parameters
| Name | Description |
|---|---|
| TColor | The color structure for the image. |
| TDepth | The depth structure for the image. |