@bula
active 4 years, 11 months agoForum Replies Created
-
AuthorPosts
-
HaverkampParticipant“In my own data processing for large telescopes, I first subtract the background in all mosaic panels and make the background zero in all panels. This handles the additive term. Then I conduct aperture photometry on stars in the panels, and use the common stars in the overlapping region to adjust the brightness of the panels. This handles the multiplicative term. Unfortunately, this only works on images with primarily point-like objects and with images that are very well flattened. Amateur images are usually not like this, unfortunately.”
Yes, for amateur images this is not feasible. I do understand your workflow.
“In my naive imagination, one may try to use the histograms in the overlapping region between two panels, and match both the central locations and the widths of the histograms. The match of the central location is an additive term, and the match of the width is a multiplicative term. For this to work very well, the panels have to be well calibrated and linear. Noise may add to the width of the histogram, and it can confuse this process.”
Indeed, the data needs to be linear and well calibrated. Noise is an important factor, since dispersion and noise values are correlated. Data that is really flat and well calibrated will have a very high correlation for the dispersion and noise values. If the data is not perfectly flat or has a a lot of structure due to nebulosity then the correlation is much lower in my experience.
In 5) normalize, you’ll notice that I have implemented 2 normalization modes
1) regular
2) advanced
The regular normalization mode, calculates lokation and dispersion values for the whole frame. This is the conventional/naive method and probably similar to what other programs do.
The advanced mode actually does what you are proposing in
“In my naive imagination, one may try to use the histograms in the overlapping region between two panels, and match both the central locations and the widths of the histograms. The match of the central location is an additive term, and the match of the width is a multiplicative term.”
For each frame the lokation and dispersion values are calculated on the area that exactly overlaps with it’s reference frame and are compared to the lokation and dispersion values of the same overlap area of the reference frame. So the advanced mode compares the exact same area’s after registration, so the normalization is done on the exact same histograms. It really works well and also works in mosaic mode. In mosaic mode, this means each panel has it’s own reference. This is possible due to the creation of registration paths in the mosaic mode. To be able to correcly compare dispersion in this advanced mode, the registration of the data is done using nearest neighbour interpolation since that actually conserves the noise characteristics of the data.
“If you don’t mind sharing the method for the current multiplicative and additive adjustments in APP, I may be able to suggest a method or two that can do both simultaneously.”
I don’t mind at all, I’ll try to send you the information with the formulas that I use within the next couple of days. Subtracting the lokation(background) and then adjusting for dispersion of the data is what’s happening in APP as well, by the way. So for each frame, it’s lokation is subtracted, then the data is multiplied, so the dispersion of the frame becomes the same as the dispersion of it’s reference. And finally, the reference lokation is added. So the frame and it’s reference will have the same lokation and dispersion afterwards in the overlap areas, which is a much better way to normalize than the regular/naive mode. I have some examples of this in my presentation, did you see those?
HaverkampParticipantHi @whwang,
Excellent, transparancy is indeed a multiplicative factor which plays its part.
Creating a normalization method which uses both additive and multiplicative terms for the lokation can be made, but my question would then be:
How to determine which part should be multiplicatively and which part additively. If we have different ISO or gain, I can simply adjust for that internally, but the differences in Light Pollution and or transparancy should be guessed somehow? Are you aware of software that actually does this adequately?
Any reference to any article that discusses these topics would be most welcome ;-)
HaverkampParticipantHi @whwang,
No problem,
” Let’s say the images were taken under different sky brightness (strong light pollution and less light pollution). So obviously there is a need for an additive term. ”
The additive term is for differences in sky background between your lights indeed due to additive terms like differences in light pollution indeed. But also for the ever changing sky brightness during the night.
In most cases, the add + scale is the preferred option.
“Also, for some reason, the images were taken with different ISO. So a multiplicative term is also needed. In that case, which is the proper option to use?”
This is a very good question. We still want to correct the light pollution and changing sky brigthness additively, but to account for different iso (or gain) me need multiplicative correction as well to normalize the lokation value of the data.
I think the best way to approach this is to use the method which is applicable for the factor which influence is the biggest.
For instance:
we have ISO400 and ISO800 light frames with equal exposure.
The multiplier between these frames would normally be 2 for the ISO800 data relative to the IS400 data.
If the additive terms in the data, like light pollution diffferences, are less than this factor, use the multiplicative normalization for the lokation. So use multiply + scale.
Would you agree, possibly there are other arguments to choose between additive or multiplicative normalization for the lokation?
Possibly you know of a better way to handle this?
Mabula
HaverkampParticipantOkay, the amount of overlap between the 2 problem frames is only 7% of the height dimension. That’s pretty low.
And if I try to register them to each other, it works fine if I choose
St-avg-9000.0s-WSC_1_3.0-x_1.0_1.0_dr-sqr-full-qua-add-sc_BWMV_nor-AA-RL-MBB5_2ndLNC_it3.fits
as the reference, but if I choose
St-avg-7200.0s-WSC_1_2.0-x_1.0_LZ3-ref-qua-add-sc_BWMV_nor-AA-RL-MBB5_1stLNC_it34.fits
as the reference it fails. So this is a problem in the pattern recognition engine which I’ll try to fix.
HaverkampParticipant@mauricetoet, I am studying your data.
First of all, I again notice an instability in the complex model, which causes it to run for quite some time. This is the complex model for
– Multiple View, not”same camera and optics” with “dynamic distortion correction” on
This is fixed, now.
Secondly, I have lokated the two problem panels. I notice from the file name that one of these is integrated with drizzle, “_1.0_1.0_dr-sqr” :
St-avg-9000.0s-WSC_1_3.0-x_1.0_1.0_dr-sqr-full-qua-add-sc_BWMV_nor-AA-RL-MBB5_2ndLNC_it3.fits
The other panel is done with Lanczos 3, “_1.0_LZ3”
St-avg-7200.0s-WSC_1_2.0-x_1.0_LZ3-ref-qua-add-sc_BWMV_nor-AA-RL-MBB5_1stLNC_it34.fits
Maybe, it’s a good idea to create that panel with LZ3, it probably gives a better SNR, Signal to Noise Ratio, I think.
Anyway, i’ll now focus on why these two panels refuse to match properly ?
HaverkampParticipant“Looks like equirectangular is more suitable for a Milky Way pano. I always hate to see a rectilinear projection. The distortion is just too severe.”
Indeed once the field of view becomes larger than 90 degrees, the perspective distortion in the rectilinear projection becomes rather significant.
“The 2pi sky pano just cover half of the whole sky, or a hemisphere. Looks to me a fisheye or a stereographic projection would be more suitable.”
Okay, i’ll put fish-eye and stereographic projections on my RFC list ;-) to add to the possible projections.
“Another question here. In the normalization page, one can choose to use “add” or “multiply” or “add-scale” or “multiply-scale”. Do you mind explaining their differences? I would think that scaling means multiplication, but it looks like they mean two different things here.”
Yes, normalization can be done for lokation and scale/dispersion of the data.
“add” or “multiply” only normalize the lokation of the data. (additively or multiplicatively)
“add-scale” or “multiply-scale” normalize for both lokation and scale/dispersion.
And yes, the normalization of the scale/dispersion is always done multiplicatively, and relative to the found lokation value.
Cheers,
Mabula
HaverkampParticipantHoi @hansvanoverzee,
Nice, you can stretch your stack in APP as well with added saturation.
In the right panel, enable colors+, slide saturation to about 20% and click on apply. You’ll see more colours in the stack ;-)
If you change the sat. (saturation) threshold slider, you can adjust how the saturation is applied in your data. the threshold value is a threshold that protects the sky background. Usually the value of 0.25 is really good not to inject chromatic noise into your background.
Let me know if this works for you ;-)
Mabula
HaverkampParticipantIndeed, looks very good to me as well Will be very nice to combine with RGB data for a HaRGB or LHaRGB composite ;-)
HaverkampParticipant“Too little overlap between the panels might cause the issue. “Hollandse zuinigheid”, I’ll send you all (6) panels.”
Great, I will have a thorough look to see if we can improve this ?
HaverkampParticipantWhat would be the minimum required overlap as a %-age of frame width/height?
I would say, that APP needs about 10% of frame width/height for most cases but it strongly depends on several factors.
– the amount of detected stars at the borders of the frames, the more stars detected, the less % it needs.
– the pattern recognition engine creates patterns in the frame to be aligned at different scales and different areas of the frame. These patterns are then compared to patterns found in the reference, also at different scales and areas. The actual implementation of this can be a limiting factor as well. I will test this on @mauricetoet’s data.
So depending on the data and the relative orientation of the reference and frame to be aligned, the percentages could actually be in the range of roughly 2% to even 25 %.
If you are planning to create a mosaic, for best results, I would advise to have at least 15% overlap and preferably a bit more. The more stars that are detected, the higher the chance that registration will be perfect.
@keesscherer, what % did you use in planning your 6 panel Virgo cluster mosaic?I will have a look at Maurice’s data later today, I’ll make an assessment of the amount of overlap for these 2 frames where registration fails and will report my findings. I hope this data helps me in reducing the required % of overlap for any dataset ?
HaverkampParticipantExcellent @hansvanoverzee ! Glad to help ;-)
Indeed, flats will help the result a lot. So focus on creating good flats.
Another focus point would be to improve tracking of the object. You’ll notice the noisy stripes in your data. This could be a result of not using a guide camera. So only using the mount to track the object. For each exposure, the object is slightly shifted in one direction (declination drift most strongly) causing the stripes. Guiding and /or dithering between several exposures will reduce this significantly.
Let me know if you need more help ;-)
HaverkampParticipantHi Wei-Hao,
“For the orientation, now I can see why the image in the previous screen shot is tilted. Among all the panels, one is tilted relative to the Galactic plane, and that one happened to be picked by APP as the reference.”
Murphy’s Law I guess… ?
“To be clear, after I launch APP, its icon appears immediately, but it takes 2 to 3 minutes for the processing window to show up. ”
Okay, i’ll put it on the RFC list to investigate, i’ll check my server logs as well. Strange behaviour indeed.
“Finally, will the equirectangular projection project the 2pi sky into a sphere or a rectangle?”
The equirectangular projection maps your data in longitude and latitude. Currently the [0,0] coordinate of the projection is the center of the reference frame. So this has some influence on how the projection actually looks.
How the 2pi sky turns out, depends on several things. Is your data a semi-sphere? Or is it a circle on the sphere? In the latter case, possibly a cylindrical projection would be nice.
To give you an idea, what will happen with the equirectangular projection versus the rectilinear projection, I show the same image with different projections, field of view is 180 degrees x 60 degrees (give or take) from the northern to southern horizon. Data is courtesy of Ralph Wagter. Canon 6D with a samyang 14mm f/2.8 objective
first image is rectilinear, straight lines stay straight, but perspective distortion is a real problem as you can see.
second image is equirectangular, now the data can easily be projected. A square rectilinear image, becomes more a circle under the equirectangular projection.
Cheers,
Mabula
HaverkampParticipantHi Wei-Hao (@whwang),
“1. I believe I used equirectangularProjection instead of the standard rectlinearProjection. I might be wrong.”
Okay, the equirectangular projection only becomes possible after calibrated projective registration. Let me know if this works tomorrow ;-)
“2. I also did try a small subset of the panels to start with. APP can process them successfully. Please see the attached image. Here, my question is whether I can control the orientation of the FOV, to be either horizontal or vertical. The tilted angle like this doesn’t look quite comfortable.”
Currently, the orientation is the result of the orientation of the chosen reference frame. To control this orientation, I need to do some more programming, but this should be possible. I would scan the borders of the whole mosaic and rotate it in such a manner that either the widest/smallest part will be either horizontally or vertically directed. I think that’s what you are referring to? I can add it to my list as a new feature.
“3. I believe what PI did for image stacking is to register every image to the reference frame. If all of the images are taken with identical optics, then the stacked result can be considered as having no distortion correction at all. It should have identical distortion pattern of the reference frame.”
This is rather complicated. An optical distortion pattern is described by a center of distortion, that is a certain spot on the sensor of your camera and dependent on your optics, like you describe. But if you have made several stacks, theses central points of distortion are definitely not at the same spot in the stacks. So these distortions patterns in the stacks can’t be considered the same, although the data is shot with the same camera. (Technically speaking, PI is the camera now for the stacks that you created, and I am quite convinced that PI doesn’t do correct distortion correction since PI uses thin plate splines for this. Pi doesn’t correct the distortion pattern in your reference frame, the thin plates just bend arbitrarily to the distorted reference. This is a fundamentally wrong approach in my opinion. That’s why I am worried about stacks that were created in PI with Pi’s so called distortion correction. )
“4. I have another project to mosaic the 2pi sky. Do you think either of the current two projection methods in APP can do that? When I started the project, I had fisheye projection in mind.”
The equirectangular projection should be able to do 360 degrees x 180 degrees, the full sphere. Rectilinear is limited to 120 degrees x 120 degrees. A fish-eye projection is something that I can implement as a new feature for sure ;-) Other projection types as well. There are a lot of possibilities. The technical requirement for these other projections is that APP knows the focal lengths and principal points of the frames, which it should know after the calibrated projective registration.
“5. It takes couple of minutes for my computer to launch APP. This is more than 10x slower than any other programs I have. Is this normal?”
No, this is not normal at all, on my windows desktop, and Macbook 2016 it takes just a couple of seconds. The seconds are basically time in which APP connects to the license server using a high degree of TLS encryption, this takes a few seconds for the encryption. It shouldn’t take a couple of minutes. Can you share your OS and hardware specifics? Let me know if it takes a couple of minutes each time that you start APP, then something is not allright..
HaverkampParticipantHi @mauricetoet,
Looks like this seam has very little overlap for the two adjacent frames. This could be the reason this seam isn’t registered like it should. You could try triangles instead of the quadrilaterals for this in the pattern recognition, but registering the mosaic while take quite a bit longer.
I think I need an addition in the registration engine to solve this properly and hopefully make the engine more robust in case there is very little overlap.
Can you send me these 2 panels? I can then check precisely what’s happening in pattern recognition and how many star pairs are matched between the 2 frames. And hopefully make a robust addition for these cases…
HaverkampParticipantGreat, the screenshot gives a lot of usefull information.
First, I see your machine has 16GB of RAM, and APP can only use 2GB at the moment.
If you click on CFG (top left) you can alter the amount of RAM APP can use. For your mosaic, I recommend to increase this to at least 12-14GB. Leave some GBs of RAM for your OS available to prevent swapping. Adust the amount of RAM, click on OK and restart APP. You’ll see in the top left corner at
“mem x/2048” that 2048 has changed, indicating that APP can now use more memory.
Regarding the encountered BUG..
The problem must be that the field of view is bigger than 120 degrees. The data normally is projected rectilinear. This will be problematic with field of views bigger than 120 degrees.
Link with some explanation on different projections:
http://www.cambridgeincolour.com/tutorials/image-projections.htm
The perspective distortion for a field of view that is full-circle (360 degrees) becomes unlimited… this would be the explanation of the error. APP needs to catch the error properly off course, will add this to my RFC/TODO list.
The solution to be able to project the data differently would be to use the “calibrated projective” registration model instead of the “projective” registration model.
I would advise to try the registration again with:
4) register
enable “dynamic distortion correction”
disable “same camera and optics” (PI made the panels, so PI’s registration engine should be considered the camera, which would normally be different for each panel)
use registration mode “mosaic”
registration model “calibrated projective”
Then at 6) integrate
composition full
no LNC and MBB to start with, let’s first try to make sure the registration works, by keeping LNC and MBB disabled, we can then easily spot the registration errors if there are any.
Lanczos 3 with “no under/overshoot” turned on
As a first start, I suggest to reduce the scale of the integration.
The 40 panel mosaic must be huge, so as a first try, reduce the scale to 0,3. If that works, integrate with 0,5 or bigger. If you use 0,3 (up until 0,7) as scale to start with, use Mitchell-Netravali instead of Lanczos, that gives smoother results in downscaling the data.
Finally, but most importantly, set the projection to “equirectangularProjection” instead of “rectilinearProjection”. This is now possible due to the calibrated projective registration model.
– as a sidenote, starting with a 40 panel mosaic as your first APP experience is really ambitious I think (and really nice to try as well off course) ? !
Judging the information in the file list panel, APP was already able to register all 40 panels within a certain registration error 0,3 – 1,7 pixel. This indicates to me that the registration to start with won’t be perfect (it’s possible that PI’s registration engine is a factor here), but probably pretty good already.
Final suggestion, before starting the registration, you can choose which frame you want to be at the center of the mosaic by selecting that frame as the reference. Maybe you already did in 4) register “set reference”?
I am looking forward to seeing the 40 panel mosaic first result with the “equirectangularProjection” applied. Possibly, your 40 panel mosaic is the biggest field of view yet that has been registered with APP, so this is really testing APP’s current capabilities off course.
Mabula
-
AuthorPosts



