Results 1 to 3 of 3

Thread: Histogram of colour levels

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2006
    Location
    UK
    Posts
    6

    Histogram of colour levels

    How could I produce a histogram of the grey levels in an image?

    I would like to be able to get a .bmp image, put it into my program and then have that give me the grey levels of each pixel.

    I could then put this data into Excel and produce a Histogram of it.

    Can anyone tell/guide me to how I could get the data for each pixel?

    Any help is much appreciated, thanks in advance!

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    744

    Re: Histogram of colour levels

    glReadPixels will do nicely, but you don't need openGL to do this job, it can be done by just loading the bmp and directly getting the histogram data from the image data.

    alternatively use the GL_EXT_histogram extention
    http://oss.sgi.com/projects/ogl-samp.../histogram.txt

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2006
    Location
    UK
    Posts
    6

    Re: Histogram of colour levels

    Thanks so much for such a quick reply!

    I'm having some compiler trouble atm so I will try it out later.

    Thanks again!

Similar Threads

  1. OpenGL colour not able to render colour
    By mundrapiyush in forum OpenGL: Linux
    Replies: 3
    Last Post: 05-16-2010, 03:15 AM
  2. Histogram and 'auto-levels'
    By Freelancer in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 11-02-2005, 04:45 AM
  3. Histogram
    By castellp in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 02-21-2005, 03:01 AM
  4. histogram
    By nat-marques in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 11-13-2003, 12:19 PM
  5. Histogram
    By nat-marques in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-11-2003, 09:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean