pogucam 0.1.8__py3-none-any.whl → 0.1.9__py3-none-any.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.
@@ -859,14 +859,18 @@ class StreamWidget(QLabel):
859
859
  # OVERTEXT
860
860
  # --------------------------------------------------------------------------------
861
861
 
862
- def overtext(self, blackbar=False):
862
+ def overtext(self, blackbar=False, image=None):
863
863
  """
864
864
  great font for small numbers
865
865
  """
866
866
  #
867
867
  #
868
868
  #
869
- if self.img is None:
869
+ selfimg = image
870
+ if selfimg is None:
871
+ selfimg = self.img
872
+ # ---------------------------
873
+ if selfimg is None:
870
874
  return
871
875
  RXT = f"XT:{self.r_xtend}" # CC LU ... for remote ok
872
876
  ZOO = f"ZOO:{self.zoomme:3.1f}"
@@ -895,30 +899,30 @@ class StreamWidget(QLabel):
895
899
  #
896
900
  overtext = f"{self.frame_time} # {self.frame_num} # {self.l_frame_num:6d} # {RXT} . {ZOO} . {ROO} . {LGA} . {SAV} {FIT} . {BUF}. {LAPS}"
897
901
  #
898
- position = ( 0, self.img.shape[0]-1 ) # 480 on x-axis
902
+ position = ( 0, selfimg.shape[0]-1 ) # 480 on x-axis
899
903
  #
900
904
 
901
905
  if blackbar:
902
- overlay = self.img.copy()
906
+ overlay = selfimg.copy()
903
907
  if self.resolution == "1920x1080":
904
908
  shade_height = 20
905
909
  else:
906
910
  shade_height = 10
907
- height, width = self.img.shape[:2]
911
+ height, width = selfimg.shape[:2]
908
912
  cv2.rectangle(overlay, (0, height - shade_height), (width, height), (0, 0, 0), -1)
909
913
  alpha = 0.5
910
914
  #alpha = 0.
911
915
  #cv2.addWeighted(overlay, alpha, self.frame, 1 - alpha, 0, self.frame)
912
- cv2.addWeighted(overlay, alpha, self.img, 1 - alpha, 0, self.img)
916
+ cv2.addWeighted(overlay, alpha, selfimg, 1 - alpha, 0, selfimg)
913
917
  #
914
918
  font = "di"
915
919
  if self.resolution == "1920x1080":
916
920
  font = "di2"
917
- self.img = iprint(self.img, str(overtext), font=font, position=position,color_rgb=(0,255,0) )
921
+ selfimg = iprint(selfimg, str(overtext), font=font, position=position,color_rgb=(0,255,0) )
918
922
  if self.SAVED_NOW:
919
- position = ( self.img.shape[1] - 20, self.img.shape[0]-1 ) # 480 on x-axis
920
- self.img = iprint(self.img, f"SAVE", font=font, position=position,color_rgb=(0,0,255) ) # bgr
921
-
923
+ position = ( selfimg.shape[1] - 20, selfimg.shape[0]-1 ) # 480 on x-axis
924
+ selfimg = iprint(selfimg, f"SAVE", font=font, position=position,color_rgb=(0,0,255) ) # bgr
925
+ self.img = selfimg
922
926
  #self.img = iprint(self.img, str(overtext), font="p7", position=position,color_rgb=(0,255,0) )
923
927
 
924
928
 
@@ -1106,6 +1110,8 @@ class StreamWidget(QLabel):
1106
1110
  mycnt += 1
1107
1111
  fff = fname1.replace(".jpg", f"_{mycnt:03d}.jpg")
1108
1112
  print(fff)
1113
+ if self.flag_print_over:
1114
+ self.overtext(blackbar=True) # ---- after ACCUM ------------------ img should be tagged
1109
1115
  if self.saving_jpg:
1110
1116
  cv2.imwrite(fff, i, [int(cv2.IMWRITE_JPEG_QUALITY), 90])
1111
1117
  else:
@@ -1679,8 +1685,10 @@ class StreamWidget(QLabel):
1679
1685
  self.img = rimg
1680
1686
  #### self.overtext(blackbar=True) # applies on img
1681
1687
 
1688
+ if self.saving_all: #
1689
+ self.SAVED_NOW = True
1682
1690
  if self.flag_print_over:
1683
- self.overtext(blackbar=True) #
1691
+ self.overtext(blackbar=True) # ---- after ACCUM ------------------ img should be tagged
1684
1692
 
1685
1693
 
1686
1694
  # # -- LAPS 1s 10s 60s but also accumulated local frames
