% Demo's the in-painting function fill_depth_cross_bf.m
%
% DATASET_PATH = '~/data1/kinect/spatial_relations_data/labeled_data.mat';
%
% load(DATASET_PATH, 'images', 'rawDepths');
clc
clear;
depthM=imread('aa.pgm');
rgbM=imread('bb.ppm');
imshow(rgbM);
figure
imshow(depthM)
%%
imageInd = 1;
imgRgb =rgbM; %images(:,:,:,imageInd);
imgDepthAbs =depthM; %rawDepths(:,:,imageInd);
% Crop the images to include the areas where we have depth information.
imgRgb = crop_image(imgRgb);
imgDepthAbs = crop_image(imgDepthAbs);
imgDepthFilled = fill_depth_cross_bf(imgRgb, double(imgDepthAbs));
%imgDepthFilled = fill_depth_colorization(imgRgb, double(imgDepthAbs));
tt=double(imgDepthAbs)-imgDepthFilled;
figure(1);
subplot(1,3,1); imagesc(imgRgb);
subplot(1,3,2); imagesc(imgDepthAbs);
subplot(1,3,3); imagesc(imgDepthFilled);
% imshow(uint16(double(imgDepthAbs)-imgDepthFilled),[])