Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Histograms

Dave
2007-06-25
2013-06-03
  • Dave
    Dave
    2007-06-25

    I was wondering what the axes are on the pnghist.cgi and histogram.cgi plots.

    I was also wondering where in the code the histograms are generated, and where the values are stored (or if they are generated when needed).

    Thanks a bunch,
    Dave

     
    • Dave,

      Histograms are generated in 2 stages (even 3). First is FPGA code (http://elphel.cvs.sourceforge.net/elphel/elphel353/elphel353/fpga/x3x3/histogram333.v?revision=1.1.1.1&view=markup) that actually calculates histogram for each of the 4 Bayer components (including 2 greens), using 8-bit (after the gamma table) data.

      Two arrays are used in a ping-pong manner- while one is accumulating frame data the other is visible to the CPU, so it is not needed to synchronize readout with the frames.

      Next stage - driver, that reads the FPGA data to the array in system memory and exposes it (through mmap) to applications (like pnghist.cgi - http://elphel.cvs.sourceforge.net/elphel/elphel353/elphel353/apps/png/pnghist.c?view=markup and histogram.cgi)

      Now I'm converting drivers to be more php-friendly and there will be php access to histogram data too.

      Andrey

       
    • Dave
      Dave
      2007-06-26

      Thanks a lot for the quick response.