Ask Your Question

Bia6969's profile - activity

2020-10-26 10:53:27 -0600 received badge  Good Question (source)
2020-09-18 14:02:40 -0600 received badge  Nice Question (source)
2018-08-06 08:12:45 -0600 received badge  Popular Question (source)
2018-06-16 04:13:23 -0600 received badge  Popular Question (source)
2016-08-30 11:53:54 -0600 received badge  Favorite Question (source)
2016-04-26 06:28:01 -0600 received badge  Popular Question (source)
2016-02-12 06:32:04 -0600 received badge  Nice Question (source)
2015-03-30 13:49:37 -0600 received badge  Popular Question (source)
2014-12-09 13:44:00 -0600 marked best answer Android: Highgui.imread Help

(Android emulator + OpenCV)

I'm using the android camera app to take a picture. I am successfully able to get the newly taken picture bitmap and display it:

Bitmap theImage = (Bitmap) data.getExtras().get("data");

but now i need to get an Mat out of the picture. For that, i've been using a simple line:

Mat a = Highgui.imread("data");

I've testing it and it is always empty! How can i reach the picture then? Reaching a gallery photo would be fine as well but i don't know how.

Thanks

2014-12-09 13:43:52 -0600 marked best answer Android + Opencv Samples

Hi everyone!

I was trying to run opencv+android samples and here's the thing: the emulator opens just fine, the layout goes to landscape and nothing happens on that black screen.

It this the correct output? What i am doing wrong? If you could elucidate me, it would be fantastic.

Thank you in advance :)

2014-12-09 13:43:44 -0600 marked best answer Android : Native OpenCV

When we are programing for Android and we want to use Opencv in the native code, the api for calling the Opencv structures and methods isn't the same used by c++ for Opencv for Linux,is it? Because i've been trying to compile a cpp (native) file based on one detect.cpp file which i used back when i was running opencv on ubuntu.

Any insight would be welcome. Thanks!

2014-12-09 13:05:54 -0600 marked best answer Android: Native Opencv - cvtColor segfault

I want to pass a newly taken picture by android camera app to my native part so i can run my object detector over it.

What i've done is, on java code, getting the picture through this: Mat original = Highgui.imread("data");

I've also created two more Mat to pass to the native code as well. I pass the Mat's getNativeObjAddr() and everything works.

The problem is, after i get the arguments (over to the cpp native code) i pass two Mat (original and gray) to cv::InputArray and cv::OutputArray, accordingly, but cvtColor(original(InputArra), gray(OutputArray), CV_BGR2GRAY, 0) gives a segfault and the app closes.

Is this NOT the best way to pass images to native part? Am i doing something wrong? Do you have any suggestion? Please, speak your mind :)

2014-12-03 06:39:17 -0600 received badge  Nice Question (source)
2014-03-18 05:56:15 -0600 received badge  Famous Question (source)
2013-12-06 08:02:32 -0600 marked best answer cascade.xml in Android APK

Hi!! I've finished my object detection android app and i want to run it on a real device. My problem is: the access to the cascade.xml file has been done through a virtual sdcard, i mean, i created a virtual sd card and pushed the xml file into it so the access to it was a simple line on the native code part:

 std::string cascade_name= "sdcard/cascade.xml";

On a real device i don't want to copy the file into the sdcard, i want it to be included on the apk. To do that, i've copied the file into the assets folder. The question is, how do i access it from the native code?

std::string cascade_name= "assets/cascade.xml";

I tried this but nothing happened which makes me think it's not the right path to assets folder. SO where's the right folder in which i should put cascade.xml ?

Any help would be appreciated, Thanks!

2013-08-12 09:19:39 -0600 received badge  Taxonomist
2013-06-04 14:19:07 -0600 received badge  Notable Question (source)
2013-05-08 13:44:17 -0600 marked best answer Android: install Opencv Manager Package

I'm trying to get the opencv-android samples to run. When i try to run the app (ex: puzzle 15), it says i need to install Opencv Manager package. It doesn't sound anything too difficult but that's all it's said all over the Internet: "Install it."

How do i install it?

2013-03-15 23:23:09 -0600 received badge  Popular Question (source)
2013-01-29 08:07:44 -0600 marked best answer Improve Object Detection Quality

I have a few basic questions regarding the object detection available on OpenCV.

  1. I is said all over the internet that a good positive folder is a huge step of the traincascade process: good images may lead to good results. My question is: is there an optimal resolution this positive images should have?

  2. About the negative folder, most times people say "random images not containing the object you want to recognize". Well, should i put images of other trained objects? Or should i put ridiculous images like forests and stuff? I'm a little lost regarding the contents of this folder..

  3. When i create the vector, what importance has the size you pick? The bigger w and h parameters, the better? I doesn't really matter? I always put 32, but truth is i've tried with -w 50 -h 50 and it gave out a better result.

  4. About groupRectangles(..) : what should the second and third arguments be? I guess if i use this function to try to reduce some redundant rectangles, i will DISABLE the possibility of identifying two of the same object on the same picture, right?

2013-01-08 03:09:59 -0600 marked best answer Haartraining vs Traincascade : Object Detection

Hello!

I wanted to do an app that was able, through a picture, to recognize staplers. I've done a quick search and i went with Haartraining. (Not sure if it was the right choice! Comments?) The thing is, i've only trained the classifier with few positive and negative examples (46 and 30) and as far as i understand, it's recommended to have at least a 1000 of each. The quantity it self ain't a problem, but i hear it takes about a day to run haartraining when you have that amount of pictures.

Then, i thought: maybe traincascade would be a better choice! Now i'm all confused..

Please, let me hear what YOU THINK :D Thanks in advance.