CPlotView:PlotCursorRowAvg


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

Syntax

CPlotView:PlotCursorRowAvg( CImageView )

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

Remarks

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

The row 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 plots the median of 200 rows, from row 300 through row 499, over columns 100 through 200 for the displayed image:

V:SetPlotAvgMode(1)

-- set the averaging method to 1 (median)

R = new_rect()

-- create a CRect object

R:Set(100,200,300,499)

-- specify the region to plot

V:SetCursorRect(R)

-- assign the CRect to the cursor

P = new_plotview()

-- create a new CPlotView

P:PlotCursorRowAvg(V)

-- plot an averaged row inside the image cursor

Related Topics

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

 

Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.