我想将手写的阿拉伯语单词分割成图片中的字符。我可以遵循哪种算法来实现这一目标?我如何使用 python 或 matLab 来做到这一点?或者我可以使用直方图方法吗?另外,我如何在 python 或 matlab 中实现这个?请我需要帮助和一个简单明了的方法,以便我可以遵循它。
我想分割图像以获得这个结果(图片中的每个字符)
这是我在 github 中找到的代码,用于英文草书手写:
import numpy as np
import cv2 as cv
from matplotlib import pyplot as plt
import pandas as pd
import matplotlib as mpl
import traceback
mpl.rcParams['legend.fontsize'] = 10
pd.set_option('display.expand_frame_repr', False)
fn=0
path='result/'
#Taking any image from the sample images
#In case of slanted image, straighten it using image-straighten.py, then use it
img = cv.imread('sample_images/7.PNG')
# In[findFeaturPoints]
def findCapPoints(img):
cpoints=[]
dpoints=[]
for i in range(img.shape[1]):
col = img[:,i:i+1]
k …Run Code Online (Sandbox Code Playgroud) python matlab opencv artificial-intelligence machine-learning