Page 2 of 2
Re: Producing flat frames
Posted: 2015-08-29T22:47:47-07:00
by fmw42
geoland wrote:Apologies. The value of the light frame pixels is reduced when dividing the lights by the auto-leveled master flat. I am then normalizing the lights to increase the pixel values.
I will try the other operators - so far median and auto-level produce flat frames that divide correctly and don't over or under compensate.
It is really hard to try to understand without examples. So perhaps I misunderstood.
But have you tried dividing by the median without the auto-level. Then after dividing, you might try using -auto-level, if it is still dark.
geoland wrote:There must be a repository with the latest deb package.
Not likely. Linux distributions for most if not all flavors of Linux are way behind. You would probably need to install yourself from source.
Re: Producing flat frames
Posted: 2015-08-30T04:06:41-07:00
by geoland
That's no problem. Thanks again. Appreciate the assistance.
Still working on the master_flat/mode method which is a bit of challenge. In the meantime I need a work around that produces clean light frames with reasonable pixel values.
This works quite well - keep the processing linear. I found including -colorspace sRGB wouldn't divide cleanly, but noise estimates were better.
median combine the flats
Code: Select all
convert flats -evaluate-sequence median master_flat.tiff
light/master_flat and normalize the lights.
Code: Select all
convert lights master_flat -compose Divide_Src -composite -normalize
Re: Producing flat frames
Posted: 2015-08-31T02:30:08-07:00
by geoland
This writes the histogram to /tmp/mode.txt and cuts the mode value, as well as removing the leading whitespace to write mode as a variable $MODE
Code: Select all
convert *.tiff -evaluate-sequence median combined_flat.tiff >/dev/null 2>&1
convert combined_flat.tiff -format "%c" histogram:info: | sort -r -k1 | head -n 1 > /tmp/mode.txt
mode=$(cut -d':' -f1 /tmp/mode.txt)
MODE=${mode//[[:space:]]/}
The next step is - pseudo code
Code: Select all
combined_flat.tiff/$MODE = master_flat.tiff
This does not work as well as hoped
Code: Select all
convert combined_flat.tiff -evaluate divide $MODE master_flat.tiff
Re: Producing flat frames
Posted: 2015-08-31T06:28:44-07:00
by snibgo
From mode.txt, you are extracting into $MODE the number of pixels that have the most common colour. I don't know what significance this number has. Depending on your images, the number might be low (eg 2) or high (eg thousands or millions).
So dividing the image by $MODE will darken it, perhaps to almost or entirely black.
Re: Producing flat frames
Posted: 2015-08-31T13:05:53-07:00
by geoland
From what I read, the idea of dividing the flats by mode is to correct the multiplicative errors in the flat frames, before combining them. My application, above, is not correct because I am dividing the master flat (all the combined flats) by the mode. I realise now that the individual flats should be corrected prior to combination. Dividing the flats by mode should produce pixel values closer to 1. However, IM does a very good job of flat calibration of the light/image frames without complicating things with mode division. Which is not working.
I will keep working at this and report back, if things improve. Many thanks fwm42 and snibgo for your help.
Re: Producing flat frames
Posted: 2015-09-07T04:36:18-07:00
by geoland
I think this is solved. The order of the operators is important. This is an effective method of creating a master flat that does not over correct or under correct the light frame pixel values during division.
Code: Select all
convert flat.tiff -auto-level -evaluate-sequence median master_flat.tiff