![]() ![]() Return np.asarray(splitted_img, dtype=np.ndarray).reshape(n_blocks) Splitted_img =, axis=1) for block in horizontal] Horizontal = np.array_split(img, n_blocks) Here is another solution, just using NumPy built-in np.array_split : def divide_img_blocks(img, n_blocks=(5, 5)): ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |