Ask Your Question

surodip's profile - activity

2020-01-30 06:28:12 -0600 received badge  Notable Question (source)
2018-01-31 08:59:33 -0600 received badge  Popular Question (source)
2017-11-12 10:12:41 -0600 received badge  Popular Question (source)
2013-10-24 04:50:14 -0600 asked a question Feature couldn't be extracted from some gif images using Flannbased matcher

I was just trying to compare two images by feature point matching using SIFT. I am using SURF type Descriptor Extractor to do this. Now for some GIF images the descriptor extractor returns empty. Why & What to to in this case?

2013-10-24 04:45:42 -0600 received badge  Editor (source)
2013-10-24 04:44:14 -0600 answered a question OpenCV error unsupported format or comibation of formats when doing FlannBased matching

This problem occurred when the descriptors could not be found from a image. Means the features couldn't be extracted from images for various reasons. Just check the descriptors for empty.


2013-09-20 07:15:37 -0600 received badge  Supporter (source)
2013-09-20 06:38:14 -0600 asked a question Compare two images and calculate SSIM in JAVA

Can anyone tell me how can I calculate SSIM for two images and get the similarity of the two images?

2013-09-19 05:51:56 -0600 commented question Comparing two images whether same or not

If I want to compare pictures contain the same objects but they differ by color-space or geometric transformations - then what should be best approach?

2013-09-13 07:09:07 -0600 commented question How to convert encoded image string to Mat in OpenCV in JAVA?

Encoded in Base64. I read an image, convert it to byte[] and encode it into Base64 String using Base64.Base64.encodeBase64String(byte[])

2013-09-13 06:45:43 -0600 asked a question How to convert encoded image string to Mat in OpenCV in JAVA?

In my work I have to get image matrix from the encoded string of an image. I am using OpenCV and JAVA.

Can anyone tell me how to do this?

Thanks, Surodip

2013-09-12 02:13:02 -0600 asked a question How to get percentage of similarity of two images from MatOfDMatch?

Hi, I am doing a project where I have to compare two images in JAVA. Whatever I have found from internet searching that SIFT is a good way to do that. I have extracted features and find the matches. Now I have the MatOfDMatch. I want to calculate the percentage of similarity from it. Can anyone help me in this?

Below is my code:


    MatOfKeyPoint vector1 = new MatOfKeyPoint();
    MatOfKeyPoint vector2 = new MatOfKeyPoint();

    Mat img1 = Highgui.imread("D:\\TestImages\\shape1.jpg");
    Mat img2 = Highgui.imread("D:\\TestImages\\shape2.jpg");

    FeatureDetector surfDetector = FeatureDetector.create(FeatureDetector.FAST);
    surfDetector.detect(img1, vector1);
    surfDetector.detect(img2, vector2);

    Mat descriptors1 = new Mat();
    Mat descriptors2 = new Mat();

    DescriptorExtractor siftDescriptor =DescriptorExtractor.create(DescriptorExtractor.SURF);

    siftDescriptor.compute(img1, vector1, descriptors1);
    siftDescriptor.compute(img2, vector2, descriptors2);

    MatOfDMatch matches = new MatOfDMatch();

    DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.FLANNBASED);

    matcher.match(descriptors1, descriptors2, matches);

    Mat outImg = new Mat();
    Features2d.drawMatches(img1, vector1, img2, vector2, matches, outImg);

Thanks, Surodip