Pages: 1 ... 11 12 [13] 14 15 16   Go Down

Author Topic: ZERO NOISE technique  (Read 412977 times)

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
ZERO NOISE technique
« Reply #240 on: June 07, 2008, 07:16:13 pm »

Quote
could you share your code for the exposure calculation and the blending?

sure, here you are:

exposure calculation:
Function CalcularExpRelativas() As Integer
    Const rUmbralMin As Double = 65536 / (2 ^ 6)    ' Ponemos el mínimo 6 diafragmas más abajo para asegurar 2 diafragmas completos de intersección
                                                    ' entre tomas con sobreexposiciones de hasta +4EV
    Const rUmbralMax As Double = 65536 * 0.9        ' Nos quitamos de encima la zona de comportamiento no lineal, 20% superior del rango dinámico
    
    Dim i As Integer, j As Integer, N As Integer
    Dim lX As Long, lY As Long
    Dim Color0 As GFL_COLOR, Color1 As GFL_COLOR
    Dim rSum0 As Double, rSum1 As Double

    On Error GoTo CalcularExpRelativas_Error

    CalcularExpRelativas = 0
    
    N = UBound(GflBitmap)
    SetStatus "Calculating relative exposure..."
    
    ' Cálculo de exposiciones
    ReDim rFactor(N)
    i = 1
    rFactor(i) = 1#     ' La primera imagen es la toma menos expuesta, la referencia final de exposición
    SetStatus EliminaRuta(sFileTIFF(iPos(i))) & ": " & _
        Round(1 / rFactor(i) * 100) / 100 & _
        " (+" & Round(Log(1 / rFactor(i)) / Log(2) * 100) / 100 & " EV)", ADD
    For i = 2 To N
        rSum0 = 0#
        rSum1 = 0#
        For lX = 0 To lWidth - 1
            For lY = 0 To lHeight - 1
                gflGetColorAt GflBitmap(i - 1), lX, lY, Color0
                gflGetColorAt GflBitmap(i), lX, lY, Color1
                
                If Gfl2Long(Color0.Red) >= rUmbralMin And Gfl2Long(Color0.Red) <= rUmbralMax And _
                    Gfl2Long(Color1.Red) >= rUmbralMin And Gfl2Long(Color1.Red) <= rUmbralMax Then
                        rSum0 = rSum0 + Gfl2Long(Color0.Red)
                        rSum1 = rSum1 + Gfl2Long(Color1.Red)
                End If
                If Gfl2Long(Color0.Green) >= rUmbralMin And Gfl2Long(Color0.Green) <= rUmbralMax And _
                    Gfl2Long(Color1.Green) >= rUmbralMin And Gfl2Long(Color1.Green) <= rUmbralMax Then
                        rSum0 = rSum0 + Gfl2Long(Color0.Green)
                        rSum1 = rSum1 + Gfl2Long(Color1.Green)
                End If
                If Gfl2Long(Color0.Blue) >= rUmbralMin And Gfl2Long(Color0.Blue) <= rUmbralMax And _
                    Gfl2Long(Color1.Blue) >= rUmbralMin And Gfl2Long(Color1.Blue) <= rUmbralMax Then
                        rSum0 = rSum0 + Gfl2Long(Color0.Blue)
                        rSum1 = rSum1 + Gfl2Long(Color1.Blue)
                End If
                
            Next lY
        Next lX
        
        If rSum1 = 0# Then
            SetStatus "Too wide exposure gap", ADD
            SetStatus "DONE", ADD
            CalcularExpRelativas = -1
            AvisoError ("Too wide exposure gap between " & _
                EliminaRuta(sFileTIFF(iPos(i - 1))) & " and " & EliminaRuta(sFileTIFF(iPos(i))))
            Exit Function
        ElseIf rSum0 > rSum1 Then
            SetStatus "Too narrow exposure gap", ADD
            SetStatus "DONE", ADD
            CalcularExpRelativas = -1
            AvisoError ("Too narrow exposure gap between " & _
                EliminaRuta(sFileTIFF(iPos(i - 1))) & " and " & EliminaRuta(sFileTIFF(iPos(i))))
            Exit Function
        Else
            rFactor(i) = rSum0 / rSum1 * rFactor(i - 1) ' Acumulamos factores y lo mostramos en pantalla
            SetStatus EliminaRuta(sFileTIFF(iPos(i))) & ": " & _
                Round(1 / rFactor(i) * 100) / 100 & _
                " (+" & Round(Log(1 / rFactor(i)) / Log(2) * 100) / 100 & " EV)", ADD
        End If
    Next i
        
    SetStatus "DONE", ADD
    
