|
|
|
|
|
- Properties specific to aiImageResult variables
aiImageResult (Type of variable) In french: iaRésultatImage
The aiImageResult type is used to retrieve the result of AIDetect. Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable. 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 ÉLÉMENT 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.Polygone.Point[1].X < iElement.Polygone.Point[2].X THEN nXCentre = (iElement.Polygone.Point[1].X + iElement.Polygone.Point[2].X)/2 nYCentre = (iElement.Polygone.Point[1].Y + iElement.Polygone.Point[3].Y)/2 ELSE nXCentre = (iElement.Polygone.Point[1].X + iElement.Polygone.Point[4].X)/2 nYCentre = (iElement.Polygone.Point[1].Y + iElement.Polygone.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 Remarks Properties specific to aiImageResult variables The following properties can be used to handle the result of object detection in an image: | | | Property name | Type used | Effect |
---|
aidElementType | Integer constant | Constant corresponding to the detected object: - aidAirplane: Plane in the image.
- aidSportsBall: Sports ball in the image.
- aidBanana: Banana in the image.
- aidBench: Bench in the image.
- aidBoat: Boat in the image.
- aidBaseballBat: Baseball bat in the image.
- aidBowl: Bowl in the image.
- aidFireHydrant: Fire hydrant in the image.
- aidBottle: Bottle in the image.
- aidBroccoli: Broccoli in the image.
- aidToothbrush: Toothbrush in the image.
- aidBus: Bus in the image.
- aidTruck: Truck in the image.
- aidSofa: Sofa in the image.
- aidCarrot: Carrot in the image.
- aidCircle: Circle (constant used for image detection).
- aidKite: Kite in the image.
- aidChair: Chair in the image.
- aidCat: Cat in the image.
- aidHorse: Horse in the image.
- aidDog: Dog in the image.
- aidScissors: Scissors in the image.
- aidKeyboard: Keyboard in the image.
- aidKnife: Knife in the image.
- aidTie: Tie in the image.
- aidSpoon: Spoon in the image.
- aidDonut: Donut in the image.
- aidTv: TV screen in the image.
- aidElephant: Elephant in the image.
- aidSink: Sink in the image.
- aidTrafficLight: Traffic light in the image.
- aidOven: Oven in the image.
- aidFork: Fork in the image.
- aidFrisbee: Frisbee in the image.
- aidBaseballGlove: Baseball glove in the image.
- aidCake: Cake in the image.
- aidGiraffe: Giraffe in the image.
- aidToaster: Toaster in the image.
- aidClock: Clock in the image.
- aidHotdog: Hot dog in the image.
- aidBed: Bed in the image.
- aidBook: Book in the image.
- aidMicrowave: Microwave oven in the image.
- aidMotorbike: Motorbike in the image.
- aidSheep: Sheep in the image.
- aidBird: Bird in the image.
- aidOrange: Orange in the image.
- aidLaptop: Laptop in the image.
- aidBear: Bear in the image.
- aidTeddyBear: Teddy bear in the image.
- aidStopSign: Stop sign in the image.
- aidUmbrella: Umbrella in the image.
- aidParkingMeter: Parking meter in the image.
- aidPerson: Person in the image.
- aidPizza: Pizza in the image.
- aidSurfboard: Surfboard in the image.
- aidPottedPlant: Potted plant in the image.
- aidLicensePlate: License plate
- aidApple: Apple in the image.
- aidTennisRacket: Tennis racket in the image.
- aidRectangle: Rectangle (constant used for image detection).
- aidRefrigerator: Refrigerator in the image.
- aidBackpack: Backpack in the image.
- aidHandbag: Handbag in the image.
- aidSandwich: Sandwich in the image.
- aidHairDryer: Hair dryer in the image.
- aidSkateboard: Skateboard in the image.
- aidSki: Skis in the image.
- aidSnowboard: Snowboard in the image.
- aidMouse: Mouse in the image.
- aidDiningTable: Dining table in the image.
- aidCup: Cup in the image.
- aidRemote: Remote control in the image.
- aidCellphone: Cellphone in the image.
- aidToilet: Toilet in the image.
- aidTrain: Train in the image.
- aidTriangle: Triangle (constant used for image detection).
- aidCow: Cow in the image.
- aidSuitcase: Suitcase in the image.
- aidVase: Vase in the image.
- aidBicycle: Bicycle in the image.
- aidWineGlass: Wine glass in the image.
- aidFace: Face in the image.
- aidCar: Car in the image.
- aidZebra: Zebra in the image.
| ConfidenceLevel | Real | Object detection confidence score, from 0 to 100. In version 27, this parameter was an integer. | Polygon | Polygon variable | Polygon that corresponds to the points surrounding the detected element. |
Related Examples:
|
Training (WINDEV): WD Object Detection
[ + ] This example shows how to use AIDetect.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|