PreviousNext
Help > Programming PhotoModeler - Scripting/DDE Interface > Commands > AutoMark
AutoMark

Description:

Perform auto-marking on the specified photo (or 0 for all)  or photoset with the specified parameters.

Syntax:

"AutoMark PhotoNumber(or 0 for all) X1 Y1 X2 Y2 MaxDiameter MinDiameter TargetType [FitError] [Layer] [Name]"

where:

PhotoNumber is the photo to mark or '0' for all photos in the project or it can be the name of an existing photoset in the project (i.e. if numeric this parameter refers to the photo number, otherwise it refers to the photoset name), X1 Y1 is the top left corner of the region to mark, Y1 Y2 is the bottom right corner of the region to mark (note the region is ignored when all photos are marked - the entire image is used in that case), MaxDiameter is the maximum size of the largest target in pixels, MinDiameter is the minimum size of the smallest target, TargetType is the type of target to mark, i.e. one of: -1 (not set, PhotoModeler will attempt to mark all targets types), 0 (RAD Coded Targets), 1 (RAD dots), 2 (dot targets), 3 (8bit set), 4 (10bit set), 5 (12bit set), 6 (User Set). 

The remaining parameters are optional. FitError indicates the Fit Error threshold (defaults to 0.2). Layer specifies the layer that automarked points are assigned. Name specifies the name to assign to points that are automarked.

 

See the Automatic Target Marking Dialog for more background.

Return:

"1 NumNewMarks"

where NumNewMarks is the number of new Marked Points created during this automarking run or "0" if this command failed. 

Failure returns

- incorrect number of parameters

- no project is open

- the photo id number is invalid

- automarking failed to run

Example:

"AutoMark 1 0 0 2000 1500 40 10  0 0.1 layerName amPt"

Or

“AutoMark 1 0 0 2000 1500 40 10  0”

return "1 14"