Ask Your Question

kpykcb's profile - activity

2016-08-01 08:58:25 -0600 received badge  Editor (source)
2016-08-01 08:57:37 -0600 asked a question cv2.projectPoints jacobians columns order

Documentation of cv2.projectPoints states:

jacobian – Optional output 2Nx(10+<numdistcoeffs>) jacobian matrix of derivatives of image points with respect to components of the rotation vector, translation vector, focal lengths, coordinates of the principal point and the distortion coefficients. In the old interface different components of the jacobian are returned via different output parameters.

I have found while digging in sources next info:

  • dp/drot must be 2Nx3 floating-point matrix
  • dp/dT must be 2Nx3 floating-point matrix
  • dp/df must be 2Nx2 floating-point matrix
  • dp/dc must be 2Nx2 floating-point matrix
  • dp/df must be 2Nx14, 2Nx12, 2Nx8, 2Nx5, 2Nx4 or 2Nx2 floating-point matrix

And:

    _jacobian.create(npoints*2, 3+3+2+2+ndistCoeffs, CV_64F);
    Mat jacobian = _jacobian.getMat();
    pdpdrot = &(dpdrot = jacobian.colRange(0, 3));
    pdpdt = &(dpdt = jacobian.colRange(3, 6));
    pdpdf = &(dpdf = jacobian.colRange(6, 8));
    pdpdc = &(dpdc = jacobian.colRange(8, 10));
    pdpddist = &(dpddist = jacobian.colRange(10, 10+ndistCoeffs));

That is strange for me that it is not clearly documented, e.g. I initially thought that it goes as dx,dy,dz,droll,dpitch,dyaw..., but anyway.

What is a complete order of derivatives? Especially for:

  • pdpdrot: droll, dpitch, dyaw or dyaw, dpitch, droll
  • dp/dt: dx,dy?
  • dp/df: dfx, dfy?
  • dp/dc: dcx, dcy?
2014-11-12 14:17:45 -0600 received badge  Supporter (source)
2014-11-11 14:35:44 -0600 asked a question opencv_traincascade training time rough estimate

Hello all,

I'm trying to make kind of quick & dirty test of LBP for purpose of my work. I'm feeding trainer with synthetic dataset, for now I tried to do this two times. First try ended with "out of memory" situation for my system (macbook pro, mem = 8gb). That was 18 training samples (18pos/18neg) with 300x300px resolution. I generated new set with 90x90px samples.

opencv_traincascade -data data -vec object.vec -bg neg/background.txt -numPos 18 -numNeg 18 -numStages 2 -w 90 -h 90 -featureType LBP

PARAMETERS:
cascadeDirName: data
vecFileName: ardrone2b.vec
bgFileName: asus_camera_simple/background.txt
numPos: 18
numNeg: 18
numStages: 2
precalcValBufSize[Mb] : 256
precalcIdxBufSize[Mb] : 256
stageType: BOOST
featureType: LBP
sampleWidth: 90
sampleHeight: 90
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   18 : 18
NEG count : acceptanceRatio    18 : 1
Precalculation time: 1
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        0|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 0 minutes 11 seconds.

===== TRAINING 1-stage =====
<BEGIN
POS count : consumed   18 : 18

This training continues already for ~24h. In fact, I would like to know if there any kind of "rule of thumb" hints about choosing dataset parameters vs time for training. Right now I want to achieve fast training (max up to ~1-2h), quality of resulting detector is not important for now.

Thank you in advance.

P.S. Actually any hints on training process would be appreciated, links, etc.

2014-11-11 13:03:14 -0600 asked a question opencv_traincascade training time vs input dataset parameters

Hi all,

i want to make kind of quick and dirty test of performance of LBP cascade detector/tracker.

I'm generating synthetic dataset for some object. I did 2 tries so far. First one ate all free memory (i have macbook pro, ram = 8gb) and hang the system. That was for 18 samples(18 pos/18 neg) with 300x300 resolution.

First i decided to decrease samples resolution to 90x90, that training continues already ~24h, e.g.:

opencv_traincascade -data data -vec object.vec -bg neg/background.txt -numPos 18 -numNeg 18 -numStages 2 -w 90 -h 90 -featureType LBP

I would like to find out is there any rule of thumb about choosing size and number of samples, to "control" the time of training.

I would like to achieve fast training (max 1-2h), detector performance does not matter for now.

NB> Other hints considering LBP tracker training also welcome. Thanks in advance.