Use nodeitk for Feature Recognition

Source: Internet
Author: User

Preface

Today, the weather in Dongguan is fine. The temperature ranges from 33 to 27 degrees. The weather is fine today. At the end of this period, there were many things and the blog was not updated for a long time. The feature recognition was completed in the past few weeks. Some foreign websites have been blocked recently, so we can only restart csdn to write articles.


This document briefly describes the usage of feature recognition. In this article, you will learn to use nodeitk,


-Use the DescriptorExtractor interface to find the feature vectors corresponding to the key points
-Use BFMatcher to match a feature vector
-Draw Feature Matching Using drawMatches


Source code

Var node_itk = require ('. /node-itk '); // read the module diagram var img_1 = node_itk.cv.imread (". /images/lena.jpg ", node_itk.cv.CV_LOAD_IMAGE_GRAYSCALE); // read the target image var img_2 = node_itk.cv.imread (". /images/lena.jpg ", node_itk.cv.CV_LOAD_IMAGE_GRAYSCALE); minHessian = 400 // sets the Feature Detection Method detector = new node_itk.cv.NodeOpenCVFeatureDetector (" SURF ") detector. set ("hessianThreshold", minHessian) keypoints_1 = detector. detect (img_1); keypoints_2 = detector. detect (img_2); // obtain the feature description extractor = new node_itk.cv.NodeOpenCVDescriptorExtractor ("SURF"); descriptors_1 = extractor. compute (img_1, keypoints_1) descriptors_2 = extractor. compute (img_2, keypoints_2) // set the matching method matcher = new node_itk.cv.NodeOpenCVDescriptorMatcher ("FlannBased"); matches = matcher. match (descriptors_1, descriptors_2); // draw the matching result img_matches = equals (img_1, keypoints_1, img_2, keypoints_2, matches); node_itk.cv.NamedWindow ("match", matching ); node_itk.cv.imshow ("match", img_matches); c = node_itk.cv.WaitKey (0); if (c> = 0) {return-1 ;}

Result

Summary


Nodeitk is a self-developed image processing tool based on nodejs. It includes basic image processing, video processing, and other feature matching functions. For more information about it, see the link. To be continued.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.