improveimage[list_List]:=Grid[Table[{i,improveimage[i]},{i,list}]]
improveimage[pic_Image]:= Module[{imgd=ImageData[pic],n,m,boxsize=12,normavg,imgnorm,improvedimage},
n=Dimensions[imgd][[1]];
m=Dimensions[imgd][[2]];
imgnorm=Apply[Function[((Norm[{#1,#2,#3}])/(Sqrt[3]))],imgd,{2}];
normavg=Table[Mean@Mean[
imgnorm[[Max[1,i-boxsize];;Min[n,i+boxsize],Max[1,j-boxsize];;Min[m,j+boxsize]] ]],{i,1,n},{j,1,m}];
improvedimage=Table[If[imgnorm[[i,j]]>-0.18*((normavg[[i,j]])^4)+1.2*normavg[[i,j]],{0,0,0},{1,1,1}],{i,1,Dimensions[imgnorm][[1]]},{j,1,Dimensions[imgnorm][[2]]}];
Image[improvedimage]
]

list={,,,,};
result=improveimage[list];
Magnify[result,4]