Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - apefos

#1
Feature Requests / Re: [IMPOSSIBLE] dual ISO H.264
November 27, 2013, 08:57:57 PM
I think the Leadership, the Master cannot discourage the padawans without showing a proof that things will not work.

In this moment, the Leadership, the Master, just have a theory that things will not work, not an experiment, a real proof.

And me, the padawan, I already found the waves behavior and I have an algorithm that worked in the first lines reconstruction test, so I have the first proof that things can work.

So, due to this, I believe that the discouraging behavior of the Leadership, the Master, is a disrespect to me and to all padawans, because if we are in an open source environment, we all have the rights of doing our attempts.

Yes, me, myself, as a padawan, I lost my temper, my bad. But me, myself, as a padawan, I do not need to endure the disrespect from the Leadership, the Master, discouraging me and all the others without any proof.

Probably you all are waiting for me to say sorry. So, I say sorry, many times as needed. But respect my attempts, do not say impossible without any proof, stop discouraging all the people who are willing to help this development.
#2
Feature Requests / Re: [IMPOSSIBLE] dual ISO H.264
November 27, 2013, 03:37:07 PM
Soon I will release a picture style.

I will ask for a small donation.

I will use some amount of the donations to support the developers who are willing to work in the dual iso h264 project until we see if it will work or not. I believe it will.

http://www.magiclantern.fm/forum/index.php?topic=9408.0
#3
Feature Requests / Re: [IMPOSSIBLE] dual ISO H.264
November 27, 2013, 03:17:04 PM
@a1ex if you think it will not work no problem, but other people are free to do tests if they want, so stop bothering us and go work in your raw tasks. you are the main developer but you made this thing open source so please respect it's nature. we have the module enabled, we do not need you and your "impossible words"anymore, let us try our success or our fail alone, you are fired of dual iso h264 development, SHUT YOUR MOUTH AND GO AWAY, NOW!

@g3gg0 here is what you asked me:

a jpg sequence with the fist wave starting at line 01 (balck and white because i did not implemented wb and hue correction to the algorithm yet)

https://www.dropbox.com/s/8z0qghs027qtxdm/jpg192seq.zip

here are the resolution chart tests in diffetent bitrates:

https://www.dropbox.com/s/mgyqi26r3j39els/MVI_1869.MOV

https://www.dropbox.com/s/y59aqo92qtbbpre/MVI_1870.MOV

https://www.dropbox.com/s/g7ddce61rgxeeka/MVI_1871.MOV

https://www.dropbox.com/s/3sbnmmjgkdc8jqm/MVI_1872.MOV

https://www.dropbox.com/s/klwl50juhqg22i0/MVI_1874.MOV

https://www.dropbox.com/s/fqwecc61bn9vov0/MVI_1875.MOV

https://www.dropbox.com/s/mgyqi26r3j39els/MVI_1869.MOV
#4
Feature Requests / Re: [IMPOSSIBLE] dual ISO H.264
November 27, 2013, 07:05:09 AM
ok, no problem, I understand. People wants to see things working.

I will stop posting for a while and concentrate my efforts to finish the demonstration video editing for the aps project I showed in the photos above.

After this I will finish the color tests to improve the algorithm and I will reconstruct a still image extracted from h264 video using the algorithm to prove it works.

It will take time.

I will stop posting for a while until I can show something working.

Thanks.
#5
Feature Requests / Re: dual ISO H.264
November 26, 2013, 11:23:37 PM
 :-X
#6
Feature Requests / Re: dual ISO H.264
November 26, 2013, 11:12:38 PM
 :-X
#7
Feature Requests / Re: dual ISO H.264
November 26, 2013, 10:58:56 PM
Oh guys, you are so hungry!!!

I will show something I am working on since I got my 600D in november 2012. Don't ask anything now!  :-X

Is this what you want?





#8
Feature Requests / Re: dual ISO H.264
November 26, 2013, 10:09:47 PM
@A1ex

I did a look in the CR2 files you uploaded in Digital Photo Professional and in Picture Style Editor, mainly in the 100-1600 and compared with the extracted jpg.

To be honest I do not believe a Picture Style will help you in this preview. Let me explain why: The nature and concept of dual iso is the iso 100 capture good highlights and iso 1600 capture good shadows, so most times the iso 1600 will be clipped in things like clouds, open windows and so on. When the image is clipped there is no information to recover because everything will be above 255, so no way to recover anything. I did lots of try to lower the highlights and what was clipped in the 1600 iso lines turned into a flat grey image. And the low iso lines turned into something like false color preview. Professional photografers will not like this.

My idea to solve this preview issue is you enable this functions in some camera buttons:

when dual iso module is enabled:
Press left arrow = disable (suspend) dual iso module and set camera to same low iso of dual iso module
Press right arrow = disable (suspend) dual iso module and set camera to same high iso of dual iso module
Press set = enable dual iso module again (kill suspend)

This way people can see the shadows recovered by the high iso, see the highlights preserved by low iso and see the mixed image if they want. And see things fast, just pressing one button. Only this will give to the professional photografers the perfect preview to see exactly what they are capturing in shadows and in highlights.

If you can, you also can enable camera buttons to change the low and high iso without the need to go into the ML menu, so the photografer see and change low and high iso separately and change them fast:

when seeing low iso press up or down arrows to change it
when seeing high iso press up or down arrows to change it
#9
Feature Requests / Re: dual ISO H.264
November 26, 2013, 09:53:41 PM
@MK11174

Many Thanks! I downloaded and instaled in card. It is working OK! I got no waterfalling behavior in first tests and module loads fine. Now the dual iso indicator turns green, great!
#10
Feature Requests / Re: dual ISO H.264
November 26, 2013, 05:19:37 PM
Ok A1ex, I understood exactly what you want, just give me some time.
#11
@A1ex

I would like to say sorry due to I did not understand the problem when you posted about it in the other topic.
I found I was to much worried about lines retention in that moment and I did not perceive the color cast problem.
Also I think I was too much focused on my goal to get h264 dual iso working, and I forgot about the main filosofy of Magic Lantern: a colaborative project where everybody helps everybody. So now I believe I am in the correct behavior, developing the h264 dual iso with help from other members and helping other members to improve their developments, like the dual iso raw preview. So the slogan is: "I help you, you help me and we help everybody." Or, as we say here in my country: "One hand washes the other and both wash the face."

@Andy600

I also was thinking about donations, doing some reflections about our talking.

I remember two video tutorials I did on Vimeo teaching people how to do good denoise in video and how to scan super8 films. I got more than 10000 plays in each video, yes, more than 10K plays, and I enabled TipJar on these videos to get donations, but nobody sent... I got just nothing!!! So my conclusion is: free donations does not work so good...

So I think when people ask for a fixed donation, if the amount is low and the product is good quality, I believe it is ok. The problem is to fix a high amount and/or when the product is bad quality, then it is wrong thing to do. Low price and good product is good for both sides.

Now it is time for me to go on doing my job, at night I will restart the tests.

thanks
#12
I will pay attention to that.

I am having a problem. My 600D is overheating with the last nightly build, and with previous nightly builds I get lots of erros when loading the modules. So I need to shut down the camera many times to wait it cool down and it is annoying and makes me lose time.

The best stable build I found is the "NewMem" build from 1%. It has the dual iso module, but the dual iso module enabled for h264 recording that I have is from other build and does not work with it. And I need to record in h264 to perceive the wb and hue differences doing analysis in the computer.

So, to go further in the tests, I need a small favor. Please enable dual iso h264 recording in the dual iso module from the newmem build. You can download the module separately from this link (I renamed it to know it is the correct module), and please allow me to download it when enabled for h264 recording.

https://www.dropbox.com/s/8rcdanbi5fvvr1o/dual_iso_newmem.mo

thanks!
#13
OK, I will test the multiplyers to perceive this issue.

Important thing is: I found the way to tweak the preview, it needs an adjust in white balance and in hue.

It will need some tests using the color chart to perceive the amount of correction in WB and HUE to give a good preview.

Also, the adjusts will be different for each iso combo: 100/200, 100/400, 100/800, 100/1600, 100/3200

There are some ways to do the adjusts after finding the correct amount: use the ML main WB, use the ML WB Y/B bias and M/G bias, use the RGB multiplyers, use a custom picture style. I will perceive which method will be more precise and more practical/easy for using.

