- gx = img[:,:,:-1,:] - img[:,:,1:,:]:定义x方向的梯度,获得x方向的图像梯度图
- gy = img[:,:-1,:,:] - img[:,1:,:,:]:定义y方向的梯度,获得y方向的图像梯度图
- tf.zeros_like(tensor) 创建与tensor形状大小相同的全为0的张量
#使用逐像素流向量进行图像翘曲。 tf.contrib.image.dense_image_warp( image, flow, name='dense_image_warp')
- disp = self.conv(x, 1, 3, 1, tf.nn.sigmoid):获得视差图
- const bool py = th != 1.0
如果th=1.0,py=0
如果th != 1,py = 1