measObjects
Top  Previous  Next

measObjects ( integer Input [, integer Photo, string File, string User ] )

Use this function to perform automatic blob measurements and collect information about geometrical, optical and topological properties of objects represented by blobs. A blob is an area of connected pixels in the Input image, which can be only of the multiphase type. Such an image is usually created as a result of the segmentation of the original Photo image. ImageWarp takes intensity measurements from the Photo image, using the Input image as a binary mask.

Before applying this function, you should select the desired measurement parameters with the
selectParam function. The image must be calibrated with proper spatial and intensity calibration scales, and the background corrected for transmission and optical density measurements.

Parameters
 
Input  
 
An integer between 1 and 99 specifying the frame number of the multiphase image for which the measurements are taken.  
 
Photo  
 
An optional integer between 1 and 116 specifying the number of the image frame used for intensity measurements. This is usually an original real-color or grayscale image from which the Input image was derived as a result of image processing and segmentation. When measuring intensity parameters, ImageWarp treats the Input image as a binary mask for the Photo image. If you do not need to perform the intensity measurements, you can omit this parameter or set its value to the number of the Input frame and work with the multiphase image only.  
 
File  
 
An optional string specifying the name of the ImageWarp data file for saving measurement results. If a file of the same name already exists, ImageWarp will append it with the new measurement data. In this case the set of parameters from the data file will take precedence over the set selected with selectParam. If you leave this field empty, ImageWarp will collect the results in memory in the Global Grid. For more details refer to ImageWarp User's Guide.  
 
User  
 
An optional string specifying the formulas for calculating user-defined parameter. See User-defined parameters for more details.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
ERR_BADFILE  
 
The flag set if the file could not be open.  
 
ERR_NOSPACE  
 
The flag set if there is not enough space to write the file.  
 
Example

This set of statements binarizes a sample image, initializes measurement parameters, performs automatic object measurements and opens the recorded data table:  
 
setCurDir ("samples")  
loadIm (1,"sample8.iwd")  
threshRGB(1, 2 , M_PRESET , TRUE, 1, 87,213, 46,151, 143,220)  
resetParam()  
selectParam ("Area","Circularity","DCircle","BlueAvrg","Holes")  
measObjects (2,1,"objects.dbs")  
loadData ("objects.dbs")  
 
Remark
 
For the list of measurement parameters supported by Blob measurements refer to ImageWarp User's Guide.