- "## Activity\n\nYour task now is to change those numbers above so that we highlight the duckies.\n\n\nWe've created a tool for you to make this easier and suggest you use the following steps:\n\n1. Use [this online color picker](https://pinetools.com/image-color-picker) to click around on the sample images in the `/assets/samples` directory and get familiar with what color corresponds to which HSV values. (You can use any other tool, the link is just for reference). This will set you up to narrow in on the duckie yellow more quickly. **Regardless of the color picker you use, always double-check whether it uses a different convention for HSV ranges. If it does, make sure to convert the result to the OpenCV's convention**.\n\n2. Use the tool [shown in this video](https://vimeo.com/534995276) to find the values interactively. It runs the code in [HSV-bound.py](../../packages/examples/HSV_bound.py) to filter a test image based on the values you choose.\n\n To get this interactive method running, open a terminal on your computer, **navigate to the exercise folder** (where you cloned the `duckietown/lx-braitenberg/` repo) and type:\n\n `dts code build -R ROBOTNAME`\n\n to build your updated exercise on your robot called `ROBOTNAME` (note that it can be virtual or physical as described in the [README](../../README.md)). Then use\n\n `dts code workbench -R ROBOTNAME [-m] -L HSV`\n\n where the `-m` option is used if you have already started the duckiematrix and are using a virtual robot. Then finally start up the VNC desktop with \n\n `dts code vnc -R ROBOTNAME`\n \n to run the HSV tool. In the terminal output you will see lines like the following (you may have to scroll up in the terminal)\n\n ```\n VNC running at http://127.0.0.1:32770\n --------------------------------------------------------\n ```\n\n Following the link will bring up the VNC desktop, where you can click on the HSV activity icon and run the tool.\n\n3. After you have a satisfactory result in the VNC tool, open the file [preprocessing.py](../../packages/solution/preprocessing.py), and change the values of `lower_hsv` and `upper_hsv` to the ones that you found to highlight the duckie. This will be used by your Braitenberg agent in the next notebook."
0 commit comments