Ask Your Question

wytmoon's profile - activity

2015-06-19 08:52:15 -0600 received badge  Famous Question (source)
2015-01-02 07:32:32 -0600 received badge  Famous Question (source)
2014-05-19 03:10:22 -0600 received badge  Notable Question (source)
2014-02-20 12:00:39 -0600 received badge  Popular Question (source)
2014-01-10 08:07:48 -0600 received badge  Notable Question (source)
2013-12-04 09:55:05 -0600 received badge  Student (source)
2013-08-30 20:52:34 -0600 received badge  Popular Question (source)
2013-06-29 14:49:14 -0600 received badge  Teacher (source)
2013-04-08 19:08:04 -0600 received badge  Scholar (source)
2013-04-08 02:10:34 -0600 received badge  Self-Learner (source)
2013-04-08 00:44:30 -0600 answered a question How to replace a certain ROI with another image?

I did it! Found a similar topic in this discussion thread.

Basically my original code above should work. The reason it didn't was because of size constraints. It turns out that the image I am trying to overlay is bigger than my background image. So I used Imgproc.resize(Mat, Mat, Size) to make it smaller.

Thanks again to everyone who answered!
Big thanks to Steven for being so prompt and understanding! :)

2013-04-04 18:59:43 -0600 commented answer How to replace a certain ROI with another image?

Thanks for the posting advice. This may sound pretty stubborn of me but wouldn't your code snippet above be the same as

 replaceImage.copyTo( capturedImage.submat( mDetectedFace ) );

I'm saying this because in Java I can't do

 capturedImage( mDetectedFace );

By the way, how do I insert preformatted code snippets in a comment? Sorry if this fact should be a dead give a way already.

2013-04-04 03:59:24 -0600 commented answer How to replace a certain ROI with another image?

Thanks for the quick reply Steven but I think that's what I have been doing.

 Mat capturedImage = Highgui.imread(<path/to/captured/image>)
 Mat selectedArea = capturedImage.submat(mDetectedFace) //mDetectedFace is a Rect object
 Mat replaceImage = Highgui.imread(<path/to/replacement/image>)

 replaceImage.copyTo(selectedArea);
 Highgui.imwrite(<path/to/save/directory>, capturedImage)

But nothing happens. The picture is as it is. The replacement image was not copied to the selected area.

2013-04-04 01:45:02 -0600 asked a question How to replace a certain ROI with another image?

Hello,

I am making a simple app that was built from the face detection sample of the OpenCv4Android SDK. Basically my goal is to overlay or replace the detected face with another image like a smiley or a face of a dog, etc.

I tried to use copyTo(Mat dest) where dest is a submat of the entire image (basically the detected face region) and the Mat from which copyTo is called is the image to overlay or replace. This doesn't work though.

Can someone provide alternatives? Or maybe my understanding of copyTo is wrong? Hoping for some advice. Thanks and best regards,


CODE THAT I USE - for clarity -

Mat capturedImage = Highgui.imread(<path/to/captured/image>) 
Mat selectedArea = capturedImage.submat(mDetectedFace) //mDetectedFace is a Rect object 
Mat replaceImage = Highgui.imread(<path/to/replacement/image>)

replaceImage.copyTo(selectedArea); 
Highgui.imwrite(<path/to/save/directory>, capturedImage)
2013-03-27 19:18:56 -0600 commented answer How to generate HAAR cascade xml file for finger detection

Yikes... sorry about that. I guess I relied too much on this forum that I didn't even try searching using Google. Really appreciate the link though and I will try to exhaust all other resources first before posting a question here. Once again, sorry for the very noob action there.

2013-03-26 02:35:17 -0600 asked a question How to generate HAAR cascade xml file for finger detection

Hello there,

I'm trying to make a simple Android Camera app that integrates OpenCV Library to detect human fingers. Eventually, I would want that app to grow and support Camera detected hand gestures. But first I need to understand how to create my own HAAR cascade xml file for finger detection. I found this list of steps to do but I have the slightest idea where to start and what exactly to prepare and do. Can someone give advice?

Btw, the steps I mentioned above are as follows :
1. Creating the description file of positive samples
2. Creating the description file of negative samples
3. Packing the positive samples into a vec file
4. Training the classifier
5. Converting the trained cascade into a xml file
6. Using the xml file to detect the object

2013-03-22 03:18:22 -0600 commented answer Explanation of cascade.xml in a haar classifier

Thanks for your feedback but I think you are referring to LBP and not HAAR classifier

2013-03-22 03:13:39 -0600 received badge  Supporter (source)
2013-03-21 19:20:16 -0600 commented answer opencv in android-x86

Thanks for the link to the Android Development tutorial Andrey Pavlenko. Unfortunately this is not what I was looking for. Let me rephrase my question to make it clearer. In the Object Detection Cascade Classifier tutorial (http://docs.opencv.org/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html#cascade-classifier), objdetect.hpp along with two other files were included. My question is, these files are not in Android-x86's JBx86 /external/opencv directory so how do I use Cascade Classifier? Does this also mean that /external/opencv in JBx86 is different from OpenCV 2.4.4 for Android? Should I place the OpenCV-2.4.4-android-sdk in /packages/apps instead?

2013-03-21 03:34:41 -0600 received badge  Editor (source)
2013-03-21 02:43:01 -0600 asked a question opencv in android-x86

Hi!

I'm trying to implement object detection for Android-x86's JB-x86 Camera app. I found opencv in /external/opencv but I have no idea how to use it for the Camera app. Can someone provide advice?

Thanks,