Ask Your Question

Jason - Like Imaging's profile - activity

2017-02-25 17:41:28 -0500 commented answer Fatal error detected on SVM

Been long time did not do anything with Java but need use it a bit lately, so will take a look after I pick up some Java.

2017-02-17 19:11:57 -0500 commented answer Fatal error detected on SVM

Change CvType.CV_32FC1 to CvType.CV_32S. Berak may give you more details.

2017-02-16 07:16:00 -0500 received badge  Enthusiast
2017-02-15 13:30:54 -0500 commented answer Image Alignment

My email: jshyou@gmail.com. I can send you a pair of feature images to see if they are helpful to you.

2017-02-14 20:27:39 -0500 answered a question problem with image rotate

The default interpolation is binear, Bicubic interpolation would give you better results but it will take a bit more processing time.

2017-02-14 20:21:58 -0500 answered a question Fatal error detected on SVM

I have C++ sample code from one moderator. The code only works in release mode. The data type of CV_32FC1 is not working for C++ either. Here include some code snippet:

Ptr<SVM> svm = SVM::create();
Mat tc;
trainingClasses.convertTo(tc, CV_32S);
svm->setType(SVM::C_SVC);
svm->setKernel(SVM::POLY);//CvSVM::RBF, CvSVM::LINEAR ...
svm->setTermCriteria(TermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 1000, 1e-6));
svm->setDegree(0.5); // for poly
svm->setGamma(1); // for poly/rbf/sigmoid
svm->setCoef0(0); // for poly/sigmoid

svm->setC(7); // for CV_SVM_C_SVC, CV_SVM_EPS_SVR and CV_SVM_NU_SVR
svm->setNu(0.5); // for CV_SVM_NU_SVC, CV_SVM_ONE_CLASS, and CV_SVM_NU_SVR
svm->setP(0.0); // for CV_SVM_EPS_SVR

Ptr<cv::ml::TrainData> t = TrainData::create(trainingData, SampleTypes::ROW_SAMPLE, tc);
cout << "SVM training ..." << endl;
svm->trainAuto(t);

I would guess there is certain serious issue in the implementation regarding the selection of parameters.

2017-02-14 19:51:03 -0500 commented answer Image Alignment

Thanks for uploading the images. Here is my procedure: 1. Convert the original images into a kind of feature images (I can send you the processed images). 2. The shift+rotation become more evident in feature images. 3. Use template matching plus certain variation minimization to find the best location.

From my experience with other types of image registration, this procedure would give you pixel-level accuracy.

2017-02-12 22:49:02 -0500 commented answer Image Alignment

I have done a lot of registration for medical images. I'd like to take a look at the images (scaled down, otherwise too big) to see if I can come up with any idea to help.

2017-01-27 09:46:23 -0500 commented question data format for using ML

Thanks, just ran your update, EM does not crash but gave me meaningless results. I used EM algorithm for medical image segmentation long time ago. May need take a detailed look to see how openCV implements the algorithm later. Busy today and will catch up with you later.

2017-01-26 16:38:45 -0500 commented question data format for using ML

LBerger, do you have working code for EM algorithm? If so please post it here. Thanks.

BTW, I'd like to post the code I tested but dont know where to publish them.

2017-01-26 09:34:24 -0500 commented question data format for using ML

With the sample code from LBerger, I think I have a much better understanding on how to setup the parameters in using ML methods. Also I came up with a very nice package to demonstrate the results for different test data generated for verifying the classification capability of several methods.

Again many thanks go to LBerger.

2017-01-25 14:13:06 -0500 commented question data format for using ML

Latest release 3.2.0. I am exercising these methods and plan to post my sample code later. If you are interested, I can send you my current version. The code is based on the sample from bytefish.

2017-01-25 13:48:29 -0500 asked a question data format for using ML

I have been evaluating the machine learning methods in openCV. So far I got 4 (mlp, knn, svm and bayes) working. Interestingly, svm and bayes require the training lable matrix to be in format of CV_32SC1, mlp and knn need the training labe matrix in the format of CV_32FC1. Otherwise train() would crash.

It would be great if anyone can post the data formats for other methods decision tree, etc.

Thanks