The ordering is based on the distance to the black or the white. Based on my measurement, we have higher MSSIM and Constrast MSE. Our PSNR haver higher values than previous method except cat, tree, bat examples.
The modified weight function
if(error>0)
maxin = max(0.5,(Ii/(5*pow(r,1.0f))));
else
maxin = max(0.5,((255-Ii)/(5*pow(r,1.0f))));
in = min(maxin, 255-Ii);// to maintain the maximum;
ramp image

Good structure for tree and snail images



It seems the structure is better, but the tone looks not that good.


The tone looks fine. Clumping is there.