# opencv-compare-image **Repository Path**: txdd/opencv-compare-image ## Basic Information - **Project Name**: opencv-compare-image - **Description**: 使用opencv比较两个图片的相似度 - **Primary Language**: NodeJS - **License**: ISC - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 2 - **Created**: 2018-03-02 - **Last Updated**: 2024-10-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # node-opencv-compare-images [OpenCV](http://opencv.org) bindings for Node.js. OpenCV is the defacto computer vision library - by interfacing with it natively in node, we get powerful real time vision in js. People are using node-opencv to fly control quadrocoptors, detect faces from webcam images and annotate video streams. If you're using it for something cool, I'd love to hear about it! ## Install You'll need OpenCV 2.3.1 or newer installed before installing node-opencv. Note that OpenCV 3.x is not yet fully supported. ## Specific for Windows 1. Download and install OpenCV (Be sure to use a 2.4 version) @ http://opencv.org/downloads.html For these instructions we will assume OpenCV is put at C:\OpenCV, but you can adjust accordingly. 2. If you haven't already, create a system variable called OPENCV_DIR and set it to C:\OpenCV\build\x64\vc12 Make sure the "x64" part matches the version of NodeJS you are using. Also add the following to your system PATH ;%OPENCV_DIR%\bin 3. Install Visual Studio 2013. Make sure to get the C++ components. You can use a different edition, just make sure OpenCV supports it, and you set the "vcxx" part of the variables above to match. 4. Download peterbraden/node-opencv fork git clone https://github.com/peterbraden/node-opencv 5. run npm install ```bash $ npm install opencv ``` ## Examples Run the examples from the parent directory. ### Face Detection ```javascript cv.readImage("./examples/files/mona.png", function(err, im){ im.detectObject(cv.FACE_CASCADE, {}, function(err, faces){ for (var i=0;i