Ask Your Question

Revision history [back]

How to save OpenCV image keypoints in mysql database using Java?

Using OpenCV in java i am trying to compare two images using their keypoints.i want to store image keypoints in mysql database and then fetch those keypoints to compare if both images are similar or not based on how much(percentage) they differ. Here is my code for keypoint recognition

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Mat img_1=Imgcodecs.imread("1.jpg");
Mat img_2=Imgcodecs.imread("2.jpg");

MatOfKeyPoint kp_1 = new MatOfKeyPoint();
MatOfKeyPoint kp_2 = new MatOfKeyPoint();

FeatureDetector fd = FeatureDetector.create(FeatureDetector.FAST);  
fd.detect(img_1, kp_1);
fd.detect(img_2, kp_2);

how can i save these keypoints in mysql database and then retrieve to compare these keypoint to find percentage difference?