Upgrade to our Platinum service and let us build your bot for you
Bot Libre Forum

How to use Vision and Image Processing

by admin posted 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.


Id: 12877485
Tags: how to, self, vision, image processing
Posted: Jun 3 2016, 12:42
Updated: Jun 3 2016, 12:47
Replies: 0
Views: 5077, today: 1, week: 2, month: 78
0 0 0.0/5