ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Image detection functions
  • Properties specific to aiImageResult variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
aiImageResult (Variable type)
In french: iaRésultatImage
The aiImageResult type is used to retrieve the result of AIDetect.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
tabElément is array of 1 int
tabElément[1] = aidMotorbike
tabIARésultatImage is array of aiImageResult
tabIARésultatImage = AIDetect(IMG_SansNom1, tabElément)
IF tabIARésultatImage.Count = 0 THEN RETURN

iImage is Image = IMG_SansNom1
dStartDrawing(iImage, dNoErase + dWithOpacity)

InitRandom(1) // Valeur fixe pour avoir toujours les mêmes couleurs de rectangles

nMarge is int = CoordinateEditorToScreen(5)
cCouleur is Color
nIndice is int
iElement is aiImageResult
FOR EACH ELEMENT iElement OF tabIARésultatImage
	nIndice ++
	cCouleur.Red = Random(0,170)
	cCouleur.Green = Random(0,170)
	cCouleur.Blue = Random(0,170)
	dBackground(iImage, White, 0, 0, 0)
	dPen(iImage, cCouleur, 0, CoordinateEditorToScreen(5), 128)
	dPolygon(iImage,iElement.Polygon)
	nXCentre is int
	nYCentre is int
	IF iElement.Polygon.Point[1].X < iElement.Polygon.Point[2].X THEN
		nXCentre = (iElement.Polygon.Point[1].X + iElement.Polygon.Point[2].X)/2
		nYCentre = (iElement.Polygon.Point[1].Y + iElement.Polygon.Point[3].Y)/2
	ELSE
		nXCentre = (iElement.Polygon.Point[1].X + iElement.Polygon.Point[4].X)/2
		nYCentre = (iElement.Polygon.Point[1].Y + iElement.Polygon.Point[2].Y)/2
	END

	dPen(iImage, cCouleur, 0, 2, 200)
	dBackground(iImage, White, 0, 0, 200)
	dRectangle(iImage, nXCentre - nMarge, nYCentre - nMarge, nXCentre + nMarge, nYCentre + nMarge)
	dPen(iImage, cCouleur, 0, 1, 255)
END
IMG_SansNom1 = iImage
Properties

Properties specific to aiImageResult variables

The following properties can be used to handle the result of object detection in an image:
Property nameType usedEffect
aidElementTypeInteger constantConstant corresponding to the detected object:
  • iadAvion: Aircraft in the image.
  • iadBalloon: Balloon in the picture.
  • iadBanana: Banana in the image.
  • iadBanc: Bench in the picture.
  • iadBateau: Boat in the picture.
  • iadBaseballBat: Baseball bat in the picture.
  • iadBol: Bowl in the picture.
  • iadFire hydrant: Fire hydrant in the picture.
  • iadBouteille: Bottle in the picture.
  • iadBrocoli: Broccoli in the picture.
  • iadBrushADents: Toothbrush in the picture.
  • iadBus: Bus present in the image.
  • iadCamion: Truck in the picture.
  • iadCanapé: Sofa in the picture.
  • iadCarotte: Carrot in the picture.
  • iadCircle: Circle (constant used for drawing detection).
  • iadCerfVolant: Flying deer in the picture.
  • iadChaise: Chair in the picture.
  • iadChat: Cat in the picture.
  • iadHorse Horse in image.
  • iadChien: Dog in the picture.
  • iadScissors Scissors present in the image.
  • iad keyboard: Keyboard shown in image.
  • iadCouteau: Knife in the picture.
  • iadCravate: Tie present in the picture.
  • iadSpoon: Spoon in the picture.
  • iadDonut: Donut in the picture.
  • iadEcranTélé: TV screen in the image.
  • iadElephant: Elephant in the picture.
  • iadEvier: Sink in the picture.
  • iadRedLight Red light in the image.
  • iadFour: Furnace in the picture.
  • iadFork: Fork in the image.
  • iadFrisbee: Frisbee in the picture.
  • iadGantBaseball: Baseball glove in the picture.
  • iadGâteau: Cake in the picture.
  • iadGirafe: Giraffe in the picture.
  • iadGrillePain: Bread grid in the image.
  • iadHorloge: Clock in the picture.
  • iadHotdog: Hotdog in the picture.
  • iadLit: Bed present in the image.
  • iadBookBook in image.
  • iadMicroOndes: Micro wave present in the image.
  • iadMoto: Motorcycle in the picture.
  • iadSheep: Sheep in the picture.
  • iadBird: Bird in the picture.
  • iadOrange: Orange in the picture.
  • iadLaptop: Laptop in the picture.
  • iadOurs: Bear in the picture.
  • iadOursEnPeluche: Teddy bear in the picture.
  • iadStopPanel: Stop panel in the image.
  • iadUmbrella: Umbrella in the picture.
  • iadParcmeter: Parcmeter in the picture.
  • iadPerson: Person in the picture.
  • iadPizza: Pizza in the image.
  • iadSurfBoard: Surfboard in the image.
  • iadPlanteEnPot: Potted plant in the picture.
  • iadPlateImmatriculation: Plate
  • iadPomme: Apple in the image.
  • iadTennisRacket: Tennis racket in the picture.
  • iadRectangle: Rectangle (constant used for drawing detection).
  • iadRefrigerator: Refrigerator in the picture.
  • iadSacADos: Backpack in the picture.
  • iadSacAMain: Handbag in the picture.
  • iadSandwich: Sandwich in the image.
  • iadHairdryer Hair dryer in the picture.
  • iadSkateboard: Skateboard in the picture.
  • iadSki: Ski in the picture.
  • iadSnowboard: Snowboard in the picture.
  • iadMouse Mouse present in image.
  • iadTableAManger: Dining table in the picture.
  • iadTasse: Cup in the picture.
  • iadRemote control Remote control present in the image.
  • iadMobile phone: Mobile phone in the picture.
  • iadToilet: Toilet in the picture.
  • iadTrain: Train in the picture.
  • iadTriangle: Triangle (constant used for drawing detection).
  • iadVache: Cow in the picture.
  • iadSuitcase Suitcase present in the image.
  • iadVase: Vase in the picture.
  • iadVélo: Bike in the picture.
  • iadVerreDeVin: Glass of wine in the image.
  • iadVisage: Face in the image.
  • iadVoiture: Car in the picture.
  • iadZebra: Zebra in the picture.
ConfidenceLevelRealObject detection confidence score, from 0 to 100.
In version 27, this parameter was an integer.
PolygonPolygon variablePolygon that corresponds to the points surrounding the detected element.
Related Examples:
WD Object Detection Training (WINDEV): WD Object Detection
[ + ] This example shows how to use AIDetect.
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help