These tests will also help me to improve the DeWaving algorithm for dual iso H264 video, implementing WB and HUE correction in the Algorithm.

Please be patience because I have job to do so I will perform the tests in a couple of hours after evening in each day. I do not know how many days I will need, so please wait.
#14
Feature Requests / Re: dual ISO H.264
November 26, 2013, 03:08:20 AM
A1ex showed a color chart in other topic and talked about his interest in better color preview in camera LCD when recording dual iso raw.

This makes me to go back here in this topic in post number 24 when he talked about hue differences between the two isos. At that moment I did not pay attention to the issue, because my mind was focused in the first challenges, to perceive lines retention and enabling h264 recording.

But after finishing the algorithm and seeing the color chart from A1ex and his informations about color differences, I perceived my job was incomplete. I need to consider the information from A1ex which says there is a hue difference between the two isos.

So I did some tests with the 600D today at night here to perceive how is the color behavior. I recorded some dual iso h264 videos showing different colors and in computer I confirmed there is a hue difference, but not just a hue difference, there is also a white balance difference between the two isos in the image.

This will make necessary to do a precise test in the same way I did the grey wall test. But this time with colors. I will need to find the hue difference and white balance difference between isos and calculate formulas for each line in the wave considering the amount of merging between them, because merging changes the hue and white balance difference... I will also need to perceive if color formulas must be applyed before of after luminance formulas... just another challenge...

Ginger HDR replied my email. They asked me If I did a try to reconstruct one still image using the algorithm. This made me to realize that I need to show the algorithm working before someone compile it into a computer software. (oh! obvious thing!)

So, after the color tests and color formulas implementation I will try to reconstruct the lines in a still image manually using the algorithm.
#15
I did some tests with the 600D in dual iso and I found there is a diference in white balance and in the hue between the two isos.

The diference in white balance is biger than in the hue.

It is possible to measure the amount for both, but it will need a very precise test.

Probably I will do this test because I will need it to rewrite the dual iso h624 algorithm to include color correction.

For dual iso raw preview in camera a simple way is to use the two bias, amber/blue and magenta/green or use the RGB multipliers like this
R= 1.084
G=0.500
B=1.084

some settings in multipliers and amber/blue and magenta/green will be enough and better than develop a picture style for this.

if the multipliers ruins the recording, just use the bias

the difference between two isos must be corrected in the post processing, when extracting in computer, in cr2hdr
#16
I just played some minutes with my 600D T3i here and I think I understood what you need.

when you enable raw recording, the preview shows correct color, but when you enable dual iso, the colors get a magenta cast. and the amount of magenta increases when you increase the fstops iso difference in dual iso module.

I did a manual  white balance in a white paper under a fluorescent light instaled behind a glass in the ceiling. The ML white balance gaves me 3300K and magenta 8

so I enabled dual iso and all colors got a magenta cast, so I decreased the magenta to 0 in the white balance and the preview becames ok (this was to 100/3200 iso in dual iso module)

if white balance does not have influence in raw dual iso recording you can use the magenta bias in white balance to get a good preview, no need a picture style for this

but if white balance have influence in dual iso raw colors recording, you cannot change the magenta bias, so the picture style will do the correction for  preview in dual iso.

what you need to do in the picture style editor is to set the hue towards green for all the colors in the second panel, the amount I do not know, needs tests. Problem is you will need 5 picture styles, one for each iso difference combination, because as iso difference increase, magenta cast increases also. So using the magenta bias in the white balance to correct the preview colors is much easy to do.

I will do tests to perceive if the magenta bias or a picture style can correct the dual iso magenta cast for dual iso h264, if yes there is no need to change the algorithm I built. If the magenta bias cannot correct the dual iso h264 recording I will need to correct the color cast in the reconstructed lines, it seems I will need to experiment to perceive if the amount of magenta cast introduced by the dual iso module is the same for both isos, if yes the magenta bias in camera can do the job, if not, the colors in the lines will be different and i will need to do the calculations to get the formulas for each line inside the wave, and implement the formulas in the algorithm...

just another challenge...
#17
@A1ex

When you talked in the other topic about this issue I think I did not understand well, but now I am starting to understand what are you after. It seems you want to find a way to see real colors in camera LCD when shooting raw instead of seeing the wrong colors. When we was talking in the other topic you said this:

