Ask Your Question

ART's profile - activity

2018-03-06 14:19:44 -0500 received badge  Popular Question (source)
2014-03-19 08:41:24 -0500 asked a question Motion Detection Detecting the motion of BOlbs and Extracting

HI All,

I am currently working on motion detection . I have done two different approaches

  1. frame Difference using cvAbsdiff(prev,curr,diff) and then drawing the contours on the images and extracting the motion frames based on the contourArea. It is was not good that when small motion contours are not represented properly even when there is some motion.

2. Background subtraction using BackgroundSubtractorMOG2 I'm following http://answers.opencv.org/question/15988/how-to-do-background-substraction/ this approach .

My Issue is : 1.How to Identify the Blobs using OpenCV .I have tried using cvFindContours(Image, storage, contours, Loader.sizeof(CvContour.class),CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);

it was drawing contours only on the parts of the image and not on the entire images.

Should I need to Do this by using HOG or any other classifiers or by any method.

I have even gone through the optical flow approach for motion detection.

Which among the three approaches the motion detection(ImgDiff,optical flow and backgroundsubtraction) can be achieved properly and suggest me with some tutorials to work with them.

Any help is appreciated.

Thanks.

2014-02-22 05:26:10 -0500 commented answer Need Suggestion for Detecting

Traincascade.exe is not working in my case i.e., can you tell me by using which version of opencv you have build the Traincascade ??? and it is getting aborted after 0 stage.

2014-02-22 05:16:15 -0500 asked a question License Plate Segmentation Problem

Hi All, I'm working on ANPR ..gone through the book of mastering opencv with practicals.

For plate detection in the book, it is considered only for plates of Spain based on plate width , height and aspect ratio. how can we get the plate detection to do done irrespective of width and other parameters. can anyone suggest me with solution for my problem or guide with any tutorial or papers . I am now doing find contours on the plate like contours and performing conditions based on aspect ratio, width and height to grab the license plate. Any suggestions greatly appreciated.

Thanks

2014-02-19 06:15:19 -0500 commented answer Need Suggestion for Detecting

Hi Median, I still facing problem with train cascade training. if you are done.can you suggest me how to build traincascade.exe i guess i am missing out there and can you tell me the version of opencv your using?? Thanks in advance.

2014-02-19 05:51:17 -0500 commented question Problems with Traincascade: A Practical Problem

Hi Median, did you get training done with traincascade?? if yes , can you guide how?? thanks

2014-02-19 00:57:17 -0500 commented answer OpenCV traincascade fails: Insufficient memory

Hi Abhishek, i am trying to create traincasade.exe but it is throwing Debug Assertion Failed! in msvisualstudio \xString line :1143 expression :invalid null pointer . and can you tell me which version of opencv are using ?? and what is the size of .exe ???

2014-02-18 07:49:10 -0500 commented question Debug Assertion Failed: trouble with traincascade.exe after creating

HI sander, Did you resolve your problem ?? coz even i am getting the same. Help me if your done with the problem.. thanks

2014-02-18 05:59:34 -0500 commented question How to use the cascade.xml generated by traincascade.exe to detect object

Hi cv_new, which version of opencv are using?? and what is the size of opencv_traincascade.exe that is created ?? thanks

2014-02-17 01:58:29 -0500 commented question Licence plate detection with different backgrounds

Hi , can you please tell me that after drawing the contours on the image .how did you extract the plate . I am even following the Mastering Opencv text book . but got stucked how to crop the plate. Thanks in advance.

2014-02-13 00:46:01 -0500 commented answer What should the parameters given for the haartrainig to be a success?

Hi , when i am training the xml using traincascade i am facing an opencv error: Here is the link to my OpenCV error:

http://answers.opencv.org/question/28144/need-help-on-traincascade-usage-of-mine/ can you please look in to it Thanks.

2014-02-12 05:05:56 -0500 commented answer Need help on trainCascade usage of mine

Hi steven, What could be the reason for the opencv error persistence.cpp. I am not getting any info about that . and thanks for ur suggestions.

2014-02-12 00:27:26 -0500 commented question opencv_traincascade crash without explanation

@taktak004 got ur training started without any issues??

2014-02-11 08:39:04 -0500 commented answer Need help on trainCascade usage of mine

Nope ,i didnt make any limits to the memory .

2014-02-11 08:14:41 -0500 commented answer Need help on trainCascade usage of mine

for the command: TrainCascade.exe -data classifier/ -vec data\posivec.vec -bg bg.txt -numStages 20 -minHitRate 0.1 -maxFalseAlarmRate 0.1 -numPos 30 -numNeg 500 -w 24 -h 48 -mode ALL -precalcValBufSize 64 -precalcIdxBufSize 64

It is Throwing OpenCV Error: Unspecified error (Invalid fs.state) in unknown function, file ......\src\opencv\modules\core\src\persistence.cpp, line 5271

and when i change the buf size to 512 for 500 Negatives it is still throwing Insufficient Memory.

2014-02-11 05:05:10 -0500 commented answer Need help on trainCascade usage of mine

My System Configuration: Intel core 2 Duo with 4gb RAM 64 bit Windows7 operating System.

I have made changes to the bufSize to 512 and even to 256 .

still throwing me : OpenCV Error: Insufficient memory (Failed to allocate 1073750100 bytes) in unknown function, file ......\src\opencv\modules\core\src\alloc.cpp, line 52

2014-02-11 04:33:46 -0500 commented answer Need help on trainCascade usage of mine

and when i am adding the featureType -LBP

TrainCascade.exe -data classifier -vec data\posivec.vec -bg bg.txt -numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 40 -numNeg 1000 -w 24 -h 48 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024 -featureType LBP

I am getting :

OpenCV Error: Unspecified error (Invalid fs.state) in unknown function, file ......\src\opencv\modules\core\src\persistence.cpp, line 5271

I am using Windows7 System with 4gb Ram

2014-02-11 04:28:27 -0500 commented answer Need help on trainCascade usage of mine

Hi Steven, Thanks for your reply.

I have made the vector file using createsample for 40 samples with any distortions. and got the vector file of 91kb.

I have even made the ratio as 24/48 pixel

Took 40 pos and 1000 negative

I'm now using traincascade : without using the featureType i.e, making it as HAAR

When i start the training using :

TrainCascade.exe -data classifier -vec data\posivec.vec -bg bg.txt -numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 40 -numNeg 1000 -w 24 -h 48 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024

I got the OpenCV Error: Insufficient memory (Failed to allocate 1073741764 bytes) in unknown function, file ......\src\opencv\modules\core\src\alloc.cpp, line 52

2014-02-11 02:03:46 -0500 commented question Need help on trainCascade usage of mine

and when i am using the C:\Banana>TrainCascade.exe -data Result -vec pos-neg.vec -bg bg.txt -numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000\ -numNeg 600 -w 24 -h 24 -mode ALL -precalcValBufSize 1024\ -precalcIdxBufSize 1024

I am getting :

PARAMETERS: cascadeDirName: Result vecFileName: pos-neg.vec bgFileName: bg.txt numPos: 1000 numNeg: 600 numStages: 20 precalcValBufSize[Mb] : 1024 precalcIdxBufSize[Mb] : 1024 stageType: BOOST featureType: HAAR sampleWidth: 24 sampleHeight: 24 boostType: GAB minHitRate: 0.999 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: ALL

