When we have images with high contrast regions (like HDR images) that might end
up with bad ringing from negative lobes of resizing filters, we use the range
like this:
oiiotool hdr.exr --rangecompress --resize 50% --rangeexpand -o small.exr
There's no perfect solution, but this is what we do in practice.
On Oct 10, 2013, at 10:18 AM, Ben De Luca wrote:
> Hi Larry,
> I was working with master, checked it out about 24 hours ago. I do
> still have the problem, but I think the range compress/expand does seem to be
> a solution. It certainly looks better with it rather than without it.
> When I saw the problem I was comparing various filters in nuke with
> our renderer, nuke has the ability to clamp the negative lobes, which also
> looks better than the original.
>
> What ever the solution I need to get the process back into a our
> renderer, and oiio is where I usually look to see a reference implementation
> of a 2d imaging process.
>
>
>
>
>
>
>
>
> On Thu, Oct 10, 2013 at 5:14 PM, Larry Gritz <[email protected]> wrote:
> Is this in master or 1.2?
>
> We very recently checked in a change to rangecompress/rangeexpand that
> contains different coefficients for the transformation, for this exact
> reason. The new coefficients are much better at avoiding black pixels from
> the negative lobes. This was a simple mistake all along: the program from
> which SPI so kindly donated the formula had two different sets of
> coefficients, which we didn't realize at the time that we took the *wrong*
> ones that were not actually used for resizing. The new ones we just put in as
> replacements are the ones actually used and which work much better.
>
> Give a try to master and see if it helps?
>
>
>
> On Thu, Oct 10, 2013 at 5:30 AM, Ben De Luca <[email protected]> wrote:
> Hey thanks for that!
>
> Im looking at the various filters to try and determine how we are going to
> deal with the ringing artifacts we have on areas that are superbright. I saw
> rangecompress function, which helps but at least in my test image the
> specular reflection component is so bright I get the black artifacts with
> almost any filter with negative lobes.
>
>
> IBA::rangecompress()/rangeexpand(), and oiiotool --rangecompress /
> --rangeexpand compress the excess >1 values of HDR images to a log
> scale (leaving the <= 1 part linear), and re-expand to the usual
> linear scale. This is very helpful to reduce ringing artifacts that
> can happen when an HDR image is resized with a good filter with negative
> lobes (such as lanczos3), by doing a range compression, then the resize,
> then range expansion. It's not mathematically correct and loses energy,
> but it often makes a much more pleasing result.
>
>
> On Wed, Oct 9, 2013 at 6:35 PM, Larry Gritz <[email protected]> wrote:
> I think you want
>
> oiiotool input.ext --resize:filter=blackman-harris 50% -o
> /tmp/test.exr
>
> options are appended to commands with the ":name=val" format.
>
> Filter choices (see end of filter.cpp) are box, triangle, gaussian,
> sharp-gaussian, catmull-rom, blackman-harris, sinc, lanczos3,
> radial-lanczos3, mitchell, bspline, disk.
>
> The default -- which I think pretty good -- is to use blackman-harris when
> magnifying, and lanczos3 when minifying.
>
>
>
> On Oct 9, 2013, at 5:04 AM, Ben De Luca wrote:
>
> > Hi All,
> > I was trying to pass a filter option to the resize command, but I cant
> > figure out what the format should look like.
> >
> > I thought it might be some thing like.
> >
> > ./oiiotool -v input.ext --resize 50% filter=blackman-harris -o /tmp/test.exr
> >
> > Is that the right sort of format? I looked that the code and I cant
> > actually see how I can pass in the filter option.
> >
> > Also, is there a list of implemented filters?
> >
>
> --
> Larry Gritz
> [email protected]
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
>
>
> --
> Larry Gritz
> [email protected]
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
--
Larry Gritz
[email protected]
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org