Page 1 of 1
Set darkness threshold
Posted: 2010-09-06T13:10:00-07:00
by pwhbeck
I am displaying text over a background jpg image. The jpg image is from a still webcam and changes several times a day. When text overlays a dark area of the image it is unreadable. Is there a way to make pixels of the image no darker than a threshold value? I use convert to lighten the image overall, but still have areas that are too dark.
Thanks,
Peter
Re: Set darkness threshold
Posted: 2010-09-06T13:57:05-07:00
by fmw42
convert image +level XXx100% result
where XX is some minimum graylevel value that you want black to become.
see
http://www.imagemagick.org/Usage/color/#level_plus
You might post a link to one of your example images so others can test techniques and to understand your problem
Re: Set darkness threshold
Posted: 2010-09-06T19:31:37-07:00
by anthony
This is a typical annotation problem.. Making text visible regardless of the background on which it appears.
The solution depends on youe background and if your text is a watermark or should be very boldly visible, and how pretty you want it.
Details on some basic methods is given in IM Examples, Annotationing Images,
Labeling on top of the Image itself...
http://www.imagemagick.org/Usage/annotating/#anno_on
Re: Set darkness threshold
Posted: 2010-09-07T07:26:25-07:00
by pwhbeck
It was suggested I post a link to my "problem":
http://www.hbeck.net
The background changes approximately every three hours during daytime, Pacific time (British Columbia).
Peter
Re: Set darkness threshold
Posted: 2010-09-07T08:01:38-07:00
by pwhbeck
How does one post a reply and indicate it is from the original submitter?
Anyway, the solution posted by fmw42:
convert image +level nnx100% result
will work for me.
Thanks to all who replied.
Peter