similar to searchBySize.py
calculates a binary image for the input
modified
modified
...