Ask Your Question

rainY's profile - activity

2018-08-29 20:40:17 -0600 commented question face recognize occur error in execute train method.

@holger Database image size is no problem.This database I got from AT&T Facedatabase . And,The train method needs

2018-08-29 04:41:02 -0600 marked best answer FaceRecognizer Parameter problem of the train method

Android project environment!

I see the official example, the two parameters passed in are vector< Mat> images and vector< int> labels;
code below:

vector<Mat> images;   
vector<int> labels;
// Read in the data (fails if no valid input filename is given, but you'll get an error message):
try {
    read_csv(fn_csv, images, labels);
} catch (cv::Exception& e) {
    cerr << "Error opening file \"" << fn_csv << "\". Reason: " << e.msg << endl;
    // nothing more we can do
    exit(1);
}
// Get the height from the first image. We'll need this
// later in code to reshape the images to their original
// size AND we need to reshape incoming faces to this size:
int im_width = images[0].cols;
int im_height = images[0].rows;
// Create a FaceRecognizer and train it on the given images:
Ptr<FisherFaceRecognizer> model = FisherFaceRecognizer::create();
model->train(images, labels);

But in my compiled Opencv4Android library, the definition of the train method is like this.

//
// C++:  void cv::face::FaceRecognizer::train(vector_Mat src, Mat labels)
//
//javadoc: FaceRecognizer::train(src, labels)
public  void train(List<Mat> src, Mat labels)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    train_0(nativeObj, src_mat.nativeObj, labels.nativeObj);

    return;
}

Why does the second argument of the train method become Mat, shouldn't it be a collection of 'int'?

2018-08-29 04:38:43 -0600 marked best answer how to convert int array to mat in android?

how to convert int array to Mat in android?

2018-08-29 04:38:43 -0600 received badge  Scholar (source)
2018-08-29 04:37:42 -0600 asked a question face recognize occur error in execute train method.

face recognize occur error in execute train method. detail code : private LoaderCallbackInterface mLoaderCallback = new

2018-08-28 05:24:34 -0600 commented answer how to convert int array to mat in android?

thanks , let me try.

2018-08-28 05:14:00 -0600 asked a question how to convert int array to mat in android?

how to convert int array to mat in android? how to convert int array to Mat in android?

2018-08-27 21:58:08 -0600 commented answer opencv c++ equivalent for arraylist in java

@berak how convert arraylist<integer> to Mat ??

2018-08-26 07:21:13 -0600 commented answer FaceRecognizer Parameter problem of the train method

@berak how to convert vector<int> to Mat in java ? Can you give me a code sample ?

2018-08-24 04:25:53 -0600 commented question FaceRecognizer Parameter problem of the train method

@berak help please.

2018-08-24 04:24:34 -0600 asked a question FaceRecognizer Parameter problem of the train method

FaceRecognizer Parameter problem of the train method Android project environment! I see the official example, the

2018-08-17 06:57:36 -0600 marked best answer Run the official face-detection sample and find the problem

System information (version)

OpenCV => 3.4

Operating System / Platform => Android

Compiler => cmake

Detailed description

Run the official face-detection sample and find that the value detected by the face is incorrect. It is clear that the current screen has no face, but the detected rectangular frame is still displayed.

code segment

 mJavaDetector.detectMultiScale(mGray, faces, 1.1, 2, 2, // TODO: objdetect.CV_HAAR_SCALE_IMAGE
                new Size(mAbsoluteFaceSize, mAbsoluteFaceSize), new Size());
  Rect[] facesArray = faces.toArray();
for (int i = 0; i < facesArray.length; i++)
    Imgproc.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(), FACE_RECT_COLOR, 3);
2018-08-16 22:02:15 -0600 commented answer Run the official face-detection sample and find the problem

@berak My problem is that the current frame has no face, but it detects the "face"

2018-08-16 21:51:03 -0600 commented answer Run the official face-detection sample and find the problem

