function result = make_gen_maps(UID, FieldID)
pkg load image

mainPath = strcat(UID, "/");
mainPath = strcat(mainPath,FieldID);
RVIFileName = strcat(mainPath, "/rvi.png");
DEMFileName = strcat(mainPath, "/dem.png");
RSMFileName = strcat(mainPath, "/rsm.png");
LAIFileName = strcat(mainPath, "/lai.png");
try
	RVI = imread(RVIFileName);
catch err
	disp(err.message);
end

try
	RVI = single(RVI);
	RVI = RVI/255;
	RVI_max = max(max(RVI));
		
	index_new = RVI;
	imgCMP = gen_map1_img(index_new);
	filename = strcat(mainPath,"/rvi");
	filename=strcat(filename,".png");
	imwrite(uint8(imgCMP),filename);
	imgCMP = gen_map2_img(index_new);
	filename = strcat(mainPath,"/rvi_cmap2");
	filename=strcat(filename,".png");
	imwrite(uint8(imgCMP),filename);
catch err
	disp(err.message);
end

RVIFileName = strcat(mainPath, "/dem.png");
try
	RVI = imread(RVIFileName);
catch err
	disp(err.message);
end

try
	RVI = single(RVI);
	RVI = RVI/255;
	RVI_max = max(max(RVI));
		
	index_new = RVI;
	imgCMP = gen_map1_img(index_new);
	filename = strcat(mainPath,"/dem");
	filename=strcat(filename,".png");
	imwrite(uint8(imgCMP),filename);
	imgCMP = gen_map2_img(index_new);
	filename = strcat(mainPath,"/dem_cmap2");
	filename=strcat(filename,".png");
	imwrite(uint8(imgCMP),filename);
catch err
	disp(err.message);
end

RVIFileName = strcat(mainPath, "/rsm.png");
try
	RVI = imread(RVIFileName);
catch err
	disp(err.message);
end

try
	RVI = single(RVI);
	RVI = RVI/255;
	RVI_max = max(max(RVI));
		
	index_new = RVI;
	imgCMP = gen_map1_img(index_new);
	filename = strcat(mainPath,"/rsm");
	filename=strcat(filename,".png");
	imwrite(uint8(imgCMP),filename);
	imgCMP = gen_map2_img(index_new);
	filename = strcat(mainPath,"/rsm_cmap2");
	filename=strcat(filename,".png");
	imwrite(uint8(imgCMP),filename);
catch err
	disp(err.message);
end


RVIFileName = strcat(mainPath, "/lai.png");
try
	LAI = imread(RVIFileName);
catch err
	disp(err.message);
end


try
	%LAI = rgb2gray(LAI);
	LAI = single(LAI);
	LAI = LAI/255;
	LAI_max = max(max(LAI));
		
	index_new = LAI;
	imgCMP = gen_map1_img(index_new);
	filename = strcat(mainPath,"/lai");
	filename=strcat(filename,".png");
	imwrite(uint8(imgCMP),filename);
	imgCMP = gen_map2_img(index_new);
	filename = strcat(mainPath,"/lai_cmap2");
	filename=strcat(filename,".png");
	imwrite(uint8(imgCMP),filename);
catch err
	disp(err.message);
end
result = "done";
end