Ask Your Question

User1's profile - activity

2018-06-12 12:31:37 -0600 received badge  Popular Question (source)
2015-10-16 15:57:56 -0600 commented question SVM model fails to load in Android Application

Can I use CascadeClassifier with SVM also ??

2015-10-16 15:27:48 -0600 commented question SVM model fails to load in Android Application

BUT svm.load() should take the path of the training file ?!

2015-10-16 13:40:35 -0600 asked a question SVM model fails to load in Android Application

I have a problem with load() method in SVM module. For example if I run code:

try {
    Uri uri = Uri.fromFile(new File("file:///android_asset/SVM_Bills.xml"));
    mySvm.load(uri.getPath());          
    int in = mySvm.get_support_vector_count();
    if (in != 0) {
        Toast.makeText(context,"done loading : " + uri.getPath(), Toast.LENGTH_SHORT).show();
        value = (int)mySvm.predict(matOfDescriptor);
    }
    else {
        Toast.makeText(context,"error while loading : " + uri.getPath(), Toast.LENGTH_SHORT).show();
    }

It give me the error toast message (i.e it goes to else part and show the toast message). Of course SVM was previously trained.

Any help please?

2015-10-15 13:47:42 -0600 asked a question Android OpenCV : How to load SVM file from Assest folder

I wanna load svm file from assets in order to use it to make prediction. BUT how to do that in android ?

I try these lines in java and they are works well

CvSVM svm = new CvSVM();

svm.load(PathToFile);

2015-10-15 08:34:14 -0600 asked a question using SIFT/SURF for feature extraction using opencv on android using Android App?

I'm working on a feature extraction/matching app using opencv on android . I'm trying to use those lines in my android app but the app crash even if the variables featureDetector & descriptorExtractor are not NULL.

FeatureDetector featureDetector = FeatureDetector.create(FeatureDetector.SIFT);

DescriptorExtractor descriptorExtractor = DescriptorExtractor.create(DescriptorExtractor.SIFT);

it crashes exactly when I call this line

featureDetector.detect(image,matOfKeyPoint);

2015-10-15 01:25:09 -0600 asked a question Resize does not work in android app. opencv 2.4.11

"Imgproc.resize" function does not work in android application.

I wrote a java test program to run on my PC, and the resize method worked perfectly?

Any help why ? Or how to solve problem ?

2015-10-07 06:12:46 -0600 commented question hough circle

YES I increase the min distance as u said :)))

2015-10-07 05:47:42 -0600 commented question hough circle

Thank u :)

2015-10-07 02:12:03 -0600 received badge  Enthusiast
2015-10-06 14:24:49 -0600 asked a question Could not find OpenCV Library - 2.4.11.apk!

I follow the instructions here but i still get this error

image description

"Could not find OpenCV Library - 2.4.11.apk!"

image description

When I run the app it tells me that the open cv manger package was not found !!! try to install it !!!

2015-10-06 04:46:39 -0600 asked a question hough circle

How can I get the number of circles that return by hough circle using java open CV.

Mat circles = new Mat();

Imgproc.HoughCircles(grayImage, circles, Imgproc.CV_HOUGH_GRADIENT, 1 , gray.rows()/2 , 200, 20, 30, 0 );

System.out.println("#rows " + circles.rows() + " #cols " + circles.cols());

I don't know how it store the circles in Mat that has cols and rows ??

I try to get the circle from column but it does not work !!!

if (circles.cols() > 0)
    for (int x = 0; x < circles.cols(); x++) 
    {
        double vCircle[] = circles.get(0,x);
        if (vCircle == null)
            break;
        Point pt = new Point(Math.round(vCircle[0]),
        Math.round(vCircle[1]));
        int radius = (int)Math.round(vCircle[2]);
        // draw the found circle
        Core.circle(imgRGB, pt, radius, new Scalar(0,255,0), 2);
        Core.circle(imgRGB, pt, 3, new Scalar(0,255,0), 2);
     }

For example look at this image

image description

Any help please.

2015-10-06 04:35:03 -0600 commented answer removing small blob from image?

open followed by close give me better result :-) thank u a lot :)

2015-10-05 07:21:06 -0600 received badge  Scholar (source)
2015-10-05 07:21:04 -0600 received badge  Supporter (source)
2015-10-05 07:11:22 -0600 commented question removing small blob from image?

U mean I need to use Filter by size to get rid of all small blobs ?! Could u please tell me the name of filter that can I use for this purpose ?

2015-10-05 07:09:13 -0600 commented question removing small blob from image?

Yes I try Erode and Dilate But it does not work well ...

2015-10-05 06:48:24 -0600 asked a question removing small blob from image?

I'm working on a java image processing program(based on OpenCV libraryJava). I need to remove the small regions from the image to get a clean image that contain only the large circle ?

image description

2015-09-24 15:40:11 -0600 asked a question Is there is a way to get what is the percentage of the correctness for the predication that used with SVM in opencv/jaVa?

i.e Is there a way to get the confidence values in SVM prediction ?

2015-09-23 14:53:25 -0600 received badge  Editor (source)
2015-09-23 14:52:43 -0600 asked a question Coin detection to make coin matching system

I'm developing an matching system in java using opencv the system accept an image with one object which is coin in order to determine the value of the currency.

What I did : 1-Convert image to gray level. 2-Use edge detection in the gray image the output of this step is used as input to the next step. 3-Use SIFT to find the feature descriptors. 4-Use SVM by storing the SIFT descriptors to predict the value of image.

BUT this algorithm does not give good result. 1-what can I do in order to enhance this algorithm, 2- what is the best SVM params that is suitable for this case . 3-what is the appropriate edge detection for this purpose.

Any suggestion please. Note that in the number of coins types are five.

2015-09-21 10:08:54 -0600 answered a question Template Matching for Coins

Start first by image with one coin only then if the matching system that u use is good then u can crop each coin and pass it to your matching system.

In your matching system you can use SIFT to detect key points and find descriptors then use any matcher such as FlANN matcher to find the matches.

Finally u can use RANSAC as criteria if there is good match or not . Hope this help.