letter detection based on SWT