PaIRS-UniNa 0.2.4__cp311-cp311-win_amd64.whl → 0.2.6__cp311-cp311-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of PaIRS-UniNa might be problematic. Click here for more details.

Files changed (58) hide show
  1. PaIRS_UniNa/Changes.txt +35 -0
  2. PaIRS_UniNa/Custom_Top.py +1 -1
  3. PaIRS_UniNa/Explorer.py +3063 -3049
  4. PaIRS_UniNa/FolderLoop.py +371 -371
  5. PaIRS_UniNa/Input_Tab.py +717 -709
  6. PaIRS_UniNa/Input_Tab_CalVi.py +4 -4
  7. PaIRS_UniNa/Input_Tab_tools.py +3018 -3009
  8. PaIRS_UniNa/Output_Tab.py +2 -2
  9. PaIRS_UniNa/PaIRS.py +17 -17
  10. PaIRS_UniNa/PaIRS_PIV.py +56 -1
  11. PaIRS_UniNa/PaIRS_pypacks.py +323 -60
  12. PaIRS_UniNa/Process_Tab.py +8 -13
  13. PaIRS_UniNa/Process_Tab_Disp.py +9 -4
  14. PaIRS_UniNa/Saving_tools.py +277 -277
  15. PaIRS_UniNa/TabTools.py +63 -21
  16. PaIRS_UniNa/Vis_Tab.py +293 -115
  17. PaIRS_UniNa/Whatsnew.py +13 -0
  18. PaIRS_UniNa/_PaIRS_PIV.pyd +0 -0
  19. PaIRS_UniNa/__init__.py +3 -3
  20. PaIRS_UniNa/gPaIRS.py +3825 -3600
  21. PaIRS_UniNa/icons/flaticon_PaIRS_download_warning.png +0 -0
  22. PaIRS_UniNa/icons/pencil_bw.png +0 -0
  23. PaIRS_UniNa/icons/pylog.png +0 -0
  24. PaIRS_UniNa/icons/python_warning.png +0 -0
  25. PaIRS_UniNa/icons/queue.png +0 -0
  26. PaIRS_UniNa/icons/uninitialized.png +0 -0
  27. PaIRS_UniNa/icons/window.png +0 -0
  28. PaIRS_UniNa/listLib.py +301 -301
  29. PaIRS_UniNa/parForMulti.py +433 -433
  30. PaIRS_UniNa/parForWorkers.py +46 -1
  31. PaIRS_UniNa/pivParFor.py +1 -1
  32. PaIRS_UniNa/procTools.py +17 -7
  33. PaIRS_UniNa/rqrdpckgs.txt +9 -0
  34. PaIRS_UniNa/stereoPivParFor.py +1 -1
  35. PaIRS_UniNa/tabSplitter.py +606 -606
  36. PaIRS_UniNa/ui_Calibration_Tab.py +542 -542
  37. PaIRS_UniNa/ui_Custom_Top.py +294 -294
  38. PaIRS_UniNa/ui_Input_Tab.py +1098 -1098
  39. PaIRS_UniNa/ui_Input_Tab_CalVi.py +1280 -1280
  40. PaIRS_UniNa/ui_Log_Tab.py +261 -261
  41. PaIRS_UniNa/ui_Output_Tab.py +2360 -2360
  42. PaIRS_UniNa/ui_Process_Tab.py +3808 -3808
  43. PaIRS_UniNa/ui_Process_Tab_CalVi.py +1547 -1547
  44. PaIRS_UniNa/ui_Process_Tab_Disp.py +1139 -968
  45. PaIRS_UniNa/ui_Process_Tab_Min.py +435 -435
  46. PaIRS_UniNa/ui_ResizePopup.py +203 -203
  47. PaIRS_UniNa/ui_Vis_Tab.py +1626 -1533
  48. PaIRS_UniNa/ui_Vis_Tab_CalVi.py +1249 -1249
  49. PaIRS_UniNa/ui_Whatsnew.py +131 -131
  50. PaIRS_UniNa/ui_gPairs.py +873 -849
  51. PaIRS_UniNa/ui_infoPaIRS.py +550 -428
  52. PaIRS_UniNa/whatsnew.txt +4 -4
  53. {PaIRS_UniNa-0.2.4.dist-info → pairs_unina-0.2.6.dist-info}/METADATA +47 -30
  54. {PaIRS_UniNa-0.2.4.dist-info → pairs_unina-0.2.6.dist-info}/RECORD +56 -51
  55. {PaIRS_UniNa-0.2.4.dist-info → pairs_unina-0.2.6.dist-info}/WHEEL +1 -1
  56. PaIRS_UniNa/stereo.py +0 -685
  57. PaIRS_UniNa-0.2.4.dist-info/LICENSE +0 -19
  58. {PaIRS_UniNa-0.2.4.dist-info → pairs_unina-0.2.6.dist-info}/top_level.txt +0 -0
