0

In Gimp, there is a convolution matrix tool which lets the user define his own convolution matrix, and then see the result on the image.

I am writing software for image classification, and I need to do the opposite: play around with image modification parameters using the standard user interface, and if I get something interesting, use the corresponding mathematical operations in my software.

Is there a way to get the pixel-level operations that correspond to a given image modification on GIMP? (Or any other software?)

  • Not all possible changes are convolutions. But yes convolution is not a complex operation (de-convolution is tough). You might want to ask somewhere else about programming. convolutions also dont sum up nicely, so you can not allways convert many convolutions into one convolution. – joojaa Aug 12 '14 at 14:19
  • @joojaa thanks. would there be another way to automate the image modification? e.g. with script that runs Gimp without actually opening up the UI? – Alexandre Holden Daly Aug 12 '14 at 16:30
  • Since you now told us what you want to do, I've answered bellow - addressing not only the question but these comments. – jsbueno Aug 13 '14 at 11:21
  • As a complement maybe also check this. – user29318 Oct 13 '14 at 11:45
2

So, as @jooja puts it in the comments - not all oeprations are convolutions, nor does convolutions sum up that nicely.

Seen your comments, this is not actually what you are in need for - this specific requiste of "finding the equivalente convolution" could be the research work of a Computer Scientist doing Image Processing theoretical research.

Since you are simply trying to automate modifications to images, based on things you have done using the UI, you should resort to scripting. I do recomend using Python of the two pre-installed programming languages (the other, script-fu, being Scheme) - and simply make calls to the functions available that are equivalent to any actions taken on the UI.

GIMP can perform through scripting nearly 100% of the operations it can do via manual image editing - and a script can be run without GIMP ever opening a GUI Window - since you commented you'd want that behavior.

To get started, check the filters menu under python->console and use the browse button to see the available methods. To get started type image = gimp.image_list()[0] to get a reference to an open image. Further questions on scripting should be on stackoverflow.com –

  • thanks! GIMP-Python looks great. I thought any image processing operation was implemented as a convolution matrix. I've rephrased my question adequately. – Alexandre Holden Daly Oct 13 '14 at 16:31
  • would you know of any research (or just examples) of operations which are not convolutions? if they are frequent and important for visual recognition, this could be a fascinating research path for improving the state of the art in computer vision! – Alexandre Holden Daly Oct 13 '14 at 16:38
  • @AlexandreHoldenDaly Most operations are not convolutions. All curve adjustments for example, noise operations, and many denoising operations, laplace, fourier and radon transformation based filters are not convolutions. Many of the morphological tarnsforms are not convolutions like DistanceTransform. Threshold functions and binarisations aren't convolutions. Segmentation functions are rarely convolutions... The list goes on and on. – joojaa Oct 13 '14 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.