# -*- coding: utf-8 -*-
import cv2
import numpy as np
import pandas as pd
scale = './Data/train/00001_00_0.1s_scale.png'
net_out_30000 = './Data/train/00001_00_0.1s_out-30000.png'
net_out_50000 = './Data/train/00001_00_0.1s_out-50000.png'
GT = './Data/train/00001_00_8s_GT.png'
im_scale = cv2.imread(scale)
im_net_out_30000 = cv2.imread(net_out_30000)
im_net_out_50000 = cv2.imread(net_out_50000)
im_GT = cv2.imread(GT)
# img=cv2.hconcat([im_scale,im_net_out,im_GT]) #水平拼接
#img=cv2.vconcat([im_scale,im_net_out,im_GT]) #垂直拼接
img=cv2.hconcat([im_net_out_30000,im_net_out_50000]) #水平拼接
# image = np.array(df)
cv2.imwrite('./Data/train/contrast-net-out.png', img)
# crop
im_scale_cut = im_scale[512:1024, 512:1024]
im_net_out_cut_30000 = im_net_out_30000[512:1024, 512:1024]
im_net_out_cut_50000 = im_net_out_30000[512:1024, 512:1024]
im_GT_cut = im_GT[512:1024, 512:1024]
# img=cv2.hconcat([im_scale_cut, im_net_out_cut, im_GT_cut])
# cv2.imwrite('./Data/train/contrast-cut-raw-GT.png', img)
img=cv2.hconcat([im_net_out_cut_30000, im_net_out_cut_50000])
cv2.imwrite('./Data/train/contrast-cut-net-out.png', img)
水平拼接两张RGB图像
最新推荐文章于 2024-04-19 10:14:53 发布