Page 1 of 1

Detect Focused Area of Image and Compose

Posted: 2016-06-23T06:59:45-07:00
by bramak
I have a bunch of photographs which are basically a sequence of images of a single scene with the difference that in each sequence a different area of the subject has been focused on. What I want to do is compose these sequence of images such that the final image has only the focused areas of each image.

In my head, I can picture this needing the following steps:
  • - Detect the focus area in each image in the sequence.
    - Use the above results in a compositing/blending operation.
I'd appreciate if you could give me some leads on how to go about this with ImageMagick.

Re: Detect Focused Area of Image and Compose

Posted: 2016-06-23T07:57:42-07:00
by Bonzo
I would guess Imagemagick is not the best program for this. I would suggest you search for focus stacking software.

There are some paid for programs around as well as Combine ZP which is free.

Re: Detect Focused Area of Image and Compose

Posted: 2016-06-23T08:33:15-07:00
by snibgo
It is possible with IM, but not quick. A stack of 24 photos tooks two hours on my previous laptop.

Aside from sharpness, a method also needs to account for (a) change of scale due to focusing (caused by moving the lens or the entire camera) and (b) slight shifts in image positions (caused by wobble in the mechanics). This takes most of the time.

Optimisations would doubtless improve the speed. I decided the results weren't interesting enough to continue development.

Re: Detect Focused Area of Image and Compose

Posted: 2016-07-17T20:14:59-07:00
by Pax2You
I'd like to do focus stacking as well. Does anyone know of a safe spot to download Combine ZP?