Jump to content

Is it possible to set a Photoshop Marquee to be offset a specified distance from edge of image?


Recommended Posts

Is this possible? Or with some other tool?

 

To go back to square one, and explain my purpose:

 

I want to retain the black edges of a scan, assess the image with

levels while excluding the black edges, and then apply that levels

assessment, to the whole image.

 

A method for doing that was explained to me here at photo.net. It is:

 

1. Set a marquee which excludes the edges

 

2. Start levels dialogue, choose what you want in options, click ok,

save the settings to a file (untitled.alv), and then cancel, don't

apply.

 

3. Deselect the marquee

 

4. Restart levels dialogue and apply the previous saved settings.

 

Now, I would like to create an action that will record all of this.

With my usual foresight, I've already rotated my portrait and

landscape images to correct orientation, so the x and y dims vary. If

I HAVE to, I could always undo that. But I'm wondering, isn't there

some way to select "all", and then offset the selection inward by

some specified pixel width?

 

Also, the steps 1 through 4 above seem a very cumbersome work-around.

And I'm not sure if the saving and restoring levels settings to a

file is going to work in an action. There is a "warn of overwrite" at

each saving of this file.

 

Any other ideas, for just excluding some percentage around the edge,

when doing a levels assessment. This is dead-simple in Vuescan, by

specifying Crop|Buffer %. But I'd like to do this in PS.

Link to comment
Share on other sites

Sorry, I can't answer your question, but I'm curious as to why you want to exclude the neg

rebate when adjusting levels. When

scanning colour negs I always like to have the neg rebate there - that's what I set to 0,0,0

when setting levels. Actually, with my photographs, it makes very little difference if the

rebate is there or not (i.e. there's always a shadow area in my negs where the negative is

basically unexposed). If you were shooting high key stuff (i.e. no blacks - say, cloud

formations on an overcast day), then I think you might still want to have the rebate there

when setting levels - otherwise you could end up boosting contrast artificially.

Link to comment
Share on other sites

Hmm, perhaps I don't need to exclude it? I was thinking PS is assessing this massive swath of black, and the results would accordingly too bright. But maybe that is not the case. It could be my Vuescan mindset. The inverse: if I have say a miscropped slide with a clear gap. Would PS levels consider this and depress the histogram accordingly? Or not. Again, maybe just Vuescan mindset? I'll try it out both ways.
Link to comment
Share on other sites

Actaully, I can answer your question!

 

There are probably many ways of doing what you want, but here's one, recordable as an

action (put a check mark in the levels part of the action, so Photoshop stops, and lets you

make your adjustments manually).

 

- select all

 

- select > transform selection > set width and height to 90% > return

 

- layer > new adjustment layer > levels

 

- select all > delete

 

- select white as foreground color > fill

 

