Consider using ImageMagick - it is free and available here. It has C, C++, Perl and PHP bindings and can be used from the command line.
Depending on how you wish to merge your images, you could use one of these:
convert -evaluate-sequence mean a.jpg b.jpg c.jpg d.jpg
which takes 3 images (a.jpg, b.jpg, c.jpg), which I artificially added noise to, and then averages them to create d.jpg which you can see is less noisy. Or maybe you prefer to take the median of the pixels at each point:
convert -evaluate-sequence median a.jpg b.jpg c.jpg d.jpg
Or you could use:
composite -blend 30 foreground.jpg background.jpg blended.jpg
for a 30% blend.
EDITED
If your fish are dark in the image and you want to remove them, you can just choose the lighter of the two pixels in your images at every point like this:
convert a.jpg b.jpg -compose lighten -composite result.jpg