Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reconstruct the image in Mathematica

I posted the question yesterday and it seems obviously that some people are interested in given the count of upvotes. But it does not seem to be very useful, as some Mathematica guru puts it. However, I think the reverse question is quite useful, i.e., how to reconstruct the original image in Mma. One answer given by a user actually used image processing software and did a decent job on reconstructing the original picture. It would be great to know how to split on tiles and use some feature matching. in Mma automatically.

Thank you all.

like image 544
Qiang Li Avatar asked Nov 25 '25 23:11

Qiang Li


1 Answers

Halfway there, posting on this old question just to see if someone wants to give it a try:

l = Import@"https://i.sstatic.net/R3xte.jpg";
l1 = Binarize[GradientFilter[MeanShiftFilter[l, 3, .01, MaxIterations -> 10], 3] 
     // ImageAdjust, .1];
l2 = Erosion[Dilation[l1, 20], 20];
l3 = ImageData@ColorNegate@l2;
n = 1; While[l3[[1 ;; n, 1 ;; n]] == Array[1 &, {n, n}], n++];
ip = ImagePartition[l, n][[1, 1]];
ipMsft = MeanShiftFilter[ip, 3, .1, MaxIterations -> 100];
l8 = ColorNegate@GradientFilter[ ImageMultiply[ip, ipMsft], 6] // ImageAdjust;
ImageSubtract[l8, GradientFilter[l8, 1]]

enter image description here

like image 65
Dr. belisarius Avatar answered Nov 28 '25 00:11

Dr. belisarius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!