imgrecog
Version:
Node.js tool to parse and act on images, using the Google Vision and Sightengine APIs.
54 lines (53 loc) • 1.84 kB
TypeScript
import vision = require("@google-cloud/vision");
/**
* Google Vision API wrapper.
*/
export declare class Vision {
description: "Google Vision API";
/**
* The Google Vision API client.
*/
client: vision.v1.ImageAnnotatorClient;
/**
* Number of API calls made to the Google Vision API.
*/
apiCalls: number;
/**
* Prepare the Google Vision client.
* @param options Program options with the authfile.
*/
prepare: (options: Options) => Promise<void>;
/**
* Detect objects on the specified image.
* @param options Program options.
* @param filepath Image file to be scanned.
*/
detectObjects: (options: Options, filepath: string) => Promise<ImageResult>;
/**
* Detect labels and tags for the specified image.
* @param options Program options.
* @param filepath Image file to be scanned.
*/
detectLabels: (options: Options, filepath: string) => Promise<ImageResult>;
/**
* Detect landmarks for the specified image.
* @param options Program options.
* @param filepath Image file to be scanned.
*/
detectLandmarks: (options: Options, filepath: string) => Promise<ImageResult>;
/**
* Detect logos and brands for the specified image.
* @param options Program options.
* @param filepath Image file to be scanned.
*/
detectLogos: (options: Options, filepath: string) => Promise<ImageResult>;
/**
* Detect if the specified image is unsafe (violent, adult, racy, medical, spoof).
* All these tags will be prefixed with "explicit".
* @param options Program options.
* @param filepath Image file to be scanned.
*/
detectUnsafe: (options: Options, filepath: string) => Promise<ImageResult>;
}
declare const _default: Vision;
export default _default;