Open fnoop opened 6 years ago
Threads=1
Time(hafc |thres ):0.980416ms 0.980416ms
Time(hafc |find-cont ):7.4278ms 8.40822ms
Time(hafc |total ):0.023125ms 8.43135ms
Time(non-parallel)= 8.71431ms
Time(hafc |thres ):1.08776ms 1.08776ms
Time(hafc |find-cont ):8.1765ms 9.26426ms
Time(hafc |total ):0.034791ms 9.29905ms
Time(non-parallel)= 9.59582ms
Time(hafc |thres ):1.29531ms 1.29531ms
Time(hafc |find-cont ):9.9215ms 11.2168ms
Time(hafc |total ):0.238854ms 11.4557ms
Time(non-parallel)= 11.793ms
Time(detect|ConvertGrey ):2.13094ms 2.13094ms
Time(detect|CreateImageToTheshold ):0.022656ms 2.15359ms
Time(detect|BuildPyramid ):2.41718ms 4.57078ms
Time(detect|Threshold and Detect rectangles ):8.76937ms 13.3401ms
Time(detect|prefilterCandidates ):0.014114ms 13.3543ms
Time(detect|Marker classification. ):0.004375ms 13.3586ms
Time(detect|Threshold and Detect rectangles ):9.64926ms 23.0079ms
Time(detect|prefilterCandidates ):0.008177ms 23.0161ms
Time(detect|Marker classification. ):0.014323ms 23.0304ms
Time(detect|Threshold and Detect rectangles ):11.8563ms 34.8867ms
Time(detect|prefilterCandidates ):0.008177ms 34.8949ms
Time(detect|Marker classification. ):0.006354ms 34.9012ms
Time(detect|Corner Refinement ):0.147709ms 35.0489ms
Time(detect|total ):0.003021ms 35.0519ms
debug:detecttime~35.8035:threads~1
Time(hafc |thres ):0.96177ms 0.96177ms
Time(hafc |find-cont ):16.6501ms 17.6119ms
Time(hafc |total ):1.91745ms 19.5293ms
Time(non-parallel)= 20.1561ms
Time(hafc |thres ):1.40328ms 1.40328ms
Time(hafc |find-cont ):9.13905ms 10.5423ms
Time(hafc |total ):0.616145ms 11.1585ms
Time(non-parallel)= 11.9742ms
Time(hafc |thres ):1.31969ms 1.31969ms
Time(hafc |find-cont ):15.3657ms 16.6854ms
Time(hafc |total ):1.21932ms 17.9047ms
Time(non-parallel)= 18.748ms
Time(detect|ConvertGrey ):2.03729ms 2.03729ms
Time(detect|CreateImageToTheshold ):0.023178ms 2.06047ms
Time(detect|BuildPyramid ):2.3537ms 4.41416ms
Time(detect|Threshold and Detect rectangles ):20.2167ms 24.6309ms
Time(detect|prefilterCandidates ):0.0325ms 24.6634ms
Time(detect|Marker classification. ):0.006667ms 24.67ms
Time(detect|Threshold and Detect rectangles ):12.2585ms 36.9285ms
Time(detect|prefilterCandidates ):0.026146ms 36.9547ms
Time(detect|Marker classification. ):0.017291ms 36.9719ms
Time(detect|Threshold and Detect rectangles ):18.9116ms 55.8835ms
Time(detect|prefilterCandidates ):0.007291ms 55.8908ms
Time(detect|Marker classification. ):0.053854ms 55.9447ms
Time(detect|Corner Refinement ):0.158073ms 56.1028ms
Time(detect|total ):0.007188ms 56.1099ms
debug:detecttime~58.743:threads~1
Most of the time in long detection time is spent copying the image:
2018-07-18 23:21:18,902 DEBUG track_targets: Debug['detecttime~9.85062', 'threads~-1']
2018-07-18 23:21:18,903 DEBUG track_targets: Debug['inactive_marker', 'center~[663.809, 446.019]', 'area~71589.2', 'marker~16=(533.402,306.749) (808.261,319.968) (787.476,604.24) (526.098,553.118) Txyz=-999999 -999999 -999999 Rxyz=-999999 -999999 -999999 ', 'Ti~0.02', 'ThresHold~100', 'Markers~2', 'processtime~249.186']
2018-07-18 23:21:18,905 DEBUG track_targets: Debug['Time(detectloop|CopyImage )', '238.85ms 238.85ms']
2018-07-18 23:21:18,906 DEBUG track_targets: Debug['Time(detectloop|MarkerDetect )', '9.97822ms 248.828ms']
2018-07-18 23:21:18,910 DEBUG track_targets: Debug['Time(detectloop|MarkerLock )', '0.177656ms 249.006ms']
2018-07-18 23:21:18,915 DEBUG track_targets: Debug['Time(detectloop|PoseEstimation )', '0.165938ms 249.172ms']
2018-07-18 23:21:18,918 DEBUG track_targets: Debug['Time(detectloop|total )', '0.343229ms 249.515ms']
2018-07-19 09:48:11,481 DEBUG track_targets: Debug['detecttime~22.3879', 'threads~-1']
2018-07-19 09:48:11,484 DEBUG track_targets: Debug['active_marker', '19', 'center~[451.493, 487.476]', 'area~32704.8', 'marker~19=(540.056,399.875) (531.611,598.735) (366.446,569.411) (367.86,381.882) Txyz=-0.0376434 -0.088547 0.603173 Rxyz=-1.7572 -1.98263 0.166654 ', 'vectornorm~0.610799', 'Ti~0.0994568', 'ThresHold~62', 'Markers~1', 'processtime~43.1282']
2018-07-19 09:48:11,489 DEBUG Sending mavlink landing_target:-0.156726 0.111097 0.610799
2018-07-19 09:48:11,490 INFO Fctime:5287441017003, Fps: 17.0971794552, Alt:0.0, Rangefinder:None, Marker:19, Distance:0.610799, xOffset:-0.156726, yOffset:0.111097, processTime:43.1282
2018-07-19 09:48:11,492 DEBUG track_targets: Debug['Time(detectloop|GrabImage )', '6.43434ms 6.43434ms']
2018-07-19 09:48:11,494 DEBUG track_targets: Debug['Time(detectloop|DecodeImage )', '11.602ms 18.0363ms']
2018-07-19 09:48:11,497 DEBUG track_targets: Debug['Time(detectloop|MarkerDetect )', '22.6277ms 40.6641ms']
2018-07-19 09:48:11,501 DEBUG track_targets: Debug['Time(detectloop|MarkerLock )', '0.135572ms 40.7996ms']
2018-07-19 09:48:11,502 DEBUG track_targets: Debug['Time(detectloop|PoseEstimation )', '2.31488ms 43.1145ms']
2018-07-19 09:48:11,504 DEBUG track_targets: Debug['Time(detectloop|SendMessage )', '1.14562ms 44.2601ms']
2018-07-19 09:48:11,506 DEBUG track_targets: Debug['Time(detectloop|DrawGreenAR )', '2.0965ms 46.3566ms']
2018-07-19 09:48:11,508 DEBUG track_targets: Debug['Time(detectloop|OutputImage )', '35.5989ms 81.9555ms']
2018-07-19 09:48:11,510 DEBUG track_targets: Debug['Time(detectloop|EndofLoop )', '0.097708ms 82.0533ms']
2018-07-19 09:48:11,527 DEBUG track_targets: Debug['Time(detectloop|total )', '0.040104ms 82.0934ms']
So the 3 x iteration of Threshold and Detect rectangles
is because the threshold method is set to THRES_AUTO_FIXED, not THRES_ADAPTIVE. In this mode, it iterates NAttemptsAutoThresFix times. This parameter can be set to 1 to prevent this, but why is the method THRES_AUTO_FIXED? It should be THRES_ADAPTIVE by default.
Ah, it's because DM_VIDEO_FAST sets it:
else if(detectMode==DM_VIDEO_FAST){
setThresholdMethod(THRES_AUTO_FIXED);
setAutoSizeSpeedUp(true,0.3);
}
If no detected markers are found, it sets random thresholds NAttemptsAutoThresFix times and tries again. If we haven't found any markers, this is a good thing - a lower framerate but a better chance of finding markers.
Threads=-1
Note 3 x
Threshold and Detect rectangles