Exp: Selections and Masks

Here everybody can post his problems with PhotoLine
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Exp: Selections and Masks

Beitrag von photoken »

Turns out that Alan and I have been thinking along the same lines -- it would be a fun experiment for everyone to bash away at the same image to learn and get some skill at using PL's selection and masking tools.

So, here's the image link:
http://onlyinhighheels.files.wordpress. ... iston3.jpg

It's a picture of The Jen on the set of one of her movies:
Jennifer Aniston 19.jpg
I came across the image several months ago when I was practicing making selections in PL, and I like using this image for that because:
  • It's large, so there's a lot of room to work with.
  • The hair will provide a very difficult challenge.
  • It's a "fooler" -- when I saw the image displayed on my screen at a reduced size, I thought it would be fairly easy to extract her, but examining the image at 400% showed that all the edges present a really difficult challenge.
  • It doesn't hurt that she's so pretty. :wink:
Here's what I came up with back then. I'm not happy with the hair (and I think I could do better now) but the rest of the selection worked very well:
Jennifer Aniston 19 modified.jpg
To make the selecting and masking as challenging as possible for myself, I decided that the final extracted image would be presented against a very dark background, which would mean that any bad edges would be very apparent.

My basic plan of attack was this: I wanted to end up with a mask layer that isolated her from the background. This is because once a perfect mask is achieved, it can be re-used for other purposes. Using a mask layer is also non-destructive, so the PLD file will be the smallest it can and the mask layer can simply be hidden if I want to see the original image.

Some things I learned when doing the extraction:
  • Making an excellent selection/mask involves a whole series of compromises all along the edges, and judgments need to be made at every step.
  • When you examine the edges at 400%, you'll see that there are a lot of artifacts. Some might be due to camera shake, some might be due to subject movement, some might be because of uncorrected lens aberrations, some might be because of sensor overload and bleeding, some might be due to the camera's image processing, etc., -- the list goes on and on.
  • Most of the compromises and judgment calls I had to make involved what to do with areas that contained reflected light or colour bleeding: how much of the background light is acceptable along the edges of the extracted image.
In general, what I did was to use the Free Lasso tool to make the initial selection, then I used the Layer panel's "Create Mask from Mask" to give me the first rough mask layer. I then zoomed in to 400% and painted along all the edges of the mask with a somewhat soft brush and varied the diameter of the brush between 2 and 5 pixels. That was the stage where I made all the decisions and compromises regarding which pixels at the edges would be in or out or partially transparent. For the hair, I think I first made a duplicate copy of her head and used a few tools like selection lassos, enhancing the edges, border matting, etc., and even clicking with the Background Eraser to get a mask that I added to the other mask.

By the way, this is an "open" experiment, so if you use a 3rd party application or plugin to do masking, by all means show us a comparison between what you can do with that and what you can do with PL's tools.

Let's have some fun!
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Exp: Selections and Masks

Beitrag von Alan9940 »

Hello Ken,

Alrighty, then... Since you and I started this little exercise and you threw down the gauntlet, I'll play. But, damn, I think you should pick a harder image next time!! :D :D

The first attachment is the full image whereby I created the initial mask in Topaz Remask 4. After the initial pass to create a rough mask (I must say that I was a little surprised how well Remask did with this difficult image), I worked on it manually, still in Remask, using the tools available there (about 20 minutes effort.) Returning to PS, I called upon Refine Edge to employ the "big guns": Smart Radius, Radius Brush, and Adjust Edge. Following the Refine Edge pass, I had a pretty decent mask to which I manually painted on the mask to refine a bit more. All told we're looking at about 30 minutes work.

The second attachment is at 300% zoom cropping out what I considered to be a very difficult part of the hair to deal with. As you can see, it's certainly not perfect, but with a bit more time I'll bet I could get something that no one would notice at normal zoom levels and normal viewing distances.

This image is very difficult, IMO, for any selection/masking process to deal with; the background wall and taxi are both very close to the color of Jennifer's hair, the tire and wheel well shadow are very close in tone to the purse/strap, her shoes are not that different in luminance value to the road, etc. Thinking back to the original post where you attached your PL results, I'm truly amazed at what you were able to accomplish. I will definitely have to go back and re-read what you did and try it myself in PL.

