Ejemplo n.º 1
0
class DoubleYellowPlate(DoublePlate):
    '''
    普通摩托车后号牌:黄底黑字黑框线。
    '''
    _FG_GENERATOR = CharsGenerator()
    _BG_FILES = [
        osp.join(resource_dir, 'template/double_yellow1.bmp'),
        osp.join(resource_dir, 'template/double_yellow2.bmp'),
    ]
    _CATEGORY = 'double_yellow'
Ejemplo n.º 2
0
class SingleYellowPlate(SinglePlate):
    '''
    大型汽车号牌
    440mm×140mm
    黄底黑字黑框线
    '''
    _FG_GENERATOR = CharsGenerator()
    _BG_FILES = [
        osp.join(resource_dir, 'template/single_yellow1.bmp'),
        osp.join(resource_dir, 'template/single_yellow2.bmp'),
    ]
    _CATEGORY = 'single_yellow'
Ejemplo n.º 3
0
class DoubleYellowPlateXue(DoublePlate):
    '''
    教练摩托车后号牌黄底黑字,黑“学”字黑框线教练用摩托车。
    '''
    _FG_GENERATOR = CharsGenerator()
    _BG_FILES = [
        osp.join(resource_dir, 'template/double_yellow1.bmp'),
        osp.join(resource_dir, 'template/double_yellow2.bmp'),
    ]
    _REGULAR = SinglePlate._REGULAR[:-1] + [
        (['black'], ['学']),
    ]
    _CATEGORY = 'single_yellow_xue'
Ejemplo n.º 4
0
class DoubleWhitePlateJing(DoublePlate):
    '''
    警用摩托车号牌白底黑字,红“警”字黑框线摩托车类警车。
    '''
    _FG_GENERATOR = CharsGenerator()
    _BG_FILES = [
        osp.join(resource_dir, 'template/double_white2.bmp'),
        osp.join(resource_dir, 'template/double_white1.bmp'),
    ]
    _REGULAR = SinglePlate._REGULAR[:-1] + [
        (['red'], ['警']),
    ]
    _CATEGORY = 'double_white_jing'
Ejemplo n.º 5
0
class ShuffleBlack(SinglePlate):
    _FG_GENERATOR = CharsGenerator()
    _REGULAR = [
        (['white', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['white', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['white', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['white', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['white', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['white', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['white', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
    ]
    _BG_FILES = [
        osp.join(resource_dir, 'template/single_black1.bmp'),
        osp.join(resource_dir, 'template/single_black2.bmp'),
    ]
    _CATEGORY = 'single_black'
Ejemplo n.º 6
0
class ShuffleDoubleYellow(DoublePlate):
    _FG_GENERATOR = CharsGenerator()
    _REGULAR = [
        (['black', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['black', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['black', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['black', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['black', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['black', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
        (['black', 'red'], cs.CHINESE + cs.LETTERS + cs.NUMBERS),
    ]
    _BG_FILES = [
        osp.join(resource_dir, 'template/single_yellow1.bmp'),
        osp.join(resource_dir, 'template/single_yellow2.bmp'),
    ]
    _CATEGORY = 'double_yellow'
Ejemplo n.º 7
0
class SingleWhitePlateJing(SinglePlate):
    '''
    警车号牌
    440mm×140mm
    白底黑字(“警”字为红字)黑框线
    '''
    _FG_GENERATOR = CharsGenerator()
    _BG_FILES = [
        osp.join(resource_dir, 'template/single_white1.bmp'),
        osp.join(resource_dir, 'template/single_white2.bmp'),
        osp.join(resource_dir, 'template/army1.bmp'),
        osp.join(resource_dir, 'template/army2.bmp'),
    ]
    _REGULAR = SinglePlate._REGULAR[:-1] + [
        (['red'], ['警']),
    ]
    _CATEGORY = 'single_white_jing'
Ejemplo n.º 8
0
class SingleBlackPlate(SinglePlate):
    '''
    使、领馆汽车号牌:驻华使、领馆汽车。
    440mm×140mm
    黑底白字白框线
    '''
    _REGULAR = [
        (['white'], cs.CHINESE_BASE),
        (['white'], cs.LETTERS),
        (['white'], cs.LETTERS + cs.NUMBERS),
        (['white'], cs.LETTERS + cs.NUMBERS),
        (['white'], cs.LETTERS + cs.NUMBERS),
        (['white'], cs.LETTERS + cs.NUMBERS),
        (['white'], cs.LETTERS + cs.NUMBERS),
    ]
    _FG_GENERATOR = CharsGenerator()
    _BG_FILES = [
        osp.join(resource_dir, 'template/single_black1.bmp'),
        osp.join(resource_dir, 'template/single_black2.bmp'),
    ]
    _CATEGORY = 'single_black'