k230 self-learning object recognition

k230 self-learning object recognitionk230 and PICO2 communication1. Experimental Prerequisites2. Experimental wiring3. Main code explanation4. Experimental Phenomenon

 

k230 and PICO2 communication

1. Experimental Prerequisites

This tutorial uses the PICO2 development board, and the corresponding routine path is [14.export\PICO-K230\16_pico_k230_self_learning.py].

K230 needs to run the [14.export\CanmvIDE-K230\16.self_learning.py] program to start the experiment. It is recommended to download it as an offline program.

Things you need:

Windows computer PICO2 development board microUSB cable K230 visual module (including TF card with image burned in) type-C cable connection cable

2. Experimental wiring

k230 vision modulePICO2 Development Board
5VVCC
GNDGND
TXD(IO9)RXD(GP9)
RXD(IO10)TXD(GP8)

image-20250430171114604

3. Main code explanation

The above program is for parsing K230 data. Only when it complies with specific protocols can the corresponding data be parsed.

in

4. Experimental Phenomenon

  1. After connecting the cables, the k230 visual module runs offline. After K230 is connected to Canmv IDE, open the corresponding program, click [Save open script to CanMV board (as main.py)] on the toolbar, and then restart K230.

image-20250429194108060

When K230 is turned on, a purple box will appear on the screen. Please align the purple box with the objects to be learned. There are two objects in total. Follow the on-screen prompts to learn the two objects.

After both objects have been learned, if the corresponding object appears in the purple box, the object name and score will be displayed.

  1. Open the Thonny editor, connect the PICO2 mainboard, open the program file and run it.

    Note: The PICO2 mainboard needs to have the microPython firmware downloaded in advance.

  2. When the K230 camera image recognizes an object, the terminal will parse and print out the information transmitted by the K230.

in