whoops when fixing the previous whoops...

tested w/ coeff but when reverting back to source forgot the cv flag.
i think it is fix, but will have to look again with fresh eyes some other time...
This commit is contained in:
Bruno Madeira
2024-07-13 01:28:19 +01:00
parent f6d6c6696a
commit bbab0d8ea0
+2 -2
View File
@@ -66,9 +66,9 @@ def seamless_horizontal(use_parallel, image, block_size, overlap, tolerance, ver
# left & right overlap errors
lo_errs = cv.matchTemplate(image=aux_texture[:, :-block_size],
templ=image[:overlap, :], method=cv.TM_CCOEFF_NORMED)
templ=image[:overlap, :], method=cv.TM_SQDIFF)
ro_errs = cv.matchTemplate(image=np.roll(aux_texture, -block_size + overlap, axis=1)[:, :-block_size],
templ=image[block_size - overlap:block_size, :], method=cv.TM_CCOEFF_NORMED)
templ=image[block_size - overlap:block_size, :], method=cv.TM_SQDIFF)
err_mat = np.add(lo_errs, ro_errs) if version <= 1 else np.minimum(lo_errs, ro_errs)
min_val = np.min(err_mat[err_mat > 0 if tolerance > 0 else True]) # ignore zeroes to enforce tolerance usage