Hi,
I would like to have finer control on applying levels on an image using the magick C++ api..
I would like to give a bezier curve as an input to specify how the level
has to be applied...
I know I could do it with the magick++ fx function but am not sure as to how to go about it...
Could some one help me...
Regards
Praveen
Histogram levels
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Histogram levels
I don't know anything about C++, but I have programmed a bash script to do something like that using splines and -clut. see my script, curves
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Histogram levels
If the curver can be described as a list of numbers, then that can be converted into a culumitive histogram, and appied using the same histogram re-directibution technique used for Gaussian Histogram re-distribution.
http://www.imagemagick.org/Usage/colors ... ian_redist
Yes we are working toward having this built into ImageMagick!
http://www.imagemagick.org/Usage/colors ... ian_redist
Yes we are working toward having this built into ImageMagick!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Histogram levels
I think he wants to have only a few point that are spline interpolated to fill out the lut for clut
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Histogram levels
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Histogram levels
Hi,
Thanks to all,
Yes,I would like to do curve fitting...
I looked at that example but that requires me to pass a mathematical formula to magick which means I need to use some external library...
Is that the only way I can achieve this effect....
Regards
Praveen
Thanks to all,
Yes,I would like to do curve fitting...
I looked at that example but that requires me to pass a mathematical formula to magick which means I need to use some external library...
Is that the only way I can achieve this effect....
Regards
Praveen
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Histogram levels
probably unless your points are equally spaced. then you can use -filter to interpolate them
convert -list filter
Bartlett
Bessel
Blackman
Bohman
Box
Catrom
Cubic
Gaussian
Hamming
Hanning
Hermite
Kaiser
Lagrange
Lanczos
Mitchell
Parzen
Point
Quadratic
Sinc
Triangle
Welsh
see my rainbow example at http://www.fmwconcepts.com/imagemagick/ ... hp#rainbow where I took a handful of point colors and interpolated them using a cubic filter to fill it out to 600 pixels wide.
This does not work if you have unevenly spaced points.
convert -list filter
Bartlett
Bessel
Blackman
Bohman
Box
Catrom
Cubic
Gaussian
Hamming
Hanning
Hermite
Kaiser
Lagrange
Lanczos
Mitchell
Parzen
Point
Quadratic
Sinc
Triangle
Welsh
see my rainbow example at http://www.fmwconcepts.com/imagemagick/ ... hp#rainbow where I took a handful of point colors and interpolated them using a cubic filter to fill it out to 600 pixels wide.
This does not work if you have unevenly spaced points.