Printable Version of Topic

Click here to view this topic in its original format

Unmanned Spaceflight.com _ Image Processing Techniques _ jpeg artifact "removal"

Posted by: JohnVV Aug 21 2011, 09:46 PM

first it is impossible undo the artifacts in jpeg images
now a lot can be done to synthetically "fix" them

information IS LOST in the jpg compression
yes it went into a black hole BUT the info was NOT conserved on the EH nor passed to a different dimension to be averaged out in the multiverse

-- it's gone --

A test image " Kodak's lenna " --- a industry standard used to calibrate equipment in labs
[attachment=25352:lenna.png]

the eyes and nose are good for showing results ( "g" rated ones )

( the below images are jpg's mad.gif but , oh well . )
the orig. close up
http://www.imagebam.com/image/f7495b146097871
a jpg artifact added ( two saves at 65% 2x2x2x2 )
http://www.imagebam.com/image/09b07c146097876

over the years i have found a few things to do this NOTHING works very very well . However GREYCstoration now Gmic works well , within reason.
http://gmic.sourceforge.net/gimp.shtml

a gimp add on and a bash command line tool .
the gimp tool ONLY works on 8 bit / layer ( 24 bit rgb )
the command line tool works on 8,16 singed & unsinged ,and 32 bit floating point .

warning this only artificially fixes them

for now the gimp tool
i like the "edge preservation flow" pde
http://www.imagebam.com/image/ab66bb146099305
and the close up
http://www.imagebam.com/image/bf37c5146099340
the artifacts are gone BUT the image is way too smooth
add some noise
http://www.imagebam.com/image/e6cc98146099566
a small amount 4 will do

and the close up AND the orig. image
http://www.imagebam.com/image/878dcf146099960 http://www.imagebam.com/image/f7495b146099973

the terminal command

CODE
gmic 4.2.04b.jpg -gimp_edgepreserving_smoothing 0.8,0.5,0.6,2.5,50,10,0,0 -gimp_noise 4,0,0,0,0 -o clean.png

where "4.2.04b.jpg" is the input
and "clean.png" is the output

example from photojournal
PIA14673.jpg
left orig./ right "fix"
http://www.imagebam.com/image/d49db3146108505

Posted by: algorimancer Feb 3 2012, 09:35 PM

I just stumbled upon this post --- one problem with this technique is that it yields an excessively smoothed image, not so much esthetically (as was improved by adding a bit of noise) but in the sense of losing fine edge detail. It occurs to me that an edge enhancement which downplays vertical and horizontal edges (which would mostly be jpeg artifacts) might be combined with this technique to yield somewhat better results. Probably would need a custom script to do this sort of edge enhancement, then merge the results of the two methods as a single image. Just a thought smile.gif

Posted by: JohnVV Feb 3 2012, 09:58 PM

hi , maybe but the problem of jpg images is that the original data is already missing from the compression


Posted by: Brian Swift Aug 8 2022, 01:11 AM

JPEG artifact "removal" continues to be an area of active research, with current work (unsurprisingly) utilizing "AI" techniques. See https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=jpeg+artifact+removal

Posted by: JohnVV Aug 9 2022, 12:32 PM

Hi Brian , things have gotten a bit better in the 10 YEARS since i posted this , but it is still a bit of a problem and an AI program looks to be an option .

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)