Ask Your Question

VoidMee's profile - activity

2016-01-27 14:08:03 -0500 received badge  Notable Question (source)
2015-09-05 14:51:48 -0500 received badge  Student (source)
2015-06-01 14:14:13 -0500 received badge  Popular Question (source)
2013-08-29 03:10:31 -0500 commented question error while using load() of boost classifier

I have read a sample code from opencv in samples directory. there was a "" file which was used to recognize 26 letters (specified by class_n = 25) so I implementated it. Have I done wrong here?? or I misunderstood it?

2013-08-29 01:47:59 -0500 asked a question error while using load() of boost classifier

I have done a training using Boost with max_depth of 5 and all other parameters as default. I have chosen 16 feature and 3 output class for training

Since, there was no error during training and saving file in .xml file I think I have done right till this point. But I want to load that xml file so I call the opencv-python load operation:

boost = cv2.Boost()

This generates the following: error: ......\src\opencv\modules\ml\src\tree.cpp:3945: error: (-212) Either 'in' or 'not_in' tags should be inside a categorical split data in function CvDTree::read_split

So, what did I did wrong? How can I load the file successfully to use the trained model?

Please ask if this information was incomplete

2013-08-28 22:44:59 -0500 asked a question error while saving cvboost classifier

I am trying to use cvBoost classifier for detecting different posture of hand. I think I successfully completed the training process with this Boost for some sample data.

But, when I tried to save this classifier it gives the following error: error: (-5) The classifier has not been trained yet in function CvBoost::write

How did this error was generated? And, how would I safely save my classifier

2013-08-19 05:57:52 -0500 asked a question CvANN_MLP::save asking for permission

Hello, I want to same values of my neural network into my .xml file. But, while saving its asking for permission

I have tried with Administrator privilege but also not working. But, the save file works well in Python interpreter

filepath = "./data/neuralnetwork.xml"

Error: Could not open the file storage. Check the path and permissions in function CvStatModel::save

2013-08-17 20:29:45 -0500 commented answer feeding feature vector from surf detector in neural network

yes, what should I do for those input values of an image before feed in to my ANN because I think for every single image there should be only one set of input values (feature vectors), isn't it

2013-08-17 09:35:40 -0500 commented answer feeding feature vector from surf detector in neural network

Also I didn't get how to limit the feature vectors to a standard size. So, can you please help me how to do this?

2013-08-17 09:33:34 -0500 commented answer feeding feature vector from surf detector in neural network

I think in the above try out, the feature vector extracted for each image is "multidimensional" with "no. of rows varying but no. of cols always fixed which is 128". I created an ANN of 128 input nodes. Because for each image, I have more than one such input values how do I feed them.

2013-08-17 00:19:23 -0500 asked a question feeding feature vector from surf detector in neural network

I want to implement Surf feature detector in neural network with python version of opencv.

What I did?

#surf feature detector
detector = cv2.SURF(400, 5, 5)

#feature detection
k1, d1 = detector.detectAndCompute(img1, None)
k2, d2 = detector.detectAndCompute(img2, None)

#shape of feature vectors
#d1 : 119 x 128
#d2 : 129 x 128

#neural network creation
nn = cv2.ANN_MLP(np.array([128, 128, 128, 4]), cv2.ANN_MLP_SIGMOID_SYM)

Now, I don't know how to use this varying number of rows in feature vector for different images.Also, do I have to normalize the feature vector before feeding into the neural network?

2013-08-16 10:04:08 -0500 commented answer how to recognize different postures of hand

Thank you very much for your such an illustrated answer.

Regarding feature vector, is the descriptor or keypoints that we take as training data.

And, for each image the extractor extracts multidimensional data. so how to feed this multidimensional data each row of 128 long vector with 128 input nodes in input layer.

2013-08-15 11:41:07 -0500 asked a question how to use feature vectors in CvANN_MLP

Hi, I am trying to use SURF features from images into my Neural Network provided by the opencv library. But, I've got some confusion in it.

As in Neural Network I have fixed set of input nodes in the input layer but numbers of features extracted from SURF are not fixed.So, my question is:

How do I feed these feature values into my NN and also is descriptor values is what we feed into our NN?

Suppose I have created a NN with 10 input nodes and 4 output nodes with 2 hidden layers of 10 nodes. How do I feed the values into the input nodes

Thanks in advance, for reducing my confusion

2013-08-14 01:49:09 -0500 asked a question how to recognize different postures of hand

Hello, I want to train and recogninze three postures of hand using neural network in Opencv. So, I have many question regarding it:

  1. (High Priority) Is it better to use Neural Network Machine Learning Library or create Haar Classifier for this kind of problem?
  2. What does the feature vector mean in ANN_MLP::train function and how to calculate these features?
  3. How to put features from multiple images in this ANN_MLP?

Thank you very much, a lot!

2013-07-28 07:37:24 -0500 commented answer backgroundsubtractormog with python

thanx, really appreciated your help. what a silly thing I did not know. :)

2013-07-28 06:39:21 -0500 asked a question backgroundsubtractormog with python

