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
Set darkness threshold
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Set darkness threshold
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
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
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Set darkness threshold
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
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Set darkness threshold
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
http://www.hbeck.net
The background changes approximately every three hours during daytime, Pacific time (British Columbia).
Peter
Re: Set darkness threshold
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
Anyway, the solution posted by fmw42:
convert image +level nnx100% result
will work for me.
Thanks to all who replied.
Peter