Convolving, I'm Stuck

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
gsbtcc
Posts: 1
Joined: 2018-06-13T00:06:12-07:00
Authentication code: 1152

Convolving, I'm Stuck

Post by gsbtcc » 2018-06-13T00:08:47-07:00

Hey, so I am trying to make a program that computes recursively using imagemagick. I want to create each pixel using pixels that are to the up-left of the pixel. The computation I am using is SAT(x,y) = SAT(x-1,y) + SAT(x,y-1) + I(x,y) - SAT(x-1,y-1) where I(x,y) is the corresponding pixel to the pixel (x,y) from another picture and SAT is the image being created so SAT(x,y) is the current pixel being created. Essentially I need to use self-referencing to accumulate in a picture.
Thanks

snibgo
Posts: 10282
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convolving, I'm Stuck

Post by snibgo » 2018-06-13T03:00:17-07:00

"SAT" is Summed Area Table, also known as Integral Images. See my page Integral images. The obvious way to implement SAT code is in a compiled language that simply loops through the pixels applying your equation. I used C, and wrote two modules, for the forward and reverse processes.

The source code for my modules is on my Process modules page.
snibgo's IM pages: im.snibgo.com

Post Reply