import scipy
# 解决报警:AttributeError: module 'scipy' has no attribute 'io'
from scipy import io
features_struct = scipy.io.loadmat('BoundingBox.mat')
bb = features_struct['bb']
print(bb)
运行结果:
[[ 1. 222. 249. 172. 200.]
[ 1. 203. 229. 240. 265.]
[ 1. 255. 282. 386. 416.]
[ 2. 288. 313. 272. 297.]
[ 2. 265. 290. 417. 444.]
[ 4. 544. 572. 143. 168.]
[ 4. 555. 580. 258. 282.]
[ 5. 357. 384. 126. 149.]
[ 5. 476. 504. 227. 252.]
[ 5. 482. 509. 394. 424.]
[ 6. 189. 215. 135. 158.]
[ 6. 318. 344. 216. 239.]
[ 7. 192. 224. 165. 193.]
[ 7. 207. 232. 235. 259.]
[ 7. 274. 296. 385. 410.]
[ 8. 386. 413. 190. 216.]
[ 8. 258. 287. 266. 291.]
[ 9. 574. 596. 182. 207.]
[ 10. 572. 599. 148. 175.]
[ 10. 550. 577. 264. 287.]
[ 10. 471. 498. 423. 449.]]