commit
71d76ae0dd
|
|
@ -186,7 +186,7 @@ class Script(scripts.Script):
|
|||
|
||||
with gr.Row():
|
||||
gr.HTML(value='<p>Set the preprocessor to [invert] If your image has white background and black lines.</p>')
|
||||
|
||||
|
||||
webcam_enable = ToolButton(value=camera_symbol)
|
||||
webcam_mirror = ToolButton(value=reverse_symbol)
|
||||
send_dimen_button = ToolButton(value=tossup_symbol)
|
||||
|
|
@ -647,7 +647,7 @@ class Script(scripts.Script):
|
|||
k = min(k0, k1)
|
||||
borders = np.concatenate([detected_map[0, :, :], detected_map[-1, :, :], detected_map[:, 0, :], detected_map[:, -1, :]], axis=0)
|
||||
high_quality_border_color = np.median(borders, axis=0).astype(detected_map.dtype)
|
||||
high_quality_background = np.tile(high_quality_border_color[None, None], [w, h, 1])
|
||||
high_quality_background = np.tile(high_quality_border_color[None, None], [h, w, 1])
|
||||
detected_map = high_quality_resize(detected_map, (safeint(old_w * k), safeint(old_h * k)))
|
||||
new_h, new_w, _ = detected_map.shape
|
||||
pad_h = max(0, (h - new_h) // 2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue