Ask Your Question

TGMCians's profile - activity

2017-08-29 00:55:38 -0600 received badge  Notable Question (source)
2016-02-09 14:55:54 -0600 received badge  Popular Question (source)
2014-03-20 13:24:22 -0600 received badge  Student (source)
2014-03-20 12:36:36 -0600 received badge  Supporter (source)
2014-03-17 06:11:37 -0600 asked a question Hand Gesture Detection in Android using OpenCV

I am looking a solution for a hand gesture detection in Android using OpenCV. I want to use the Open CV Android SDK for this stuff. I went through many links but did not find anything that was done using Open CV Android SDK.

I know about this a bit that it can be done by detecting the skin colors etc but don't know how this can be done using SDK

Guys, can you look how this can be done using SDK.

2014-03-17 05:20:52 -0600 asked a question Minimum threshold value of Histogram comparison

I am using OpenCV library to see how two object in a two picture are similar. I read on many blogs in OpenCV histogram comparisons make this. Below is my code to do so.

I want to know minimum threshold value of this double text = Imgproc.compareHist(H1, H2, Imgproc.CV_COMP_BHATTACHARYYA); I should consider that objects inside the two picture are similar and anything I am doing wrong , please share.

public Mat histogram(String filenameIn, String filenameOut) {
    Mat img = Highgui.imread(filenameIn);
    Mat src = new Mat(img.height(), img.width(), CvType.CV_8UC2);
    Imgproc.cvtColor(img, src, Imgproc.COLOR_RGB2GRAY);
    Vector<Mat> bgr_planes = new Vector<Mat>();
    Core.split(src, bgr_planes);
    MatOfInt histSize = new MatOfInt(256);
    final MatOfFloat histRange = new MatOfFloat(0f, 256f);
    boolean accumulate = false;
    Mat b_hist = new Mat();
    Imgproc.calcHist(bgr_planes, new MatOfInt(0), new Mat(), b_hist, histSize, histRange, accumulate);
    Highgui.imwrite(filenameOut, b_hist);
    return b_hist;
}

String mCapturedPicPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();

if (!OpenCVLoader.initDebug()) {
    // Handle initialization error
}

Mat H1 = histogram(mCapturedPicPath + "/Camera/1.jpg", mCapturedPicPath + "/Camera/5.jpg");
Mat H2 = histogram(mCapturedPicPath + "/Camera/2.jpg", mCapturedPicPath + "/Camera/6.jpg");
double text = Imgproc.compareHist(H1, H2, Imgproc.CV_COMP_BHATTACHARYYA);
2014-03-17 04:26:40 -0600 commented question Error : 03-17 06:50:45.728: A/libc(1453): Fatal signal 11 (SIGSEGV) at 0x00000170 (code=1), thread 1453 (mple.opencvdemo)

@berak If you write all these in answer, definitely I will accept the answer. one question also what is minimum threshold value of Histogram comparison so that you can consider them similar.

2014-03-17 04:19:17 -0600 commented question Error : 03-17 06:50:45.728: A/libc(1453): Fatal signal 11 (SIGSEGV) at 0x00000170 (code=1), thread 1453 (mple.opencvdemo)

Thanks, you saved my day, awesome, Image Path was wrong that is reason for this issue

2014-03-17 04:14:23 -0600 commented question Error : 03-17 06:50:45.728: A/libc(1453): Fatal signal 11 (SIGSEGV) at 0x00000170 (code=1), thread 1453 (mple.opencvdemo)

@berak Yup , it is empty as I saw Mat [ 00CV_8UC1, isCont=false, isSubmat=false, nativeObj=0xb800e5d8, dataAddr=0x0 ] but why I am passing the correct path /storage/emulated/0/DCIM/1.jpg

2014-03-17 03:54:13 -0600 commented question Error : 03-17 06:50:45.728: A/libc(1453): Fatal signal 11 (SIGSEGV) at 0x00000170 (code=1), thread 1453 (mple.opencvdemo)

@berak Actually I want to compare two picture, object in the picture how similar they are, so I am doing this using Histogram calculcation. I tried with your suggestion also but same same issue persist

2014-03-17 03:39:56 -0600 received badge  Editor (source)
2014-03-17 03:35:07 -0600 asked a question Error : 03-17 06:50:45.728: A/libc(1453): Fatal signal 11 (SIGSEGV) at 0x00000170 (code=1), thread 1453 (mple.opencvdemo)

Hello, I am using OpenCV library in my android application for comparison the image stuff how they are similar.

So I am doing this using the Histogram calculation. I integrated the android -opencv java library 2.4.8 in my application and added the so (shared object) files in the libs folder.

public Mat histogram(String filenameIn, String filenameOut) {
    Mat img = Highgui.imread(filenameIn);
    Mat src = new Mat(img.height(), img.width(), CvType.CV_8UC2);
    Imgproc.cvtColor(img, src, Imgproc.COLOR_RGB2GRAY);
    Vector<Mat> bgr_planes = new Vector<Mat>();
    Core.split(src, bgr_planes);
    MatOfInt histSize = new MatOfInt(256);
    final MatOfFloat histRange = new MatOfFloat(0f, 256f);
    boolean accumulate = false;
    Mat b_hist = new Mat();
    Imgproc.calcHist(bgr_planes, new MatOfInt(0), new Mat(), b_hist, histSize, histRange, accumulate);
    Highgui.imwrite(filenameOut, b_hist);
    return b_hist;
}

This line Imgproc.cvtColor(img, src, Imgproc.COLOR_RGB2GRAY); creating a issue of 03-17 06:50:45.728: A/libc(1453): Fatal signal 11 (SIGSEGV) at 0x00000170 (code=1), thread 1453 (mple.opencvdemo).

I went through many links about this type of errors Fatal signal 11 (SIGSEGV) at 0x00000170 , as I read there might be some bug in the native code also.

Guys, look the issue and share your opinion the possibilities of this error