Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to increase/decrease brightness of an image with the use of JSlider slider or JScrollBar

 
ashish donvir
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i Had load my image Buffered image now need to brighten it using Slider or scroll-bar so could any one suggest me how to do it? If it can done using any ImageJ library then suggest me that also.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a RescaleOp. Check out this tutorial.
 
ashish donvir
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any other help...........
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why, did you find RescaleOp unsuitable for your purpose?
 
ashish donvir
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
provide me full code....
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are NotACodeMill <-- link. You need to ShowSomeEffort <-- link

If you can't achieve your purpose, be sure to IsolateTheProblem <-- link and TellTheDetails <-- link. Remember that ItDoesntWorkIsUseless <-- link
 
ashish donvir
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK I will try something for sure but right now first i am trying to plot histogram of an image so suggest me that how could i plot my histogram in a JPanel or content pane.
I got the the histogram using Jai now need to plot it somehow

Here is how i am getting my histogram

PlanarImage image = JAI.create("fileload", "C:\\Sunset.jpg");
ParameterBlock pb = new ParameterBlock();
pb.addSource(image);
pb.add(null); // The ROI.
pb.add(1); // Samplings.
pb.add(1);
pb.add(new int[]{256}); // Num. bins.
pb.add(new double[]{0}); // Min value to be considered.
pb.add(new double[]{256}); // Max value to be considered.
// Creates the histogram.
PlanarImage temp = JAI.create("histogram", pb);
Histogram h = (Histogram)temp.getProperty("histogram");
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> how could i plot my histogram in a JPanel or content pane. 

tried google?
 
ashish donvir
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Michael, I can plot it using ImajeJ library but the thing is i need to have my own histogram so that i can be helpful to me in my further image processing
so suggest me some way to plot it
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> so suggest me some way to plot it

I did.

unless you're the only person to have ever wanted to plot a histogram in java,
there should be heaps of sample code out there.

grab some of the code, modify to suit, then, if you have problems,
you can post the code you've tried.

if you're waiting for someone to write it for you, there's rent-a-coder for that
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic