The Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.
-
Read Prerequisites and How to run a sample first.
-
Install dependencies:
npm install
View the documentation or the source code.
This sample uses node-canvas to draw an output image. node-canvas depends on Cairo, which may require separate installation. See the node-canvas installation section for details.
Run the sample:
Usage: node faceDetection <path-to-image-file>
Example:
node faceDetection "./resources/face.png"
View the documentation or the source code.
Run the sample:
Usage: node labelDetection <path-to-image-file>
Example:
node labelDetection "./resources/wakeupcat.jpg"
View the documentation or the source code.
Run the sample:
Usage: node landmarkDetection <image-uri>
Example:
node landmarkDetection "https://cloud-samples-tests.storage.googleapis.com/vision/water.jpg"
View the source code.
Run the sample:
Usage: node textDetection <command> [args]...
Analyze images:
node textDetection analyze "./resources/"
Look up words:
node textDetection lookup the sunbeams in