@@ -1770,6 +1778,7 @@ class StreamWidget(QLabel):
1770
1778
  # ---- save ALL ----------------- -------------------------------------------- ************ "shift-s" ***********
1771
1779
  # ---- save ALL ----------------- -------------------------------------------- ************ "shift-s" ***********
1772
1780
  if self.saving_all: # --------------- Shift-S-------
1781
+
1773
1782
  # jpg and NO AVG
1774
1783
  if (len(self.FABuffer) < 2) and (not self.l_show_accum) and (not self.saving_fits_only):
1775
1784
  self.save_img( time_tag=self.frame_time, dumpbuffer=False, use_fits=False) # every frame, BURSTING JPGS!
@@ -1845,6 +1854,9 @@ class StreamWidget(QLabel):
1845
1854
  pass
1846
1855
 
1847
1856
 
1857
+ if self.flag_print_over:
1858
+ ####self.overtext(blackbar=True)
1859
+ self.SAVED_NOW = False # this is for overtext RED save
1848
1860
 
1849
1861
 
1850
1862
  # ------------------------------------- -------------------- TRANNS OR NOT TRANS
@@ -1862,9 +1874,7 @@ class StreamWidget(QLabel):
1862
1874
  self.img = cv2.cvtColor(self.img, cv2.COLOR_GRAY2BGR) #I want to keep 3 channels
1863
1875
  self.use_frame(stripes=True)# img = self.frame
1864
1876
 
1865
- if self.flag_print_over:
1866
- #self.overtext(blackbar=True)
1867
- self.SAVED_NOW = False # this is for overtext RED save
1877
+
1868
1878
 
1869
1879
  #=============================== --------------------- =================== UPDATE/SHOW
1870
1880
  #=============================== --------------------- =================== UPDATE/SHOW
@@ -1975,9 +1985,11 @@ class StreamWidget(QLabel):
1975
1985
  if (key == Qt.Key.Key_P):
1976
1986
  if ( len(parts_set) == 0):
1977
1987
  self.flag_print = not self.flag_print
1988
+ print(f"i... termtext: {self.flag_print}")
1978
1989
  #print("i... flasg print ", self.flag_print)
1979
1990
  elif (parts_set == {'Shift'}):
1980
1991
  self.flag_print_over = not self.flag_print_over
1992
+ print(f"i... overtext: {self.flag_print_over}")
1981
1993
  elif (parts_set == {'Ctrl'}) :
1982
1994
  pass
1983
1995
  # ----------------------------------------------------------------- e expo
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pogucam
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Add your description here
5
5
  Author-email: jaromrax <jaromrax@gmail.com>
6
6
  Requires-Python: >=3.12
@@ -1,9 +1,9 @@
1
1
  pogucam/__init__.py,sha256=Iij7VvXCrFPMtTia41mQ7LxFLaulf_fD5cb-AyjpUo0,53
2
2
  pogucam/buffers.py,sha256=9nW9W8z3wjaLcfFrZqmsnsowxQOWXTweOuHVjwWWIn8,6368
3
- pogucam/explore_u24_uni.py,sha256=1_P7_5IYgxIKcTAh5l8FtXXndN162KS59Qlb9m7TQmM,110637
3
+ pogucam/explore_u24_uni.py,sha256=e2qpEagex5vqauXhPyaKOvxQelUjNyGnBJypoZmlZTk,111220
4
4
  pogucam/installation.md,sha256=8qspiLlYjEBx5CedRfBU7Mm0A2pz0lfAnaupZyBm5Eo,128
5
5
  pogucam/text_write.py,sha256=hyRyA1M5z-pda963T-k0i8fvvAlv1p3YBTZtYNdOeoE,19304
6
- pogucam-0.1.8.dist-info/METADATA,sha256=Rdr2jXmn_yWxnwj0YagSp4UFtZanb4JMXu_w0SNVnUM,466
7
- pogucam-0.1.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- pogucam-0.1.8.dist-info/entry_points.txt,sha256=-97N0LsXIR8h0rJMzIMuNeNwuY8LvPYPTqnXsuAnVsM,63
9
- pogucam-0.1.8.dist-info/RECORD,,
6
+ pogucam-0.1.9.dist-info/METADATA,sha256=frJgje8YmVhg6yTv6Vh_SjoSy-k66L9ixETyFAY-xNs,466
7
+ pogucam-0.1.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ pogucam-0.1.9.dist-info/entry_points.txt,sha256=-97N0LsXIR8h0rJMzIMuNeNwuY8LvPYPTqnXsuAnVsM,63
9
+ pogucam-0.1.9.dist-info/RECORD,,