I'm interested in this for in-camera preview (not final output), but I'm having big trouble with color casts caused by demosaicing. Just compare the two sub-images at low ISO and the two sub-images at high ISO (they have very different hues). I'm not sure how to solve it.

When we open the raw video files in computer in ACR it looks like very wrong colors, so we need to correct colors to get a useful image. In camera, the LCD shows similar wrong colors when recording raw.

Is this what you want to solve?
1-to get a great color preview in camera LCD when doing the raw recording? (without dual iso)
2-to solve the hue difference in dual iso raw video between low and high iso? in preview?, in recorded dual iso raw video? or in both preview and recorded?

how do you perceive the hue difference in the two isos in dual iso recording?
is it more red or magenta in low iso and more green in high iso as I said in the other topic or is it a different thing?

how a picture style can help you to achieve your goals?
what a picture style can do for raw recording and also for dual iso raw recording?

I would like to understand better, maybe I can help someway...
#18
Andy, you can ask for a donation for your picture style, no problem. And it would be great for all of us if you allow us to donate and download it! I saw your videos on vimeo and they are great!

The websites which offer Picture Styles don't sell, they ask for donations, like Magic Lantern does. And they use the Canon Picture Style Editor. See this text from the Lightform disclaimer:

"The Lightform Picture Style and the Cinema Picture Style is a file generated by the official Canon Picture Style Editor."
This text is here: http://www.cineplus.ch/disclaimerc5d.html

The Magic Lantern developers and the Picture Style Creators are doing great work for us, they deserve the donations, as you also deserve for your picture style.

The Canon Picture Style Editor User Agreement License does not talk about selling prohibition, see the license:

