bep -
Have you looked at the Histogram example? It should be under the Analysis directory wherever the examples are.
After doing the Histogram like the example does, you will have a CWIMAQHistogramReport object (let's call it HistogramReport) that contains the result of the Histogram. To access the 1-dimensional array containing the count in each bin, use the Histogram property on the CWIMAQHistogramReportItem that the HistogramReport contains.
To use this array, however, you will need to assign it to a variant. So, to find the number of pixels that are in the 5th bin (with the default options, this will be the pixels that have exactly the value 4), do
Dim Histogram As Variant
Dim HistogramReport As New CWIMAQHistogramReport
CWIMA
QVision1.Histogram2 CWIMAQViewer1.Image, HistogramReport
Histogram = HistogramReport(1).Histogram
' Now Histogram(5) contains the number of pixels in the 5th bin.
Let me know if this helps.
Greg Stoll
IMAQ R & D
National Instruments
Greg Stoll
LabVIEW R&D