programm freezes when calling cvtColor() or HoughCircles() maybe bug ?

asked 2016-07-26 17:06:05 -0600

L1ne gravatar image

updated 2016-07-26 17:11:06 -0600

berak gravatar image

Hi, im new to opencv ... I use Android Studio 2.1.2 and opencv 3.1.0 opencv is running, i checked with

static {
    if (!OpenCVLoader.initDebug()) {
        Log.d(TAG, "OpenCV not loaded");
    } else {
        Log.d(TAG, "OpenCV loaded");
    }
}

finaly running after days of trying :D but now to my problem ... when i try to call cvtColor(src, src_grey, COLOR_BGR2GRAY); (wich i tried to use before, now i use imread() for greyscale) or

HoughCircles(src_grey, circles, CV_HOUGH_GRADIENT, dp, minDist, param1,
                    param2, minRadius, maxRadius);

...my circles mat Mat circles = new Mat(); maybe im too stupid here ? its not throwing any errors just freezes and nothing afterwards.



Mat src_grey = imread(Environment.getExternalStorageDirectory() + File.separator + "img.png", IMREAD_GRAYSCALE );
imwrite(Environment.getExternalStorageDirectory() + File.separator +"grey.png", src_grey);

this is working to make my image grey but i still need to find the circles : (

edit retag flag offensive close merge delete

Comments

I would add actual parameters for dp thru maxRadius. Those are descriptions and have a numeric value. For instance dp should be a 1 or a 2. minDist is the minimum distance between the circles center point in pixels and will vary based on input pic. The HoughCircles docs have all the info. docs

jmbapps gravatar imagejmbapps ( 2016-07-27 13:58:44 -0600 )edit

y i know ... i did set these variables im not a total fool :D

L1ne gravatar imageL1ne ( 2016-07-28 09:18:36 -0600 )edit

Sry. You never know on here sometimes. I assume your variables are top secret? ;o) Good luck!

jmbapps gravatar imagejmbapps ( 2016-07-28 11:35:27 -0600 )edit