What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Selecting transparent background


pinguwin

New Member
Messages
4
Likes
0
I am stitching photos together and have regions at the edges that are transparent (grey/white checkers).

Currently I am fixing these areas with content-aware fill but there has got to be a better way to select the regions to fill. What I would like to do is select a general region that included the transparent parts and a regular part. I want it to then only outline the transparent part (so the content-aware fill doesn't overwrite good parts).

When I open the images after stitching, they have only a single layer and are a.png. Ideas?
 
Well one idea here, Explain that again, it doesn't seem to ringing any bells here.
 
I think when you start getting near areas you don't want content aware to duplicate you need to switch to clone stamp, or patch or something else.
I don't think you can mask out or select areas to use or not to use.

pinguwin said:
When I open the images after stitching, they have only a single layer and are a.png. Ideas?

Don't save it as a png.
When they open in PS you have 1 layer and mask for every image in the stitch.
If you save as a PSD or layered TIFF the layers will still be there.

If you save as a png or jpg you'll flatten the image.
 
My fault for not explaining this well enough. Consider the following picture:


5120997027_68eafa58e5_b.jpg

It is common with stitching programs to have irregular edges. I want to use content-aware fill to fill in the checkered regions.

With saving in .jpg, my stitcher inserts black areas where the image doesn't fill in completely. .png will give a transparent background. Didn't think of saving as a .psd.

Sometimes the stitcher fills in the top and bottoms very well, other times, there is an irregular region that doesn't fill well and would ruin the panorama if I cropped it out of the photo. Content-aware fill can often help fill in the edges of the photo and often does an excellent job of doing so. I can use the clone tool effectively to fill in grassy areas but look at the portions of the collapsed roof (It's an old train roundhouse in the city when I lived in Santa Fe, Argentina), it would be difficult to use the clone tool on the rafters (content fill does surprisingly good)

What I want to do, is select a region of the photo, using the lasso or rectangular selection tool as shown in the picture. Then, force it to ONLY select the transparent background. My hand is not that steady and to get a good selection is difficult. So, let me select a region as I did above and do not choose any of the good regions (i.e. only trace out the non-transparent background/checkered regions). If I do include the good regions, content-aware fill will be overwriting "good" data from the original photos with it's own assumptions of what should be there. With spherical pictures, sometimes I'll get a star-shaped region in the middle where it didn't stitch properly. I know there are way to trace objects in certain drawings, just not sure in this application.

So I'm trying to figure out is there a way to relatively quickly only select the checkered regions? I could up the scale greatly and very slowly trace out the transparent background but some of these photos are 30,000 pixels horizontally but that is a lot of work, especially as I'm working on dozens of panos.

My knowledge of PS is ok but this is beyond my current knowledge. Thanks for reading my blabber up to this point :-)
 
Select
Load Selection
Layer 0 Transparency
tick the Invert checkbox

Will select all the transparency.
 
It may be better to deal with one question at a time.
How to select only the transparent areas.
If there are 5 images in your merge then there are 5 layers and masks and they are all selected at this point.
Most of the options in the Select pull down are grayed out with all the layers selected, so you need to combine them all onto 1 layer.

You will "Stamp Visible" with Ctrl+Alt+Shift+E in Windows or Cmd+Opt+Shift+E on a Mac to combine all the images without flattening it.

In this new layer, use the marquee tool or any selection tool and make a few random selections in the transparent area only.

It doesn't have to be pretty or complete.

Then go to Selection|Similar.

You should now have just the transparent area selected.

pinguwin said:
With spherical pictures, sometimes I'll get a star-shaped region in the middle where it didn't stitch properly.

It could be the photos weren't overlapped properly.
Let's get this worked out first than post a new question, it's just simpler.
 
Select
Load Selection
Layer 0 Transparency
tick the Invert checkbox

Will select all the transparency.

You still need to combine the layers to a single layer first with Merge Layers, Merge Visible, or Stamp Visible.
Then load Select|Load Selection works fine too, it's actually simpler than what I suggested.
 
Thanks folks, that is exactly what it is needed. It's giving better results and 10x faster. Now I can just select a region, exec an action that does the selection and fill with a function key and it's done.

There are a few problems with this approach. It seems that with certain types of backgrounds, i.e. blue skies, this will often leave a single bad pixel outlining the area but that is something that can be tolerated and fixed as it happens.

One change I made (not through knowing what I'm doing, rather random experimentation), is choosing "intersect with selection", if you go with the default choice "new selection", it chooses all of the transparency in the whole 30k*8k pixel drawing. I run out of memory and it makes you take the good with the bad fills. With the "intersect.." option, it allows me to select a smaller region and fix things on more selective basis, but still very quickly.

Thanks a ton!
 


Write your reply...

Back
Top