Скачать открытый исходный код бота Либре общий выпуск и установите бот Libre на свой собственный сервер
Bot Libre Forum

How to use Vision and Image Processing

по admin опубликовано Jun 3 2016, 12:42

Bot Libre now supports vision and image processing.

This lets your bot load, analyze, and match images. The Self Vision class can be used to access your bot's vision API. You can also use the default Vision script, or load it from our script library from your bot's scripts page. Currently the Vision class supports loading and tagging images, and matching images using color histograms.

For example, to load an image you can send the chat message "load image" with a URL, and the name of the image:

load image http://www.botlibre.com/graphic?file&id=11643917&name=blink00.png Julie

load image http://www.botlibre.com/graphic?file&id=12661434&name=blink00.png Maylin

Then to match an image you can send the chat message "match image" with a URL:

match image http://www.botlibre.com/graphic?file&id=12661415&name=blink00.png

The bot will answer the name of the closest matching image that it has loaded.

You can also include a tag when loading and matching images to restrict the match to a specific set of images, like colors, faces, animals, or objects.

load image http://www.botlibre.com/graphic?file&id=11643917&name=blink00.png Julie face

load image http://www.botlibre.com/graphic?file&id=12661434&name=blink00.png Maylin face

match image face http://www.botlibre.com/graphic?file&id=12661415&name=blink00.png

The Vision script contains color matching support. To initialize colors send your bot the chat message "init colors" (you only need to call this once ever).

To have the bot guess the primary color for an image use either of:

what color is http://www.botlibre.com/graphic?file&id=11675767&name=delete.png
or,
match image color http://www.botlibre.com/graphic?file&id=11675767&name=delete.png

You can also create your own Self script using the Vision class and access additional API. This support is the start of our vision support, we intend to enhance our vision support with more vision processing features.


Идентификатор: 12877485
Теги: how to, self, vision, image processing
Опубликовано: Jun 3 2016, 12:42
Обновлено: Jun 3 2016, 12:47
Ответы: 0
Вид: 5096, сегодня: 1, неделю: 2, месяц: 15
0 0 0.0/5