Jump to content
You must now use your email address to sign in [click for more info] ×

Cleaning selections to achive sharp edges


Recommended Posts

Hi,

I work with panoramas that have low contrast areas (picture_1) and I need to create and save many selections (Spare Channels) to be able to work on these areas separately.
Because of the low contrast, initial selections aren’t very clean (picture 2).  The Selection Brush Tool and the Refine Tool seem to be at their limits.

Picture 2 was created by using a black pixel layer and filling the initial selection with white.

To create a clean selection (picture 3) I use pixel layers because then Levels adjustment layers or dodge and burn tools can be used to achieve a clean black and white image. (It is not possible with Spare Channels.)

With Ctrl+Alt+clicking the pixel layer thumbnail the new clean selection is created and saved as Spare Channel.

 

The actual work process is somewhat more complex and I tried to ease it with writing Macros. However, Marcos are limited and e.g. don’t support Pixel Selection from Layers.

Is there any other possibility to improve initial selections so that Macros can be applied or the work process can be simplified?

 Picture 4 shows the final result, when working on four sections separately.

 

Thanks for any reply.

 

picture_1.jpg

picture_2.jpg

picture_3.jpg

picture_4.jpg

Link to comment
Share on other sites

I think this is close to a problem that I’ve been having recently which is isolating blond hair from a white background.
It doesn’t sound like the same thing at first but we are both trying to ‘separate’ colours that are very close to each other tonally (if that’s the correct word).
I would be interested in hearing any solutions to this in case it helps me too.

Link to comment
Share on other sites

I would have thought other than increasing the contrast a bit would be to manually define the area's using the pen tool or making a matte with a textured brush to define a ragged edge.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

18 minutes ago, firstdefence said:

I would have thought other than increasing the contrast a bit would be to manually define the area's using the pen tool or making a matte with a textured brush to define a ragged edge.

The approach with the pen tool or the polygonal lasso tool I am familiar with. However, the shown picture is just a fraction of the real panorama and using these tools would take to much time.
The approach with the textured brush, I don't fully understand. What kind of texture would it be? Would that be a fixed texture? How is that texture linked to the edge of the forest in the picture?
The edge may not only be a forest. Another edge is the mountain tops to the sky (It is a panorama of the Alpes).

Link to comment
Share on other sites

No approach is going to be easy on a low contrast image and would invariably utilise multiple methods. The eye is always drawn to straight lines and in a selection or change of contrast will only become more obvious, using a ragged edged brush can, to a point, make selections less obvious. So, even though the edge may not be perfect it goes a way to making the selection look more natural.

the use of a matte, such as black on white can can aid in making accurate masks and selections, during their creation lowering the opacity helps as a guide.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

On 1/17/2020 at 2:31 PM, GarryP said:

I think this is close to a problem that I’ve been having recently which is isolating blond hair from a white background.
It doesn’t sound like the same thing at first but we are both trying to ‘separate’ colours that are very close to each other tonally (if that’s the correct word).
I would be interested in hearing any solutions to this in case it helps me too.

 

1 minute ago, firstdefence said:

No approach is going to be easy on a low contrast image and would invariably utilise multiple methods. The eye is always drawn to straight lines and in a selection or change of contrast will only become more obvious, using a ragged edged brush can, to a point, make selections less obvious. So, even though the edge may not be perfect it goes a way to making the selection look more natural.

the use of a matte, such as black on white can can aid in making accurate masks and selections.

Yes, I agree. And the workflow I am using includes many steps, also "hiding" the hard edges. 
How would you propose to create the ragged edged brush in picture one (top) for the lower forest, section 4 (lowest picture)?

Link to comment
Share on other sites

@Rolbrecht, have you tried using the AP Haze Removal filter on low contrast photos? It is no panacea but sometimes it works reasonably well, or at least can provide a starting point for further retouching.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

1 minute ago, R C-R said:

@Rolbrecht, have you tried using the AP Haze Removal filter on low contrast photos? It is no panacea but sometimes it works reasonably well, or at least can provide a starting point for further retouching.

Yes I did. It works to a certain extent.

