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?".
I gleaned the code above from fwm42 Fred's site with a view to modifying a tiff image by zeroing all but the very bright blue and red pixels. This would be used to subtract matching pixels from other images from the same camera, without subtracting any other features.
Having identified the blue and red values to be retained the rest of the image would be negated, including the alpha channel.
Is this doable in IM? If so it will make a very useful template or map of hot and cold pixels. Not sure where to start?
Last edited by geoland on 2016-06-12T02:03:58-07:00, edited 1 time in total.
I wrote some code to remove hot pixels from a photo and changed the hot pixel ( plus surrounding ones ) to transparent I then composited it over a blurred version of the same image. This worked well but obviously you need to do it before the image is cropped or resized and you would need a map for all the possible orientations. In the end I did it manually in a photo editing program as my hot pixels only showed up at certain ISO/exposure values.
It is interesting if you take a long exposure with the lens cap on there is a great variation in the pixel colours. I suppose it is impossible to get every pixel to be exactly the same.
I'm not sure how to tackle this but the operation will be on the final image and orientation will not be an issue.
The colour and intensity of the offending pixels is significantly brighter than the remainder of the image. If the hot pixels are mapped and averaged to the surrounding pixels using interpolation / morphology, a disk of some sort, loosely speaking, that might work. http://www.imagemagick.org/Usage/morphology
The process needs to be reasonably quick. In Linux jpeghotp quickly maps hot pixels and jpegpixi fixes them. Something similar for tiff images would be very handy. I will have a look at the code and see if it can work with tiff files.