在python中打开一个.mat图像文件



我有一个.mat图像文件,我想用python打开它。如何打开它?

我尝试了以下代码:

from scipy.io import loadmat
annots = loadmat('G:/Deep_learning/FCNloca-master/FCNloca-master/test_truelabel.mat')

它产生了这样的结果:

{'__header__': b'MATLAB 5.0 MAT-file Platform: nt, Created on: Sat May 30 21:56:37 2020',
'__version__': '1.0',
'__globals__': [],
'loca_true': array([[[[2.39782206e-16, 3.56671207e-16, 5.16006790e-16, ...,
6.33323300e-16, 4.44995588e-16, 3.04104053e-16],
[5.69377430e-16, 8.46937471e-16, 1.22528950e-15, ...,
1.50386469e-15, 1.05666909e-15, 7.22113569e-16],
[1.33106018e-15, 1.97992525e-15, 2.86441644e-15, ...,
3.51565466e-15, 2.47022463e-15, 1.68811858e-15],
...,
[5.46237626e-22, 8.12517479e-22, 1.17549308e-21, ...,
1.44274683e-21, 1.01372549e-21, 6.92766486e-22],
[1.83964277e-22, 2.73643161e-22, 3.95887659e-22, ...,
4.85894534e-22, 3.41406868e-22, 2.33312903e-22],
[6.09957441e-23, 9.07299422e-23, 1.31261692e-22, ...,
1.61104640e-22, 1.13197879e-22, 7.73579214e-23]],

[[4.87105648e-16, 7.24559851e-16, 1.04824218e-15, ...,
1.28656485e-15, 9.03986447e-16, 6.17772288e-16],
[1.15666198e-15, 1.72051143e-15, 2.48911480e-15, ...,
3.05502647e-15, 2.14657079e-15, 1.46693787e-15],
[2.70398269e-15, 4.02211985e-15, 5.81891981e-15, ...,
7.14187792e-15, 5.01813871e-15, 3.42932910e-15],
...,
[3.32563390e-37, 4.94681352e-37, 7.15670150e-37, ...,
8.78381042e-37, 6.17181917e-37, 4.21773895e-37],
[1.12002141e-37, 1.66600932e-37, 2.41026498e-37, ...,
2.95824978e-37, 2.07857203e-37, 1.42046842e-37],
[3.71357638e-38, 5.52387015e-38, 7.99154641e-38, ...,
9.80846114e-38, 6.89177539e-38, 4.70974744e-38]],

[[2.80540338e-32, 4.17298109e-32, 6.03717523e-32, ...,
7.40975472e-32, 5.20635852e-32, 3.55795601e-32],
[6.66160094e-32, 9.90899738e-32, 1.43356397e-31, ...,
1.75949132e-31, 1.23628149e-31, 8.44858292e-32],
[1.55731354e-31, 2.31647255e-31, 3.35130939e-31, ...,
4.11324496e-31, 2.89011293e-31, 1.97506465e-31],
...,
[6.39086991e-38, 9.50629041e-38, 1.37530317e-37, ...,
1.68798465e-37, 1.18603835e-37, 8.10522799e-38],
[2.15234489e-38, 3.20156972e-38, 4.63180566e-38, ...,
5.68486793e-38, 3.99439140e-38, 2.72971384e-38],
[7.13637888e-39, 1.06152200e-38, 1.53573529e-38, ...,
1.88489176e-38, 1.32439232e-38, 9.05072058e-39]],

[[5.22854183e-33, 7.77735078e-33, 1.12517235e-32, ...,
1.38098545e-32, 9.70329737e-33, 6.63110408e-33],
[1.24154905e-32, 1.84677924e-32, 2.67179018e-32, ...,
3.27923393e-32, 2.30410697e-32, 1.57459599e-32],
[2.90242715e-32, 4.31730200e-32, 6.24596856e-32, ...,
7.66601817e-32, 5.38641838e-32, 3.68100652e-32],
...,
[1.19109184e-38, 1.77172514e-38, 2.56320719e-38, ...,
3.14596411e-38, 2.21046683e-38, 1.51060357e-38],
[4.01141075e-39, 5.96689279e-39, 8.63248037e-39, ...,
1.05951144e-38, 7.44450608e-39, 5.08747622e-39],
[1.33003531e-39, 1.97840076e-39, 2.86221092e-39, ...,
3.51294771e-39, 2.46832263e-39, 1.68681878e-39]]],


[[[9.08393404e-16, 1.24663765e-15, 1.66395957e-15, ...,
2.72578746e-16, 1.76700344e-16, 1.11408689e-16],
[2.15164953e-15, 2.95282562e-15, 3.94130760e-15, ...,
6.45638693e-16, 4.18538059e-16, 2.63886168e-16],
[5.01745217e-15, 6.88572238e-15, 9.19077302e-15, ...,
1.50557106e-15, 9.75992915e-16, 6.15358686e-16],
...,
[1.51398512e-21, 2.07772409e-21, 2.77325884e-21, ...,
4.54296745e-22, 2.94499818e-22, 1.85680673e-22],
[5.08613353e-22, 6.97997754e-22, 9.31658084e-22, ...,
1.52618006e-22, 9.89352786e-23, 6.23782018e-23],
[1.68216293e-22, 2.30852363e-22, 3.08132038e-22, ...,
5.04761328e-23, 3.27213701e-23, 2.06306614e-23]],

[[1.83617531e-15, 2.51988319e-15, 3.36343424e-15, ...,
5.50975338e-16, 3.57172132e-16, 2.25195255e-16],
[4.34922327e-15, 5.96867553e-15, 7.96673739e-15, ...,
1.30505772e-15, 8.46009278e-16, 5.33404649e-16],
[1.01419955e-14, 1.39184117e-14, 1.85777114e-14, ...,
3.04327662e-15, 1.97281715e-15, 1.24385142e-15],
...,
[3.06028432e-21, 4.19979454e-21, 5.60570935e-21, ...,
9.18289873e-22, 5.95285358e-22, 3.75324462e-22],
[1.02808241e-21, 1.41089338e-21, 1.88320122e-21, ...,
3.08493449e-22, 1.99982204e-22, 1.26087787e-22],
[3.40022947e-22, 4.66631975e-22, 6.22840760e-22, ...,
1.02029614e-22, 6.61411361e-23, 4.17016579e-23]],

[[3.59959835e-15, 4.93992450e-15, 6.59360373e-15, ...,
1.08012013e-15, 7.00192521e-16, 4.41467907e-16],
[8.52612321e-15, 1.17008624e-14, 1.56178197e-14, ...,
2.55840693e-15, 1.65849829e-15, 1.04567493e-15],
[1.98821485e-14, 2.72853533e-14, 3.64193435e-14, ...,
5.96597365e-15, 3.86746807e-15, 2.43841941e-15],
...,
[5.99931519e-21, 8.23318638e-21, 1.09893114e-20, ...,
1.80019560e-21, 1.16698454e-21, 7.35777957e-22],
[2.01543052e-21, 2.76588486e-21, 3.69178694e-21, ...,
6.04763884e-22, 3.92040788e-22, 2.47179770e-22],
[6.66573630e-22, 9.14775230e-22, 1.22100355e-21, ...,
2.00016649e-22, 1.29661653e-22, 8.17510280e-23]],

...,

[[3.76687693e-31, 5.16948999e-31, 6.90001811e-31, ...,
1.13031489e-31, 7.32731487e-32, 4.61983564e-32],
[8.92234458e-31, 1.22446185e-30, 1.63436025e-30, ...,
2.67729982e-31, 1.73557112e-31, 1.09426897e-31],
[2.08061009e-30, 2.85533434e-30, 3.81118034e-30, ...,
6.24322114e-31, 4.04719495e-31, 2.55173632e-31],
...,
[6.27811211e-37, 8.61579454e-37, 1.15000007e-36, ...,
1.88385332e-37, 1.22121601e-37, 7.69970631e-38],
[2.10909051e-37, 2.89441956e-37, 3.86334966e-37, ...,
6.32868143e-38, 4.10259494e-38, 2.58666574e-38],
[6.97550278e-38, 9.57286168e-38, 1.27774537e-37, ...,
2.09311714e-38, 1.35687218e-38, 8.55501174e-39]],

[[7.20279288e-32, 9.88478423e-32, 1.31937948e-31, ...,
2.16131936e-32, 1.40108457e-32, 8.83376863e-33],
[1.70607645e-31, 2.34134145e-31, 3.12512423e-31, ...,
5.11936983e-32, 3.31865350e-32, 2.09239455e-32],
[3.97841603e-31, 5.45979660e-31, 7.28750717e-31, ...,
1.19379076e-31, 7.73879994e-32, 4.87927493e-32],
...,
[1.20046240e-37, 1.64745981e-37, 2.19896016e-37, ...,
3.60218969e-38, 2.33513496e-38, 1.47229099e-38],
[4.03287455e-38, 5.53453298e-38, 7.38726215e-38, ...,
1.21013196e-38, 7.84473244e-39, 4.94606484e-39],
[1.33381320e-38, 1.83046437e-38, 2.44322695e-38, ...,
4.00233124e-39, 2.59452844e-39, 1.63583729e-39]],

[[1.33573453e-32, 1.83310111e-32, 2.44674637e-32, ...,
4.00809651e-33, 2.59826580e-33, 1.63819368e-33],
[3.16386332e-32, 4.34194163e-32, 5.79544132e-32, ...,
9.49370497e-33, 6.15433506e-33, 3.88027769e-33],
[7.37784323e-32, 1.01250153e-31, 1.35144452e-31, ...,
2.21384617e-32, 1.43513530e-32, 9.04845678e-33],
...,
[2.22621851e-38, 3.05516068e-38, 4.07790015e-38, ...,
6.68014372e-39, 4.33043189e-39, 2.73031580e-39],
[7.47883478e-39, 1.02636115e-38, 1.36994376e-38, ...,
2.24415038e-39, 1.45478014e-39, 9.17231651e-40],
[2.47351323e-39, 3.39453668e-39, 4.53088498e-39, ...,
7.42219321e-40, 4.81146866e-40, 3.03360710e-40]]],


[[[2.83450944e-24, 4.53961001e-24, 7.07123786e-24, ...,
5.50432304e-23, 4.16412435e-23, 3.06393629e-23],
[4.62884041e-24, 7.41332167e-24, 1.15475472e-23, ...,
8.98872749e-23, 6.80014213e-23, 5.00350145e-23],
[7.44184562e-24, 1.19184916e-23, 1.85651386e-23, ...,
1.44512916e-22, 1.09326750e-22, 8.04419295e-23],
...,
[3.06491183e-50, 4.90861107e-50, 7.64602167e-50, ...,
5.95174057e-49, 4.50260416e-49, 3.31298759e-49],
[7.09873355e-51, 1.13689803e-50, 1.77091785e-50, ...,
1.37850036e-49, 1.04286156e-49, 7.67330920e-50],
[1.61866850e-51, 2.59237934e-51, 4.03808497e-51, ...,
3.14328617e-50, 2.37795536e-50, 1.74968447e-50]],

[[1.38919062e-23, 2.22485894e-23, 3.46560756e-23, ...,
2.69766396e-22, 2.04083374e-22, 1.50163252e-22],
[2.26859068e-23, 3.63326253e-23, 5.65944289e-23, ...,
4.40536757e-22, 3.33274377e-22, 2.45221173e-22],
[3.64724210e-23, 5.84124240e-23, 9.09875834e-23, ...,
7.08256548e-22, 5.35809457e-22, 3.94245200e-22],
...,
[1.50211064e-49, 2.40570604e-49, 3.74730860e-49, ...,
2.91694290e-48, 2.20672240e-48, 1.62369235e-48],
[3.47908317e-50, 5.57192739e-50, 8.67925304e-50, ...,
6.75601831e-49, 5.11105546e-49, 3.76068220e-49],
[7.93308029e-51, 1.27052287e-50, 1.97906195e-50, ...,
1.54052183e-49, 1.16543386e-49, 8.57518845e-50]],

[[6.60306405e-23, 1.05751405e-22, 1.64726340e-22, ...,
1.28224648e-21, 9.70043685e-22, 7.13751992e-22],
[1.07830051e-22, 1.72695272e-22, 2.69003140e-22, ...,
2.09394764e-21, 1.58411094e-21, 1.16557878e-21],
[1.73359745e-22, 2.77644386e-22, 4.32479770e-22, ...,
3.36646626e-21, 2.54679531e-21, 1.87391584e-21],
...,
[7.13979247e-49, 1.14347382e-48, 1.78116079e-48, ...,
1.38647357e-47, 1.04889344e-47, 7.71769144e-48],
[1.65366859e-49, 2.64843376e-49, 4.12539955e-49, ...,
3.21125272e-48, 2.42937334e-48, 1.78751750e-48],
[3.77073070e-50, 6.03901564e-50, 9.40682481e-50, ...,
7.32236754e-49, 5.53950935e-49, 4.07593585e-49]],

...,

[[4.87253864e-10, 7.80361669e-10, 1.21555001e-09, ...,
9.46196416e-09, 7.15815461e-09, 5.26692477e-09],
[7.95700428e-10, 1.27435442e-09, 1.98503026e-09, ...,
1.54516762e-08, 1.16894849e-08, 8.60104886e-09],
[1.27925770e-09, 2.04879581e-09, 3.19135840e-09, ...,
2.48418564e-08, 1.87933336e-08, 1.38280157e-08],
...,
[5.26860173e-36, 8.43793173e-36, 1.31435569e-35, ...,
1.02310776e-34, 7.74000342e-35, 5.69504543e-35],
[1.22027653e-36, 1.95433449e-36, 3.04421835e-36, ...,
2.36965034e-35, 1.79268524e-35, 1.31904643e-35],
[2.78250081e-37, 4.45631555e-37, 6.94149216e-37, ...,
5.40332768e-36, 4.08771945e-36, 3.00771805e-36]],

[[2.25901207e-10, 3.61792192e-10, 5.63554720e-10, ...,
4.38676691e-09, 3.31867203e-09, 2.44185783e-09],
[3.68903565e-10, 5.90817689e-10, 9.20302054e-10, ...,
7.16372423e-09, 5.41949269e-09, 3.98762835e-09],
[5.93090955e-10, 9.49865116e-10, 1.47958132e-09, ...,
1.15172106e-08, 8.71298735e-09, 6.41096084e-09],
...,
[2.44263531e-36, 3.91200380e-36, 6.09363124e-36, ...,
4.74334417e-35, 3.58842946e-35, 2.64034364e-35],
[5.65746037e-37, 9.06070848e-37, 1.41136408e-36, ...,
1.09862007e-35, 8.31126832e-36, 6.11537852e-36],
[1.29002628e-37, 2.06604224e-37, 3.21822273e-37, ...,
2.50509711e-36, 1.89515328e-36, 1.39444177e-36]],

[[1.01573764e-10, 1.62675512e-10, 2.53395608e-10, ...,
1.97245703e-09, 1.49220100e-09, 1.09795203e-09],
[1.65873055e-10, 2.65654075e-10, 4.13802760e-10, ...,
3.22108252e-09, 2.43680977e-09, 1.79298917e-09],
[2.66676221e-10, 4.27095436e-10, 6.65275962e-10, ...,
5.17857535e-09, 3.91769007e-09, 2.88261151e-09],
...,
[1.09830162e-36, 1.75898550e-36, 2.73992807e-36, ...,
2.13278771e-35, 1.61349419e-35, 1.18719879e-35],
[2.54380908e-37, 4.07403869e-37, 6.34602898e-37, ...,
4.93981312e-36, 3.73706193e-36, 2.74970647e-36],
[5.80044818e-38, 9.28971068e-38, 1.44703518e-37, ...,
1.12638681e-36, 8.52132901e-37, 6.26993984e-37]]],


...,


[[[3.79819054e-12, 5.77307770e-12, 8.53442609e-12, ...,
1.79735239e-11, 1.29045548e-11, 9.01133395e-12],
[7.55690926e-12, 1.14861600e-11, 1.69801601e-11, ...,
3.57602621e-11, 2.56750020e-11, 1.79290197e-11],
[1.48021846e-11, 2.24986506e-11, 3.32600878e-11, ...,
7.00458326e-11, 5.02912112e-11, 3.51186775e-11],
...,
[2.16352465e-27, 3.28845954e-27, 4.86137834e-27, ...,
1.02380756e-26, 7.35069032e-27, 5.13303451e-27],
[6.10517192e-28, 9.27958497e-28, 1.37181476e-27, ...,
2.88904551e-27, 2.07426470e-27, 1.44847243e-27],
[1.69608689e-28, 2.57797530e-28, 3.81105899e-28, ...,
8.02610029e-28, 5.76254561e-28, 4.02402281e-28]],

[[7.34623017e-12, 1.11659373e-11, 1.65067702e-11, ...,
3.47633016e-11, 2.49592086e-11, 1.74291765e-11],
[1.46161163e-11, 2.22158353e-11, 3.28419976e-11, ...,
6.91653337e-11, 4.96590344e-11, 3.46772243e-11],
[2.86294892e-11, 4.35155278e-11, 6.43296479e-11, ...,
1.35478408e-10, 9.72702157e-11, 6.79244197e-11],
...,
[4.18455838e-27, 6.36033933e-27, 9.40258365e-27, ...,
1.98018660e-26, 1.42172601e-26, 9.92800456e-27],
[1.18082539e-27, 1.79480114e-27, 2.65328105e-27, ...,
5.58781690e-27, 4.01191719e-27, 2.80154768e-27],
[3.28046856e-28, 4.98616373e-28, 7.37111954e-28, ...,
1.55235972e-27, 1.11455668e-27, 7.78302127e-28]],

[[1.37800898e-11, 2.09451127e-11, 3.09634697e-11, ...,
6.52091489e-11, 4.68185895e-11, 3.26937233e-11],
[2.74169731e-11, 4.16725582e-11, 6.16051587e-11, ...,
1.29740627e-10, 9.31506276e-11, 6.50476847e-11],
[5.37033176e-11, 8.16266119e-11, 1.20669827e-10, ...,
2.54130974e-10, 1.82459884e-10, 1.27412915e-10],
...,
[7.84941239e-27, 1.19307515e-26, 1.76374063e-26, ...,
3.71444243e-26, 2.66687970e-26, 1.86229931e-26],
[2.21499728e-27, 3.36669560e-27, 4.97703587e-27, ...,
1.04816507e-26, 7.52557131e-27, 5.25515504e-27],
[6.15351687e-28, 9.35306711e-28, 1.38267774e-27, ...,
2.91192296e-27, 2.09069016e-27, 1.45994244e-27]],

...,

[[5.27898508e-29, 8.02381838e-29, 1.18617293e-28, ...,
2.49808332e-28, 1.79356332e-28, 1.25245685e-28],
[1.05031095e-28, 1.59642511e-28, 2.36001884e-28, ...,
4.97020590e-28, 3.56848745e-28, 2.49189783e-28],
[2.05730889e-28, 3.12701640e-28, 4.62271456e-28, ...,
9.73544907e-28, 6.98981663e-28, 4.88103409e-28],
...,
[3.00701459e-44, 4.57052606e-44, 6.75667624e-44, ...,
1.42295780e-43, 1.02164923e-43, 7.13424257e-44],
[8.48538565e-45, 1.28974021e-44, 1.90664202e-44, ...,
4.01539312e-44, 2.88295500e-44, 2.01318609e-44],
[2.35733760e-45, 3.58304645e-45, 5.29687054e-45, ...,
1.11552233e-44, 8.00918016e-45, 5.59286222e-45]],

[[9.65867479e-30, 1.46807485e-29, 2.17027675e-29, ...,
4.57060856e-29, 3.28158624e-29, 2.29155286e-29],
[1.92169740e-29, 2.92089307e-29, 4.31799940e-29, ...,
9.09371813e-29, 6.52906936e-29, 4.55929129e-29],
[3.76414732e-29, 5.72133355e-29, 8.45793195e-29, ...,
1.78124270e-28, 1.27888912e-28, 8.93056527e-29],
...,
[5.50177269e-45, 8.36244546e-45, 1.23623267e-44, ...,
2.60350927e-44, 1.86925660e-44, 1.30531395e-44],
[1.55252533e-45, 2.35976822e-45, 3.48848024e-45, ...,
7.34674860e-45, 5.27478755e-45, 3.68341821e-45],
[4.31309369e-46, 6.55570719e-46, 9.69139884e-46, ...,
2.04101115e-45, 1.46539657e-45, 1.02329589e-45]],

[[1.71389568e-30, 2.60504385e-30, 3.85107483e-30, ...,
8.11037376e-30, 5.82305192e-30, 4.06627475e-30],
[3.40998009e-30, 5.18301539e-30, 7.66212826e-30, ...,
1.61364623e-29, 1.15855891e-29, 8.09029169e-30],
[6.67933848e-30, 1.01522922e-29, 1.50082836e-29, ...,
3.16074848e-29, 2.26934085e-29, 1.58469537e-29],
...,
[9.76268965e-46, 1.48388464e-45, 2.19364859e-45, ...,
4.61982972e-45, 3.31692584e-45, 2.31623074e-45],
[2.75489806e-46, 4.18732036e-46, 6.19017758e-46, ...,
1.30365303e-45, 9.35991301e-46, 6.53608769e-46],
[7.65342327e-47, 1.16328569e-46, 1.71970244e-46, ...,
3.62169787e-46, 2.60029135e-46, 1.81580024e-46]]],


[[[1.80422931e-11, 2.53132944e-11, 3.45415539e-11, ...,
9.82783451e-12, 6.51319245e-12, 4.19823022e-12],
[3.56734286e-11, 5.00497358e-11, 6.82959563e-11, ...,
1.94317070e-11, 1.28779588e-11, 8.30078892e-12],
[6.94403851e-11, 9.74246956e-11, 1.32942016e-10, ...,
3.78249378e-11, 2.50676890e-11, 1.61579641e-11],
...,
[4.70526696e-27, 6.60147839e-27, 9.00812507e-27, ...,
2.56301041e-27, 1.69858172e-27, 1.09486050e-27],
[1.31948962e-27, 1.85124081e-27, 2.52613245e-27, ...,
7.18740439e-28, 4.76330243e-28, 3.07029776e-28],
[3.64285460e-28, 5.11091636e-28, 6.97416110e-28, ...,
1.98430277e-28, 1.31505530e-28, 8.47649587e-29]],

[[3.46589544e-11, 4.86264308e-11, 6.63537688e-11, ...,
1.88791118e-11, 1.25117378e-11, 8.06473264e-12],
[6.85280819e-11, 9.61447364e-11, 1.31195432e-10, ...,
3.73279963e-11, 2.47383514e-11, 1.59456818e-11],
[1.33393861e-10, 1.87151271e-10, 2.55379471e-10, ...,
7.26610964e-11, 4.81546269e-11, 3.10391888e-11],
...,
[9.03874205e-27, 1.26813337e-26, 1.73044632e-26, ...,
4.92350173e-27, 3.26294813e-27, 2.10320938e-27],
[2.53471831e-27, 3.55620378e-27, 4.85265974e-27, ...,
1.38068881e-27, 9.15022725e-28, 5.89799256e-28],
[6.99786501e-28, 9.81798802e-28, 1.33972512e-27, ...,
3.81181367e-28, 2.52620004e-28, 1.62832120e-28]],

[[6.45712081e-11, 9.05932518e-11, 1.23620089e-10, ...,
3.51726438e-11, 2.33099365e-11, 1.50249636e-11],
[1.27670933e-10, 1.79122016e-10, 2.44423056e-10, ...,
6.95437545e-11, 4.60886736e-11, 2.97075303e-11],
[2.48518830e-10, 3.48671329e-10, 4.75783567e-10, ...,
1.35370927e-10, 8.97142597e-11, 5.78274202e-11],
...,
[1.68395875e-26, 2.36259013e-26, 3.22390018e-26, ...,
9.17270761e-27, 6.07902075e-27, 3.91837472e-27],
[4.72229548e-27, 6.62536935e-27, 9.04072577e-27, ...,
2.57228603e-27, 1.70472895e-27, 1.09882283e-27],
[1.30373407e-27, 1.82913581e-27, 2.49596881e-27, ...,
7.10158220e-28, 4.70642556e-28, 3.03363645e-28]],

...,

[[1.48263010e-28, 2.08012651e-28, 2.83846113e-28, ...,
8.07604843e-29, 5.35223274e-29, 3.44990654e-29],
[2.93147323e-28, 4.11284998e-28, 5.61223788e-28, ...,
1.59680555e-28, 1.05824959e-28, 6.82119476e-29],
[5.70628160e-28, 8.00589956e-28, 1.09245445e-27, ...,
3.10827405e-28, 2.05994383e-28, 1.32778488e-28],
...,
[3.86656529e-44, 5.42478194e-44, 7.40245007e-44, ...,
2.10616044e-44, 1.39581392e-44, 8.99704445e-45],
[1.08429401e-44, 1.52126192e-44, 2.07585587e-44, ...,
5.90626815e-45, 3.91425609e-45, 2.52302513e-45],
[2.99352519e-45, 4.19990874e-45, 5.73103492e-45, ...,
1.63060593e-45, 1.08065009e-45, 6.96558240e-46]],

[[2.69423740e-29, 3.78000869e-29, 5.15805537e-29, ...,
1.46758060e-29, 9.72608451e-30, 6.26917479e-30],
[5.32707708e-29, 7.47387651e-29, 1.01985662e-28, ...,
2.90171719e-29, 1.92305258e-29, 1.23954843e-29],
[1.03694626e-28, 1.45483314e-28, 1.98520969e-28, ...,
5.64835977e-29, 3.74333269e-29, 2.41285246e-29],
...,
[7.02632764e-45, 9.85792101e-45, 1.34517422e-44, ...,
3.82731757e-45, 2.53647493e-45, 1.63494412e-45],
[1.97038053e-45, 2.76443921e-45, 3.77224807e-45, ...,
1.07328784e-45, 7.11299142e-46, 4.58484465e-46],
[5.43983798e-46, 7.63207979e-46, 1.04144443e-45, ...,
2.96313929e-46, 1.96375879e-46, 1.26578657e-46]],

[[4.74830537e-30, 6.66186117e-30, 9.09052111e-30, ...,
2.58645391e-30, 1.71411841e-30, 1.10487503e-30],
[9.38840380e-30, 1.31719083e-29, 1.79738825e-29, ...,
5.11396631e-30, 3.38917457e-30, 2.18457158e-30],
[1.82750692e-29, 2.56398787e-29, 3.49871984e-29, ...,
9.95463020e-30, 6.59722365e-30, 4.25239449e-30],
...,
[1.23831512e-45, 1.73735318e-45, 2.37072574e-45, ...,
6.74523802e-46, 4.47026588e-46, 2.88141422e-46],
[3.47258502e-46, 4.87202854e-46, 6.64818392e-46, ...,
1.89155507e-46, 1.25358869e-46, 8.08029850e-47],
[9.58713284e-47, 1.34507246e-46, 1.83543447e-46, ...,
5.22221620e-47, 3.46091492e-47, 2.23081350e-47]]],


[[[7.06169378e-12, 1.00880505e-11, 1.40165741e-11, ...,
6.26316053e-12, 4.22640438e-12, 2.77386177e-12],
[1.41823387e-11, 2.02603161e-11, 2.81501587e-11, ...,
1.25786060e-11, 8.48809083e-12, 5.57087978e-12],
[2.80414826e-11, 4.00589293e-11, 5.56588164e-11, ...,
2.48705640e-11, 1.67827505e-11, 1.10148074e-11],
...,
[1.29847271e-26, 1.85494566e-26, 2.57730503e-26, ...,
1.15164199e-26, 7.77132360e-27, 5.10045314e-27],
[3.69862574e-27, 5.28370733e-27, 7.34130695e-27, ...,
3.28038676e-27, 2.21361737e-27, 1.45283510e-27],
[1.03719902e-27, 1.48170062e-27, 2.05870961e-27, ...,
9.19913008e-28, 6.20760771e-28, 4.07415955e-28]],

[[1.35689614e-11, 1.93840701e-11, 2.69326819e-11, ...,
1.20345892e-11, 8.12098622e-12, 5.32994272e-12],
[2.72511967e-11, 3.89299588e-11, 5.40901982e-11, ...,
2.41696433e-11, 1.63097665e-11, 1.07043799e-11],
[5.38813785e-11, 7.69727607e-11, 1.06947760e-10, ...,
4.77884957e-11, 3.22478573e-11, 2.11648226e-11],
...,
[2.49500002e-26, 3.56425624e-26, 4.95226126e-26, ...,
2.21286651e-26, 1.49325067e-26, 9.80046061e-27],
[7.10686580e-27, 1.01525814e-26, 1.41062348e-26, ...,
6.30322452e-27, 4.25343970e-27, 2.79160552e-27],
[1.99296570e-27, 2.84707029e-27, 3.95578627e-27, ...,
1.76760201e-27, 1.19278451e-27, 7.82844957e-28]],

[[2.52862289e-11, 3.61228851e-11, 5.01899843e-11, ...,
2.24268732e-11, 1.51337387e-11, 9.93253260e-12],
[5.07835476e-11, 7.25473246e-11, 1.00798955e-10, ...,
4.50409662e-11, 3.03938140e-11, 1.99479821e-11],
[1.00409812e-10, 1.43441402e-10, 1.99300850e-10, ...,
8.90555146e-11, 6.00949975e-11, 3.94413789e-11],
...,
[4.64951883e-26, 6.64211478e-26, 9.22871015e-26, ...,
4.12375327e-26, 2.78272428e-26, 1.82634973e-26],
[1.32438902e-26, 1.89196866e-26, 2.62874565e-26, ...,
1.17462769e-26, 7.92643200e-27, 5.20225344e-27],
[3.71396051e-27, 5.30561396e-27, 7.37174454e-27, ...,
3.29398748e-27, 2.22279519e-27, 1.45885865e-27]],

...,

[[5.92145098e-29, 8.45914566e-29, 1.17533355e-28, ...,
5.25185589e-29, 3.54397218e-29, 2.32596980e-29],
[1.18923343e-28, 1.69889084e-28, 2.36047880e-28, ...,
1.05475543e-28, 7.11752949e-29, 4.67135683e-29],
[2.35136597e-28, 3.35906644e-28, 4.66716574e-28, ...,
2.08547453e-28, 1.40728609e-28, 9.23626028e-29],
...,
[1.08880996e-43, 1.55542992e-43, 2.16115083e-43, ...,
9.65687803e-44, 6.51649776e-44, 4.27688939e-44],
[3.10141330e-44, 4.43055376e-44, 6.15591536e-44, ...,
2.75070684e-44, 1.85618736e-44, 1.21824764e-44],
[8.69723800e-45, 1.24245229e-44, 1.72629236e-44, ...,
7.71375813e-45, 5.20527311e-45, 3.41631013e-45]],

[[1.07632937e-29, 1.53760065e-29, 2.13637843e-29, ...,
9.54618511e-30, 6.44180175e-30, 4.22786512e-30],
[2.16164394e-29, 3.08803721e-29, 4.29059137e-29, ...,
1.91720619e-29, 1.29373797e-29, 8.49102450e-30],
[4.27402718e-29, 6.10570258e-29, 8.48340644e-29, ...,
3.79072205e-29, 2.55799355e-29, 1.67885510e-29],
...,
[1.97910636e-44, 2.82727140e-44, 3.92827723e-44, ...,
1.75530988e-44, 1.18448973e-44, 7.77400954e-45],
[5.63737203e-45, 8.05332195e-45, 1.11894745e-44, ...,
4.99990046e-45, 3.37395171e-45, 2.21438245e-45],
[1.58087818e-45, 2.25837871e-45, 3.13784438e-45, ...,
1.40211317e-45, 9.46151259e-46, 6.20975320e-46]],

[[1.89741344e-30, 2.71056819e-30, 3.76612705e-30, ...,
1.68285475e-30, 1.13559674e-30, 7.45311643e-31],
[3.81066650e-30, 5.44376423e-30, 7.56369377e-30, ...,
3.37975800e-30, 2.28067346e-30, 1.49684516e-30],
[7.53449349e-30, 1.07634730e-29, 1.49550220e-29, ...,
6.68249626e-30, 4.50937371e-30, 2.95957940e-30],
...,
[3.48887908e-45, 4.98407172e-45, 6.92498620e-45, ...,
3.09435816e-45, 2.08808457e-45, 1.37044576e-45],
[9.93787383e-46, 1.41968451e-45, 1.97254297e-45, ...,
8.81410340e-46, 5.94779025e-46, 3.90363688e-46],
[2.78686023e-46, 3.98119595e-46, 5.53156708e-46, ...,
2.47172329e-46, 1.66792821e-46, 1.09468993e-46]]]])}

现在我想从这个矩阵中绘制位置图像。如何从中绘制位置?

这应该可以做到:

import scipy.io
mat = scipy.io.loadmat('file.mat')

编辑

from mat4py import loadmat
data = loadmat('datafile.mat')

data现在将存储带有相应变量和值的字典

相关内容

  • 没有找到相关文章

最新更新