【发布时间】:2021-02-23 08:17:44
【问题描述】:
我正在尝试在图像上覆盖一个蒙版。例如,我正在尝试像使用两个散点图一样执行此操作,但错误表明在将图形添加到跟踪时数据属性错误。
rgb_pad_removed, thermal_img = get_thermal_and_rgb(img_path)
img, mask = get_masked_image(rgb_pad_removed)
thermal_img_resized = cv2.resize(thermal_img, dsize=(mask.shape[1], mask.shape[0]), interpolation=cv2.INTER_CUBIC)
from plotly.subplots import make_subplots
f1 = px.imshow(rgb_pad_removed)
f2 = px.imshow(mask)
fig = make_subplots()
fig.add_trace(f1)
fig.add_trace(f2)
fig.show()
出现以下错误:
ValueError:
Invalid element(s) received for the 'data' property of
Invalid elements include: [Figure({
ect...
我使用的是正确的方法还是有更好的方法?
【问题讨论】:
标签: python image data-visualization plotly-dash