CalcularExpRelativas_Resume:
    DoEvents
    Exit Function
    
CalcularExpRelativas_Error:
    MostrarError ("CalcularExpRelativas")
    CalcularExpRelativas = -1
    Resume CalcularExpRelativas_Resume

End Function


blending:
Sub FusionarImagenes(sRuta As String)
    Const MAXINT65535 As Long = 65535
    Dim sResult As String
    Dim i As Integer, N As Integer
    Dim lX As Long, lY As Long
    Dim Color As GFL_COLOR
    Dim lTH As Long
    Dim rIGamma As Single

    On Error GoTo FusionarImagenes_Error
    
    N = UBound(GflBitmap)
    SetStatus vbCrLf & "Blending into a noise free image...", ADD
    
    ' REPLICAMOS CÓDIGO SEGÚN GAMMA SEA 1.0 Y OTRA PARA GANAR VELOCIDAD
    rIGamma = 1 / (frmMain.hscGamma.Value / 10) ' 1/Gamma
    
    ' Tomamos el color del píxel de la toma más expuesta que cumpla las condiciones
    lTH = Round(MAXINT65535 * frmMain.hscTH / 100)   ' Umbral de fusión

    If rIGamma = 1# Then
        For lX = 0 To lWidth - 1
            For lY = 0 To lHeight - 1
                i = N
                gflGetColorAt GflBitmap(i), lX, lY, Color
                ' Bucle para elegir la imagen que prevalecerá
                Do While i > 1 And _
                    (Gfl2Long(Color.Red) > lTH Or Gfl2Long(Color.Green) > lTH Or Gfl2Long(Color.Blue) > lTH)
                    i = i - 1
                    gflGetColorAt GflBitmap(i), lX, lY, Color
                Loop
                ' Solo corregimos valor si no hemos recurrido a la toma menos expuesta
                If i > 1 Then
                    Color.Red = Long2Gfl(Round(Gfl2Long(Color.Red) * rFactor(i)))
                    Color.Green = Long2Gfl(Round(Gfl2Long(Color.Green) * rFactor(i)))
                    Color.Blue = Long2Gfl(Round(Gfl2Long(Color.Blue) * rFactor(i)))
                    gflSetColorAt GflBitmap(1), lX, lY, Color
                End If
            Next lY
        Next lX
    Else
        For lX = 0 To lWidth - 1
            For lY = 0 To lHeight - 1
                i = N
                gflGetColorAt GflBitmap(i), lX, lY, Color
                Do While i > 1 And _
                    (Gfl2Long(Color.Red) > lTH Or Gfl2Long(Color.Green) > lTH Or Gfl2Long(Color.Blue) > lTH)
                    i = i - 1
                    gflGetColorAt GflBitmap(i), lX, lY, Color
                Loop
                'If i > 1 Then   ' Solo corregimos exposición si i > 1
                Color.Red = Long2Gfl(Round(MAXINT65535 * (Gfl2Long(Color.Red) * rFactor(i) / MAXINT65535) ^ rIGamma))
                Color.Green = Long2Gfl(Round(MAXINT65535 * (Gfl2Long(Color.Green) * rFactor(i) / MAXINT65535) ^ rIGamma))
                Color.Blue = Long2Gfl(Round(MAXINT65535 * (Gfl2Long(Color.Blue) * rFactor(i) / MAXINT65535) ^ rIGamma))
                gflSetColorAt GflBitmap(1), lX, lY, Color
                'End If
            Next lY
        Next lX
    End If

    ' Guardamos imagen final generada
    sResult = "ZN_" & Format(Time, "hhmmss") & "_" & _
        Sust(frmMain.cmbProfile, " ", "") & "_G" & Sust(1 / rIGamma, ",", ".") & ".tif"
    SetStatus "Saving result as " & sResult & "...", ADD
    GuardarGflBitmap GflBitmap(1), DimeRuta(sRuta) & sResult
    
    ' Liberamos las imágenes cargadas
    For i = 1 To N
        CerrarGflBitmap GflBitmap(i)
    Next i
    
    SetStatus "DONE", ADD
    Beep
    
