| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example :: Related |
| Back to top |
| Back to top |
autofid(oeproji, chipfile, chipsens, caledge, oeprojo)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| OEPROJI * | str | Input OrthoEngine project file | 1 - | |
| CHIPFILE | str | Chip database file | 0 - | |
| CHIPSENS | str | Sensor origin | 0 - | |
| CALEDGE | str | Calibration edge | 0 - 192 | Left, Top, Right, Bottom Default: Left |
| OEPROJO | str | Output OrthoEngine project file | 0 - |
| Back to top |
OEPROJI
Specifies the name of the OrthoEngine project file.
All images in the project must have the same type of fiducial marks and must be scanned at the same resolution and orientation (have the same calibration edge).
CHIPFILE
Optionally specifies the name of the chip database file that contains the fiducial chips used to automatically collect fiducials in all project file images.
If this parameter is not specified and the project file has at least one set of fiducial coordinates already collected, the best image with this information is used to extract templates for the fiducial marks. The best image is the first image in the project with all fiducial marks or with the highest number of collected fiducial marks.
CHIPSENS
Specifies the sensor (camera) name. This name is used to extract fiducial chips from the chip database. This parameter is ignored when the default CHIPFILE (Fiducial Chip Database) parameter is used.
CALEDGE
Optionally specifies the calibration edge for the images. The following values are supported: Left, Top, Right, or Bottom. If this parameter is not specified, the left edge is used by default.
All images in the project must have the same calibration edge. Fiducial mark templates in the chip database can have a different calibration edge, and are rotated internally to this orientation, if required.
OEPROJO
Optionally specifies the name of the output OrthoEngine project file that receives the extracted fiducial measurements.
The file must not already exist. If this parameter is not specified, the extracted fiducial marks are added to the input project file.
| Back to top |
Returns: execution status
Type: PCI_INT
| Back to top |
AUTOFID automatically collects fiducial measurements for all images in a project, stores them in the output project file, and optionally generates a text report. If an output file name is not provided, the extracted fiducial marks are added to the input project file. The input project must contain scanned aerial images with fiducial marks. Valid camera calibration information must already be imported into the project through CAMIMPORT or in OrthoEngine. Only one camera is supported for each project.
The fiducial marks on the project images are identified by automatic matching with fiducial template chips. The template chips can be extracted from a chip database or from an image in the project that has already acquired fiducial marks.
All images in the project are processed. All images must have the same type of fiducial marks and must be scanned at the same resolution and orientation (that is, they must have the same calibration edge position).
The specified chip database must contain fiducial mark templates for the camera in the input project. The chips in the database must be collected from an image with the calibration on the left side and must be scanned at the same resolution as the images in the project.
If the CHIPFILE (Fiducial Chip Database) parameter is not specified, AUTOFID searches the project file for the best image with fiducial marks that are already collected and uses these fiducials as templates for all other images. The best image is defined as the first image with all fiducial marks collected. If no such image exists, the first image with the largest number of collected fiducial marks is selected as the best image.
The maximum and minimum number of required fiducial marks depends on the fiducial type. For the Edge or Corner fiducials, the maximum number of fiducial marks is four, and at least three templates are required. For the Edge_Corner fiducials, the maximum number of fiducial marks is eight, and at least five templates are required. AUTOFID exits and displays an error message if an insufficient number of fiducials is found in the best image.
The fiducial mark templates are identified in the database based on the sensor (camera) name and the fiducial type (Edge, Corner, or Edge_Corner). The type is extracted from the calibration information in the input project. The first suitable template at every fiducial position is used. For example, if CHIPSENS (Chip Sensor Type) is set to "Camera_1" and the fiducial type in the input project file is Corner, then the fiducial chip database is searched to find the four chips for this camera that correspond to the upper-left, upper-right, lower-right, and lower-left positions.
The chips in the database should be scanned at the same resolution as the the images in the project. AUTOFID exits and displays an error message if the sizes of the source images of the templates in the chip databases differ from the average image size in the project.
The CALEDGE (Calibration Edge) parameter specifies the position of the calibration edge (left, top, right, or bottom) of the images in the project. The left position is used by default. All images must have the same calibration edge. If the calibration edge of the images is different than the edge of the templates extracted from the database, the templates are rotated before processing to match the orientation of the images.
If the project has images with more than one calibration edge position, it is recommended that the project be divided into two or more separate projects, each with images with the same camera calibration edge positions. Each of the subprojects can be processed separately in AUTOFID. All output subprojects can be merged using MERGPROJ.
If the OEPROJO (OutputText) parameter is not specified, the extracted fiducial coordinates are added to the input project file. Otherwise, a new project file is created to receive the extracted fiducial coordinates. The output project is not updated or created if no new fiducial marks are extracted in the run.
The position of fiducial marks in each image are determined by matching the image of the template chips (rotated if necessary) with the content of the image near an estimated position of each fiducial mark. The already collected fiducial marks are retained (omitted from matching).
For multi-channel templates or images, or both, only the first channel is used for matching. An image is successfully processed if a required number of fiducial marks is collected: a minimum of three for the Edge or Corner fiducials, and a minimum of five fiducial marks for the Edge_Corner fiducials.
The standard REPORT parameter specifies the destination of the text report. The extracted fiducial measurements are reported in the following format:
*Auto Fiducial Collection Residuals
ImageId NumFids TL TR BR BL Notes
S189 4 0.26 0.26 0.26 0.26 OK
S188 4 0.34 0.34 0.34 0.34 OK
S130 4 0.14 0.14 0.14 0.14 OK
S129 4 0.08 0.08 0.08 0.08 OK
Number of images processed in this run: 4
#Fids #Images
0 0
1 0
2 0
3 0
4 4
AUTOFID Total time: 21.247 seconds
The residuals are provided in image pixels. The column headings identify the fiducial mark positions as follows:
TL: Top Left corner
TM: Top Middle edge
TR: Top Right corner
RM: Right Middle edge
BR: Bottom Right corner
BM: Bottom Middle edge
BL: Bottom Left corner
LM: Left Middle edge
??: Unknown location
The residual listing indicates the fiducial marks that were not collected as N/A. The images with the number of collected fiducials that is lower than the required minimum number show their residuals as 0.00.
The Notes column indicates OK for images that have at least the minimum required number of fiducial marks collected. Other possible self-explanatory messages are as follows:
Skipped - source image for fid templates
Skipped - image is offline
Skipped - image is inactive
Skipped - cannot open disk file
Skipped - invalid image size
Skipped - fids already collected
Skipped - fids not sufficient
The final summary table indicates the number of images with the specified number of extracted fiducials. The processing time will be different for different data sets.
| Back to top |
An OrthoEngine project file named "left_edge_1.prj" contains valid camera calibration information, and lists scanned aerial photographs with the camera calibration edge on the left. One of the images has the fiducials already collected in OrthoEngine.
AUTOFID is set up to automatically collect fiducial information for the remaining images in the project. The results are written to a new project file and the report is directed to a report file.
from pci.autofid import autofid oeproji = "left_edge_1.prj" # input project file chipfile = "" # fiducial marks from the "best" project image will be used chipsens = "" # ignored since chipfile is empty caledge = "Left" # use the left edge of the images as the calibration edge oeprojo = "left_edge_all.prj" # output project file autofid (oeproji, chipfile, chipsens, caledge, oeprojo)
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.