using stroke segmentation