-
Notifications
You must be signed in to change notification settings - Fork 0
/
definition.py
47 lines (30 loc) · 1.5 KB
/
definition.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import cv2
# Template Sysnthesis definitions
#
# all numpy arrays
original_sample = cv2.imread("args.sample_path") #- original image, the source pattern to be compared and reproduced
# sample - original_sample in gray scale, converted to floating point and
# normalize to the range [0., 1.]
# used to template matching search and copy fragments to window
# window - the result window in gray scale of template synthesis algorithm.
# Dimensions defined in parameters
# pixels copied from sample
# started with one randomic seed from sample
# the template grows here
# base to pattern reconstruction
# base to template matching comparsion
# result_window - the result window in rgb color of template synthesis.
# same dimensions defined in parameters
# pixels copied from rgb original sample
# same pixels coords defined in window seach
# mask - information about pixels already synthesized,
# same dimension of window and result_window
# sample_semantic_mask - diferent regions of patterns of input image
# 0 salt,
# 1 litofacies,
# 2 frontier
# oringinal sample image size
# generat_mask - mask to generate, same result windows size
# patch mask - fragment to syntehtize
# control mask - mask to control the synthesis
# control mask expansion - new control mask expansion with no interruptions