Pixel Region tool panel


hpanel = impixelregionpanel(hparent,himage)


hpanel = impixelregionpanel(hparent,himage) creates a Pixel Region tool panel associated with the image specified by the handle himage, called the target image. This is the image whose pixels are to be displayed. hparent is the handle to the figure or uipanel object that will contain the Pixel Region tool panel. hpanel is the handle to the Pixel Region tool scroll panel.

The Pixel Region tool is a uipanel object that contains an extreme close-up view of a small region of pixels in the target image. If the size of the pixels allows, the tool superimposes the numeric value of the pixel over each pixel. To define the region being examined, the tool overlays a rectangle on the target image, called the pixel region rectangle. To view pixels in a different region, click and drag the rectangle over the target image. See impixelregion for more information.


To create a Pixel Region tool in a separate figure window, use impixelregion.


himage = imshow('peppers.png');
hfigure = figure;
hpanel = impixelregionpanel(hfigure, himage);

Set the panel's position to the lower-left quadrant of the figure.

set(hpanel, 'Position', [0 0 .5 .5])
Was this topic helpful?