Seeed grove vision AI and seeed terminal WIO

I’ve made an edge impulse project of object detection. I’ve deployed it on a Seeed grove vision AI captor.
It works, and I can see the images on my PC, with the detection.
My object is regognises (it is a ball bearing), but I don’t have the position X,Y ine the image. How can I realize this?

Moreover, I would like to connect the captor on a Seeed terminal WIO, to get the informations about the detected object. Can I find somewhere an exemple of program to send in the Seeed WIO terminal?

Thanks a lot.
Fabrice

Hi @fbdumas

  1. Process Object Detection Output:
  • Use the functions provided by the Edge Impulse Arduino library to run inference and obtain the detection results, including the bounding box coordinates.
  • Calculate the X, Y coordinates of the detected object. This can be the center point of the bounding box, calculated as X = (X_min + X_max) / 2 and Y = (Y_min + Y_max) / 2.
  1. Send Coordinates to WIO Terminal:
  • Once you have the coordinates, send this data to the WIO Terminal using the initialized communication protocol. For example, using I2C, you might use Wire.write() to send the data.

then after the run inference in your loop() print our the bounding boxes like this:

  if (result.bounding_boxes_count > 0) {
    float X = (result.bounding_boxes[0].x + result.bounding_boxes[0].width) / 2.0;
    float Y = (result.bounding_boxes[0].y + result.bounding_boxes[0].height) / 2.0;
    
    // Send X, Y coordinates to WIO Terminal via I2C
    Wire.beginTransmission(WIO_TERMINAL_ADDRESS); // Replace with your WIO Terminal's I2C address
    Wire.write(X);
    Wire.write(Y);
    Wire.endTransmission();

Best

Eoin