READ CAREFULLY BEFORE USING!
CANON SOFTWARE LICENSE AGREEMENT
IMPORTANT - READ THIS AGREEMENT BEFORE USING THE SOFTWARE ON THE CD-ROM
IN THIS BOX. BY USING THE SOFTWARE, YOU AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT.
This is a license agreement (the [Agreement]) between you and Canon Inc. ([Canon]).
IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT
USE THE SOFTWARE PROGRAM ON THE CD-ROM
AND THE USER MANUAL IN THIS BOX
(COLLECTIVELY, THE [SOFTWARE]) AND RE
TURN THE SOFTWARE WITHIN 30 DAYS FROM
THE DATE OF PURCHASE TO YOUR POINT OF PURCHASE FOR A REFUND.
In consideration of the right to use the SOFT
WARE, you agree to abide by the terms and conditions
of this Agreement.
1. LICENSE: Canon grants you the non-exclusive
right to use the SOFTWARE only on a single
computer. You may physically transfer the SOFTWARE from one computer to another provided
that the SOFTWARE is used on only one computer
at a time. You shall not install or use the
SOFTWARE on a network, multiple CPU, multiple site arrangement, or any other hardware
configuration where the SOFTWARE is accessible to more than one CPU or to more than one
user.
YOU SHALL NOT ASSIGN, SUBLICENSE, RENT,
LEASE, LOAN, CONVEY OR OTHERWISE USE,
TRANSFER, COPY, TRANSLATE, CONVERT
TO ANOTHER PROGRAMMING LANGUAGE,
ALTER, MODIFY, DECOMPILE OR DISASSEMBLE THE SOFTWARE, IN WHOLE OR IN PART,
EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT.
2. BACK-UP COPY: You may make one copy of t
he SOFTWARE solely for back-up purposes, or
copy the SOFTWARE onto the permanent storage device (e.g. a hard disk) of your computer
and retain the original for back-up purposes. Any ot
her copying of the SOFTWARE is a violation
of this Agreement. You must reproduce and
include the copyright notice on the back-up copy.
3. SUPPORT AND UPDATES: Canon is not responsible for providing maintenance or support for
use of the SOFTWARE. No updates, fixes
or support will be made available for the
SOFTWARE.
4. LIMITED WARRANTY AND LIMITATION OF LIABILIT
Y: It is your responsibility to choose,
maintain and match the hardware and software components of your computer system. Thus
Canon does not guarantee uninterrupted service or correction of errors or that the functions or
performance of the SOFTWARE will meet y
our requirements. THE SOFTWARE IS LICENSED
ON AN [AS IS] BASIS AND WITHOUT WARRANTY
OF ANY KIND. The CD-ROM storing the
SOFTWARE is warranted only against defective ma
terial under normal use for a period of ninety
(90) days after purchase from an authorized Canon
dealer as evidenced by your sales receipt.
Your sole remedy for a defective CD-ROM shal
l be replacement of the same without charge
when returned by you at your expense to your
point of purchase and proven to be defective
upon inspection. The replacement CD-ROM will be
warranted for the remainder of the original
ninety (90) day warranty period of the defective
CD-ROM. The limited warranty does not apply if
the failure of the CD-ROM resulted from acci
dent, abuse or misapplication of the SOFTWARE
and shall not extend to anyone other than the original user of the SOFTWARE.
EXCEPT AS SPECIFICALLY SET FORTH IN THIS PARAGRAPH 4, CANON, CANON'S
SUBSIDIARIES, DISTRIBUTORS AND DEALER
S DISCLAIM ALL WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE.
NEITHER CANON NOR ANY OF
CANON'S SUBSIDIARIES, DISTRIBUTORS OR DEALERS IS
LIABLE FOR ANY DAMAGES HOWSOEVER CAUSED, INCLUDING WITHOUT LIMITATION,
DIRECT, CONSEQUENTIAL OR INCIDENTAL LOSS OR DAMAGE INCLUDING LOSS OF
PROFITS, EXPENSE OR INCONVENIENCE HOWS
OEVER CAUSED OR ARISING OUT OF THE
SOFTWARE OR THE USE THEREOF.
NEITHER CANON, NOR ANY OF
CANON'S SUBSIDIARIES, DISTRIBUTORS OR DEALERS
SHALL HAVE ANY OBLIGATION TO INDEMN
IFY YOU AGAINST ANY CLAIM OR SUIT
BROUGHT BY A THIRD PARTY ALLEGING TH
AT THE SOFTWARE OR THE USE THEREOF
INFRINGES ANY INTELLECTUAL PR
OPERTY OF SUCH THIRD PARTY.
5. TERM: This Agreement is effective upon your using the SOFTWARE and remains in effect until
expiration of all copyright interests in t
he SOFTWARE unless earlier terminated. You may
terminate this Agreement by destroying the SOFTWARE. This Agreement will also terminate
without notice to you if you fail to comply with
any of the terms of this Agreement and you must
then promptly return the SOFTWARE. In additi
on, Canon may enforce its other legal rights.
6. U.S. GOVERNMENT RESTRICTED RIGHTS NO
TICE: The SOFTWARE is provided with
restricted rights. Use, duplication or
disclosure is subject to restrictions as set forth in either
subparagraph (c) (1) (ii) of the Rights in Te
chnical Data and Computer software clause at
DFARs 252.227-7013 or subparagraph (c) (1) and (2) of the Commercial Computer Software
Restricted Rights Clause at FAR 52.227-19, as applicable.
7. SEVERABILITY: In the event that any provision of this Agreement is declared or found to be
illegal by any court or tribunal of competent ju
risdiction, such provisi
on shall be null and void
with respect to the jurisdiction of that court or
tribunal and all the remaining provisions of this
Agreement shall remain in full force and effect.
8. CONTROLLING LAW: The terms of this Agreement as
it relates to purchases of the Software in
the United States of America shall be governed and
construed in all respects in accordance with
the laws and regulations of the State of New York,
without reference to choice of law principles.
The terms of this Agreement as it relates to purchases of the Software in Canada shall be
governed by the laws of the province of Ontario.
9. OWNERSHIP: All rights, including but not limited
to copyrights and trade secret rights, to the
SOFTWARE belong to Canon, its affiliated corpor
ations and third party licensors. Your use of
the SOFTWARE is subject to the United St
ates, Canada and other applicable copyright and
trademark laws and nothing in this Agreement consti
tutes a waiver of the rights of Canon, its
affiliated corporations and third party licensors under such laws.
Nothing contained in Paragraph 1 shall be constr
ued to give Canon any ownership rights in any
images, graphics or textual material that
you save in connection with the Software.
10.ACKNOWLEDGEMENT: BY USING THE SOFTWARE, YOU ACKNOWLEDGE THAT YOU
HAVE READ THIS AGREEMENT, UNDERSTOOD IT, AND AGREE TO BE BOUND BY ITS
TERMS AND CONDITIONS. YOU ALSO AGREE THAT THIS AGREEMENT IS THE
COMPLETE AND EXCLUSIVE STATEMENT OF
AGREEMENT BETWEEN YOU AND CANON
CONCERNING THE SUBJECT MATTER HERE
OF AND SUPERSEDES ALL PROPOSALS
OR PRIOR AGREEMENTS, VERBAL OR WRIT
TEN, AND ANY OTHER COMMUNICATIONS
BETWEEN THE PARTIES RELATING TO THE SUBJECT MATTER HEREOF. NO
AMENDMENT TO THIS AGREEMENT SHALL
BE EFFECTIVE UNLESS SIGNED BY A DULY
AUTHORIZED OFFICER OF CANON.
#19
Tragic Lantern / Re: 600D/T3i Raw Video
November 25, 2013, 01:24:51 AM
@1%

