Pixel Region tool
impixelregion function to create a Pixel Region
tool. The Pixel Region tool opens a separate figure window containing an extreme
close-up view of a small region of pixels in the target image. For more information
about using the tool, see Tips.
htool = impixelregion(___)
Display an image and then create a Pixel Region tool associated with the image.
imshow peppers.png impixelregion
h— Handle to graphics object
Handle to a figure, axes, uipanel, or image graphics object, specified as
a handle. If
h is an axes or figure handle,
impixelregion uses the first image returned by
htool— Handle to Pixel Region tool
Handle to Pixel Region tool figure, returned as a handle.
The Pixel Region rectangle defines the area of the target image that is displayed in the Pixel Region tool. You can move this rectangle over the target image using the mouse to view different regions. To get a closer view of the pixels displayed in the tool, use the zoom buttons on the Pixel Region tool toolbar or change the size of the Pixel Region rectangle using the mouse. You can also resize the Pixel Region tool itself to view more or fewer pixels. If the size of the pixels allows, the tool superimposes the numeric value of the pixel over each pixel.
To get the current position of the Pixel Region rectangle, right-click on the rectangle and select Copy Position from the context menu. The Pixel Region tool copies a four-element position vector to the clipboard. To change the color of the Pixel Region rectangle, right-click and select Set Color.
To create a Pixel Region tool that can be embedded in an existing figure
window or uipanel, use