FusionarImagenes_Resume:
    DoEvents
    Exit Sub
    
FusionarImagenes_Error:
    MostrarError ("FusionarImagenes")
    Resume FusionarImagenes_Resume

End Sub

button

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 427
    • http://
ZERO NOISE technique
« Reply #241 on: July 10, 2008, 09:01:11 pm »

Hey Guillermo,

I've followed this thread over the past year, and I must say BRAVO!  I have two questions for you:

1) Does ZN v0.91 have your previously mentioned corrections for the Canon 40D?

2) When I open the noise corrected file (the "ZN" file generated by Zero Noise), it seems to have significantly lower resolution and detail than both the original RAW files and the TIFF files that your program creates prior to blending.  What am I doing wrong?

Thanks, and keep up the superb work!

John

Edit:  Ignore question #2.  There is no problem with your program's resolution!  Somehow, I had my resolution settings different in camera RAW (ACR) for the ZN files and the RAW images, even when opened at the same time.  Sorry for the confusion.  I would, however, very much appreciate an answer for question #1.
« Last Edit: July 11, 2008, 12:06:42 am by button »
Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
ZERO NOISE technique
« Reply #242 on: July 11, 2008, 12:06:27 pm »

Quote
1) Does ZN v0.91 have your previously mentioned corrections for the Canon 40D?
Not exactly corrected (since it's a fault of DCRAW's source code), but you can now in v0.91 easily solve the problem just by entering the right saturation value for your camera in the 'Saturation' text box.

I have detected 2 cameras so far that need to be corrected:
- Canon 30D: 3398
- Canon 40D: 13823

I am quitting my job in August and taking some kind of sabbatic year. I will devote a lot of time to getting used to code in C/C# and rewrite Zero Noise in this languages with another two guys introducing some needed improvements as the anti-ghosting and progressive blending. The idea is to produce a 16-bit DNG output file out of Zero Noise instead of a TIFF file so I again ask for help: if any coder is able to generate a DNG file from scratch using the Adobe DNG SDK just contact me.

We are already developing a new RAW developer based on DCRAW but with a powerful graphical interface and other new features for high precision RAW development (just development, no processing). If you want to track that project: Perfect RAW.

BR
« Last Edit: July 11, 2008, 12:07:57 pm by GLuijk »
Logged

docmaas

  • Newbie
  • *
  • Offline Offline
  • Posts: 34
ZERO NOISE technique
« Reply #243 on: July 11, 2008, 12:17:09 pm »

Hi guillermo,

If possible pleasse continue with the tiff output as well.  Sigma cameras do not do dng.  

thanks,

Mike

Quote
Not exactly corrected (since it's a fault of DCRAW's source code), but you can now in v0.91 easily solve the problem just by entering the right saturation value for your camera in the 'Saturation' text box.

I have detected 2 cameras so far that need to be corrected:
- Canon 30D: 3398
- Canon 40D: 13823

