1

我正在尝试批量移动所有图像并进行“最近”插值。出于某种原因,生成的图像被黑色像素插值......这是一个错误吗?

 translations = [100,0] * len(img_batch_list)
 img_batch = tf.contrib.image.translate(img_batch,
                                        translations,
                                        interpolation='NEAREST',
                                        name="shift")
4

1 回答 1

1

不,这不是错误。根据https://www.tensorflow.org/api_docs/python/tf/contrib/image/translate 这是因为由于翻译导致的空白空间将被零填充。零将显示为黑色。

于 2019-02-15T19:00:35.407 回答