Layers alignment

General discussion about StarTools.
Post Reply
devonshire
Posts: 60
Joined: Mon Sep 24, 2018 12:30 am

Layers alignment

Post by devonshire »

Hi!

I'm getting back to image processing, after a bit of a hiatus, and I have questions about the Layers module - can you help? I recall (some time ago), having trouble with its' same-size image restriction, but I just took a look, and now see that X and Y pixel adjustments are possible between layers. I'm wondering how much latitude there is in using this feature.

My issue back in the day, was with bringing different, dithered stacks in, or a mix of stacks and crops, and getting stuck on the images needing to be the same size...

Same-size may fit some use cases, but it's not always helpful. Some times, it would be nice to bring in differently-sized images, line the stars up, crop off the ragged edges that result, and carry on with the remnant that you're interested in. Lining up might need more than X and Y adjustments, might need a bit of rotation as well.

I'm not seeing how to accomplish this in ST, but I can't imagine that I'm the first to look for it. Is there a way to do this that I'm missing?

Thanks!

- Bob
almcl
Posts: 263
Joined: Wed Jan 21, 2015 7:15 pm
Location: Shropshire. UK

Re: Layers alignment

Post by almcl »

I think there may be a way, but it starts outside StarTools.

I too have sometimes wanted a way to import slightly different sized images, but it's not presently possible.

So to blend or layer output from different sessions where the camera or scope is oriented slightly differently, I use Deep Sky Stacker's ability to use a reference frame from one night to register and stack subs from another. I don't think the other stacking programs I have (ASTAP and Sirilic) can do this (I don't much like using them anyway), not sure about any others. It is important not to use DSS's Intersection or Mosaic modes when stacking or the sizes will come out wrong.

This will give two or more images that are the same size and (with luck) where the stars are aligned. These can now be used in StarTools either in compose or layer mode and combined. If they need to be processed separately and cropped before combining, then both must be cropped by exactly the same amount and I find the only safe way to do this is to write down the crop details and copy them. This is tedious and error prone but if done correctly will allow images from different sessions to be combined.

There's an image where this worked out OK, where RGB stars were combined with a bi-colour nebula (which otherwise has white stars) here:
download/file.php?id=1813

Apologies if this doesn't answer your question?
Skywatcher 190MN, ASI 2600 or astro modded Canon 700d, guided by OAG, ASI120, PHD2
ionia23
Posts: 62
Joined: Fri Jul 16, 2021 7:39 pm

Re: Layers alignment

Post by ionia23 »

My good Sir,

I dont know if it is coincidence or serendipity that I was coming to the forum to ask about that exact subject. You just saved me a ton of frustration. Thank you!! :thumbsup:
devonshire
Posts: 60
Joined: Mon Sep 24, 2018 12:30 am

Re: Layers alignment

Post by devonshire »

I use Deep Sky Stacker's ability to use a reference frame from one night to register and stack subs from another.
I'm using APP for stacking. APP nominates the 'best' light in the set as a reference, but I may be able to bring in another and just use it as a reference. I do recall that DSS could do that, so perhaps. I'll have a look - Thank You! :bow-yellow:
In the meantime, {cough...} some ability to register stars across images in the Layers module would sure be nice...
Mike in Rancho
Posts: 1141
Joined: Sun Jun 20, 2021 10:05 pm
Location: Alta Loma, CA

Re: Layers alignment

Post by Mike in Rancho »

What is the specific use case here?

Don't get me wrong, if more features were packed into ST, I'd find ways to use them! :D And indeed plenty of times (because ST's Layer has useful astro stuff maybe not found in some other photo programs layer capability) I would like to see the ability to bring together differently-sized files. Or be able to call additional options beyond the x and y displacement. ST already has independent rotation and mirroring, as well as bin/resampling, which could be called from Layer I suppose. Crop could also either be included or kept separate for doing afterward, as is now with rotate.

But, two issues I would see with this. One is that it would have to be a non-tracking deal I think. Occasionally layer is used while inside tracking, for example to partially reverse something gone awry in another module (sometimes SVD, sometimes NBA, as was recently discussed in order to preserve appropriate star color).

The other is that good alignment (registration) I believe is often more than just x and y displacement plus angular rotation. So, an algorithm will be used to "warp" or interpolate things, maybe even on a sub-pixel level, in order to truly make sure that star centers are lined up across the entire field of the image.

As was noted earlier though, there are ways to set yourself up with multiple datasets so that most of that work is already done, and done by a stacking program that will employ those more advanced registration techniques. Sometimes little tricks are needed in order to get them to do what you want, but I variously use DSS, ASTAP, and/or Siril in order to achieve those goals. And it can usually be done either in stacking itself with a known reference - Ivo's recommendation - or even after the fact. While DSS allows you to force-choose a reference file, which can also be unchecked so as not to be stacked, ASTAP selects its own reference from only lights being used, so you would have to register afterwards or utilize a calibration and alignment step first.

About all I can think of at the moment.
devonshire
Posts: 60
Joined: Mon Sep 24, 2018 12:30 am

Re: Layers alignment

Post by devonshire »

I've checked, and APP will do the registration as described. Easy to do in DSS - it's fairly simple, but a bit more involved in APP, as it has more options for stacking. No worries on that aspect. So one could register against the same frame, across stacks.

It looks like I also have a couple of alternatives for managing a crop across registered stacks of dithered lights in APP, so with a bit of experimenting, I should be able to do that as well.

Mike,
I can recall trying to use the Layer module (maybe 3yr ago?), and just throwing my hands up in frustration over this limitation. It looks like this module is built around the expectation that you'll load and perform some processing steps on an image, then fork your project, do some different things to each branch, and then merge them back together somehow, in the Layer module.

Break that assumption by bringing in an image from outside that path, or by taking your branch out and running other tools on it before bringing it back, and things don't necessarily match up to the degree that Layers wants them to. I might have been trying Starnet++ at the time. I don't recall that part clearly, just that the time I spent trying to shave pixels and line things up, was not well spent and I gave up on it.

Visually aligning a zoomed image (X,Y,rotate) a few pixels/degrees, and clean up the edges, would have been fine for what I needed at the time.
Mike in Rancho
Posts: 1141
Joined: Sun Jun 20, 2021 10:05 pm
Location: Alta Loma, CA

Re: Layers alignment

Post by Mike in Rancho »

Yes I think you are right on the forking. Other than special techniques, of which there are quite a few actually, I think Layer is usually intended for finished images, or at least certain stages of finish if saved off.

If you get everything registered beforehand though, especially if the file resolutions also match, then trying out stuff in ST becomes a lot easier. It opens up options for Compose, NB Accent, and Layer. Just make sure to match crops and bins if you want to layer things together later on. I refer to prior logs quite a bit in order to do this. But also, if you don't close ST and just roll with a new Open after saving a first stage, it should remember your crop settings, which makes things even easier.
Post Reply