I am quitting my job in August and taking some kind of sabbatic year. I will devote a lot of time to getting used to code in C/C# and rewrite Zero Noise in this languages with another two guys introducing some needed improvements as the anti-ghosting and progressive blending. The idea is to produce a 16-bit DNG output file out of Zero Noise instead of a TIFF file so I again ask for help: if any coder is able to generate a DNG file from scratch using the Adobe DNG SDK just contact me.

We are already developing a new RAW developer based on DCRAW but with a powerful graphical interface and other new features for high precision RAW development (just development, no processing). If you want to track that project: Perfect RAW.

BR
[a href=\"index.php?act=findpost&pid=207316\"][{POST_SNAPBACK}][/a]
Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
ZERO NOISE technique
« Reply #244 on: July 11, 2008, 01:14:35 pm »

Quote
If possible pleasse continue with the tiff output as well.  Sigma cameras do not do dng.
Hi Mike, I didn't explain myself well: the RAW files to be fed into Zero Noise will be any vendor supported by DCRAW, just like now.
Only the output would be a DNG 16-bit RAW file free of noise with the optimal blending of the information contained in the original RAW files, and ready to be developed with your favourite RAW developer.

I wonder why no company has done this before; perhaps market researchs indicate that what people demand are programs where you just click a button to obtain a finished "HDR" image with no extra effort.

BR
« Last Edit: July 11, 2008, 01:17:33 pm by GLuijk »
Logged

button

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 427
    • http://
ZERO NOISE technique
« Reply #245 on: July 11, 2008, 02:09:40 pm »

Quote
I have detected 2 cameras so far that need to be corrected:
- Canon 30D: 3398
- Canon 40D: 13823
[a href=\"index.php?act=findpost&pid=207316\"][{POST_SNAPBACK}][/a]


Thanks very much for that.  Please continue the outstanding work!

John
Logged

feppe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2906
  • Oh this shows up in here!
    • Harri Jahkola Photography
ZERO NOISE technique
« Reply #246 on: July 11, 2008, 03:07:49 pm »

Guillermo, how would you recommend combining Zero Noise Technique software with making panoramas (I'm using Autopano Pro)?

Example: I have a panorama with three shots. I shoot each of these 3 shots twice, bracketing 4 stops apart to use for Zero Noise, ending up with 6 shots.

I'd imagine it would be better to make the panoramas first, then do the blending in Zero Noise. My understanding is that ZN only reads RAW files, and since Autopano only produces TIFFs and PSDs, I'd have to find a way to convert those to DNGs. Or is there an easier way to approach this?

Or would you recommend doing the blending beforehand, and stitching afterwards? The potential problem with this is big panoramas where exposures are wildly different at the different edges of the final image.

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
ZERO NOISE technique
« Reply #247 on: July 12, 2008, 09:06:33 am »

Quote
I'd imagine it would be better to make the panoramas first, then do the blending in Zero Noise. My understanding is that ZN only reads RAW files, and since Autopano only produces TIFFs and PSDs, I'd have to find a way to convert those to DNGs. Or is there an easier way to approach this?

Or would you recommend doing the blending beforehand, and stitching afterwards? The potential problem with this is big panoramas where exposures are wildly different at the different edges of the final image.

Forget about converting TIFF to DNG, it's conceptually wrong since DNG expected by ZN is a RAW undemosaiced file.

I think you can blend each of the three pairs in ZN (same WB is a must). If you shot the least exposed RAWs in each pair with the same exposure (aperture/shutter/ISO), they should be ready for Autopano straight out of ZN.
Otherwhise you can open the TIFF files and match their exposures with the 'Exposure' option of Photoshop or easier with a simple curve like:




Another option is to forget about ZN and blend the images yourself following this tutorial, which performs conceptually the same operations as ZN but into Photoshop: Yet another method to reduce noise with two exposures. This process can be applied after performing the 2 pano stitchings of 3 images each, as long as those stitchings match perfectly pixel to pixel.

BR
« Last Edit: July 12, 2008, 04:37:44 pm by GLuijk »
Logged

Plekto

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 551
ZERO NOISE technique
« Reply #248 on: July 14, 2008, 05:52:08 pm »

Quote
I wonder why no company has done this before; perhaps market researchs indicate that what people demand are programs where you just click a button to obtain a finished "HDR" image with no extra effort.

Because since it is pure mathematical conversion, it essentially isn't able to be patented or made into a piece of software for them to sell at vastly inflated prices to professionals.(it's all about the money)
Logged

cedricb

  • Newbie
  • *
  • Offline Offline
  • Posts: 14
ZERO NOISE technique
« Reply #249 on: August 15, 2008, 05:42:54 am »

GLuijk,

Sorry to be a pain but... I've just found some free time to carry on my Linux experiment...

What's the mathematical formula applied to the RGB matrix for the negative exposure compensation?


Regards,
Ced.
Logged

michaelnotar

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 367
ZERO NOISE technique
« Reply #250 on: August 18, 2008, 03:04:43 am »

very cool!

so how is this better than noise reduction software, like noise ninja? i am super happy with it after inspecting it with a critical eye.

an interesting note on my P25 back, i noticed if I OE a stop and pull it back in raw processing it get about 2 stops less noise. ie an exposure at iso 200 pulled back in brightness in raw has much less noise than if it was shot and processed normally at iso 50 the backs native iso.
Logged

cedricb

  • Newbie
  • *
  • Offline Offline
  • Posts: 14
ZERO NOISE technique
« Reply #251 on: August 18, 2008, 08:22:42 am »

GLuijk,

Finally I've be able to produce a ZN effect with ImageMagick. I've compared "visually" with your ZN software and it "looks" the same.

Here is an example with the "lounge" images which uses the camera WB and a compensation of -3.93EV.

dcraw -v -w -W -o 0 -q 3 -4 -T hdr1.cr2
dcraw -v -w -W -o 0 -q 3 -4 -T hdr3.cr2
convert hdr3.tiff -negate negate.tiff
ec=$(echo 'e(l(2)*-3.93)' | bc -l)
convert hdr3.tiff -evaluate multiply $ec corrected.tiff
composite -compose CopyOpacity negate.tiff corrected.tiff mask.tiff
composite -blend 90 mask.tiff hdr1.tiff merge.tiff

...these should work for Linux/Mac and Windows...

The merge.tiff is a 16bits one so no gamma/contrast/brightness applied.

In term of tone mapping, have you got some magic curves which can be applied every where? :-)

I've replicated a similar Sigmoidal curve for the contrast but I don't know which settings you have used in your tutorial... contrast + mid-point
For the brightness, can you give me the settings for the curve?
« Last Edit: August 19, 2008, 05:04:10 am by cedricb »
Logged

BruceHouston

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 308
ZERO NOISE technique
« Reply #252 on: August 18, 2008, 10:26:08 am »

Thank you again for your work, Guillermo.

I for one am very appreciative of your interest and dedication to this.  I imagine that we will look back one day and recognize the significance of your contribution.  I predict that every serious DSLR will soon perform your algorithm in-camera.

Best regards,
Bruce
Logged

BruceHouston

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 308
ZERO NOISE technique
« Reply #253 on: August 18, 2008, 10:37:56 am »

Quote
Thank you again for your work, Guillermo.

I for one am very appreciative of your interest and dedication to this.  I imagine that we will look back one day and recognize the significance of your contribution.  I predict that every serious DSLR will soon perform your algorithm in-camera.

Best regards,
Bruce
[a href=\"index.php?act=findpost&pid=215795\"][{POST_SNAPBACK}][/a]

Otra cosita, Guillermo...  Aunque mi primer idioma es ingles, tambien soy fluente en el espanol.  Ando casi siempre atrasado en mi propio trabajo como abogado de patentes.  No obstante, estoy dispuesto de ayudarle con traducciones de espanol al ingles cuando lo necesite, ya con el acuerdo de que el trabajo probablemente no sea instantaneo.

Con estimo,
Bruce
Logged

Plekto

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 551
ZERO NOISE technique
« Reply #254 on: August 18, 2008, 06:44:34 pm »

Quote
Thank you again for your work, Guillermo.

I for one am very appreciative of your interest and dedication to this.  I imagine that we will look back one day and recognize the significance of your contribution.  I predict that every serious DSLR will soon perform your algorithm in-camera.

He definitely should apply for a patent on the idea so that he's not going to get sued at some later date by some over-zealous manufacturer(or lose out on possible royalties)
Logged

cedricb

  • Newbie
  • *
  • Offline Offline
  • Posts: 14
ZERO NOISE technique
« Reply #255 on: August 20, 2008, 09:11:54 am »

GLuijk,

I've been able to reproduce your exposure calculation in C with the ImageMagick API.

I'm just wondering if you can explain the colors min and max values:
min = 65536 / pow(2, 6);
max = 65536 * 0.9;

Another thing, is it possible to calculate the best blending ratio? for the time been I'm using 90%.


Regards,
Ced
Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
ZERO NOISE technique
« Reply #256 on: August 21, 2008, 03:07:33 pm »

Quote
I've been able to reproduce your exposure calculation in C with the ImageMagick API.

I'm just wondering if you can explain the colors min and max values:
min = 65536 / pow(2, 6);
max = 65536 * 0.9;

Another thing, is it possible to calculate the best blending ratio? for the time been I'm using 90%.
Ced


Hi Ced, nice to see you are achieving the same things on Linux.

I have gathered my answers to your questions:

1. Exposure correction down, in linear state, is as simple as multiplying each RGB level by a <1 factor. For instance let L be a 16-bit level that has to be corrected 1 f-stop down: OUT = L * 0.5

2. The contrast and bright curves I apply are always made by hand. The proper curves deeply depend on the image's histogram in front of you, and the desired result. I don't think a 100% automatic process is possible here. However some algorithm to get a curve with which to start should be possible (RAW developers calculate this curve).

3. The min = 65536 / pow(2, 6); max = 65536 * 0.9; were just my criteria. I thought values higher than 90% of sat could start to be non-linear in certain sensors. In the low end pow(2,6) ensures the program will not consider values falling in the 7th or lower f-stop (they are surely very noisy).

4. The best blending ratio of course is 100%, or nearly, but depending on how linear is your sensor to allow a lower value is recommended. 99% means any RGB value less or equal to 99% of saturation in a given image will be considered right.



Quote
estoy dispuesto de ayudarle con traducciones de espanol al ingles cuando lo necesite, ya con el acuerdo de que el trabajo probablemente no sea instantaneo.

That would be nice, I planned to translate the ZN tutorial this August but found no time. Would you like to translate some part of it? wait first cause a new version of the tutorial (in SP) is coming soon since I added new features.

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
ZERO NOISE technique
« Reply #257 on: August 21, 2008, 03:25:12 pm »

These days I could relax and add some features:
  • Concept of "blending map": a GIF map file represents now which images are the pixels taken from. This map can be manually edited to perform a personalized blending.
  • Possibility to do progressive blending with a radius parameter
  • Anti-ghosting feature with radius parameter to minimise artifacts in presence of moving elements (leaves, water) in the scene and also when alignment is not perfect
  • The process has been divided into 4 stages: Development, Relative exposure calculation, Blending map generation and Blending. Each stage can be re-run with new parameters without the need to recalculate any previous stage. This allows for instance user intervention to align images after development, or blending map fine tuning in PS after blending map generation
  • Each stage gives an important amout of statistical info about the process such as absolute and relative exposures of each image, % contribution of each image to the result, % genuine pixels (pixels coming from one single image)
  • New algorithm for relative exposure calculation based on median rather than on average (as until now), that will be more robust against moving parts of the scene
  • For those familiar with DCRAW, any DCRAW command can now be included in the workflow (at your own risk)
This is the new GUI:




Blending map (in black those pixels coming from the most exposed shot, gray medium exposure shot and white least exposed shot):




200% crop of previous blending map (upper lamp): up without anti-ghosting nor progressive exposure (like ZN worked until now), down with 4px anti-ghosting radius plus 3px progressive blending radius.




200% crop (ground lamp) on how ZN seeks most exposed areas to obtain them from less exposed shots. With real tone pixels coming from the most exposed shot, in green tones blending map showing pixels coming from the medium and least exposed shots, with a progressive area in the borders where information from more than one shot gets combined:




I will try to upload the update when it is 100% ready before my vacation (I will visit NY/Boston next month).

Salu2
« Last Edit: August 21, 2008, 03:28:37 pm by GLuijk »
Logged

BruceHouston

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 308
ZERO NOISE technique
« Reply #258 on: August 21, 2008, 04:20:26 pm »

Quote
Hi Ced, nice to see you are achieving the same things on Linux.

I have gathered my answers to your questions:

1. Exposure correction down, in linear state, is as simple as multiplying each RGB level by a <1 factor. For instance let L be a 16-bit level that has to be corrected 1 f-stop down: OUT = L * 0.5

2. The contrast and bright curves I apply are always made by hand. The proper curves deeply depend on the image's histogram in front of you, and the desired result. I don't think a 100% automatic process is possible here. However some algorithm to get a curve with which to start should be possible (RAW developers calculate this curve).

3. The min = 65536 / pow(2, 6); max = 65536 * 0.9; were just my criteria. I thought values higher than 90% of sat could start to be non-linear in certain sensors. In the low end pow(2,6) ensures the program will not consider values falling in the 7th or lower f-stop (they are surely very noisy).

4. The best blending ratio of course is 100%, or nearly, but depending on how linear is your sensor to allow a lower value is recommended. 99% means any RGB value less or equal to 99% of saturation in a given image will be considered right.
That would be nice, I planned to translate the ZN tutorial this August but found no time. Would you like to translate some part of it? wait first cause a new version of the tutorial (in SP) is coming soon since I added new features.
[a href=\"index.php?act=findpost&pid=216527\"][{POST_SNAPBACK}][/a]


Guillermo: That would be nice, I planned to translate the ZN tutorial this August but found no time. Would you like to translate some part of it? wait first cause a new version of the tutorial (in SP) is coming soon since I added new features.

Bruce: Ok; please just email me the version that you want translated when you are ready, to: bhouston1@satx.rr.com.

Best regards,
Bruce
Logged

cedricb

  • Newbie
  • *
  • Offline Offline
  • Posts: 14
ZERO NOISE technique
« Reply #259 on: August 22, 2008, 05:10:48 am »

GLuijk,

Thank you for your reply...  

With the mask technique (negate of the over-exposed image to the alpha channel of the negative corrected over-exposed image) which is described in the PS tutorial, I don't get the same amount of perfect gradient in the spot light area in comparison of your ZN software.
My experiment produces the mask and blend the original image with a threshold ratio. So I don't thing it's exactly the same result than your software, or maybe I've done something wrong with the mask generation.
Can I upload the 16bits TIFF files (around 50M for each file) somewhere so you could have a look and let me know what's wrong?  

I've been using your "lounge" raw images for my test, so for your sensor which is the best blending ratio?

Could you shared your new algo for the "relative exposure calculation", so I can update my code.

Are you planing to release the code source when you hit version 1.0?  


Regards,
Ced.
Logged
Pages: 1 ... 11 12 [13] 14 15 16   Go Up