Btw, my initial trial with this image was in OnOne's Perfect Photo Suite thinking their Smart Brush masking capability would be able to knock this image out without much effort. I was wrong! But, I haven't given up on that, yet. I will go back with the Suite and try, again, when I have more time to play. If I produce anything of value, I'll definitely post it here.

Thanks! This was fun!!

Best regards,
AlanH

P.S. Hey, Ken, I tried to include the referenced attachments, but the $%#& forum software (or whatever) won't let me. Is there some special chant or something I have to do to include attachments? Sorry...
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Exp: Selections and Masks

Beitrag von Alan9940 »

Hello Ken,

OMG, I finally figured out the "special" very specific file parameters allowing me to upload an attachment! In all my years on many different forums, this one has got to be the most annoying!! OK, clicking the preview button I now see that it's a push-down stack...images are reverse of my description above...whatever...

Best regards,
AlanH
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Exp: Selections and Masks

Beitrag von photoken »

Alan9940 hat geschrieben:But, damn, I think you should pick a harder image next time!! :D :D
Heee, heee! If you think this image was easy, just you wait! I've already picked out a truly nasty one for the next Experiment after this one has run its course.... :mrgreen:
Alan9940 hat geschrieben:The second attachment is at 300% zoom cropping out what I considered to be a very difficult part of the hair to deal with. As you can see, it's certainly not perfect, but with a bit more time I'll bet I could get something that no one would notice at normal zoom levels and normal viewing distances.
Just a couple of quick comments: I really like the result on the hair. How about the edges of her sweater and skirt, though -- there's a off-color edge around them. I'll post an analysis of the original image edges at 400% later today or tomorrow with comments about what I was thinking about as I worked on the image.

Don't forget: there's no time limit, no deadline pressure -- just an opportunity to learn and practice. My thing took a few hours spread over a few days as I learned to use the PL tools, and I returned to it with a fresh eye every few days over the subsequent weeks to fine-tune the mask. For the sake of learning and practicing, the time spent on the Experiment is immaterial.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Exp: Selections and Masks

Beitrag von Alan9940 »

photoken hat geschrieben: How about the edges of her sweater and skirt, though -- there's a off-color edge around them. I'll post an analysis of the original image edges at 400% later today or tomorrow with comments about what I was thinking about as I worked on the image.
Yeah, I saw that but the wife was getting a little anxious about why I wasn't coming to dinner. :) Anyway, that artifact is exactly why I want to play with this image in OnOne's Perfect Photo Suite because they have a chisel tool that allows one to hack away at an edge one pixel at a time. I think that tool would have been perfect for that edge. I do plan to work this image up in the Suite so we'll see what we see.
photoken hat geschrieben: Don't forget: there's no time limit, no deadline pressure -- just an opportunity to learn and practice.
I know. I just wanted to join the other kid in the sandbox! :D Stay tuned for more...

Also, I forgot to mention in my last post that IMO a higher quality image to begin with might have made this exercise a little easier. Not looking for easy...just thinking out loud that most of us are probably working up our own higher quality denser image files. Fuzzy edges on things--not that it doesn't happen, anyway, in real life--doesn't lend itself to clean masking in my experience. That said, though, it's a challenge, right?

Best regards,
AlanH
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Exp: Selections and Masks

Beitrag von photoken »

Alan9940 hat geschrieben: Anyway, that artifact is exactly why I want to play with this image in OnOne's Perfect Photo Suite because they have a chisel tool that allows one to hack away at an edge one pixel at a time. I think that tool would have been perfect for that edge. I do plan to work this image up in the Suite so we'll see what we see.
Sounds good. Looking forward to hear what you discover.
Alan9940 hat geschrieben: Also, I forgot to mention in my last post that IMO a higher quality image to begin with might have made this exercise a little easier. Not looking for easy...just thinking out loud that most of us are probably working up our own higher quality denser image files. Fuzzy edges on things--not that it doesn't happen, anyway, in real life--doesn't lend itself to clean masking in my experience.
You're absolutely right. All I can say in my defense is that there's a quote that goes something like "You can cook a little bit of food in a large frying pan, but you can't cook a lot of food in a small frying pan". Uhhh...errrr...that is to say that when I was first learning PL, I kind of figured that if I could get a great result out of a not-so-great image, then I'd be golden with better images.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Exp: Selections and Masks

Beitrag von Alan9940 »

Hello Ken,

I was playing around with this image in PL late last night and, frankly, I was pretty impressed with the initial mask that the Automask wand provided. But, then I started playing with the Mat Border tool for the hair I really couldn't get the hang of it. It seems that it might be color-based where I mark keep, drop, and compute areas which is the way Topaz's Remask and OnOne's old Perfect Mask products work, but no matter how I marked things and/or at what zoom level I was working I couldn't pull off anything even remotely successful. Would you be willing to provide brief instructions on how to use this tool? It would be greatly appreciated and, IMO, would be a substantial contribution to this thread! Just based on what I've seen of your efforts, masking of hair, bridal veils, etc, would be impossible in PL without it.

Thanks!

Best regards,
AlanH
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Exp: Selections and Masks

Beitrag von photoken »

Alan9940 hat geschrieben:I was playing around with this image in PL late last night and, frankly, I was pretty impressed with the initial mask that the Automask wand provided. But, then I started playing with the Mat Border tool for the hair I really couldn't get the hang of it. It seems that it might be color-based where I mark keep, drop, and compute areas which is the way Topaz's Remask and OnOne's old Perfect Mask products work, but no matter how I marked things and/or at what zoom level I was working I couldn't pull off anything even remotely successful.
Hey Alan,
I'm still fumbling my way around the Border Matting tool, too.

You've got the basic idea of the keep, drop, and re-compute areas, but just now when I tried to create some screenshots of my steps I didn't get a very good final result. :( For the image I posted in the other discussion, I did it really simply: used the AutoMask tool to get the initial selection, and then only used the Border Matting tool's "re-compute" tool to go over only the thin strands of hair, using a small brush size that completely covered the strand of hair and included a little bit of the surrounding background.

What I'm coming up against is essentially trying to figure out how much of an area to mark with the re-compute tool. By this I mean, do I mark only the edges to re-compute, or do I have to mark the object, its edges, and a little part of the background?

I'll have a go at this again later today. I've got a couple of different methods I want to test. The first method occurred to me when I re-read the Help and learned I was applying the tools in the wrong order. So, after doing the initial selection with the AutoMask tool, I'll do the Border Matting first (if I can figure out a consistent way to apply it), and then switch to the AutoMask tool again to use its Enhance Edge button on the selection, and then switch back to the Border Matting tool to use its Extract function. (BTW, I think the BM tool's settings should probably also include the Enhance Edge button. I might file a Feature Request for that.)

If I can nail down that method, then I'll test a technique of first generating an intermediate image layer that has more contrast between the hair and its background. I'm thinking of creating a layer from the Blue channel for that.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Exp: Selections and Masks

Beitrag von Alan9940 »

Hello Ken,

Good luck with your Border Matting experiments...I anxiously await your results!

I will try using the re-compute brush, only, and see where that leads. A couple of thoughts I had this morning was (haven't had a chance to play, yet): what if I create a loose selection around the area I'm attempting to use the BM tool on? Would this resist the computation? I have absolutely no idea if PL even follows this technique, but I've used it repeatedly in other software. What if I replace the yellow of the brick wall, taxi, etc, with a contrasting color to Jennifer's hair, etc? I've used this type of idea in PS, but I'd really like to learn what's possible in PL; at this time, I don't even know how to replace color in PL. But, as you said this is a learning experience!

Best regards,
AlanH
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Re: Exp: Selections and Masks

Beitrag von MikeFromMesa »

Alan9940 hat geschrieben: Would you be willing to provide brief instructions on how to use this tool? It would be greatly appreciated and, IMO, would be a substantial contribution to this thread! Just based on what I've seen of your efforts, masking of hair, bridal veils, etc, would be impossible in PL without it.
I guess I am light-years behind you guys in doing selections and masks in PL. I have Topaz ReMask 4 and OnOne Suite 8 (and have tried OnOne Suite 9) and can make quite nice masks with any of those, but cannot seem to do even simple selections in PL that actually yield useful masks.

I have not tried the photo provided but I do have a nice shot of the San Xavier Mission outside of Tucson which should be an easy image for selections. The building is white stucco and the front center piece is the color of terra cotta, but I cannot even get a decent selection in PL with that clear color distinction so I would gladly second brief instructions on how to use PL's tools.

Oh, I can draw a rectangle around the front piece of the church and mark the outlines of what I want selected, but I still get parts of the while surrounding stucco. Even refining the edges in PL does not seem to help me. After looking at your Aniston selection I am sure the problem is not in the tool but my lack of experience in how to use it and, unfortunately, the video tutorials I have seen on the web are no help since they do not try to do an actual selection.

Fortunately both ReMask 4 and PerfectLayers integrate so successfully into PL that I could continue to use them but that seems to miss the point of all of PL's functionality and I would at least like to know how to use that functionality properly.
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Exp: Selections and Masks

Beitrag von Alan9940 »

Hello Mike,

I, too, have both Remask 4 and OnOne's Suite 9; my initial post of the Aniston picture was all created using a combination of Remask 4 and PL's brushes. I've tried this image in Suite 9, but so far have been totally unsuccessful getting a decent mask--even a good starting mask. Not sure what OnOne did when revamping their masking tools in order to integrate them within the modules, but so far I'm finding that, overall, they don't work as well as when I was able to pick keep/drop colors in the old Perfect Mask.

All that said, the point of this thread and exercise is to learn PL's selection/masking tools and push these to the limits to see what/what not can/can't be accomplished. Sure, there are plugins/external tools that might speed up the masking process, but that doesn't help us learn PL. As you've already seen for yourself, there is not a lot of PL help out there in cyberworld so Ken and I thought this thread might foster education and exchange of ideas. Jump in and see what you can do! :)

I have quite a few pictures of the Mission, too, but if you'd be willing to post some form of it that we all could play with that would be great!

Best regards,
AlanH
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Re: Exp: Selections and Masks

Beitrag von MikeFromMesa »

Alan9940 hat geschrieben: I have quite a few pictures of the Mission, too, but if you'd be willing to post some form of it that we all could play with that would be great!
While I have a bunch most of them have people walking into and out of the church. Here is one with no people. Unfortunately I seem to have cut off the very top of the left tower, but at least I got the dirt ...

The website won't allow me to upload anything like a full image and I can provide a dropbox link if someone wants the original raw image (Canon 5D3.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Exp: Selections and Masks

Beitrag von Alan9940 »

Hello Mike,

The attached represents about 10 mins effort starting with the Automask Lasso and running a brush around the edges of the Mission. If I could figure out how to really use the Border Matting tool (with Ken's help--hint, hint), I think that this tool would greatly contribute to the masking around the palm trees and ocotillo. Short of having a better tool, I just brushed loosely around these areas with a soft brush. Of course, more time spent would lead to a better mask!

Let me know what you think. Clouds are from my backyard, btw... :) No other image adjustments made.

Best regards,
AlanH
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Re: Exp: Selections and Masks

Beitrag von MikeFromMesa »

Alan9940 hat geschrieben:Hello Mike,

The attached represents about 10 mins effort starting with the Automask Lasso and running a brush around the edges of the Mission. If I could figure out how to really use the Border Matting tool (with Ken's help--hint, hint), I think that this tool would greatly contribute to the masking around the palm trees and ocotillo. Short of having a better tool, I just brushed loosely around these areas with a soft brush. Of course, more time spent would lead to a better mask!

Let me know what you think. Clouds are from my backyard, btw... :) No other image adjustments made.

Best regards,
AlanH
Nicely done. Instructions would be helpful.

What I had tried to do was to select the front terra cotta facia, but not the wall and not the white stucco, so I could enhance its color. Everytime I do that I get part of the white building and the sky (at the very top). No matter what I do it takes me a lot of "adding" and "subtracting" of the lasso to get the selection I want and the process takes me perhaps 30 minutes. This can not be the proper way to use the tool.

In Photoshop I can use the Quick Select tool and it automatically aligns itself along the color difference on the left, right and top and I only have an issue on the bottom. Perhaps 2-3 minutes, tops. I can even go to, of all things, PaintShop Pro, and get a decent mask. But when I use the Auto Lasso I get more or less of the facia and it does not seem to want to conform to the brown/white boundary. Pressing Refine does not seem to do anything to my "marching ants". The Auto Mask does not seem very "Auto" to me. As I said before I am certain the fault is in my use of the tool, not in the tool itself. But I am missing something (or, perhaps, many somethings)...
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Exp: Selections and Masks

Beitrag von photoken »

Alan and Mike,
Hey guys, the mission photo and learning the PL selection tools by working on it is very valuable, but would be more appropriate in its own thread....

Just a thought.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.