The best stable build for 600D at this moment is your NewMem. Everything works great, including RAW video.

I did a try in the 600D.102 nightly 2013/11/23 but temperature is reaching 82 Celsius and recording stops automaticaly. I also did a try in 2013/09/28 but lots of errors loading modules...

Only thing you could improve is the audio metters layout because it is over the other informations. In this 2013/11/23 build the audio metters is in better layout, smaller and  besides the other informations.

Can you just implement this audio layout in your NewMem build? The colors of the displayed informations is not so much inportant, can be colored or white, but reposition the audio metters is a must. If you can, it will be the best build for 600D !

Thanks.
#20
Feature Requests / Re: dual ISO H.264
November 24, 2013, 04:22:26 PM
Last observations:

Someone needs to compile it into some kind of DUALISOH264.exe, so we can drag the MOV file over it and get the still images DeWaved. Maybe also with the isos extraction and interpolation... (I do not know computer programming) Or maybe the Ginger HDR people could do something...


My theory for the one line per iso version is:

the wavelength will be 16 pixels

the amount of merging will be higher, lines separation will be almost lost, or completely lost, so work with 2 stops difference will be smrt decision to help the camera debayer.

if the debayer in camera merges all the lines, instead of reconstructing the lo and hi isos, maybe it will be possible to adjust the luminance values of each line direct into the image.

it deserves a try...


And That's All Folks!!!
#21
Feature Requests / Re: dual ISO H.264
November 24, 2013, 04:09:26 PM
I decided to finish the work this Sunday to free my mind for my next job... so here it is:

I decided to created the algorithm considering the isos 100/800 combo (3 fstops difference). So it can also be 80/640, 160/1250 and so on... This is due to Magic Lantern advice says it is a safe maximum difference to avoid aliasing when merging the isos. Also I think it will be good idea to avoid noise increase so much, so 3 fstops difference does not increase the high iso so much.

It is possible to implement all isos difference in the same algorithm (100/200, 100/400, 100/800, 100/1600, 100/3200), see in the end of this topic how to do.

The isos will be called hi and lo (high and low). (this remembers me the A-HA band: "hunting high and low, ahhhh ahh ahhh...")

I did some tests with less and more light shooting the grey wall to perceive the wave amplitude better. In these tests I found when the highlight gets too high the results was better keeping the values a little below the maximum. So I found a safe maximum value result for the formula, and it is 245, just a little less than 255.

I foud it will be impossible to reconstruct the two lines structure. The reason is: the camera debayering process turns the two lines separation in a mixture of two or three lines resulting in the wave. After reconstructing the lines, the interpolation algorithm must do the job considering this pattern.

wavelength = 32 lines in 7 groups and 14 sub-groups.
each group contains the adjacent hi-lo lines
each sub-group contains hi or lo lines

the groups and sub-groups distribution inside the wave is:

hi-lo:
2-3
2-2
3-2
2-2
3-2
2-3
2-2

Numbers in the left are iso hi, numbers on the right are iso lo.
There are 3 lines together two times in the left and two times in the right.
The first two groups have same desing as the last two groups.
Three groups in the middle are in symmetric arrangement.
This design makes things calibrated.

