@@ -48,7 +48,6 @@ def estimate_watermark (face_J, orig_J, strength, window):
4848 J_delta = face_J - J_mean # J´ = J - µ
4949 else :
5050 J_delta = face_J - orig_J
51- # TODO: ensure J_delta always != 0
5251 dprint ("J_delta:" , J_delta .shape , J_delta .min (), '...' , J_delta .max ())
5352 if config .will_plot ('MSCN' ): # MSCN = Mean Substracted Contrast Normalization
5453 show (J = face_J , J_mean = J_mean , J_var = J_var , J_delta = J_delta )
@@ -115,7 +114,7 @@ def find_peaks (S2_uni, S2j, window):
115114 S2M_mean = common .local_mean (S2M_uni , window ) # µ_S´ = local mean of S´
116115 dprint ("S2M_mean:" , S2M_mean .shape , S2M_mean .min (), '...' , S2M_mean .max ())
117116 S2M_std = np .std (S2M_uni ) # standard deviation of S´ - "σ²_S´"
118- dprint ("S2M_std:" , S2M_std .shape , S2M_std .min (), '...' , S2M_std .max ()) # TODO: useless
117+ dprint ("S2M_std:" , S2M_std .shape , S2M_std .min (), '...' , S2M_std .max ())
119118 S2M_var = S2M_std ** 2 # global variance of S´ - "σ²_S´"
120119 # S2M_var = common.local_variance (S2M_uni, S2M_uni.shape) # global variance of S´ - "σ²_S´"
121120 # dprint ("S2M_var:", S2M_var.shape, S2M_var.min(), '...', S2M_var.max())
@@ -507,7 +506,7 @@ def watermark_from_grid (grid, uz, LR, Ldim, Lwu, face_J, orig_J, wmasked_up, W_
507506 # skip decoding step if minimum ws_score is not reached
508507 wmi = None
509508 if ws_score >= min_ws_score :
510- wmi = pixels_to_watermark (ws_Y , ws_score , conv_decoder , args ) # TODO: when this becomes too expensive, run once per grid list
509+ wmi = pixels_to_watermark (ws_Y , ws_score , conv_decoder , args )
511510 # add statistics
512511 wmi ['regularity' ] = grid .features ['regularity' ]
513512 wmi ['coverage' ] = coverage
@@ -836,7 +835,6 @@ def watermark_from_grid_lists (grid_lists, face_J, orig_J, W_est, wmasked, S2_xp
836835 wmi_time = args .startup_time
837836
838837 # Detect lists of grids with decreasing regularity
839- # TODO: for testing we use either peaks2grid or cornersync, but for the final version we should use both
840838 for grid_list in grid_lists :
841839 # peaks2grid can send us empty grid lists?
842840 if len (grid_list ) < 1 :
@@ -876,6 +874,3 @@ def watermark_from_grid_lists (grid_lists, face_J, orig_J, W_est, wmasked, S2_xp
876874
877875 done = best_jsd > jsd_window_threshold or done_expecting
878876 return wmi_list , done
879- # TODO: Xsum = Bsum ^ m_enc
880- # TODO: dprint ("Xsum:", Xsum.shape, Xsum.min(), '...', Xsum.max())
881- # TODO: show (title = "Summarized Top 8", Ysum=Ysum, Bsum=Bsum, m=m_enc, xor=Xsum)
0 commit comments