===== TRAINING 0-stage ===== <BEGIN POS count : consumed 1000 : 1000 NEG count : acceptanceRatio 600 : 1 OpenCV Error: Insufficient memory (Failed to allocate 1674252

2014-02-11 01:20:30 -0500 asked a question Need help on trainCascade usage of mine

Hi All, I am trying to detect the banana using traincascade approach. positive sample-40(40*50 using createsample.exe )

+ive desc file looks like:

rawdata/1.bmp 1 180 154 494 161
rawdata/2.bmp 1 247 154 349 175
rawdata/3.bmp 1 133 118 488 141

Used the CreateSamples utility

createsamples -img Positive\rawdata\2.bmp -num 50 -bg bg.txt -vec data\positive2.vec -maxxangle 1.1 -maxyangle 1.1 -maxzangle 0.5 -maxidev 40 -bgcolor 0 -bgthresh 0 -w 24 -h 24

where i am passing 40 diff single +ive sample and creating 50*40 = 2000 samples

Negative 600 images and -ive desc looks like:

bg.txt :

Negative/1.bmp
Negative/2.bmp
Negative/3.bmp

after that using the mergevector.cpp.

using command

mergevec pos-neg.txt pos-neg.vec -w 24 -h 24

so my pos-neg.vec is having size of 2.19mb.

Utility used for Training

I am using

TrainCascade.exe -data Result -vec pos-neg.vec -bg bg.txt -numPos 1500 -numNeg 600 -w 24 -h 24 -featureType LBP -minHitRate 0.999 -maxFalseAlarmRate 0.5 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024

My console O/p of training:

C:\Banana>TrainCascade.exe -data Result -vec pos-neg.vec -bg bg.txt -numPos 1500 -numNeg 600 -w 24 -h 24 -featureType LBP

PARAMETERS:

cascadeDirName: Result
vecFileName: pos-neg.vec
bgFileName: bg.txt
numPos: 1500
numNeg: 600
numStages: 20
precalcValBufSize[Mb] : 256
precalcIdxBufSize[Mb] : 256
stageType: BOOST
featureType: LBP
sampleWidth: 24
sampleHeight: 24
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   1500 : 1500
NEG count : acceptanceRatio    600 : 1
Precalculation time: 1.025
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|    0.998|    0.215|
+----+---------+---------+
END>

OpenCV Error: Unspecified error (Invalid fs.state) in unknown function, file ..\..\..\src\opencv\modules\core\src\persistence.cpp, line 5271

Can Anyone Help me out where I am doing wrong. Any Help is appreciated.

Thank you.

2014-02-05 08:42:20 -0500 commented question Unspecified error in persistence.cpp during trainingcascade

thanks for your reply

2014-02-05 05:13:03 -0500 commented question Unspecified error in persistence.cpp during trainingcascade

@StevenPuttemans can you help out with my issue. Thanks.

2014-02-04 03:02:22 -0500 commented answer Cascade Training Error OpenCV 2.4.4 - Train dataset for temp stage can not filled. Branch training terminated. Cascade Classifier can't be trained. check the used training parameters

Hi Steven, Here is my question pls look into it . http://answers.opencv.org/question/27653/unspecified-error-in-persistencecpp-during/ and can you tell me where i am doing wrong Thanks

2014-02-03 23:46:23 -0500 commented answer Cascade Training Error OpenCV 2.4.4 - Train dataset for temp stage can not filled. Branch training terminated. Cascade Classifier can't be trained. check the used training parameters

Hi, you have build traincascade.exe using opencv2.4.5 or 2.4.6.? i'm using 2.4.5 and after displaying this below content

===== TRAINING 0-stage ===== <BEGIN POS count : consumed 100 : 100 NEG count : acceptanceRatio 300 : 1 Precalculation time: 5.915 +----+---------+---------+ | N | HR | FA | +----+---------+---------+ | 1| 1| 1| +----+---------+---------+ | 2| 1| 1| +----+---------+---------+ | 3| 1| 1| +----+---------+---------+ | 4| 1| 0.77| +----+---------+---------+ | 5| 1| 0.3| +----+---------+---------+ END> OpenCV Error: Unspecified error (Invalid fs.state) in unknown function, file .....\src\opencv\modules\core\src\persistence.cpp, line 5271 It is getting stoppped.

2014-02-03 22:29:18 -0500 received badge  Editor (source)
2014-02-03 22:27:41 -0500 asked a question Unspecified error in persistence.cpp during trainingcascade

Hi All, I am trying to train the cascade xml using Opencv Traincascade approach.

I have the Positive folder containing the images of object to be detected and the descr file postivedesc.txt and Negative folder containing the Negative images(not the object of interest) and traincascade.exe in the C:\haar folder.

now when i am using the below command for training .

i am facing an issue :

C:\haar>traincascade.exe -data result/cascade -vec data/positive.vec -bg negative/negative.txt -numPos 100 -numNeg 300 -w 24 -h 24 -numStages 10 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024

console o/p:

PARAMETERS: cascadeDirName: result/cascade vecFileName: data/positive.vec bgFileName: negative/negative.txt numPos: 100 numNeg: 300 numStages: 10 precalcValBufSize[Mb] : 1024 precalcIdxBufSize[Mb] : 1024 stageType: BOOST featureType: HAAR sampleWidth: 24 sampleHeight: 24 boostType: GAB minHitRate: 0.999 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: ALL

===== TRAINING 0-stage ===== <begin pos="" count="" :="" consumed="" 100="" :="" 100="" neg="" count="" :="" acceptanceratio="" 300="" :="" 1="" precalculation="" time:="" 9.795="" +----+---------+---------+="" |="" n="" |="" hr="" |="" fa="" |="" +----+---------+---------+="" |="" 1|="" 1|="" 1|="" +----+---------+---------+="" |="" 2|="" 1|="" 1|="" +----+---------+---------+="" |="" 3|="" 1|="" 1|="" +----+---------+---------+="" |="" 4|="" 1|="" 0.77|="" +----+---------+---------+="" |="" 5|="" 1|="" 0.3|="" +----+---------+---------+="" end=""> OpenCV Error: Unspecified error (Invalid fs.state) in unknown function, file ......\src\opencv\modules\core\src\persistence.cpp, line 5271

can anyone please tell me where am i doing wrong or what does the error specify.

Thanks in advance. image description(/upfiles/13915983026478138.jpg)(/upfiles/13915982234484787.jpg)

2014-02-03 22:14:11 -0500 commented question Cascade Training Error OpenCV 2.4.4 - Train dataset for temp stage can not filled. Branch training terminated. Cascade Classifier can't be trained. check the used training parameters

Hi Constantin, Did you get out of the problem .If yes ,can you please tell the solution to resolve the issue. Even i am facing the same Thanks

2014-02-03 21:33:58 -0500 commented answer Need Suggestion for Detecting

ya ok thanks

2014-02-03 08:38:29 -0500 commented answer Need Suggestion for Detecting

Hi , i am done with creating .vec file and now when i am making for training using cascadetraining using the following command: C:\haar>traincascade.exe -data result -vec data\positive.vec -bg Negative\negative.txt -numPos 100 -numNeg 300 -numStage 10 -featureType LBP -precalcvalBufSize 1024 -precalcIdBufSize 1024

i am getting this error . OpenCV Error: Parsing error (result/params.xml(8): Duplicated key) in unknown function, file ......\src\opencv\modules\core\src\persistence.cpp, line 717 can you help me this thanks

2014-02-01 05:00:09 -0500 commented answer Need Suggestion for Detecting

thanks once again.. can u suggest good tutorial for generating classifier using traincascade . I have followed this tut http://mehebuba.blogspot.in/2013/07/cascaded-classifier-with-opencv.html done up to creating the .vec file and when i am trying to start the training for +ive and -ive . It is getting aborted. can you please help me out.

2014-01-31 04:59:41 -0500 commented answer Need Suggestion for Detecting

thanks for your reply and what is the ratio of images should i need to take i.e.,(positive:negative ) is it 1:2 or 2:1 ratio .

2014-01-30 09:56:28 -0500 received badge  Supporter (source)
2014-01-30 01:38:50 -0500 asked a question Need Suggestion for Detecting

Hi All,

I'm trying to create an xml for detecting the cars using opencv .

Now my question is that for detecting the car should i need to create 4 different xml i.e,(front,back ,left and right ) view xml's by using 4 different sets of the positive images . or else all sets of data together. and which method haartraining or traincascade is the best way to create cascade xml for object detection ??

Thank You.