dwettstein / pattern-recognition-2016

MIT License
0 stars 1 forks source link

search function with display #15

Open fmeyenhofer opened 8 years ago

fmeyenhofer commented 8 years ago

show all the matches (image and document coordinates)

if there is time; pull out all the documents and highlight the words. (generat a html file, crop the non-relevant curves in the svg file out and write a new one, create the html-code to use the pages as background images and overlay the svg's)

jungomi commented 8 years ago

See branch Visualization.

Images can be filtered by Paths or by word ids (e.g. '270-01-01'). The images and svgs can also be directly given by the path or selected with their id (with the corresponding methods).

Example

visual = HTMLVisualization()
visual.add_image('images/270.jpg', 'svgs/270.svg')
visual.add_image_by_id('271', word_ids=['271-01-01', '271-04-07']) 
visual.save('my_file.html')

Creates my_file.html displaying the images 270 (entire svg mask) and 271 (svg mask only for the given words)