So the algorithm is (see the attached original wave and reconstructed wave images below):



DeWaving Algorithm by Apefos
(for H264 dual iso with two lines per iso)


General Function: to reconstruct the lines in h264 video recorded in Canon DSLR using Magic Lantern Firmware using dual iso module with two lines per iso set to 3 fstops iso difference, removing the wave pattern generated by camera debayer algorithm and allowing extraction of two images with different isos.


Three suggestions to match the algorithm with the wave pattern in the image:

1 - User must reposition the video file height in timeline to put the first line of the first wave in the line 01 of the frame.

2 - Insert a wave 00 before the wave 01 in the algorithm and leave the image from the camera as is. The user types a number between 00 and 31 and the entire algorithm is moved down using the typed number as how many lines to move down the first line of wave 01. This way the wave 00 will fit the lines above.

3 - User types a number between 01 and 32 and this number will be the line where the first wave 01 starts. The wave 00 will fill the lines above/before the wave 01. (best option)

(After some try, the user will find the number for his camera).
(all video files from the same camera are expected to need the same amount of height reposition).


Main functions (rules all line functions):

main function A: decimal results below 0,5 = discard

main function B: decimal results equal or above 0,5 = +1

main function C: results above 245 = 245

main function D: (this must be decided by the programmer)
idea 1: line functions apply it's function separately to the R, G and B values of each pixel in the line.
idea 2: line functions apply it's function to the global luminance value of each pixel in the line, some kind of brightness adjust.
(luminance values are measured in RGB 8bit, from 0 to 255, for both ideas 1 and 2)


The Wave design: Line Isos and Line Functions:

wave 00 ( to process the lines before/above wave 01)
(repeat the lines from wave 01)

wave 01 (starts at line 0001) or (starts at line 0001 + number typed by user) or (starts at line typed by user)

wave line 01 = iso hi, line function: luminance x 1.132184
wave line 02 = iso hi, line function: luminance x 1.010356
wave line 03 = iso lo, line function: luminance x 0.523438
wave line 04 = iso lo, line function: luminance x 0.870130
wave line 05 = iso lo, line function: luminance x 0.592920
wave line 06 = iso hi, line function: luminance x 1.031414
wave line 07 = iso hi, line function: luminance x 1.082418
wave line 08 = iso lo, line function: luminance x 0.770115
wave line 09 = iso lo, line function: luminance x 0.957143
wave line 10 = iso hi, line function: luminance x 1.238994
wave line 11 = iso hi, line function: luminance x 1.020725
wave line 12 = iso hi, line function: luminance x 1.387324
wave line 13 = iso lo, line function: luminance x 0.837500
wave line 14 = iso lo, line function: luminance x 0.683673
wave line 15 = iso hi, line function: luminance x 1.036842
wave line 16 = iso hi, line function: luminance x 1.000000
wave line 17 = iso lo, line function: luminance x 0.663366
wave line 18 = iso lo, line function: luminance x 0.917808
wave line 19 = iso hi, line function: luminance x 1.368056
wave line 20 = iso hi, line function: luminance x 1.020725
wave line 21 = iso hi, line function: luminance x 1.270968
wave line 22 = iso lo, line function: luminance x 0.817073
wave line 23 = iso lo, line function: luminance x 0.807229
wave line 24 = iso hi, line function: luminance x 1.042328
wave line 25 = iso hi, line function: luminance x 1.010256
wave line 26 = iso lo, line function: luminance x 0.582609
wave line 27 = iso lo, line function: luminance x 0.893333
wave line 28 = iso lo, line function: luminance x 0.523438
wave line 29 = iso hi, line function: luminance x 1.026042
wave line 30 = iso hi, line function: luminance x 1.158824
wave line 31 = iso lo, line function: luminance x 0.788235
wave line 32 = iso lo, line function: luminance x 1.000000

wave 02 (starts at line 0033) or (starts at line 0033 + number typed by user) or (just after previous wave)
(repeat same lines from wave 01)

