
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
DOH! Thanks all sorted now :p "Roger Cattin" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Exchange max and min: > > pixOut = ((pixIn - min)*((255-0)/(max-min))+0); > > Roger > > "Vexed Puppy" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I'm trying to perform normalization /contrast stretching on a gray > > scale image. > > However when applied I get a negative of the image. As i understand to > > normalize an image i process each pixell using this formula: > > > > pixOut = ((pixIn - max)*((255-0)/(min-max))+0); > > > > where max is the maximum pixell density (say 235) and min is the > > minimum (say 25) and the 255 and 0 are representing the complete range > > of values. > > > > I'm going wrong somewhere but not sure where that is :/
| <-- __Chronological__ --> | <-- __Thread__ --> |