Getting RAW Video

All things embedded.
*NO FEATURE REQUESTS*

Re: Getting RAW Video

Postby stvnms » Fri May 01, 2015 7:49 am

Thanks again! I know all this great effort has been developed with a D5100 but if you need to do some testing on a D3200 I could help.
stvnms
 
Posts: 15
Joined: Fri Aug 08, 2014 7:46 pm
Been thanked: 0 time

Re: Getting RAW Video

Postby stvnms » Fri May 01, 2015 9:26 am

Captura.PNG
What did I do wrong? :-? This is my result of LV_new0.rar file from Photoshop.

Thanks in advice
stvnms
 
Posts: 15
Joined: Fri Aug 08, 2014 7:46 pm
Been thanked: 0 time

Re: Getting RAW Video

Postby nikkor » Fri May 01, 2015 10:30 am

This is getting really exciting.
nikkor
 
Posts: 138
Joined: Mon May 20, 2013 11:06 am
Been thanked: 44 times

Re: Getting RAW Video

Postby a1ex » Fri May 01, 2015 1:22 pm

Please find attached a DNG converter for the above files, based on ML RAW tools.

These images have more than 12 bits - the two most significant ones are missing, and this is why you will get funky artifacts in highlights.

I was able to guess the 2 extra bits in one of the images, as a proof of concept. This functionality is not included in the attached converter though. The guessing algorithm adds 4096 to certain pixels until it gets rid of discontinuities in the image.

Full-resolution image:
LV__0000x.jpg
LV__0000x.DNG
Attachments
LV__0000.jpg
Directly converted to DNG
LV__0000.jpg (9.78 KiB) Viewed 14143 times
LV__0000x.jpg
Two extra highlight bits guessed
LV__0000x.jpg (11.85 KiB) Viewed 14148 times
raw2dng-nikon.7z
DNG converter for Nikon LV RAW files (source code only)
(11.4 KiB) Downloaded 237 times
a1ex
 
Posts: 4
Joined: Tue Apr 21, 2015 12:23 pm
Been thanked: 13 times

Re: Getting RAW Video

Postby astronomer » Fri May 01, 2015 3:35 pm

Great work leegong.

I briefly looked at the histogram from raw bayer channel. There were significant gaps spacing at 17ADU, thus the actual data is only 12-4=8bit.
Maybe there are additional register to scale the data. As a1ex had mentioned the highlight problem, it's possible the digital scaling overflowed the 12bit output.

If you look at the highlight in the other image, all those number are the same revealing the lower 12bit from the image- "3698".
Attachments
highlight.png
User avatar
astronomer
Developer
 
Posts: 722
Joined: Fri Apr 06, 2012 10:06 am
Location: US
Been thanked: 292 times

Re: Getting RAW Video

Postby ron5800 » Fri May 01, 2015 5:02 pm

Great job leegong!
ron5800
 
Posts: 14
Joined: Thu May 01, 2014 8:48 pm
Been thanked: 3 times

Re: Getting RAW Video

Postby leegong » Fri May 01, 2015 7:21 pm

Three major problems need to be solved now :
1) Highlight problem
2) How to activate TFT displaying while dump LV raw . The current patch forces LV raw frame written into RAM ,
so no input for chip4001 now , thus TFT displaying is blank while LV RAW stream is saved to card .
3) Latter dumping in the steam sequence become abnormal .

All attachments in previous thread come from RAM dumping , i didn't modify any byte ,
in fact the dumping address is exactly same as that of the earliest LV raw patch several months ago .
Regarding 1) , my gut feeling and guessing : maybe it's due to special encoding mechanism ,
a NEF RAW container is the best solution EDIT : might be helpful , otherwise we have to use a1ex's DNG container .
maybe there is other kind of problem for shadow , just it's not so sensitive for peoples' perception .
Regarding 2) , lots of hacking are needed .
Regarding 3) , maybe it's due to poor writing speed of my SD card which was very old and cheap .
leegong
Core Developer
 
Posts: 2129
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 546 times

Re: Getting RAW Video

Postby leegong » Fri May 01, 2015 8:13 pm

Here are 11 successive LV raw frames .
Attachments
LV__V3_02.rar
(1.16 MiB) Downloaded 382 times
LV__V3_03.rar
(1.21 MiB) Downloaded 176 times
LV__V3_04.rar
(1.23 MiB) Downloaded 240 times
LV__V3_05.rar
(1.24 MiB) Downloaded 164 times
LV__V3_06.rar
(1.23 MiB) Downloaded 150 times
LV__V3_07.rar
(1.23 MiB) Downloaded 167 times
LV__V3_08.rar
(1.24 MiB) Downloaded 156 times
LV__V3_09.rar
(1.2 MiB) Downloaded 142 times
LV__V3_10.rar
(1.18 MiB) Downloaded 209 times
leegong
Core Developer
 
Posts: 2129
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 546 times

Re: Getting RAW Video

Postby leegong » Fri May 01, 2015 10:12 pm

I just realized that highlight problem is probably due to clipping in addition mode , see similar description stated in SONY IMX036 manual .
Pixels addition also might be explaination to astronomer's 17 ADU finding .
EDIT : @a1ex , does canon video stream work in sensor addition mode ?
Attachments
LV__V3_00.rar
(1.23 MiB) Downloaded 148 times
HighLight_Clipping.png
leegong
Core Developer
 
Posts: 2129
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 546 times

Re: Getting RAW Video

Postby a1ex » Sat May 02, 2015 1:55 am

@astronomer: that's a great hint. Indeed, the lower 4 bits are not random noise, as you would expect from LSBs - they actually seem to be some significant bits, although I wasn't able to figure out their meaning yet.

@leegong: the data is not clipped to white. Rather, instead of say 5000, the DNG file contains a value close to 904 = 5000-4096 (value not exact because the last 4 bits are unknown).

On Canons, 5D3 uses 3x3 pixel binning, and all other cameras use column binning and line skipping. However, that doesn't cause any clipping issues - the data is already scaled down.
http://www.magiclantern.fm/forum/index. ... #msg118232
http://www.magiclantern.fm/forum/index. ... #msg123894
Last edited by a1ex on Sat May 02, 2015 2:18 am, edited 1 time in total.
a1ex
 
Posts: 4
Joined: Tue Apr 21, 2015 12:23 pm
Been thanked: 13 times

PreviousNext

Return to Firmware

Who is online

Users browsing this forum: No registered users and 3 guests