我正在尝试使用以下工具裁剪图像
tf.image.crop_to_bounding_box(image,
offset_height,
offset_width,
target_height,
target_width)函数。我有像素坐标裁剪为x1,y1,x2,y2。如何将此坐标转换为offset_height、offset_width、target_height、target_width
发布于 2017-12-16 01:47:12
我猜,您想要将点转换为长度?
offset_height = y1; //y1 - 0
offset_width = x1; //x1 - 0
target_height = y2 - y1;
target_width = x2 - x1;https://stackoverflow.com/questions/47837165
复制相似问题