- deselect and flatten (if you don't want to keep the adjustment layer)

Link to comment
Share on other sites

Elliot, thanks! I'm cut and pasting that, and will try right away. Well, I'm playing one-man-band with slide mounts transfers, scanner, and photoshop right now, but in the next hour or so.

 

FYI: I quickly both approaches, first, straight levels, second, levels with marquee exclusion, followed by the save settings, etcetera. There is a difference in the histograms:

 

The blue is blocked up in both, and doensn't vary between the two versions. The red and green however, both push further to left in the straight version, vs standing off, a little to the right, in the marquee'd version. I suppose if the blue was not blocked up, it would follow suit.

 

So the shadows are a little more "open" in the marquee version. Have to think about why... Haven't had my coffee yet.

 

So thanks again, will try your suggestion. I was thinking to select all, but could not figure out where to go from there.

Link to comment
Share on other sites

Elliot, something "funny" happens, if I procede beyond:

 

- select > transform selection > set width and height to 90% > return

 

If, on the other hand, I switch over to my "trick" at this point, ie: start levels dialogue, save result, deselect, load result, I get same (or close, due to slightly different selection) result as my "by hand" marquee selection.

 

Unfortunately, when recorded in an action, the untitled.alv does not get updated. The time of the file stays the same, when I run the action. In other words, I think it's just using the old file, or something.

 

Just for the heck of it, I might try running a roll with that alv file. But I'm sure that is not the way to go.

Link to comment
Share on other sites

There's gotta' be 5 to 10 ways to do this one. A simple way is to use the Magic Wand to select the black border. If the black border is not contiguous, hold the shift key and use the Magic Wand again. Apply a little diffusion to the selection, then invert the selection (shift-crtl-I). You've just selected everything BUT the border.

 

Somebody explain why the rough edge is so important. Are you trying to prove you compose in the viewfinder?

Link to comment
Share on other sites

Hi Edward,

 

Elliot's "Select all" followed by "transform selection", with a value of around 90% in both x and y directions, did the trick for automated exclusion of the border. I did try magic wand, but there is nothing contiguous about the black edge: the selection spills into black portions of picture near the edge. Anyway, there is a solution, that bit works.

 

Now, I can to the levels assement on the selection, save settings (to a file), bail out, deselect so that whole image is now to be assessed, go back into levels, load previous settings, and Bob's your uncle. BUT, it won't behave in an action. The act of saving levels settings to a file and loading levels settings from that file does not seem to "take", in an action.

 

Right now I'm running a batch with action as is, using the same levels setting (I think!) for the whole roll. Just curious to see how it turns out.

 

As to your question/suggestion: why not just crop off the black edge, I may just throw in the towel and do that. That's what I've always done in the past. You do lose a bit of the image, due to rough edges, rounded corners (Kodachrome mounts and similar), slight skew of holder (tho I have that pretty well sorted with shims in holder), etcetera. Plus I kinda like the look, looking thru a window into the past.

 

Anyway, I have a one-by-one, by-hand way I can do it. I hope there's a solution that could be done in an action. There ought to be. Lowly Vuescan can manage this: you just tell it to exclude a percentage around the edge when considering the histogram, but apply that consideration to the overall picture. Quite simple.

 

Actually, maybe this is for the best. I can make the majority of the process automated. In my workflow I'm first assigning a profile, then converting to a profile. These steps, plus the select all and transform, can be in an action. Then maybe just do it by hand from there. At least it forces me to review what levels is going to do.

Link to comment
Share on other sites

It may be neurotic, but I like to scan and archive my negs with a slither of black border. It's

not that I want to print the border, it's just so that when I call the file up I can immediately

tell by looking at it that it's a scan of the whole negative and not a crop...

 

Mendel, I'm not sure why my suggestion didn't work for you. I tested it, as an action, and it

worked for me. Basically your making a selection, converting that selection into a layer mask

(by creating an adjustment layer), and then filling that layer mask with white (so that it is no

longer a mask, as the adjustment is now being applied to the whole of the image).

Link to comment
Share on other sites

Elliot, I'll go through it again. Been running around shopping and stuff. My Photoshop level is newbie, so could very well be an oversight. What did see: the result was quite different than the result of the workflow I described at the top of thread. Outcome was darker, lower in contrast. Not sure why. If you're curious and want to see for yourself, try applying identical levels adjustments thru both workflows, and see if you arrive at the same histogram at the end. 'Branch' just after the transformation step. Do the levels my way one time, your way the next, and toggle in the history pallet. If you get identical results, then I've definitely jumped the tracks somewhere.
Link to comment
Share on other sites

Someone told me a technique: you apply levels to a selection, the nundo with ctrl z, then remove the selections so that the whole file is being considered, and then do something that applies levels, with your last settings. I can't recall exactly what that was. It's in one thread I contrib'd to, so am still digging. As I recollect, it did not require writing a file with the settings. I was thinking it was <ctrl> <f>, but that's always greyed-out, for some reason. Will keep digging. It's somewhere in my history of postings, and I know the approx date.

 

In the meantime, if someone else could find it, or knows the trick, would be great.

Link to comment
Share on other sites

Bingo:

 

http://www.photo.net/bboard/q-and-a-fetch-msg?msg_id=00CczF

 

Man, this time I'm going to be sure to record this offline.

 

Elliot, I'll still check out your workflow. Anyway, here's one that works, and can be made into an action. Uses <ctrl> <alt> L to bring up levels, with the last settings used.

 

Here's the relevant text:

 

++++

 

Kris Heylen , jun 22, 2005; 03:43 p.m.

 

"With a marquee (or crop?) window set, if I start a levels dialogue, the histogram reflects the selection only. If I make adjustments to levels, is there a (simple?) way to apply the adjustments to the whole image, not just the selection."

Mendel,

 

Yes, there is a way. After having applied levels to a selection, first undo with ctrl-Z. Then unselect, or either select the entire image. Then call the levels dialogue with Ctrl+Alt+L (instead of just Ctrl+L) and the dialogue pops up with the last values used, thus applying to the whole image.

 

This works for a lot of adjustments, not only levels.

 

Hope this helps,

Kris.

 

++++

 

So my workflow (based on PS7 pulldowns (The locations vary a bit in CS2. I'm starting with 16 bit linear tiffs, and applying a specific profile):

 

Image|Mode|Assign profile: Ektachrome-EO50302

 

Image|Mode|Convert to profile: sRGB IEC61966-2.1

 

<ctrl> A (select all)

 

Select|Transform selection (specify 95% for x and y, then hit return)

 

<ctrl> L (levels) (apply desired settings, and run it)

 

<ctrl> Z (undo previous step) (but saves those settings!)

 

unselect the selection (various methods available. For me, <ctrl> m, then right click and deselect works)

 

<ctrl> <alt> L (brings up levels, with last settings used, just hit ok to apply. This time it is applied to whole image)

Link to comment
Share on other sites

Ok, even with <ctrl> Z out, the act of bringing back previous levels settings with <ctrl> <alt> L still does not work in an action. The action records unigue levels settings for that step. In short, they only apply for the image with which you recorded the action. Well, it can atleast be done by hand.
Link to comment
Share on other sites

It is possible with other tools. Quick Mask and using the Move Tool with the arrow keys to Nudge the image by precise numbers of pixels.

 

Create an Action to do the following:

 

1) Select All.

 

2) Enter Quick Mask.

 

3) Select the move tool and nudge the selection up and to the right. Single arrow clicks nudge by one pixel, shift-click an arrow and you nudge by 10 pixels in the specified direction. You want to nudge up and to the right by twice as many pixels as you want your border to be.

 

