@@ -81,13 +81,13 @@ namespace cv
81
81
// Crop Target Patch
82
82
83
83
// Previous frame GTBBs center
84
- prevCenter.x = prevBB.x + prevBB.width / 2.0 ;
85
- prevCenter.y = prevBB.y + prevBB.height / 2.0 ;
84
+ prevCenter.x = prevBB.x + prevBB.width / 2 ;
85
+ prevCenter.y = prevBB.y + prevBB.height / 2 ;
86
86
87
- targetPatchRect.x = prevCenter.x - prevBB.width *padTarget/2.0 ;
88
- targetPatchRect.y = prevCenter.y - prevBB.height *padTarget / 2.0 ;
89
- targetPatchRect.width = prevBB.width *padTarget;
90
- targetPatchRect.height = prevBB.height *padTarget;
87
+ targetPatchRect.x = prevCenter.x - prevBB.width *padTarget/2 ;
88
+ targetPatchRect.y = prevCenter.y - prevBB.height *padTarget / 2 ;
89
+ targetPatchRect.width = ( float )( prevBB.width *padTarget) ;
90
+ targetPatchRect.height = ( float )( prevBB.height *padTarget) ;
91
91
92
92
targetPatch = prevFrame (targetPatchRect);
93
93
@@ -97,8 +97,8 @@ namespace cv
97
97
TrainingSample sample;
98
98
99
99
// Current frame GTBBs center
100
- currCenter.x = currBB.x + currBB.width / 2.0 ;
101
- currCenter.y = currBB.y + currBB.height / 2.0 ;
100
+ currCenter.x = ( float )( currBB.x + currBB.width / 2.0 ) ;
101
+ currCenter.y = ( float )( currBB.y + currBB.height / 2.0 ) ;
102
102
103
103
// Generate and add random Laplacian distribution (Scaling from target size)
104
104
double dx, dy, ds;
@@ -112,10 +112,10 @@ namespace cv
112
112
113
113
// cout << dx << " " << dy << " " << ds << endl;
114
114
115
- searchPatchRect.width = prevBB.width *padSearch*ds;
116
- searchPatchRect.height = prevBB.height *padSearch*ds;
117
- searchPatchRect.x = currCenter.x + dx - searchPatchRect.width / 2 ;
118
- searchPatchRect.y = currCenter.y + dy - searchPatchRect.height / 2 ;
115
+ searchPatchRect.width = ( float )( prevBB.width *padSearch*ds) ;
116
+ searchPatchRect.height = ( float )( prevBB.height *padSearch*ds) ;
117
+ searchPatchRect.x = ( float )( currCenter.x + dx - searchPatchRect.width / 2.0 ) ;
118
+ searchPatchRect.y = ( float )( currCenter.y + dy - searchPatchRect.height / 2.0 ) ;
119
119
120
120
searchPatch = currFrame (searchPatchRect);
121
121
0 commit comments