Image search in network

To run a reverse image search, use the SearchFirst method of the Searcher class. This method returns the first portion of results.

To continue the search, the SearchNext method is used, returning the second and subsequent portions of results.

The search image object and search options object are the same as those used for single index searches.

The following code example demonstrates performing a reverse image search on the search network.


Console.WriteLine("First image search");

Searcher searcher = node.Searcher;
ImageSearchOptions options = new ImageSearchOptions();
options.HashDifferences = hashDifferences;
int total = 0;

NetworkImageSearchResult result = searcher.SearchFirst(searchImage, options);
Console.WriteLine("Images found (shard " + result.ShardIndex + "): " + result.ImageCount);
total += result.ImageCount;

while (result.NetworkImageSearchToken != null)
    Console.WriteLine("Next image search");

    result = searcher.SearchNext(result.NetworkImageSearchToken);
    Console.WriteLine("Images found (shard " + result.ShardIndex + "): " + result.ImageCount);
    total += result.ImageCount;

Console.WriteLine("Total images found (diffs = " + hashDifferences + "): " + total);

More information about reverse image search in the article.

More resources

GitHub examples

You may easily run the code from documentation articles and see the features in action in our GitHub examples:

Free online document search App

Along with full featured .NET library we provide simple, but powerful free Apps.

You are welcome to search over your PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX and more with our free online Free Online Document Search App.