CPlotView:PlotCursorColRange CPlotView:PlotCursorCol

CPlotView:PlotCursorColAvg


The PlotCursorColAvg method plots an average of all adjacent columns inside the image cursor on a displayed image.

Syntax

CPlotView:PlotCursorColAvg( CImageView )

    CImageView is a reference to the class object where the image is displayed.

Remarks

This method works with a displayed image. It creates a graph of luminance value versus row number, with one plot series combined from many adjacent columns. The adjacent columns are combined using the SetPlotAvgMode method of the CImageView class. Available averaging methods include mean, median, and others.

The column region is specified by the limits of the image cursor. The cursor region can be set using the SetCursorRect method or related methods.

Example

Assume that a CImageView object named V exists. The following script fragment plots the median of 100 columns, from column 100 through column 199, over rows 300 through 500 for the currently displayed image:

V:SetPlotAvgMode(1)

-- set the averaging method to 1 (median)

R = CRect:new()

-- create a CRect object

R:Set(100,199,300,500)

-- specify the region to plot

V:SetCursorRect(R)

-- assign the CRect to the cursor

P = CPlotView:new()

-- create a CPlotView

P:PlotCursorColAvg(V)

-- make the plot

Related Topics

CPlotView, CImageView, SetCursorRect, PlotCursorColRange, Image Coordinate System, Subpixel Coordinate Definition