0

I am working on a photobooth program and would like to create a "Flash" everytime a picture is taken. the only way I have come up with to do this after a bit of research, is to replace the image with an all white image for a moment. However this is not clean especially since I hope to make the the program agnostic to resolution (it is fixed at 720 atm). I have it set up with javacv video feed, using bufferedimages in swing.

I would like to honestly flash the screen, the vid or the GUI. The main goal is to use flash to indicate when the picture was taken.

river226
  • 73
  • 12

1 Answers1

1

As shown here, you can get a nice effect by varying the image's saturation in HSB color space. The example uses a color lookup table with linear variations, but you might experiment with a series of logarithmic decrements from white.

Addendum: To apply this to a BufferedImage, use RescaleOp on the desired component. This example varies the alpha component.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045