skip
Top  Previous  Next

skip ( integer Input, integer Output, string Param , float Min =0, float Max [, integer Mode =0 ] )

Use this function to remove or extract objects from a multiphase image or selection based on a selected geometrical parameter. The function works by performing blob measurements on each object. If a computed parameter's value for a given object lies within the selected range, the object is identified as scrap and removed from the image. An alternative mode of the function extracts such objects and removes all other objects.

Parameters
 
Input  
 
An integer between 1 and 116 specifying the input image frame number. Values in the range of 100-116 correspond to hidden frames.  
 
Output  
 
An integer between 1 and 116 specifying the output image frame number. Values in the range of 100-116 correspond to hidden frames.  
 
Param  
 
A string argument specifying the measurement parameter used in the function. Must be one of the following values:  
 
AngleMajor
the angle between the major axis of the object and X-axis
Pixels
the number of pixels in an object
Area
the area of an object in calibrated units
AreaBox
the area of the bounding box of an object in calibrated units
Dcircle
the diameter of the equivalent circle in caliblrated units
AxisMajor
the major axis of the equivalent ellipse in calibrated units
AxisMinor
the minor axis of the equivalent ellipse in calibrated units
Perim
the perimeter of an object in the calibrated units
StartX
the X-coordinate of the starting point of an object in pixels
StartY
the Y-coordinate of the starting point of an object in pixels
EndX
the X-coordinate of the endpoint of an object in pixels
EndY
the Y-coordinate of the endpoint of an object in pixels
CenterX
the X-coordinate of object's centroid in calibrated units
CenterY
the Y-coordinate of object's centroid in calibrated units
Aspect
the aspect ratio of the major axis divided by the minor axis
Circularity
the circular form-factor of an object
Ellipticity
the elliptical form-factor of an object
Class
the class ID of an object
Count
the ordinal number of an object in the current session
FeretX
the length of the horizontal projection of an object in calibrated units
FeretY
the length of the vertical projection of an object in calibrated units
MaxX
the maximum X coordinate of an object in calibrated units
MinX
the minimum X coordinate of an object in calibrated units
MaxY
the maximum Y coordinate of an object in calibrated units
MinY
the minimum Y coordinate of an object in calibrated units
YatMaxX
the associated Y-value at the maximum X coordinate of an object
YatMinX
the associated Y-value at the minimum X coordinate of an object
XatMaxY
the associated X-value at the maximum Y coordinate of an object
XatMinY
the associated X-value at the minimum Y coordinate of an object
 
 
Min, Max  
 
Floating arguments specifying the minimum and maximum limit of the selected Param for the objects to be identified as scrap.  
 
Mode  
 
An enumerated integer that describes the mode in which the function operates. Must be one of the following values: the borders to be used for objects removal. Must be one of the following values:  
M_REMOVE – erases the objects identified as scrap from the image.  
M_SELECT – extracts the objects identified as scrap from the image.  
Default value: M_REMOVE  

Error flags


ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  

Example

This set of statements binarizes a sample image and removes objects having the circularity in a range of 0 – 0.3  
 
setCurDir("samples")  
loadIm (1,"sample8.iwd")  
threshRGB(1, 1 , M_PRESET , TRUE, 1, 87,213, 46,151, 143,220)  
skip (1, 2, "Circularity", 0., 0.3)  
 
Remark

For more information on the measurement parameters refer to ImageWarp User's Guide.