4) Exit Quick Mask.

 

5) Enter Quick Mask.

 

6) Use the arrow keys (with the Move Tool still selected) to nudge the selection down and to the left by number of pixels you wish the border to be.

 

7) Exit Quick Mask.

 

You now have your selection. Next apply your corrections with the selection active. Hit CTRL-d to get rid of the Selection.

 

You could use a Levels Adjustment Layer here to nondestructively apply your Levels corrections.

 

I would suggest going to the options for the Action and assigning a keyboard shortcut to it to save time. You could also embed the application of Levels or the creation of the Levels Adjustment Layer in the Action.

 

If anyone has a simpler solution I would love to hear it.

 

hope this helps,

 

Sean

Link to comment
Share on other sites

I should note that if you want to apply the Levels adjustment to the whole image, then you need to use a Levels Adjustment Layer.

 

If you create an Adjustment Layer with a selection active, then the selection becomes the Layer Mask for the Adjustment Layer. Next you simply click on the Layer Mask, Select All, and then Fill (SHIFT-F5 IIRC) with white. This changes the Layer Mask from selective application of the ajustment to adjusting the entire image.

 

Or, if your borders are inconsistent, them manually select the image area with the Marquee Tool, create a Levels Adjustment Layer (automatically only applying to the selected area), and then fill the Layer Mask with pure white.

 

Whatever your goal, all of this is scriptable with Actions.

 

enjoy,

 

Sean

Link to comment
Share on other sites

Sean, several aspects of your suggestions seem similar to Elliot's. It's encouraging to hear it can be done. I need to take another break from the scanning process (I am totally occupied juggling the scanner/holder/slide mounts/, and PS review of results. Walk through the suggestions, and see if I can get it working. The main stumbling block is to get levels to consider only the selected area, but apply it to the whole.

 

The solutions are byzantine to me, as a newbie, but I will try! Would be nice if there was an option in the Levels dialogue box, allowing you to ignore a specified edge strip %. Simple!

Link to comment
Share on other sites

Mendel,

 

The trick is to use the Levels Adjustment Layer (created from the Layers Palette) which will then allow you to shift the adjustment from applying to the selection to the whole image. Elliot's solution goes there too.

 

The only difference is my method allows you to precisely specify the number of pixels of border to exclude rather than using a percentage.

 

You will need to get an understanding of Layer Masks to understand the technique.

 

Also, by saving the output as a PSD with the Levels Adjustment Layer intact you can later tweak any frame for which the preselected levels parameters did not work.

 

enjoy,

 

Sean

Link to comment
Share on other sites

Hi Sean, I've used Adjustment Layer|Levels. Also, I think I used layer mask in the process of creating a blended exposure. Emphasis on "think". That's where I'm at... I will persevere in going thru the suggestions.

 

Seems such a common situation, but there isn't a simple option in levels for this.

 

As I said in my ramblings up the page, I can achieve this thru <ctrl> <alt> L application of previously undone levels, but this doesn't work (so far) in an action, so would have to be done one image at a time.

Link to comment
Share on other sites

Hi Elliot,

 

Again, followed your guidance for creating the offset selection. That bit's working fine. Then:

 

I create a Adjustment Layer|Levels

 

Layer dialogue appears. Also, at this point. the selection appears to disappear.

 

I fill in my settings in the options sub-box of levels, and click ok there. Now, nothing appears to be happening to the visible image. Tick and untick of levels preview shows no change.

 

At this point I'm lost again.

 

Followed thru, did these steps:

 

- select all > delete

 

- select white as foreground color > fill

 

- deselect and flatten (if you don't want to keep the adjustment layer)

 

 

But, basically it ends up as if no levels adjustment has been done. Assume I'm missing something.

 

 

FWIW, applying levels to the full image (not excluding the border), seems almost identiical to my "manual" border exclusion method. But I suspect this would vary from one image to the next, depending on the amount of shadow detail.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...