Skip to content

Commit

Permalink
remove un-needed log
Browse files Browse the repository at this point in the history
  • Loading branch information
remov-b4-flight committed Jul 7, 2024
1 parent 0d7cb9a commit a2d05dd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions evalfocus.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,8 @@ def get_resize_factor(long_side) :
# Get result
hist, bins = np.histogram(laplacian, bins = 32, range = (0,255))
power_length = len(hist)
if (verbose >= 3) :
print("(orig)hist=", hist, end=", ")

#determine power start
# Determine power calc. start/end
power_start = 0
power_end = 0
max_hist = 0
Expand All @@ -185,14 +183,15 @@ def get_resize_factor(long_side) :
else :
if (power_end != 0 and hist[i] != 0 and (hist[i - 1] / hist[i]) > HIST_RISE) :
power_start = i
# Limit power_start
if (power_start == 0 or (power_end - power_start) > POWER_RANGE ) :
power_start = power_end - POWER_RANGE

if (verbose >= 3) :
print("power_start=", power_start, end=", ")
print("power_end=", power_end)
print("hist=", hist[ power_start : power_end], end=", ")
# Compute the power
# Calc. the power
power = 0
for i in range(power_start, power_end) :
power += hist[i] * i
Expand Down

0 comments on commit a2d05dd

Please sign in to comment.