Hash patterns and bloctches

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
markanini
Posts: 14
Joined: 2010-06-15T12:55:03-07:00
Authentication code: 8675308
Location: Malmö, Sweden

Hash patterns and bloctches

Post by markanini » 2015-11-24T15:06:53-07:00

I decided to revisit this image.
Image

I can remove the hash pattern by using a no-op command:

Code: Select all

convert input -filter lanczos -distort resize 100% hash_removed.png
Image

However this introduces bloctches.

Previously I discovered I could cancel out the blotches and hash by adding on some color space conversions and averaging the final result in Photoshop.

Code: Select all

convert input.jpg -colorspace log -filter lanczos -distort resize 100% hash_removed_log.png"
convert input.jpg +sigmoidal-contrast 5.5 -filter lanczos -distort resize 100% hash_removed_sigmoidal.png"
Image
however this changed the tone of the image.

Help me find a cleaner way to do this.

User avatar
fmw42
Posts: 25761
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Hash patterns and bloctches

Post by fmw42 » 2015-11-25T00:44:28-07:00

What IM version and platform? Please read viewtopic.php?f=1&t=9620.

If you are on Unix (linux, mac osx or window with cygwin), then you can try my script notch at the link below.

I ran this command and it reduces the impact of the dither pattern, but does not remove it altogether.

Code: Select all

notch -h 3 -v 3 -c 20 Dx1GDI3.jpg Dx1GDI3_notch.png
Image

markanini
Posts: 14
Joined: 2010-06-15T12:55:03-07:00
Authentication code: 8675308
Location: Malmö, Sweden

Re: Hash patterns and bloctches

Post by markanini » 2015-11-25T12:18:30-07:00

Im aware of your excellent notch script. I gives a cleaner result than the basic no-op operation. Currently I have v6.9.2-6 Q16 HDRI x64 installed on Windows 10.

User avatar
fmw42
Posts: 25761
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Hash patterns and bloctches

Post by fmw42 » 2015-11-25T12:24:40-07:00

Unfortunately, my scripts do not work on basic Windows. You would have to install Cygwin. Or you could create the spectrum mask manually and apply it to the FFT magnitude image and then convert back with IFT with Windows. You need to install the FFTW delegate library. See http://www.fmwconcepts.com/imagemagick/ ... se_removal and viewtopic.php?f=4&t=14251#p56836

User avatar
fmw42
Posts: 25761
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Hash patterns and bloctches

Post by fmw42 » 2015-11-25T13:31:48-07:00

If you decide to try to do it manually, then these are the spectrum and mask images that were created and used by my script.

Image

Image

The bright spots near the corners and mid-sides in the spectrum are what are being removed by the (black regions in the) mask. Perhaps if you make the dark spots in the mask a little bigger, you might get better results.

markanini
Posts: 14
Joined: 2010-06-15T12:55:03-07:00
Authentication code: 8675308
Location: Malmö, Sweden

Re: Hash patterns and bloctches

Post by markanini » 2015-12-29T15:20:59-07:00

I tied the suggestions but was not able to get much improvement. Any other ideas?

User avatar
fmw42
Posts: 25761
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Hash patterns and bloctches

Post by fmw42 » 2015-12-29T15:23:40-07:00

Sorry, no.

What exactly are you trying to remove? Fine vertical lines or the cross-hatch pattern in the top portion of the image?

Post Reply