Converting acv file to a lut

D
Posted By
Des
May 7, 2006
Views
1602
Replies
7
Status
Closed
Hello

Does anyone know of an algorithm which will accurately convert an acv file to a look-up-table?

Reading an acv file is no problem – it’s just a sequence of 2D points for each curve.
But I’m having big problems converting the points to the same curve as PhotoShop. I can get close – but not spot on.

Many thanks for any input or pointers.

Des

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

MR
Mike Russell
May 7, 2006
"Des" wrote in message
Hello

Does anyone know of an algorithm which will accurately convert an acv file to a look-up-table?

Reading an acv file is no problem – it’s just a sequence of 2D points for each curve.
But I’m having big problems converting the points to the same curve as PhotoShop. I can get close – but not spot on.

Many thanks for any input or pointers.

Curve a gradient and save it as a raw file. Create an action to do this if you have multiple curves to convert.

Splines should do a good job of duplicating the curve mathematically. What function are you using, and what is the nature of the errors you are encountering?

Mike Russell
www.curvemeister.com
D
Des
May 7, 2006
"Mike Russell" wrote in message
"Des" wrote in message
Hello

Does anyone know of an algorithm which will accurately convert an acv
file
to a look-up-table?

Reading an acv file is no problem – it’s just a sequence of 2D points
for
each curve.
But I’m having big problems converting the points to the same curve as PhotoShop. I can get close – but not spot on.

Many thanks for any input or pointers.

Curve a gradient and save it as a raw file. Create an action to do this
if
you have multiple curves to convert.

Splines should do a good job of duplicating the curve mathematically.
What
function are you using, and what is the nature of the errors you are encountering?

Thanks for the response.

The PS curve is defined entirely by the input points (ie the points written to or read from the acv file).
In addition the curve is not changed if you add another point that is already on the curve – which is intuitively expected.

Taken together this means that the curve must maximise/minimise some global property.
I’ve initially assumed that the curve is a minimum curvature curve.

I tried fitting a cubic bezier spline to the points with the control points set to minimise curvature (which is equivalent to ensuring curvature continuity for a cubic spline – ie a b-spline).

My results look good in terms of curvature, but are different from the curve PS generates. The PS curve looks too loose to me. I was wondering if anyone knew what sort of curve is being fitted – maybe they use a higher order spline?

Thanks again
Des
MR
Mike Russell
May 8, 2006
"Des" wrote in message

[re spline curve for photoshop curves]

The PS curve is defined entirely by the input points (ie the points written
to or read from the acv file).
In addition the curve is not changed if you add another point that is already on the curve – which is intuitively expected.

Taken together this means that the curve must maximise/minimise some global
property.
I’ve initially assumed that the curve is a minimum curvature curve.
I tried fitting a cubic bezier spline to the points with the control points
set to minimise curvature (which is equivalent to ensuring curvature continuity for a cubic spline – ie a b-spline).

My results look good in terms of curvature, but are different from the curve
PS generates. The PS curve looks too loose to me. I was wondering if anyone
knew what sort of curve is being fitted – maybe they use a higher order spline?

The cubic spline algorithm from the Numeric Recipes book is an exact match. —
Mike Russell
www.curvemeister.com
D
Des
May 8, 2006
"Mike Russell" wrote in message
"Des" wrote in message

[re spline curve for photoshop curves]

The cubic spline algorithm from the Numeric Recipes book is an exact
match.

Thanks a million.

Yes, I implemented that and as you say it matches PS exactly.

Thanks again
Des
W
Waldo
May 8, 2006
Des wrote:
Hello

Does anyone know of an algorithm which will accurately convert an acv file to a look-up-table?

Reading an acv file is no problem – it’s just a sequence of 2D points for each curve.
But I’m having big problems converting the points to the same curve as PhotoShop. I can get close – but not spot on.

Many thanks for any input or pointers.

Des

Des,

How are the 2D points stored in the ACV file? Is the data type floats or ints?

Waldo
D
Des
May 8, 2006
"Waldo" wrote in message
Des,

How are the 2D points stored in the ACV file? Is the data type floats or ints?

Waldo

Curves file format

Length Description

2 Version ( = 1)
2 Count of curves in the file.

The following is the data for each curve specified by count above

2 Count of points in the curve (short integer from 2…19)

point count
4
Curve points.Each curve point is a pair of short integers where the first number is the output value (vertical coordinate on the Curves dialog graph) and the second is the input value. All coordinates have range 0 to 255. See also "Null curves" below.

Hth
Des
W
Waldo
May 8, 2006
Des wrote:
"Waldo" wrote in message

Des,

How are the 2D points stored in the ACV file? Is the data type floats or ints?

Waldo

Curves file format

Length Description

2 Version ( = 1)
2 Count of curves in the file.

The following is the data for each curve specified by count above
2 Count of points in the curve (short integer from 2…19)
point count
4
Curve points.Each curve point is a pair of short integers where the first number is the output value (vertical coordinate on the Curves dialog graph) and the second is the input value. All coordinates have range 0 to 255. See also "Null curves" below.

Hth
Des

Thanks!

Waldo

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections