从python中的图像中有效地提取特定大小的补丁 [英] Extracting patches of a certain size from the image in python efficiently

查看:661
本文介绍了从python中的图像中有效地提取特定大小的补丁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个图像,我想从中提取不同大小的方形补丁。

I have an image and I want to extract square patches of different sizes from it.

我需要密集补丁,也就是说,我需要在每个像素都有一个补丁在图像中。

I need dense patches, that is, I need a patch at every pixel in the image.

例如,如果图像 100x100 且补丁大小为 64

For example if the image is 100x100 and the patch size is 64.

结果将是 10000 大小 64x64

这些是我们用于过滤操作的补丁,例如。

These are the same patches which we use for filtering operations for example.

如果有边界我想镜像图像。

In case there is a boundary I would like to mirror the image.

使用python提取补丁的最有效方法是什么?

What is the most efficient way of extracting patches using python?

谢谢

推荐答案

我认为您正在寻找类似的东西:

I think you are looking for something like this:

http://scikit-image.org/docs/0.9.x/api/skimage.util.html#view-as-windows

这篇关于从python中的图像中有效地提取特定大小的补丁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