Hello, I want to use backgroundsubtractormog with python so my code is this

import cv2
import numpy as np

winname = "GRS"

bgs_mog = cv2.BackgroundSubtractorMOG(500, 6, 0.9, 1)

capture = cv2.VideoCapture(0)

frame =[1]

if __name__ == "__main__":
    while frame != None:
        #fgmask = bgs_mog.apply(frame)
        cv2.imshow(winname, frame)
        c = cv2.waitKey(1)
        if c == 27:
        frame =[1]

The output I am having is some mask of binary images. But I want only coloured image of moving objects. I do not know how to implement this mask to get the coloured image of moving objects only. I have referred the opencv2refman doc about this function but I am no getting clear about how to determine the parameters for mog constructor. Can somebody explain how to do this, Plz. Thanks

2013-07-18 05:58:07 -0500 asked a question different features that can be used to track

Hello, I want to track some object. I have used backprojection of histogram. Besides that what are other techniques that I can use to track my object. My ROI of interest can be of any shape.Still Can I use corner detector functions. Also, I want this to be rotation and scaling invariant using opencv python Would you please suggest me some ideas


2013-07-06 08:38:01 -0500 commented answer opencv_traincascade not working with cvhaardetectobject in python

the function just needs path to classifier and returns the classifier object which i can keep in any new identifier, python is a dynamic language so i can assign the returned value to any variable

2013-07-06 05:05:02 -0500 commented answer opencv_traincascade not working with cvhaardetectobject in python

ok, simply to load my classifier I use this code:

import as cv


Which works fine for cascade file created by opencv_haartraining but genereates the above error with file created by opencv_traincascade

2013-07-04 19:55:09 -0500 commented answer opencv_traincascade not working with cvhaardetectobject in python

I have tried using new version of opencv 2.4.6. I simply copied cv2.pyd file to mydirectory : python27/lib/site-packages and again failed to run my program at the same error point. Is that a bug or can I send you my cascade file? Help

2013-07-04 08:39:34 -0500 commented answer opencv_traincascade not working with cvhaardetectobject in python

ok let me try this , thanx for replying, really appreciate your help

2013-07-04 07:53:20 -0500 commented answer opencv_traincascade not working with cvhaardetectobject in python

I have used the output cascade.xml directly into my program. Do I have to modify something in between? Please help

2013-07-04 07:33:10 -0500 commented answer opencv_traincascade not working with cvhaardetectobject in python

Sorry to say but I didn't understand what is new or old xml structure. How can I check my version of xml structure?

2013-07-04 07:03:12 -0500 commented answer opencv_traincascade not working with cvhaardetectobject in python

sorry, but i have used cascade.xml too but it doesn't work out

2013-07-04 04:03:38 -0500 asked a question opencv_traincascade not working with cvhaardetectobject in python

Hello, I am doing training using opencv_traincascade. I tried to use the output file at stage 16 do detect object using opencv 2.4.3. When I load my classifier in cvHaarDetectObjet, this gave me output error:

"The node does not represent a user object (unknown type?)"

I tried the classifier output of opencv_haartraining but it worked. I am using Python 2.7.3 32-bit

2013-06-30 05:52:03 -0500 asked a question is opencv_traincascade runnable using cluster computing

Hello, I want to do training using opencv_traincascade. As it is taking long time so, Is the algorithm is parallelized so that I can do faster training using cluster computing

2013-06-29 05:53:57 -0500 asked a question speeding haar training


I have tried haar training on my single pc.But it is taking a whole lot of time. I am at Stage 3 and though the training is going on since 3 days but the cursor is still blinking on 0% that means it may take a month to finish this stage.

I have also read that on a research paper that training for the robust face took 24 hrs in 30+ clusters. Is that so, how can I do training faster way? or, is there some useful utility in opencv for running this application in cluster?? I have took 4925 negative samples and 2462 positive samples. Regards

2013-06-29 05:40:36 -0500 commented question How to detecting multiple objects

Hello, briefly explaining, my problem is to detect hand and I want to detect multiple hand postures. I have heard of HAAR training but doesn't it applied for a single object??. Say, for only one hand posture. If not how can I do with it for multiple hand postures . Also, that detection should be fast. Can you please help me which will be the best method?Hoping your reply soon


2013-06-26 04:20:33 -0500 answered a question generating classifier during training

Really, Need a help. The training is not progressing

2013-06-26 04:04:25 -0500 asked a question How to detecting multiple objects

Hello, My problem is to detect multiple object types at the same type. Like classifier for face detection it only detects face at a time. But, I want to know how to detect multiple objects at the same time. Help!!

2013-06-24 01:55:35 -0500 received badge  Editor (source)
2013-06-22 21:51:37 -0500 received badge  Supporter (source)
2013-06-22 21:48:15 -0500 commented answer error while loading haar classifier

thanx a lot, but can you tell how to know my how much my Max_false_alarm_rate should be

2013-06-22 20:58:09 -0500 asked a question generating classifier during training

Hello, again! I've heard that opencv_haartraining is going to be obsolette( Am I right? ) so I preferred using opencv_traincasscade. I am on a training and now I'm at stage 17 but this is taking a whole lot of time. So, I want to generate a workable classifier at this stage. Is there any way to get this done? Need a help

2013-06-20 12:27:51 -0500 asked a question error while loading haar classifier

HHello, I want to use haar cascade to detect a object. So I collected large image dataset. At first I created a classifier for less stage, which correctly creaed a classifier file. But when I load this classifier the process stops at the current step of loading classifier. The program smoothly runs when given another xml classifier. Look:

C:\TrainingDatas>opencv_haartraining -data haarcascade -vec myvec.vec -bg negatives.txt -npos 2726 -nneg 4925 -nstages 3 Data dir name: haarcascade Vec file name: myvec.vec BG file name: negatives.txt, is a vecfile: no Num pos: 2726 Num neg: 4925 Num stages: 3 Num splits: 1 (stump as weak classifier) Mem: 200 MB Symmetric: TRUE Min hit rate: 0.995000 Max false alarm rate: 0.500000 Weight trimming: 0.950000 Equal weights: FALSE Mode: BASIC Width: 24 Height: 24 Applied boosting algorithm: GAB Error (valid only for Discrete and Real AdaBoost): misclass Max number of splits in tree cascade: 0 Min number of positive samples per cluster: 500 Required leaf false alarm rate: 0.125

Tree Classifier Stage +---+ | 0| +---+

Number of features used : 85848

Parent node: NULL

* 1 cluster * POS: 2726 2726 1.000000 NEG: 4925 1 BACKGROUND PROCESSING TIME: 0.48 Precalculation time: 0.69 +----+----+-+---------+---------+---------+---------+ | N |%SMP|F| ST.THR | HR | FA | EXP. ERR| +----+----+-+---------+---------+---------+---------+ | 1|100%|-|-0.619577| 1.000000| 1.000000| 0.147955| +----+----+-+---------+---------+---------+---------+ | 2|100%|+|-0.786546| 1.000000| 1.000000| 0.147955| +----+----+-+---------+---------+---------+---------+ | 3|100%|-|-1.135068| 1.000000| 1.000000| 0.147170| +----+----+-+---------+---------+---------+---------+ | 4| 89%|+|-1.409561| 1.000000| 1.000000| 0.108744| +----+----+-+---------+---------+---------+---------+ | 5| 92%|-|-1.841712| 1.000000| 1.000000| 0.110574| +----+----+-+---------+---------+---------+---------+ | 6| 89%|+|-1.445023| 0.998899| 0.682234| 0.107568| +----+----+-+---------+---------+---------+---------+ | 7| 93%|-|-1.126912| 0.995965| 0.332183| 0.073454| +----+----+-+---------+---------+---------+---------+ Stage training time: 1973.78 Number of used features: 7

Parent node: NULL Chosen number of splits: 0

Total number of splits: 0

Tree Classifier Stage +---+ | 0| +---+


Parent node: 0

* 1 cluster * POS: 2715 2726 0.995965 NEG: 4905 0.338579 BACKGROUND PROCESSING TIME: 1.20 Precalculation time: 0.73 +----+----+-+---------+---------+---------+---------+ | N |%SMP|F| ST.THR | HR | FA | EXP. ERR| +----+----+-+---------+---------+---------+---------+ | 1|100%|-|-0.547500| 1.000000| 1.000000| 0.181627| +----+----+-+---------+---------+---------+---------+ | 2|100%|+|-0.656821| 1.000000| 1.000000| 0.181627| +----+----+-+---------+---------+---------+---------+ | 3|100%|-|-1.274177| 1.000000| 1.000000| 0.139764| +----+----+-+---------+---------+---------+---------+ | 4|100%|+|-1.660406| 1.000000| 1.000000| 0.158661| +----+----+-+---------+---------+---------+---------+ | 5|100%|-|-1.263998| 0.996317| 0.657085| 0.112467| +----+----+-+---------+---------+---------+---------+ | 6| 77%|+|-1.326653| 0.997422| 0.639551| 0.118110| +----+----+-+---------+---------+---------+---------+ | 7| 80%|-|-1.121162| 0.995212| 0.496228| 0.103018| +----+----+-+---------+---------+---------+---------+ Stage training time: 1953.28 Number of used features: 7

Parent node: 0 Chosen number of splits: 0

Total number of splits: 0

Tree Classifier Stage +---+---+ | 0| 1| +---+---+


Parent node: 1

* 1 cluster * POS: 2702 2726 0.991196 NEG: 4881 0.178935 BACKGROUND PROCESSING TIME: 1.05 Precalculation time: 0.48 +----+----+-+---------+---------+---------+---------+ | N |%SMP|F| ST.THR | HR | FA | EXP. ERR| +----+----+-+---------+---------+---------+---------+ | 1|100%|-|-0.502708| 1.000000| 1.000000| 0.202690| +----+----+-+---------+---------+---------+---------+ | 2|100%|+|-0.419535| 0.997039| 0.871543| 0.193987| +----+----+-+---------+---------+---------+---------+ | 3| 91%|-|-1.223766| 1 ... (more)