Skip to content

Commit 1ad814a

Browse files
bygreencnvpisarev
authored andcommitted
fix faster_rcnn sample crashed at PoolingInvoker on Windows7(x64). (opencv#10724)
* fix faster_rcnn sample crashed at PoolingInvoker operator() of pooling_layer. * find_odj onmouse bug about find matched point status. * reverted AutoBuffer back to std::vector
1 parent b675235 commit 1ad814a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

modules/dnn/src/layers/pooling_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class PoolingLayerImpl : public PoolingLayer
320320
bool compMaxIdx = computeMaxIdx;
321321

322322
#if CV_SIMD128
323-
const int* ofsptr = &ofsbuf[0];
323+
const int* ofsptr = ofsbuf.empty() ? 0 : (const int*)&ofsbuf[0];
324324
v_float32x4 idx00(0.f, (float)stride_w, (float)(stride_w*2), (float)(stride_w*3));
325325
v_float32x4 ones = v_setall_f32(1.f);
326326
v_float32x4 idx_delta = v_setall_f32((float)(inp_width - kernel_w));

samples/python/find_obj.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ def onmouse(event, x, y, flags, param):
120120
r = 8
121121
m = (anorm(np.array(p1) - (x, y)) < r) | (anorm(np.array(p2) - (x, y)) < r)
122122
idxs = np.where(m)[0]
123+
123124
kp1s, kp2s = [], []
124125
for i in idxs:
125126
(x1, y1), (x2, y2) = p1[i], p2[i]
126-
col = (red, green)[status[i]]
127+
col = (red, green)[status[i][0]]
127128
cv.line(cur_vis, (x1, y1), (x2, y2), col)
128129
kp1, kp2 = kp_pairs[i]
129130
kp1s.append(kp1)

0 commit comments

Comments
 (0)