Author Topic: DBE Sample Generation at Edges  (Read 5005 times)

Offline mcintyre_sj

  • Newcomer
  • Posts: 41
DBE Sample Generation at Edges
« on: 2010 February 06 12:53:28 »
Is there a way to tell DBE auto sample generation to stay away from the edges?

For some reason, the fts file i stacked with DSS from CR2 files from a  Canon XS/1000d has black pixels around the edges - about 2 pixels or so all the way 'round. Its as it the image data from 4 pixels smaller than the file size.

So i now manually move all the pixels at the edges over a couple of pixels so they are sampling real background.

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: DBE Sample Generation at Edges
« Reply #1 on: 2010 February 06 13:20:27 »
Hi

As far as I know No  :sealed:

There are two ways to look at this

1) The black pixels probably will not be used by DBE ( check sample box ) and why bother moving them  >:D

2) I always crop my image to start with to remove misaligned frames and such things then I do not get the problem

Harry
Harry Page

Offline dhalliday

  • PixInsight Old Hand
  • ****
  • Posts: 307
    • on Flickr
Re: DBE Sample Generation at Edges
« Reply #2 on: 2010 February 07 07:11:55 »
Dynamic crop...
My favorite tool..!

Dave
Dave Halliday
8" Newtonian/Vixen VC200L/ TV 101,etc etc
SSAG/EQ6
CGE Pro
SBIG ST2K,ST10XME

Offline mcintyre_sj

  • Newcomer
  • Posts: 41
Re: DBE Sample Generation at Edges
« Reply #3 on: 2010 February 07 16:27:48 »
Thank Harry. I decided to go with the crop.

If my object of interest is only a small portion of the frame, is it better then to crop before any real processing? I generally have cropped at the last stage.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: DBE Sample Generation at Edges
« Reply #4 on: 2010 February 07 17:03:17 »
Hi,

cropping saves processing time and memory. So it is a good idea to do an inital crop first. In case of nebula and galaxies, I usually also keep plenty of background since this helps with DBE. I do the final crop later.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: DBE Sample Generation at Edges
« Reply #5 on: 2010 February 08 05:43:13 »
Quote
the fts file i stacked with DSS from CR2 files from a  Canon XS/1000d has black pixels around the edges - about 2 pixels or so all the way 'round

Are you using DSS to 'deBayer' the 'raw' CR2 files? If so, then this may be a (necessary) artefact introduced when the deBayer algorithm tries to porcess 'nearest neighbour' information from edge and corner pixels - where 'nearest neighbour' information isn't available.

In any case, even with 'perfect' guiding, you are still likely to end up with 'funny edges' on your final image - and it really does make life much easier if you apply an Auto STF right at the start of your PI workflow, and then use DynamicCrop to trim off the nasty edges (and, remember, DynamicCrop can also be used to 'rotate' the 'trimming lines' so you can also get your image 'back on the level' if image registration has introduced any form of rotation.

Definitely worth doing at the start of proceedings - and can sometimes be used at the end of play as well, if you are looking to 're-frame' your final image.

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline mcintyre_sj

  • Newcomer
  • Posts: 41
Re: DBE Sample Generation at Edges
« Reply #6 on: 2010 February 08 12:50:03 »
Thanks all.

The note about leaving some background for DBE to work with was what i was really wondering about, but didn't explain my question very well.

I am using DSS ADH to debayer, automatic alignment to stack and "standard mode" as the results. I expect it's the nearest neighbor that causes the edge to dark. It's exactly 1 pixel all the way 'round.

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: DBE Sample Generation at Edges
« Reply #7 on: 2010 February 08 23:57:56 »
Whenever a deBayer algorithm is written, the programmer must decide how to handle 'the edges' - simply because there is not the same amount of 'surrounding data' as found in a mid-image pixel.

In the deBayer routine that I wrote to learn all about PJSR, I effectively 'synthesise' the missing data, so that I don't end up with the 'empty' surround - but it doesn't mean that the data I end up with is, statistically, any better than just not processing it in the first place.

But, like I said, just don't worry about that outer edge of pixels - it is highly likely that you will want to crop much more than that off the edge of your stacked image in any case.

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: DBE Sample Generation at Edges
« Reply #8 on: 2010 February 09 00:46:23 »
Hi,

As others have pointed out, you should crop registration or deBayer border artifacts systematically, as a first processing step. The DynamicCrop tool is an interactive tool that allows you to crop, rotate and scale images in a single operation.

On the other hand, DBE will (if properly used) reject too dark and too bright border artifacts automatically, even if you (or DBE's automatic sample generation) place samples over them. The rejected pixels will not contribute to background modeling; they will be simply ignored.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: DBE Sample Generation at Edges
« Reply #9 on: 2010 February 09 04:52:56 »
Hi all,

Remember - if you take the time to inspect the actual samples that you have set (manually, or automagically) on the image that you wish DBE to process, then you can consider each sample as a 'mask' in its own right.

If you correctly adjust the various other parameters (although you very often do NOT need to do this) then you should see that the littlle 'sample' screen should be 'black' where data is to be excluded from the DBE analysis process. In this way, a sample laid over a star should show that star as 'black' in the sampler preview area - in other words, the 'star data' will NOT be included in the DBE algorithm.

I would imagine (but cannot prove this from where I am working at the moment) that the same should be observed when samples are at the image edges, and where the image edges have deBayering artifacts - the artifacts should end up being 'totally black' in the sample previewer.

Can someone verify this?

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC