video699.event.imagehash

This module implements a screen event detector that matches image hashes extracted from document page image data with image hashes extracted from projection screen image data. Related classes and functions are also implemented.

Module Contents

video699.event.imagehash.LOGGER
video699.event.imagehash.CONFIGURATION
video699.event.imagehash._hash_image(image)

Produces an image hash for an image.

Parameters:image (ImageABC) – An image.
Returns:image_hash – A hash of the image.
Return type:array_like
class video699.event.imagehash.ImageHashPageDetector(documents)

Bases: video699.interface.PageDetectorABC

A page detector using approximate nearest neighbor search of image hashes.

The following image hashes are used to represent images: - average hash and perception hash [Krawetz11], - difference hash [Krawetz13], and - wavelet hash [Petrov16].

Parameters:documents (set of DocumentABC) – The provided document pages.
detect(self, frame, appeared_screens, existing_screens, disappeared_screens)
class video699.event.imagehash.RTreeDequeImageHashEventDetector(video, screen_detector, documents)

Bases: video699.event.screen.ScreenEventDetectorABC

A screen event detector that wraps ImageHashPageDetector and serves as a facade.

A ScreenEventDetector is instantiated with the RTreeDequeConvexQuadrangleTracker convex quadrangle tracker and the ImageHashPageDetector page detector.

Parameters:
  • video (VideoABC) – The video in which the events are detected.
  • screen_detector (ScreenDetectorABC) – A screen detector that will be used to detect lit projection screens in video frames.
  • documents (set of DocumentABC) – Documents whose pages are matched against detected lit projection screens.
video

VideoABC – The video in which the events are detected.

video
__iter__(self)