ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Image detection functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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 ELEMENT 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. This 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: 09/25/2024

Send a report | Local help