Speed ​​of processing and photo retouching

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
MILLIONER
Posts: 3
Joined: 2012-01-05T04:53:00-07:00
Authentication code: 8675308

Speed ​​of processing and photo retouching

Post by MILLIONER »

Good day!

Very good program you have:)
I have a few questions about her work. And so.. the fact that I am developing code for retouching photos and I really need to have good speed processing. As is well known that a lot of time consuming parameter "blur" and "Sharpen". Now the question: what other options are more demanding (this also applies to the configuration script)? As you can retouch photos to zberech skin structure? What will be possible algorithm (very much like to get an answer to this question)?

Sincerely, Yaroslav! :)
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Speed ​​of processing and photo retouching

Post by anthony »

That is a loaded question.

Blurs can be quite fast as it uses a 2-pass gaussian blur. They only start getting slow when you start doing very large blurs, but even then you can limit its effects. unsharp is closely related to blurs (subtraction of a blurred version of the image. True sharpening however is generally better quality, but can not be easily applied using 2-pass operation, as such they can become very slow, bt still small sharpens are not that costly.

You can get a deeper understand of this by looking at the notes in IM examples, Convolution section
http://www.imagemagick.org/Usage/convolve/
and especially the section detailing the difference between 2-pass 1-dimensional blurs, VS 1 pass 2-dimensional Gaussian Blurs.
http://www.imagemagick.org/Usage/convol ... an_vs_blur

Other types of filtering like median filtering can also be slow, similarly distortions and image resizing using filters with a large support factor, can also be slow.

All of these are 'area effect' operations, originally convolves but that is only a sub-set of more general morphological operations.

Basically unless you actually understand how a operator works and how big a neighbour hood that operator works with for each pixel of an image it ha hard to know just how 'slow' it will be.


There are ways of mitigating slowness, especially if you are only working on small areas of the image like red-eye removal.
That is by using Regions
http://www.imagemagick.org/Usage/masking/#regions
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply