I'd say that staring at someone for a while is always rude, because otherwise we'll be getting in a situation where we can stare and stare and stare at the eyes of a woman in a niqab, defending it by saying "Well, if she didn't want me to stare at her gorgeous eyes then why'd she go out in public without wearting sunglasses?"
With that said, though, there's nothing wrong with a quick look. People do have the right to look at other human beings.
And if you wanna be classy, then just say "That's a very nice cosplay. Is it okay if I take a picture?" or something like that. If she says yes, which cosplayers pretty much always do since they appreciate appreciation, you take a pic and then, when you're home, you can ogle the pic all you want. Because let's face it, what you do with a photo that you took yourself, of a person who gave you permission, is your own business (as long as it doesn't hurt anybody or break any laws).