@@ -388,6 +388,7 @@ class StereoDisparity_ParFor_Worker(ParForWorker):
388
388
  if self.isKilled: return self.stopDisparity(it,flagOut,flagOutIter)
389
389
  try:
390
390
  self.disp.initAllocDisp()
391
+ self.disp.dispAvCo.NImg=2*len(imList[0][0]) if spivIn.FlagImgTau==0 else len(imList[0][0])
391
392
  except Exception as inst: #ValueError as exc:
392
393
  FlagInitError=True
393
394
  stringaErr=f'\n!!!!!!!!!! Error during disparity process initialization:\n{inst}\n'
@@ -473,7 +474,7 @@ class StereoDisparity_ParFor_Worker(ParForWorker):
473
474
  pri.Error.red(stringaErr)
474
475
  else:
475
476
  flagOut|=FLAG_PROC[kConst]# per completezza aggiungo anche processato
476
- stampa+=f" Laser plane eq. : z (mm) = {ve.PianoLaser[0]:.4g} + {ve.PianoLaser[1]:.4g} * x + {ve.PianoLaser[2]:.4g} * y\n Residual calib. error = {dAC.dOrtMean:.4g} pixels\n Estimated laser thick. = {dAC.DeltaZ:.4g} pixels (approx. {dAC.DeltaZ * dP.RisxRadd / abs(dAC.ta0Mean - dAC.ta1Mean):.4g} mm)\n"
477
+ stampa+=f" Laser plane eq. : z (mm) = {ve.PianoLaser[0]:.4g} + {ve.PianoLaser[1]:.4g} * x + {ve.PianoLaser[2]:.4g} * y\n Residual calib. err. ort. = {dAC.dOrtMean:.4g} pixels\n Residual calib. err. par. = {dAC.dParMean:.4g} pixels\n Estimated laser thick. = {dAC.DeltaZ:.4g} pixels (approx. {dAC.DeltaZ * dP.RisxRadd / abs(dAC.ta0Mean - dAC.ta1Mean):.4g} mm)\n Outliers % = {dAC.percOutlier*100:g} \n"
477
478
  data.OUT_dict['zconst']=float(ve.PianoLaser[0])
478
479
  data.OUT_dict['xterm']=float(ve.PianoLaser[1])
479
480
  data.OUT_dict['yterm']=float(ve.PianoLaser[2])
@@ -484,6 +485,10 @@ class StereoDisparity_ParFor_Worker(ParForWorker):
484
485
  # saveResults(data,-1,Var,nameVar)
485
486
  #else:
486
487
  saveResults(data,f'it{it+1}',Var,nameVar)
488
+ CC_rot=self.create_CC_image(self.disp.vect.CCrot)
489
+ nameFileOut=data.resF(f'it{it+1}',string='dispMap')
490
+ self.save_CC_image(CC_rot,nameFileOut)
491
+ pass
487
492
  except Exception as inst:
488
493
  errorPrint=f"\n!!!!!!!!!! Error while saving the results:\n{str(inst)}\n"
489
494
  stampa+=errorPrint
@@ -546,3 +551,43 @@ class StereoDisparity_ParFor_Worker(ParForWorker):
546
551
  self.signals.progress.emit(procID,ind,flagOutIter,[],'')
547
552
  self.signals.finished.emit(data,'')
548
553
 
554
+
555
+ def create_CC_image(self,CC):
556
+ # Get the dimensions of the input matrix
557
+ n, m, h, w = CC.shape
558
+
559
+ # Normalize the matrix values to the range [0, 65535]
560
+ CC_min = CC.min()
561
+ CC_max = CC.max()
562
+ CC_mean = 0.5*(CC_min+CC_max)
563
+ CC_mean_normalized = (CC_mean + 1.0)/2.0 * 65535
564
+
565
+ CC_normalized = (CC + 1.0)/2.0 * 65535
566
+ CC_normalized = CC_normalized.astype(np.uint16) # Convert to 16-bit integers
567
+
568
+ # Initialize the final image grid with the correct size
569
+ h=2*self.disp.dispAvCo.N_NormEpi+1
570
+ grid_height = h * n
571
+ grid_width = w * m
572
+ CC_rot = np.zeros((grid_height, grid_width), dtype=np.uint16)
573
+
574
+ # Populate the grid with submatrices
575
+ try:
576
+ for i in range(n):
577
+ for j in range(m):
578
+ # Copy the submatrix (w x h) into the appropriate position in the grid
579
+ CC_rot[i*h:(i+1)*h, j*w:(j+1)*w] = CC_normalized[i, j, :h, :]
580
+ CC_rot[i*h, j*w:(j+1)*w] = CC_mean_normalized
581
+ CC_rot[i*h:(i+1)*h, j*w] = CC_mean_normalized
582
+ CC_rot[(i+1)*h-1, j*w:(j+1)*w] = CC_mean_normalized
583
+ CC_rot[i*h:(i+1)*h, (j+1)*w-1] = CC_mean_normalized
584
+ except:
585
+ pri.Error.red(f'Error while generating disparity map image:\n{traceback.format_exc()}\n\n')
586
+ pass
587
+
588
+ return CC_rot
589
+
590
+ def save_CC_image(self,CC,file_path):
591
+ image = Image.fromarray(CC)
592
+ image.save(file_path)
593
+ return
PaIRS_UniNa/pivParFor.py CHANGED
@@ -78,7 +78,7 @@ def procPIV(i,procId ,PIV,data:dataTreePar,numUsedProcs,*args,**kwargs):
78
78
  where FLAG_FINALIZED_OR_ERR = [ p|e for (p,e) in zip(FLAG_FINALIZED,FLAG_READ_ERR)]
79
79
  numProcOrErrTot=sum(1 if (f&FLAG_FINALIZED_OR_ERR[0])or(not f&FLAG_PROC[0]) else 0 for f in flagOut)
80
80
  to delete images
81
- pa='C:\desk\dl\apairs\jetcross\'
81
+ pa='C:\\desk\\dl\\apairs\\jetcross\\'
82
82
  no='zR2jet0_0004a'
83
83
  I =imread([pa no '.png']);
84
84
  I=I*0+1;
PaIRS_UniNa/procTools.py CHANGED
@@ -168,14 +168,20 @@ class dataTreePar(TABpar):
168
168
  self.assignDataName()
169
169
  return
170
170
 
171
- def resF(self,i):
171
+ def resF(self,i,string=''):
172
172
  if self.ndig<-1: return ''
173
- if type(i)==str:
174
- return f"{self.outPathRoot}_{i}{self.outExt}"
175
- elif type(i)==int:
176
- return f"{self.outPathRoot}_{i:0{self.ndig:d}d}{self.outExt}"
173
+ if string=='dispMap':
174
+ fold=os.path.dirname(self.outPathRoot)
175
+ rad=os.path.splitext(os.path.basename(self.outPathRoot))[0]
176
+ if rad[-1]!='_': rad+='_'
177
+ return myStandardRoot(os.path.join(fold, f'dispMap_rot_{rad}{i}.png'))
177
178
  else:
178
- return ''
179
+ if type(i)==str:
180
+ return f"{self.outPathRoot}_{i}{self.outExt}"
181
+ elif type(i)==int:
182
+ return f"{self.outPathRoot}_{i:0{self.ndig:d}d}{self.outExt}"
183
+ else:
184
+ return ''
179
185
 
180
186
  def setProc(self,INP:INPpar=INPpar(),OUT:OUTpar=OUTpar(),PRO:PROpar=PROpar(),PRO_Min:PROpar_Min=PROpar_Min(),PRO_Disp:PROpar_Disp=PROpar_Disp()):
181
187
  if INP is None: return
@@ -361,7 +367,7 @@ class dataTreePar(TABpar):
361
367
  continue
362
368
  if self.Step==StepTypes.min: #minimum
363
369
  cont+=2
364
- flag=(p&FLAG_FINALIZED[0]) and (p&FLAG_FINALIZED[1])
370
+ #flag=(p&FLAG_FINALIZED[0]) and (p&FLAG_FINALIZED[1])
365
371
  if (p&FLAG_FINALIZED[0]):
366
372
  if (p&FLAG_FINALIZED[1]):
367
373
  LogProc+=(self.list_print[i])
@@ -375,6 +381,7 @@ class dataTreePar(TABpar):
375
381
  else:# la b nonè stata proprio letta
376
382
  cont-=1
377
383
  #pri.Process.magenta(f'LogProc wrong {i} {p} {splitAs.join(sAppo[1:-1])} {hex(p)} ')
384
+ LogProc+='\n'
378
385
  else:
379
386
  sAppo=self.list_print[i].split('\n')
380
387
  if (p&FLAG_FINALIZED[1]):
@@ -1289,6 +1296,9 @@ def data2Disp(data:dataTreePar):
1289
1296
  dAC.N_NormEpi=PRO_Disp.SemiWidth_Epipolar # Semiwidth in the direction normal to the epipolar line
1290
1297
  dAC.RaggioFiltro=PRO_Disp.Filter_SemiWidth # Semiwidth of the filter for the detection of the maximum in the displacement map
1291
1298
  dAC.SogliaCor = PRO_Disp.Threshold # Threshold for the determination of point used in the baricentric search of the maximum in the disp map
1299
+ dAC.nIterMaxValid = PRO_Disp.Nit_OutDet
1300
+ dAC.numStd = PRO_Disp.Std_Threshold
1301
+
1292
1302
  #%% Volume ********************************
1293
1303
  dP.xinfZC = OUT.x_min # Coordinata x inferiore
1294
1304
  dP.yinfZC = OUT.y_min # Coordinata y inferiore
@@ -0,0 +1,9 @@
1
+ scipy 1.14.0 1.16.1 0
2
+ matplotlib 3.9.0 3.10.6 0
3
+ pillow 10.4.0 11.3.0 0
4
+ numpy 2.0.0 2.3.2 0
5
+ pyside6 6.7.0 6.9.2 0
6
+ unidecode 1.3.0 1.4.0 0
7
+ psutil 6.0.0 7.0.0 0
8
+ debugpy 1.6.6 1.8.16 0
9
+ certifi 2025.7.14 2025.8.3 0
@@ -67,7 +67,7 @@ def procStereoPIV(i,procId ,StereoPIV,data:dataTreePar,numUsedProcs,*args,**kwar
67
67
  where FLAG_FINALIZED_OR_ERR = [ p|e for (p,e) in zip(FLAG_FINALIZED,FLAG_READ_ERR)]
68
68
  numProcOrErrTot=sum(1 if (f&FLAG_FINALIZED_OR_ERR[0])or(not f&FLAG_PROC[0]) else 0 for f in flagOut)
69
69
  to delete images
70
- pa='C:\desk\dl\apairs\jetcross\'
70
+ pa='C:\\desk\\dl\\apairs\\jetcross\\'
71
71
  no='zR2jet0_0004a'
72
72
  I =imread([pa no '.png']);
73
73
  I=I*0+1;