Could not find OpenCV Library - 2.4.8.apk!

asked 2014-05-19 09:06:56 -0600

maizi gravatar image

updated 2014-05-20 02:28:00 -0600

berak gravatar image

Anyone know the error :Could not find OpenCV Library - 2.4.8.apk! Please help me!

The console:

[2014-05-19 21:53:36 - OpenCV Library - 2.4.8] Could not find OpenCV Library - 2.4.8.apk!

In My project I write a piece of code like this :Mat imageroiB(block,block,CV_8UC1),it will appear a red break line under the word "Mat". I could not find the "CV_8UC1" in the options when I use the "Alt+/". image description

edit retag flag offensive close merge delete

Comments

CvType.CV_8UC1 (but unrelated to the apk not found)

berak gravatar imageberak ( 2014-05-19 09:14:28 -0600 )edit

You are missing an underscore between CV and 8UC1!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-19 09:17:32 -0600 )edit

I'm sorry,it is my mistake.I have modified it.It show error like that above.

maizi gravatar imagemaizi ( 2014-05-19 19:13:27 -0600 )edit

You are doing weird things. This is C++ interface so empty constructors are a no go here. Try switching to the following code:

  Mat imageroiR, imageroiG, imageroiB; // default constructor is called here
  MinMaxLocResult minR, minG, minB; // very weird type = not available in openCV 2.4.9
  Mat dark_channel (Row, Cols, CV_8UC1);

Also do show us your definitions of stuff like Row and Cols! More info needed!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-20 02:08:33 -0600 )edit

Ok! Thank you. I learn the Java by myself,so I don't know many standard.

 Mat src=new Mat();
 Utils.bitmapToMat(srcbmp, src);//get the picture from srcbmap
 int Row=src.rows();
 int Cols=src.cols();
 Mat dark_channel(Row,Cols,CV_8UC1);

If I write

  MinMaxLocResult minR;

it will error the local variable minR may not have been initialized. Another how to highlight the code in this forum.

maizi gravatar imagemaizi ( 2014-05-20 02:47:44 -0600 )edit

So this code doesn't work? @berak, your experience with java is better, see a problem?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-20 02:51:49 -0600 )edit

Yes! What do you mean with @berak?

maizi gravatar imagemaizi ( 2014-05-20 02:57:03 -0600 )edit

@berak is another user of this forum who has more knowledge in this topic then me!, it was not a command for your ;)

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-20 03:08:01 -0600 )edit

And please do not re-edit editted remarks, I only want to make your code layout more clear! :)

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-20 03:10:31 -0600 )edit

Thank you very much! Could you teach me how to make the code highlight in this forum.

maizi gravatar imagemaizi ( 2014-05-20 03:44:28 -0600 )edit

Well normally in a post or answer you use the format button. As for comments, you need to apply these rules

  1. The rule above the code needs to be empty
  2. Each line of code needs 5 spaces in front
  3. At the end an empty line is needed before text follows

That will give you the result you want. As for numeration, start each line with a number and a dot after the 5 spaces.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-20 03:52:34 -0600 )edit
1

Thank you,I see.

maizi gravatar imagemaizi ( 2014-05-20 04:02:50 -0600 )edit

maizi, you are still trying to compile it, right ? not a runtime error. ?

i only got 2.4.5 here, but the opencv library is a *.jar not an .apk

you had to add the opencv library to your project before, check if you did the right thing there

berak gravatar imageberak ( 2014-05-20 06:35:55 -0600 )edit

If I use

 Mat dark_channel(Row,Cols,CV_8UC1);

It can't compile. But I can use

 Mat dark_channel=new Mat();

it can compile ,but the dark_channel is null! I think I have add the library(OpenCV library 2.4.8) into my project,because the other code is right for example I can put out the rows of Mat ,making a color picture gray.

maizi gravatar imagemaizi ( 2014-05-20 19:11:45 -0600 )edit