0

I made a program to take a picture of myself and text it to me whenever I enter in the wrong code, but the picture is very hard to see without turning the screen on my phone. I think the contrast is too low, but I have no clue on how to do this. My code saves the picture to a png file and sends that to me, so it has to be a file (and not to a JFrame like how I saw in everything I found online)

user233009
  • 296
  • 2
  • 11

1 Answers1

1

You could use histogram equalization to increase the contrast/visibility. See the section of Examples - Full sized image for a grayscale example.

There are already implementations available, so you don't have do it yourself. One of which I found here, which appears to preserve the color: HistogramEqualizer.java by a Student of Tunghai University.

Lumiukko
  • 437
  • 3
  • 8