5 from skimage.util
import img_as_ubyte
7 from rose_v1_repo.fft_structure_extraction
import FFTStructureExtraction
as structure_extraction
9 import rose_v1_repo.fft_structure_extraction
12 def main(path_to_image, path_to_folder, filter_level, par):
15 grid_map = img_as_ubyte(io.imread(path_to_image))
16 rose = structure_extraction(grid_map, peak_height=0.2, par=50)
19 rose.simple_filter_map(filter_level)
26 rose.generate_initial_hypothesis_simple()
28 rose.find_walls_flood_filing()
35 visualisation = {
"Binary map":
False,
36 "FFT Spectrum":
False,
37 "Unfolded FFT Spectrum":
False,
38 "FFT Spectrum Signal":
False,
39 "FFT Spectrum Noise":
False,
40 "Map Reconstructed Signal":
False,
41 "Map Reconstructed Noise":
False,
42 "Map Scored Good":
True,
43 "Map Scored Bad":
False,
44 "Map Scored Diff":
False,
45 "Map Split Good":
False,
46 "FFT Map Split Good":
False,
47 "Side by Side":
False,
48 "Histogram of pixels quality":
False,
49 "Histogram of scaled pixels quality":
False,
50 "Simple Filtered Map":
False,
51 "FFT spectrum with directions":
False,
52 "Map with directions":
False,
53 "Partial Scores":
False,
54 "Partial Reconstructs":
False,
55 "Threshold Setup with Clusters":
False,
56 "Cluster Filtered Map":
False,
57 "Map with walls":
False,
58 "Map with slices":
False,
59 "Wall lines from mbb":
True,
60 "Labels and Raw map":
False,
61 "Raw line segments":
False,
62 "Clustered line segments":
True,
63 "Short wall lines from mbb":
True,
64 "Short wall lines over original map":
True
66 rose.show(visualisation, path_to_folder, rose.shape)