Histogram equalization

Posts: 8
Joined: 2010.07
Post: #1
I want to ask for histogram equalization. First i count histogram:

for (i=0; i<width; i++) {
        for (j=0; j<height; j++) {
            pixelValue = pixels[(j*width + i)];
            tablica[pixelValue] += 1;

Second thing is distribution:

for (int i=0; i<[histogram count]; i++) {
        sum += [[histogram objectAtIndex:i] intValue];
        [dystrybuanta addObject:[NSNumber numberWithInteger:sum]];

But now i should count Look Up Table and apply this LUT at picture. Can anyone help me with this?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Realtime histogram? TomorrowPlusX 6 7,856 Feb 23, 2009 05:24 PM
Last Post: TomorrowPlusX