ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Image detection functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Classifies freehand drawings, including circles, squares and triangles.
Example
arrAIImageResult is array of aiImageResult
 
WHEN EXCEPTION IN
arrAIImageResult = AIDetectDrawing("circle.png")
DO
Trace(ExceptionInfo(errFullDetails))
END
 
iElement is aiImageResult
FOR EACH ÉLÉMENT iElement OF arrAIImageResult
Trace(iElement.aidElementType, " ", iElement.ConfidenceLevel)
END
Syntax
<Result> = AIDetectDrawing(<Image>)
<Result>: Array
Array of 3 variables of type aiImageResult, sorted by confidence level in descending order.
<Image>: Control name, Image variable, character string
Image to be analyzed. The image can correspond to:
  • an Image control,
  • a variable of type Image,
  • an Image Memo,
  • the path of an image or PDF file.
This image must have a black contour on a white background. The contour should be relatively thick to improve detection and classification.
Remarks
AIDetectDrawing returns an array containing 3 variables of type aiImageResult. Each one corresponds to one of the possible values (circle, square or triangle), classified according to probability.
For each possible value, the following information is returned:
  • type (aidCircle, aidSquare and aidTriangle),
  • probability (in percent).
The polygon is not specified.
Please note the function works as a classifier. Even if the drawing does not look like a circle, square, or triangle, the classifier may return probabilities higher than 0 for those shapes.
Component: wd300ia.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2023

Send a report | Local help