@berak I don't understand what you mean.

2018-08-16 21:49:19 -0600 commented answer Run the official face-detection sample and find the problem

@berak minNeighbours I have already set it up, but there is still a problem

2018-08-16 05:12:14 -0600 commented question Run the official face-detection sample and find the problem

used haarcascade_frontalface_default

2018-08-16 05:11:46 -0600 asked a question Run the official face-detection sample and find the problem

Run the official face-detection sample and find the problem System information (version) OpenCV => 3.4 Operatin

2018-08-02 02:09:23 -0600 received badge  Enthusiast
2018-08-01 02:43:08 -0600 commented question Tracking direction is reversed in front Camera mode

@berak in front mode ,i try to use Core.flip(Mat src, Mat dst, int flipCode) ,and flipCode select 1(1>0).then, mTra

2018-08-01 02:23:10 -0600 commented question Tracking direction is reversed in front Camera mode

@berak isUpdate = mTracker.update(mSrcMat, mSelectArea); Log.e("rain", "run: -- isUpdate = "+isUpdate+"--"+mSelectAre

2018-08-01 02:08:01 -0600 asked a question Tracking direction is reversed in front Camera mode

Tracking direction is reversed in front Camera mode when i use tracker to track object. in back Camera mode,The trac

2018-07-27 04:15:49 -0600 commented question Where to place the pretrained data for GOTURN tracker

@berak OK, Do you know this question?

2018-07-27 04:14:24 -0600 commented question Where to place the pretrained data for GOTURN tracker

@berak OK

2018-07-27 03:22:00 -0600 answered a question Where to place the pretrained data for GOTURN tracker

Where to place the pretrained data for GOTURN tracker in Android project? @nrparikh @00Zetti

2018-07-27 03:05:41 -0600 commented question opencv Tracker is too slow in high revolution!

I try medianflow. Occur this issue . app crash in TrackerMedianFlow

2018-07-27 03:03:16 -0600 commented question When target dismiss app crash in TrackerMedianFlow Tracking mode

@berak I try TrackerMedianFlow algorithm At high resolution, its frame rate meets my requirements.But, when the target t

2018-07-27 02:47:06 -0600 commented question Occur crash when used TrackerGOTURN in Android

ok thanks

2018-07-27 02:40:29 -0600 asked a question When target dismiss app crash in TrackerMedianFlow Tracking mode

When target dismiss app crash in TrackerMedianFlow Tracking mode crash info below: --------- beginning of crash 07-27

2018-07-27 02:00:01 -0600 commented question Occur crash when used TrackerGOTURN in Android

@berak Where is model/prototxt? I didn't see it in my o4a/install dir.

2018-07-27 01:31:44 -0600 asked a question Occur crash when used TrackerGOTURN in Android

Occur crash when used TrackerGOTURN in Android CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.2-de

2018-07-26 20:58:14 -0600 commented question opencv Tracker is too slow in high revolution!

@berak Did your conclusion be tested with this code? Tracking sample Is fps too low or not caused by VideoCapture? My d

2018-07-26 20:51:12 -0600 commented question opencv Tracker is too slow in high revolution!

@Eduardo "Try to resize your image to a lower resolution, perform the tracking at this scale and update the bounding bo

2018-07-26 20:49:19 -0600 commented question opencv Tracker is too slow in high revolution!

@sturkmen Track anything,I only need to specify a region to track which area I am delineating.

2018-07-26 05:58:29 -0600 commented question opencv Tracker is too slow in high revolution!

@berak Is there any other solution?

2018-07-26 05:36:46 -0600 commented question opencv Tracker is too slow in high revolution!

hi berak, I closed the issue new . But I have tried the algorithms you mentioned, I found that the KCF effect is the bes

2018-07-26 05:29:53 -0600 asked a question opencv Tracker is too slow in high revolution!

opencv Tracker is too slow in high revolution! System information (version) OpenCV => 3.4.2: Operating System /