How to plot and display Histogram of an Image ?If it can done using Java Advance Imaging API please suggest me how to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
This link provides a tutorial to use the Java Advanced Imaging API http://www.raditha.com/java/image/ to do what you want. Personally I use the standard image API’s to do this, create a BufferedImage from your image file and then use getRGB() on each pixel. From this you can get the individual red, green and blue values for each pixel. You can count the number of values, 0-255, storing them in an array like the bins of a histogram. I use this for internal processing and don’t display the graph so unfortunately I can’t help you with the displaying part.