This repository contains augmentation from our paper.
- bezier>=2020.5.19
pip install hwb
Import:
from hwb import HandWrittenBlot
Using:
blots = HandWrittenBlot()
new_img = blots(img)
Done.
Config of rectangle that should contains blot.
rectangle_info = {
'x': (None, None), ## Minimum and maximum X coordinate for blot position. Can be single int value.
'y': (None, None), ## Minimum and maximum Y coordinate for blot position. Can be single int value.
'h': (None, None), ## Minimum and maximum blots Height. Can be single int value.
'w': (None, None), ## Minimum and maximum blots Width. Can be single int value.
}
Config of different blots parameters.
blot_params = {
'incline': (-10, 10), # Incline of blots. All left or right points of blot will be shifted on this value. Can be single int value.
'intensivity': (0.5, 0.9), # Points count that will be generated for blots. Can be single float value (0, 1).
'transparency': (0.05, 0.4), # Blots transparency. Can be single float value (0, 1).
'count': (1, 5), # Min Max Blots count.
}
from hwb import HandWrittenBlot
blots = HandWrittenBlot(rectangle_info, blot_params)
new_img = blots(img)
Issues should be raised directly in the repository. For professional support and recommendations please welcomedenk@gmail.com.