I am working to speed up a script that uses a complex fx expression. I think I could speed it up dramatically, if IM had a weighted average of multiple images. The problem I have is in using -compose plus or minus, I get clipping at 0 or 1 between pairs of images.
I was wondering if this might be relatively easy?
Basically either change -average to have a list of weights for arguments, like -convolve's list of kernel values, in this case one positive or negative floating point weight (no normalization) for each image or make a new function -weighted-average that does the same.
Let me know if this is a big deal or not.
I am trying to develop a work around in the mean time.
enhancement request to -average
Re: enhancement request to -average
We would need a -weighted-average option. We'll add it to our enhancement list. We expect to get to it sometime in late June.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: enhancement request to -average
magick wrote:We would need a -weighted-average option. We'll add it to our enhancement list. We expect to get to it sometime in late June.
OK. I know you are busy. No problem. Perhaps it should be called -weighted-sum as it is doing no normalization.
Thanks for putting it on the list.
Fred
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: enhancement request to -average
One other thought about this to consider. Rather than using a -convolve type argument list (that is currently restricted to odd number of values), one could use a -set option:...:args list of values
convert image1 image2 ... imageN -set option:...:args "wt1, wt2,... wtN" -weighted-sum result
Not urgent. Just wanted to add some further thoughts that might make it easier.
Fred
convert image1 image2 ... imageN -set option:...:args "wt1, wt2,... wtN" -weighted-sum result
Not urgent. Just wanted to add some further thoughts that might make it easier.
Fred