W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
tf.image.pad_to_bounding_box(
image,
offset_height,
offset_width,
target_height,
target_width
)
定義在:tensorflow/python/ops/image_ops_impl.py.
請參閱指南:圖像操作>裁剪
用零指定的height和width來填充image.
在頂部增加了零的offset_height行,在左側(cè)添加零的offset_width列,然后用0填充底部和右側(cè)的圖像,直到它具有target_height,target_width等維度.
如果此操作offset_*為零且該圖像已具有大小target_height x target_width,則此操作不會執(zhí)行任何操作.
參數(shù):
返回:
如果image是四維,則返回形狀為[batch, target_height, target_width, channels]的四維浮點型張量;如果image是三維的,則返回形狀為[target_height, target_width, channels]的三維浮點型張量.
可能引發(fā)的異常:
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: