CLsqFit:GetNumPtsDeleted
The GetNumPtsDeleted method returns the number of points that were manually deleted form the sample.
nPts = CLsqFit:GetNumPtsDeleted( nChannel* ) n1, n2, n3, n4 = CLsqFit:GetNumPtsDeleted() where |
nChannel is an optional argument that specifies the channel for multi-channel (RGB) data.
nPts, n1, n2, n3, and n4 are the number of points deleted from all channels when nChannel is not specified.
The following script fits a 2x2 polynomial with data rejection enabled, then retrieves the number of points deleted and rejected from the fit.
|
-- create a CLsqFit object |
|
-- set 2x2 coefficients to fit a warped plane |
|
-- add a point with x = 3, y = 5, z = 5.15 |
|
-- add more points |
|
-- manually delete the 2nd point |
|
-- enable bad data rejection |
|
-- Fit the polynomial |
|
-- number of points deleted |
|
-- number of points rejected |
|
-- list number deleted and number rejected |
Rejecting Outliers from the Fit