Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8144795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:28:39+00:00 2026-06-06T13:28:39+00:00

I am quite new to image processing and I am looking for a solution

  • 0

I am quite new to image processing and I am looking for a solution to obtain the maximum pixel value of a grayscale image. I am using the Aforge.Net library and I tried using the ImageStatistics class to obtain the maximum pixel value of the grayscale image. I just need to make sure if I am on the correct path. Can someone advise me on the following please?

ImageStatistics stat = new ImageStatistics(bmpSource);

        Histogram hist = stat.Gray;

        int maxPixelVal = hist.Max;
        int minPixelVal = hist.Min;

In this snippet I am getting the maximum value using the GrayChannel. I need to make sure whether this would give me the highest pixel value of the whole image or just the gray channel

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:28:40+00:00Added an answer on June 6, 2026 at 1:28 pm

    http://www.aforgenet.com/framework/docs/html/937b609f-8d95-662f-c4ac-55eebc44a1cf.htm

    ImageStatistics.Gray Property
    

    Histogram of gray channel.
    Remarks:The property is valid only for grayscale images (see IsGrayscale property).

    http://www.aforgenet.com/framework/docs/html/61212d57-52ee-9935-2364-b3a34a2213d0.htm

    Histogram.Max Property
    

    The property allows to retrieve maximum value of the histogram with non zero hits count.

    So, it looks like this would give you what you want.

    One thing to consider is the granularity / resolution of the histogram. Sometimes histograms have a number of bins (values) smaller than the number of possible shades in the colour channel it is representing.

    Each bin therefore represents a range of shades / pixel values from the source image, and will give you the count of the number of pixels (or the fraction of the total image) in this range.

    If this is the case, you will not be able to get the absolute maximum pixel value from the histogram, only the range in which the maximum pixel fell.

    Here however the number of bins looks to be 1:1 with the number of possible shades in the colour channel so your approach should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am quite new to Aforge.Net and I am looking for a way to
I am quite new to ASp.net MVC so it might be really trivial for
I am quite new to the iphone development, I am using xml parsing to
I am quite new in this. Now this simple app downloads image as a
I'm trying to make an app using Kinect (OpenNI), processing the image (OpenCV) with
Quite new to maven here so let me explain first what I am trying
Still quite new to Haskell.. I want to read the contents of a file,
Iam quite new to functions in SQL and I would like to create a
I'm quite new to php and have been reading Larry Ullman book to develop
I'm quite new to c++, but I've got the hang of the fundamentals. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.