Resource

Resource Basics

Resource Name Area Information
Resource Version 1.0
Category Custom Thumbnail Info
Downloads 534
Release Date 3/30/2024 3:33:10 PM
 

Resource Details

Description This script displays some Area information;

e.g.
3 areas; 2 detected; 2 recognized
Installation Instructions na
Usage Instructions Select the script from the drop down in a custom thumb info line -> From Repository

or

1. Store the script on the local hard drive
2. Open the script in a text editor
3. Copy/Paste the content of the script to a custom thumb info line
Changes in this version na
Special Requirements
 

Author Information

Author Name IDimager
 

Script

%code
var
  AAreas: TCatalogAreas;
  AArea: TCatalogArea;
  i: Integer;
  AFaceCount, ARecognizedCount: Integer;
begin
  AAreas := TCatalogAreas.Create(TCatalogArea, '')
  try
    PublicCatalog.EnumAreasForImage(ImageItem, AAreas);

    AFaceCount := 0;
    ARecognizedCount := 0;
    for i := 0 to AAreas.Count - 1 do
    begin
      AArea := AAreas.Items[i];

      if AArea.IsFaceDetected then
        Inc(AFaceCount);

      if AArea.IsFaceRecognized then
        Inc(ARecognizedCount);
    end;

    result := IntToStrW(AAreas.Count) + ' areas; ' + IntToStrW(AFaceCount) + ' detected; ' + IntToStrW(ARecognizedCount) + ' recognized';
  finally
    AAreas.Free;
  end;
end;
%/code