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

Recommended Posts

Hello,

I am a new user of Affinity Photo with small experience in Photoshop. What I would like to achive is quite simple (I hope so) but it needs to be done automatically. I have hundreds of photos of the cell tower. I want to mask everything except the tower itself. I have watched a couple of tutorials on Youtube but they focus on different aspects (mostly using one image to get the final result). I think that mask by colour would be the best (see attached image) but I don't know how to do it right. I would appriciate pointing me in the right direction (feature name, maybe some tutorial). If Affinity can't do this, I would be grateful for suggesting a software or some workaround.image.thumb.png.bc8fada5496a0eff409cfa693364e102.png

 

Regards,

Edited by Grzmocislaw
Link to comment
Share on other sites

  • Staff

Hi @Grzmocislaw Welcome to the forums,

As far as i'm aware there isn't a way to automatically mask out the background as you have described as this would require some combination of selection and refinement to perform, hopefully some other users may have some alternative workflows suggestions. 🙂

Link to comment
Share on other sites

On 6/1/2022 at 2:34 PM, Grzmocislaw said:

What I would like to achive is quite simple (I hope so) but it needs to be done automatically. I have hundreds of photos of the cell tower. I want to mask everything except the tower itself

Unfortunately this is no simple task at all.

The tower has no simple 100% criteria to distinguish from background. No matter if you use RGB channels, HSL channels, or anything else. You could try to use some macros published by DM1 in his YouTube channel, but it will be far away from 100% automatic / perfect.

 

If you look at the cell tower, it is a combination of white parts, reddish parts, black parts. Unfortunately all these colors occur in the background, too.

The image shows a very wide depth of filed, so you can't use sharpness / depth of field to select the tower.

 

Photo is no "Swiss army knife" which can automate the process for you.

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Do you literally need the white pole on a transparent background? And will the towers be white on all of your hundreds photos, with no white in the surrounding?

Or can it be useful just isolate this object + make it obvious? Maybe a procedural filter (@NotMyFault?) may help and avoid the need for use of any of the Selection Tools. Here a quick trial with a Channel Mixer adjustment affecting the Alpha channel. (I am not familiar with this either, so probably there are better, closer solutions)

904879467_isolatingviachannelmixer.thumb.jpg.e0e23019dc687105c5e54e4f1d0bf60d.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

30 minutes ago, thomaso said:

Do you literally need the white pole on a transparent background? And will the towers be white on all of your hundreds photos, with no white in the surrounding?

Or can it be useful just isolate this object + make it obvious? Maybe a procedural filter (@NotMyFault?) may help and avoid the need for use of any of the Selection Tools. Here a quick trial with a Channel Mixer adjustment affecting the Alpha channel. (I am not familiar with this either, so probably there are better, closer solutions)

 

I could select o good portion by converting to HSL. unfortunately the colors in the tower match some of the colors in the background, no change to fully isolate them.

 

 

Screenshot 2022-06-06 at 16.51.26.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

3 minutes ago, NotMyFault said:

I could select o good portion by converting to HSL.

How did you get from the Procedural Texture layer to the Mask layer? In your screenshot it seems the displayed result doesn't use the Procedural layer at all.

I thought of such a workflow to avoid the need to create a selection which could not achieved with an automatism via APh's macro panel.

Well, we don't know yet how precise the result is expected to be. Also I guess cropping the image first can be useful if all area around the tower is expected to be invisible.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

I use the PT filter to convert to hsl, rasterize the result to avoid spinning beachball (App hangs)

Then use flood select tool to try out if it is possible to get a clear selection.

unfortunately this failed in this case. The mask was created to show the interim (insufficient) result 

otherwise I would add another PT filter to encode the manual color selections.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

coming back to the original title of the thread:

Automatic masking by colour

It is possible to automatically create a mask by color. Unfortunately the source image has 100% identical color values both in intended foreground and background areas, thus making it impossible to use color. 
 

If you doubt, use the flood selection tool, uncheck continuous, reduce tolerance, and click to foreground colors. You will always select areas in background having the identical color values (e.g. road on left side, upper part of image).

 

If you had a lens with shallow depth of field, or depth maps (like iPhone Cameras will deliver in HEIC mode), it would be more realistic.

But the example image proofs it is not possible - based on color values alone.

AI based apps may succeed.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Thank you @NathanC, @NotMyFault and @thomaso for answering my question.

At @thomaso
 

On 6/6/2022 at 4:20 PM, thomaso said:

Do you literally need the white pole on a transparent background? And will the towers be white on all of your hundreds photos, with no white in the surrounding?

It is not about the color itself, I want to mask the background so my photogrammetry software will not use it for the calculations. Therefore, only the tower will be used. 
As you can see in the image, the tower is red and white with grey colour for the antennas. 


At @NotMyFault
 

On 6/6/2022 at 4:53 PM, NotMyFault said:

I could select o good portion by converting to HSL. unfortunately the colors in the tower match some of the colors in the background, no change to fully isolate them.

 Actually, what you showed in the image looks very promising. If most of the background is removed apart from the dark strip at the top of the picture, this may be enough to force the program to use only pixels from the tower. Therefore, my goal would be achived, even if the photo is not 100% masked.



 

On 6/6/2022 at 5:11 PM, NotMyFault said:

I use the PT filter to convert to hsl, rasterize the result to avoid spinning beachball (App hangs)

Then use flood select tool to try out if it is possible to get a clear selection.

unfortunately this failed in this case. The mask was created to show the interim (insufficient) result 

otherwise I would add another PT filter to encode the manual color selections.

Is the above the way you achieved the image you posted? I will do some resarch and I will try to recreate your process to see if I understand it well.

 

 

On 6/6/2022 at 5:25 PM, NotMyFault said:

AI based apps may succeed.

 

As for the AI, what you wrote is exactly what I was thinking myself. Unfortunately, without the knowledge of coding, it may be extremely difficult, so I would like to stick with regular programs and automatic/batch processes.

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.