What to use instead of levels and curves

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

gm20
Posts: 3
Joined: Tue May 19, 2020 5:09 pm

What to use instead of levels and curves

Post by gm20 »

It's nice to have a cross-platform, command-line image manipulation tool like Nconvert.
I use XnView MP 0.96.2 to export settings to it.
The thing that I miss is: curves and more parameter for '- levels'.

Is there any way to set other options for Nconvert to get the same results without levels and curves?
If it possible, what options should be used for this purpose?
In XnView Script it looks like this, what I would like to achieve:
<Levels in_low="27,0,0,0," in_high="222,255,255,255," out_low="0,0,0,0," out_high="255,255,255,255," gamma="0.49,1,1,1," mode="0"/>
<Curves count="1" curve_0="0,0,0.0768246,0.373786,0.514725,0.281553,0.859155,0.73301,1,1,"/>
SAMSAM
Posts: 28
Joined: Sun Sep 15, 2019 5:14 pm

Re: What to use instead of levels and curves

Post by SAMSAM »

It's complicated. I think it will be easier to add the "-levels" parameter medium tone (shadow) to the command. For example:- levels 15 145 210, where 15 is the black point (B), 145 is the mid - tone point (shadow), and 210 is the white point (W).
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: What to use instead of levels and curves

Post by cday »

SAMSAM wrote: Thu Jun 04, 2020 8:49 am It's complicated. I think it will be easier to add the "-levels" parameter medium tone (shadow) to the command. For example:- levels 15 145 210, where 15 is the black point (B), 145 is the mid - tone point (shadow), and 210 is the white point (W).
+1 Add midtones value to -levels :D
gm20
Posts: 3
Joined: Tue May 19, 2020 5:09 pm

Re: What to use instead of levels and curves

Post by gm20 »

It would be nice, but I don't think it's going to work, because Nconvert accepts only 2 parameters, according to the latest version's help :(
SAMSAM wrote: Thu Jun 04, 2020 8:49 am It's complicated.
Do you mean that there's a workaround?
SAMSAM
Posts: 28
Joined: Sun Sep 15, 2019 5:14 pm

Re: What to use instead of levels and curves

Post by SAMSAM »

Yes, there are only 2 parameters now - the white point (W) and the black point(B). However, if the middle tone parameter is added to developers, it will simplify batch processing of similar scans. For example: "- autolevels -levels 000 165 255"
gm20
Posts: 3
Joined: Tue May 19, 2020 5:09 pm

Re: What to use instead of levels and curves

Post by gm20 »

I couldn't find anything about plans like changing levels parameters or implementing curves in Nconvert in the near future.
What I really need is a workaround. I would like to use some other options instead of levels and curves. I'm new to Nconvert and I don't know if it possible or not.
Does anyone have tried and succeed to get the same result without levels and curves using Nconvert as he or she would get with for example using XnConvert with levels and curves?
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: What to use instead of levels and curves

Post by cday »

gm20 wrote: Thu Jun 04, 2020 5:35 pm What I really need is a workaround. I would like to use some other options instead of levels and curves. I'm new to NConvert and I don't know if it possible or not.
Does anyone have tried and succeed to get the same result without levels and curves using NConvert as he or she would get with for example using XnConvert with levels and curves?
If you check through the NConvert help file listing there are some other adjustments available that might be useful, although I'm not sure how satisfactory they would be for your needs.

However, I see that there is also a gamma function, and although I'm no expert I think that is very similar or even identical to the missing midtones option in the levels function... :D

It would be interesting to enhance an image using levels in XnView MP for example, noting the black, white and midtones values used, and then try using identical values with levels and gamma corrections in NConvert. If that works maybe you could post the results side by side.