However, I found, it is necessary to select areas and work on them separately. Doing all these selections and cleaning them up is a time consuming work. I am familiar with doing this in Photoshop, and I found a way doing it in AP as well, but much more complex. So I tried to ease the workflow with Macros. But I can't get the workflow to run with Macros. (Macros are too restricted.)
As I learned the hard way, that AP works differently than Photoshop, and I am not an expert on AP, I started this post.  

Link to comment
Share on other sites

On 1/17/2020 at 2:31 PM, GarryP said:

I think this is close to a problem that I’ve been having recently which is isolating blond hair from a white background.
It doesn’t sound like the same thing at first but we are both trying to ‘separate’ colours that are very close to each other tonally (if that’s the correct word).
I would be interested in hearing any solutions to this in case it helps me too.

Separating blond hair from a white background is even more challenging because a soft transition is needed to nicely blend the hair into a different background. I know of no tool (also not in Photoshop) that can do that separation in one step.
My recommendation:

1. Select the hair with the Selection Brush and refine it with the Refine Tool. Use the black and white matte to show the mask. Ensure to keep sufficient detail (selection is not perfect).

2. Create a Spare Channel from that selection -> delete the selection.

3. Create a new Pixel layer -> fill it with black

4. Load the selection from the spare channel -> fill the selection on the pixel layer with white -> deselect the selection. (Now a matte is available, where Level Adjustment layers, dodge and burn and blur tools can be used to further improve the matte.

5. When satisfied -> Merge down all used adjustment layers (if any) -> Ctrl+Alt+LMB on the pixel layer (to make a pixel selection).

6. Copy the hair on a new layer (Ctrl+j) -> move it above the desired background. (The hair transition areas may not look satisfying.)

7. Protect the background (transparent) pixels of the new hair layer (switch off Composite Alpha).

8. Use Clone tool with Current Layer & below to copy from the hair and / or background into the transition area to achieve an optimal transition.

9. Delete unwanted layers, spare channel and swith on composite alpha.

I hope I covered all steps.

Link to comment
Share on other sites

14 minutes ago, Rolbrecht said:

However, I found, it is necessary to select areas and work on them separately. Doing all these selections and cleaning them up is a time consuming work.

I have very little firsthand experience with this kind of work but from the suggestions I have read by other forum users, one thing that can help to get cleaner selections is to make a duplicate of the photo, apply various adjustments & filters to it that increase contrast, & use that to make the selections that are then applied to the original.

So for example, sometimes experimenting with the color sliders of a Black & White adjustment can create a lot of contrast so a selection applied to that with the Flood Select Tool can much more easily create cleaner selections which can then be used on the original layer.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

On 1/17/2020 at 12:03 PM, Rolbrecht said:

However, Marcos are limited and e.g. don’t support Pixel Selection from Layers.

Yes they are limited in certain areas and for specific aspects, but common selections should probably work here.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

6 hours ago, Rolbrecht said:

How would you propose to create the ragged edged brush in picture one (top) for the lower forest, section 4 (lowest picture)?

I would use something like Daubs dry media brush "Greasy Pencil" see highlighted brush in the image, I would create a Curve layer to get better definition and create a pixel layer to paint black onto using the selected brush.
777090840_ScreenShot2020-01-19at18_17_58.thumb.png.0962d3d377d07696df05f6d2527f9275.png

I would check the edge and if need be use a textured brush  with the eraser to refine the edge, I would keep doing this until I was happy with the edge. I would block in the black with a basic brush, use the pixel layer to make a selection and then a spare channel.
132505315_ScreenShot2020-01-19at18_26_36.png.d546f41215d52648ad2ca895a858cb7f.png

264388743_ScreenShot2020-01-19at18_27_17.png.fcc492839fcd53f5c0ce2d85a56f3e52.png

Obviously this is a rough example but a lot of the skill is in the refinement.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

18 hours ago, R C-R said:

I have very little firsthand experience with this kind of work but from the suggestions I have read by other forum users, one thing that can help to get cleaner selections is to make a duplicate of the photo, apply various adjustments & filters to it that increase contrast, & use that to make the selections that are then applied to the original.

So for example, sometimes experimenting with the color sliders of a Black & White adjustment can create a lot of contrast so a selection applied to that with the Flood Select Tool can much more easily create cleaner selections which can then be used on the original layer.

Yes, that is a similar approach with the difference that I make the selection first and create from that selection a black & white pixel layer (matte) where I can fine tune this matte with the available tools. This way around I can see how my fine tuning is affecting the matte. I tried both ways and didn’t find a major difference. Actually, I had the impression that the Refine tool works better on the original image. I guess that is, because any change to an image is reducing details.

The black & white adjustment layer is a good hint. Thanks.

Link to comment
Share on other sites

14 hours ago, firstdefence said:

I would use something like Daubs dry media brush "Greasy Pencil" see highlighted brush in the image, I would create a Curve layer to get better definition and create a pixel layer to paint black onto using the selected brush.
777090840_ScreenShot2020-01-19at18_17_58.thumb.png.0962d3d377d07696df05f6d2527f9275.png

I would check the edge and if need be use a textured brush  with the eraser to refine the edge, I would keep doing this until I was happy with the edge. I would block in the black with a basic brush, use the pixel layer to make a selection and then a spare channel.
132505315_ScreenShot2020-01-19at18_26_36.png.d546f41215d52648ad2ca895a858cb7f.png

264388743_ScreenShot2020-01-19at18_27_17.png.fcc492839fcd53f5c0ce2d85a56f3e52.png

Obviously this is a rough example but a lot of the skill is in the refinement.

I never used that brush before. Interesting. I can imagine using that brush on certain sections of an image, where fine details have a low variance. Thanks.

As you seem to be familiar with brushes, allow me a different question:
When I am working with an .e.g 30% white brush on a fully black mask, with any new brush stroke going over a previous brush stroke the intensity increases over 30 % within the intersection.

Is there a type of brush where the maximum intensity remains at 30% no matter how often a new stroke is applied to the same area? (Shall I open a new post for that question?)

Link to comment
Share on other sites

4 minutes ago, Rolbrecht said:

When I am working with an .e.g 30% white brush on a fully black mask, with any new brush stroke going over a previous brush stroke the intensity increases over 30 % within the intersection.

 

Is there a type of brush where the maximum intensity remains at 30% no matter how often a new stroke is applied to the same area? (Shall I open a new post for that question?)

I don't think that's possible with brushes as each separate brush stroke will add the percentage it is set at, so it would not be a brush to set 30% it's a brush that applies 30% incrementally, this is how I perceive it to be. To maintain an even 30% it would need to be applied as a single stroke.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

2 hours ago, Rolbrecht said:

Yes, that is a similar approach with the difference that I make the selection first and create from that selection a black & white pixel layer (matte) where I can fine tune this matte with the available tools. This way around I can see how my fine tuning is affecting the matte. I tried both ways and didn’t find a major difference.

I am not sure we are talking about the same thing. What I have seen suggested is to use filters & adjustments on a duplicate to boost the effective contrast on that duplicate & make a 'marching ants' selection on that layer, thereby making it easier to get a cleaner one, & then (at that point hiding or deleting the duplicate if you want) use that selection with the original layer to do your retouching, or to create a spare channel for that.

For example, applying a Black & White adjustment with the Cyan & Blue sliders moved to the left might create substantially more b&w contrast between the sky & other less bluish objects, making it easier to use the Flood Select (magic wand) to select one or the other.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

@R C-RHm – the principle with both methods is to increase the contrast so that the selection tools can work better.

Roughly we discuss these two methods:

A) To increase the contrast on the image (copy) first and make than the selection.

B) or to make first the selection and increase than the contrast and repeat the selection.

In both methods a separate layer is created to work on. In A) it is a copy of the image, in B) it is a black and white created pixel layer. (A few steps are needed to create it.)

For me, the Levels Adjustment Layer is the main tool to increase the contrast by pulling in the Black and White Levels and adjust Gamma. Good for method A) and B).
With the Black & White Adjustment Layer the Red, Green and Blue channels can be addressed more individually. However, it looks as if noise is added. Alternatively, only the best (with the most even contrast) Composite Channel is selected and only Level Adjustments are applied.

OK. It makes a difference what type of selection tool is used. When one color is dominant and there are high contrast edges in an image the Flood Selection tool is good, e.g. the sky in the attached image (Test_picture). When the forest in the middle section shall be selected, the Selection Brush tool with the Refine tool work better for me. Usually, I use method B) because the black & white pixel layer shows directly the quality of the final selection. 

Test_picture.tiff

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.