sklearn.feature_extraction.reconstruct_from_patches_2d?
sklearn.feature_extraction.image.reconstruct_from_patches_2d(patches, image_size)
從所有的斑塊重建圖像。
假設斑塊重疊,從左到右,從上到下對斑塊進行填充,對重疊區域進行平均,構建圖像。
在用戶指南中閱讀更多內容。
參數 | 說明 |
---|---|
patches | ndarray of shape (n_patches, patch_height, patch_width) or (n_patches, patch_height, patch_width, n_channels) 補丁的完整集。如果貼片包含顏色信息,通道將沿著最后一個維度進行索引:RGB貼片的 n_channels=3 。 |
image_size | tuple of int (image_height, image_width) or (image_height, image_width, n_channels) 將要重建的圖像的大小。 |
返回值 | 說明 |
---|---|
image | ndarray of shape image_size 重建圖像。 |