(and goes like this until reaches line 1080)
(the 1080 lines needs 33.75 waves, so the algorithm can have 35 waves (from wave 01 to wave 34 plus the wave 00 before/above the wave 01, total = 35 waves)

End of algorithm.

To create the lines function table for the other isos difference: shoot a grey wall with perfect illumination, with the lens in f8 to avoid vignetting, defocused. In computer, convert the image to 16bit, discard colors turning into greyscale. Find the first line of the wave and use the color picker to find the luminance value for each line. Line 16 in the wave will be the maximum luminance value for high iso, line 32 will be the lowest luminance value for low iso. The other high iso lines must be multiplyed by a factor/ratio number to get same luminance value of line 16. The other low iso lines must be multiplyed by a factor/ratio number to get same luminance of line 32. In the conversion table of wave 01 in the algorithm, it shows which line is low iso and high iso. To find the factor/ratio number for each line, divide the luminance value of line 32 by the low iso lines luminance value, and divide the luminance of line 16 by the high iso lines luminance value. After finding the factor/ratio numbers, then create the table. (the wavelength is 32 lines and finding the correct first line, the line 16 and line 32 will be the maximum and minimum luminance values respectively, the wave's ridge and valley). To find the first line of the wave in h264 canon dslr dual iso video, compare the image pixels with the images below.

Other line functions can be created in the algorithm for each line, for example: hue correction, saturation correction, white balance correction...

See the wave and the reconstructed wave:

#22
Feature Requests / Re: dual ISO H.264
November 24, 2013, 09:29:27 AM
Thanks guys, I will do my best!

Today is Sunday, and after lots of brainstorming, I think I deserve some rest!

As I said before I have some important work to do next days, so I will use the free time to go on with the project.

I got new ideas about the wave amplitude, needs tests...

I will keep you posted!
#23
Feature Requests / Re: dual ISO H.264
November 24, 2013, 01:31:49 AM
Hi guys, I have great news!

I did the grey wall test and I found the wave!

And the best news: wavelength and wave amplitude are both constant! Not average constant, but perfectly constant!

I will try an attempt to write the algorithm! It seems I can do the step 5 from my last post, only thing I cannot do is to put the functions into a computer compiled file, but after everything is written, this step 6 will be easy and fast for someone else to do.

I will show images to demonstrate how things works.

;D  :)  ;)

But remember: there are chances for things to work, but nothing is proven in real world yet, so everything can fails!!!!!  :o
#24
This is the link for download the original dual iso .RAW file from 600D which gives me magenta dots (hot pixels). With the .RAW file the tests can be better than using the DNGs I uploaded before.

https://www.dropbox.com/s/i4gs4qvzsbrbhwr/600d_raw_video.rar
#25
Feature Requests / Re: dual ISO H.264
November 23, 2013, 10:43:14 PM
The beginning of "DeLinering Algorithm" (or "DeWaving Algorithm")

The first idea to start developing the "DeLinering Algorithm" is a static algorithm trusting the wavelength and wave amplitude is a constant over all the frame, from the first to the last line... I think "DeWaving Algorithm" is a better name because this first attempt does not removes the lines, it reconstruct the lines. It is considered static because it takes into account that the wavelength and wave amplitude will allways be the same, and it does not find the first line, the user must reposition the first high iso line in the first line of the frame (the beginning of the first wave) moving the video up in the timeline a little bit. the amount of moving probably will allways be the same for each camera, (as we saw in previous post each camera keeps the lines position in all recorded clips)

Idea is:

1 - shot a dual iso h264 video pointing camera to a white or grey/gray flat wall/paper with perfect ilumination distribution in all the frame.

2 - zoom the image in timeline to perceive the amount of lines in one wavelength, (x lines), (if needed downscale 50% in height to help perceiving the waves)

3 - with a color picker find the luminance value for each line inside one wavelength

4 - calculate the amount of lift or low to the luminance for each line inside one wavelength to reconstruct the "two lines per iso structure" in the x lines wich forms the wavelength

5 - each line inside the wavelength will have a equation like this (my luminance + y% or my luminance - y%)

5 - create the algorithm with 1080 equations, one per line, repeating the wavelength equations group

if wavelength and wave amplitude is a constant this thing will work

I can do everything but not the step 5 because I do not know computer programming...

http://www.en.wikipedia.org/wiki/Wave

Updated: looking to the images in my post showing the three cameras, it seems the wavelength and wave amplitude are not constant, ie, it seems luminance variations are random... but it needs the flat wall test to be sure.