function name as as input of another function?
<p>I an image processing enginner, and am using Python as a prototyping language. </p>

<p>Most of the time, as I get thousands of images, named "imagen.jpg", n being the increment. </p>

<p>So the main structure of my program may be seen as :</p>

<pre><code>def main_IP(imgRoot, stop_ncrement):
  name = update_the_increment(imgRoot, stop_increment)
  img = load_the_image(name)
  out_img = process_image(img)
  displays_images(img, out_img)
  return out_img
</code></pre>

<p>As you can see it, from one application to another, the only change would be the process_image function.
Is there a way so that the process_image can be inserted as an input? </p>

<p>I would get a generic function, prototyped as :
main_IP(imgRoot, stop_increment, process_image)</p>

<p>Thanks ! 
Julien</p>
