New Ruler Transformation

Moderator: jsachs

Post Reply
tomczak
Posts: 1481
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

New Ruler Transformation

Post by tomczak »

The new Special Effects/Ruler is great! While I'm still getting around its settings, here is a question: say, there is an object in an image that is of known physical length, say 1 m long. I can draw a ruler that spans the length of the object.

Now, I would like to label this ruler (or subdivide the scale) according to its physical length in the image. The only way I could figure out how to approximately do that is to equate Ruler Length with Unit Length manually by copying the value from one field to another. Is there a more direct way of doing something like that?
Maciej Tomczak
Phototramp.com
tomczak
Posts: 1481
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: New Ruler Transformation

Post by tomczak »

I have one suggestion for the Ruler Transformation: would it be possible for the Transparency slider at the bottom to be split to Line Transparency and Ruler Transparency (maybe using a double slider on the same scale?). This way, it would be possible to create a ruler consisting of the 'line' and labels only, without a background rectangle colour.
Maciej Tomczak
Phototramp.com
tomczak
Posts: 1481
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: New Ruler Transformation

Post by tomczak »

Oh, and one more observation on ruler divisions (ticks). The easiest is an example: set all divisions and subdivisions to 1, start value 0, increment 1. That should show two major ticks - at zero and at 1. If you then start increasing Minor divisions or subdivisions, at certain values (e.g. Minor Divisions = 3), the large tick at 1 disappears (and then reappears at some other combinations of minor divisions/subdivisions value).

Edit: I just discovered that you can also make the end major tick to disappear by simply changing the number of Major Divisions (without having to invoke minor ones).
Maciej Tomczak
Phototramp.com
jsachs
Posts: 4687
Joined: January 22nd, 2009, 11:03 pm

Re: New Ruler Transformation

Post by jsachs »

>> say, there is an object in an image that is of known physical length, say 1 m long. I can draw a ruler that spans the length of the object.

Let's assume you have a photo that includes an object that is 1.23 cm long and you want to add a mm scale at the bottom of the image.

First, set Unit to Pixels and measure the object size in pixels -- say it comes out to 151 pixels long.
Therefore, 1 cm = 151 / 1.23 = 122.8 pixels.
Set the ruler Length to the desired length in pixels (e.g. for a 4 cm scale, set it to 4 * 122.8 = 491.2 pixels)
Set the Major Unit to 1cm = 122.8 pixels
Set the Starting value to 0.0 and the Increment to 10.0

Unfortunately it would be difficult to make the ruler background transparent given the way I implemented the transformation.
Jonathan Sachs
Digital Light & Color
tomczak
Posts: 1481
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: New Ruler Transformation

Post by tomczak »

If labels are not appearing at the ends of the ruler, try increasing the left and right margins.
It's not the labels - it's the last Major tick disappearing and reappearing, depending on its own number of divisions and the values of minor divisions, labels or not. It seems to happen when the Unit Length equals Ruler Length (as in making a ruler with a range from zero to one).
Maciej Tomczak
Phototramp.com
jsachs
Posts: 4687
Joined: January 22nd, 2009, 11:03 pm

Re: New Ruler Transformation

Post by jsachs »

Yes, sorry I misread your message. I was able to reproduce the missing tic mark problem and it was being caused by roundoff error. Fixed for next release.
Jonathan Sachs
Digital Light & Color
Post Reply