Personal View site logo
Make sure to join PV on Telegram or Facebook! Perfect to keep up with community on your smartphone.
Please, support PV!
It allows to keep PV going, with more focus towards AI, but keeping be one of the few truly independent places.
3D 3K 12-bit RAW camera project
  • 133 Replies sorted by
  • Under Custom Video Modes, I've been using Mode 0, Pixel Format Raw 12. Even after browsing the documentation for the camera, I'm still not sure how one changes between Format 7 and other modes. Is Format 7 the default mode? If so, that's what I've been using.

    I tried your new RAW12 option under Recording Settings, Image Format. After processing the resulting files with DANcince, they now open in Photoshop and look like they're supposed to. So that's very encouraging!

    One problem that remains is the lagging. I can't capture 1080p24 without the program choking up or crashing altogether. Any idea what could be causing this?

  • I just remembered, that version the DNG header is hardcoded as I was getting DNG export to work.

    And the RAW12 mode from camera will never work with DANCAD - the bit ordering is off, nibbles are swapped.

    Try the new RAW12 option that I have inside the Image options. Then process this via DANcinec

  • Did you try the DNG mode ? In Image processing options ? Also, try the RAW12 mode.

    I tested it at 3104x1744 and its possible somewhere its been hardcoded. I'll try different options.

    In Image Modes, are you in Format 7 mode ? With Mode 0 and Raw 12 selected ?

  • Thank you for all the hard work - it is much appreciated!

    I'm desperate for a way to get DNGs out of my Flea3. I tested your FlyCap2d.exe with my FL3-U3-32S2C-CS using RAW12, 1920x1080, 23.98fps, color processing off, and DNG export.

    During capture, the software lagged more than usual and a number of frames were dropped. With the stock software, I usually have zero dropped frames. For now, the resulting DNGs won't open up in Photoshop - I get the message "Could not complete your request because the file-format module cannot parse the file."

    I've experimented with the DanCad software as well. Using it, I'm able to convert RAW12 files to DNGs that will actually open in Photoshop, but they don't look right - blown out, colors are way off, lots of stippling.

    I don't have much programming experience, but I'm more than happy to test out my Flea3 with any newer versions of FlyCap2d that you come up with. Thanks again!

  • Here is the upload on Dropbox - https://dl.dropboxusercontent.com/u/9906333/FlyCap2d.exe

    I will simply update this file with newer versions.. Isnt there anyone willing to test this on other cameras form Point Grey ? The cheapest is 395/-

  • Finally, something usable. I had to do a lot of nibble swapping and byte shifting to get the data to Adobe Raw standards. The attached Flycap2d.exe has a lot of options in the Image Recording pane. You can use RAW12, RAW16 or DNG (with RAW12). Turn the Color Processing to off.

    This will create a directory and record a series of DNG files. These files will be recognized by any RAW processing program.

    If you want to save HDD space, I suggest using RAWzor to compress the RAW files.

  • Thanks to DanCad software, here is a basic DNG header that can be pre-pended to the RAW data from Point Grey for a compliant DNG file. https://dl.dropboxusercontent.com/u/9906333/000-hdr.bin

    One gotcha - make sure color processing is off, otherwise you can only capture the RGB24 file. Check the file size, for 12-bit RAW it will be widthheight3/2 So its half the size of RGB24 file.

    These DNG header settings work for Format7, RAW12, Mode 0, 3104x1744 As this seems to be a sweet spot for the sensor - largest frame writeable as a part of a stereo pair to a fast Evo 420MBps SSD - I recommend this size for the project. Its also divisible by 16, so as and when I can implement a CF RAW option, it can be used as well.

    Use the memory channel to change the default settings. IMO - Ideal gain is 6DB for indoors. 12DB has too much noise. Outdoors use 0db. I have standardized at 25P and 1/50th shutter. Turn all the Auto checkboxes off.

  • Disclaimer applies - code is messy, and a work-in-progress. If the sky falls on your head while using this - don't blame me. Don't use this if you do not understand coding, C++, objects, RAW and other terminology being used.

  • Here is the first update to FlyCapture2. The only way to capture RAW12 is using the image capture tab for a sequence of RAW images. When they say RAW, its actually RAW - no headers. Just a dump from the sensor.

    Download the FlyCapture2 SDK and build it with Visual Studio 2012. DO NOT install .Net 4.5 - and do not use the Express version of VS.

    Inside source, replace the files with the ones inside Flycap2.zip below. I have made minimal changes to their source.

    Now add the 2 classes in Settings+DNG.zip to this project. CameraSettings changes the defaults to something more useful before we start recording. I used the max unsable size for 12-bit RAW 25P (and 24P) - slightly larger than 3K video frames.

    The DNG files implement the save as DNG methods.

    This is still not working - the DNG headers are still messed up.

    IMO - its not worth the trouble to implement Cineform RAW ATM as there is insufficient documentation and I want a working system from this month for my next film.

    FlyCap2.zip
    27K
    Settings+DNG.zip
    10K
  • Turns out that one can only access RAW12 by storing a sequence of RAW images within FlyCapture2 or paying for a Streampix 6 license with 1-7 cameras and Cineform RAW module.

    Streampix 6 with these options is worse than a ripoff, and no other version can access USB3 cameras.

    So we move to CF again - my previous approach failed as I was trying to modify the DPX2CF converter within the SDK.

    Turns out David Newman used RawSpeed some years ago as a frontend to a RAW2CF utility. http://cineform.blogspot.com.au/2010/11/camera-raw-to-cineform-raw.html

    However, the source file is linked to the old CF site, and I cannot locate it.

    http://cineform.com/downloads-other/rawspeedDLLsrc101028.zip

    If I can see this source, its a simple matter to integrate this within FlyCapture2 for a free USB3 to Cineform RAW solution. No one seems to post on this thread - but if you are one of the few who downloaded this, can you post this again ?

    I have also asked Cineform for this.

  • Using virtualdub with flea3 -

    https://groups.yahoo.com/neo/groups/Flea3/conversations/topics/74

    how to use v-dub without lockups. You need to use FlyCap1.8 first, set everything up, then start up v-dub. If you only make setting changes in FlyCap, v-dub will not lock up and will collect avi data, just unclick the audio option.

  • Just kidding, but on a serious note, I thought 3d was kind of becoming a thing of the past...again...?

    I doubt that it is "thing of the past". It is great tech, especially for amateurs. In fact all idea to ditch it in consumer cameras came from pros and from sponsored reviewers after companies realized that you need much more powerful LSI, 2x sensors and 2x lenses and still can't make 2x price :-)

  • might as well make it 3d,3k,13bit,13 stops,3 in. disp., 3 card slots, 3 ND's and might as well just name the camera THR33. RED kept it simple lol

    Just kidding, but on a serious note, I thought 3d was kind of becoming a thing of the past...again...?

  • Virtualdub has problems recording to Cineform. I cannot capture no matter what - the camera does get recognized if I register the DirectShow driver.

    Next option - tried to build the Flycapture SDK. The GUI is useless.

    Some notes :-

    Install

    Win 7.1 SDK .Net 4.0 VC++ Express 2010

    File -> New Project and select “Win32 Console Application”.

    “Win32 Application Wizard” -> Next ...next page select “Empty Project” under the “Additional options”.

    “Configuration Manager” -> “Active solution platform” -> “New”: x64 “Copy settings from” “Win32”.

    “Configuration Properties” -> “General”. In there we select as “Platform Toolset” “Windows7.1SDK”

    "Options" > "Tools" > "Projects and Solutions" > "VC++ Directories" > "Include files" C:\WinDDK\7600.16385.1\inc\mfc42;C:\WinDDK\7600.16385.1\inc\atl71;

    "Options" > "Tools" > "Projects and Solutions" > "VC++ Directories" > "Library files" C:\WinDDK\7600.16385.1\lib\mfc\ia64;:\WinDDK\7600.16385.1\lib\atl\ia64;

    Linker -> General c:\Program Files\Point Grey Research\FlyCapture2\lib64; C/C++ -> General c:\Program Files\Point Grey Research\FlyCapture2\include;

    “Configuration Properties > General > Output directory” $(SolutionDir)$(PlatformName)\$(Configuration).

    “Configuration Properties > General> Intermediate Directory” $(PlatformName)\$(Configuration).

    “Configuration Properties > Linker > Debugging > Generate Program Database File” $(ProjectDir)$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb.

    Compile the project. If there are compile errors you may need to add the $(PlatformName) macro to other settings as well. For example, if there are user library files the macro may need to be added to “Configuration Properties > Linker > General > Additional Library Directories”.

    I renamed the FlyCapture2.lib to FlyCapture2_Windows7.1SDK.lib as the build needs this file.

    Status - Hello World compiled with FlyCapture SDK.

  • As for storing the image data - I am currently gravitating towards usage of lz4 compression of the 12-bit raw image data. I am not sure if I want to pay for another Cineform license (my current license is on OSX). The Point Grey SDK has a simple example program that writes out the raw image data. It would be an easy job to link with the lz4 library - http://code.google.com/p/lz4/source/checkout and save it as compressed RAW.

    I will also build a batch CLI that will take this raw compressed data after filming and convert it to a compressed DNG after the video has been saved. The speed and scalability of lz4 is phenomenal!!

    If anyone here has used the Adobe DNG API, please help me! Their documentation is not the best, and there is little in terms of example programs.

  • Set of prime lenses. The crop factor on 1/2-inch lenses is about 6x. The sensor is 1/2.5" and we can realistically expect to capture only 3K - the final sensor size is slightly larger 1/3-inch after cropping. So, the crop will be about 7x.

    A 6mm lens will provide a normal POV on the 3K image and 8mm on the binned image from the total sensor.

    The Budget option is

    Ricoh C-Mount 6mm M Series 2 Mp Lens with Locking Screws 145$

    Spacecom JHF8M-MP VELA Series 2/3" Low Distortion 3 Megapixel Lens (8mm) 100$

    And for tele, a single 16mm is enough. I may buy 12mm as well since the lenses are quite cheap.

    Spacecom JHF16M-MP VELA Series 2/3" Low Distortion 3 Megapixel Lens (16mm) 100$

    Spacecom JHF12M-MP VELA Series 2/3" Low Distortion 3 Megapixel Lens (12mm) 100$

    All the Spacecom lenses are also usable with the BMPCC camera, which I have. The lenses, as with all lenses will have better lph ratings near the center.

    The Spacecom lenses have filter threads of 37.5 and the Ricoh at 35.5 I can realistically use the 2x cameras at a min. IA of ~ 40mm

    This is excellent for indoor filming.

    The Deluxe option - Kowa - http://1stvision.com/lens/kowa-lens.html

    Kowa LM6NCM - 1/2" 120lph at the centre 100lph on the periphery uncalibrated - 189$ new

    Kowa LM12JCM - in 2/3-inch but 120lph at center. 195/- new with uncalibrated Iris and Focus

    Kowa LM6NC3 - same specs for 3-CCD Calibrated

    Kowa LM12NC3 - same in 12mm for 3-CCD and calibrated - 375$ new

    Spacecom also offers 5MP lenses but they have 49mm filter thread. So the min IA is affected, the Kowa lenses have 37.5mm width.

    Hmm!!! Until I decide on the lens, I bought a 6mm 1.4 lens from AliExpress. It looks visually to be the same as the 120lph uncalibrated 6mm Kowa lens. Its rated for 3 MP. http://www.aliexpress.com/store/product/Manual-Iris-6mm-3-Megapixel-Machine-Vision-Lens-with-1-2-C-Mount/409940_798120701.html

  • The elphel project has code to create DNG - and the people at the Field project came up with a makeDNG utility.

    http://openendedgroup.com/field/images/makeDNG.zip

    raw2dng - Magic Lantern as well - http://www.magiclantern.fm/forum/index.php?topic=5404.0

    ATM, I am trying to get my head around this.

  • Does anyone knows Soeren Mueller from bmcuser - http://www.bmcuser.com/showthread.php?2043-Little-raw-cam-side-project ?

    I think he got pissed off because some aggressive people took over his thread. I am keen on accessing his code for writing the frames as DNG. CinemaDNG offer lossless compression that may help a bit with disk space. Even a 2:1 compression saves heaps of space.

    The only free options for realtime compression seem to be lossy 10-bit YUY2 Cineform and lossless 8-bit UTVideo from within Virtualdub. The Cineform RAW options are only available for the paid version.

    I am not considering libjpeg-turbo as it only supports 8-bit, and at 8-bit I'd rather have lossless 4:2:2 or 4:4:4. 12-bit 4:4:4 MJPEG would be great - but the libjpeg-turbo authors are not keen on 12-bit support.

  • I'm quite looking forward to seeing this progress. I looked at the flea cameras in hopes of building a rig capable of some higher frame rates. alas, life got in the way. I hope it works out for you.

  • @zcream

    Cool. Keep us updated.

  • I got the cameras. I used 2x 2 way Macro Shot Focusing Focus Rail Sliders from ebay ~ 10$ each. Now I have a sliding calibrated 3d rig that allows the cameras to move from IA of 32mm to 84mm. I reckon this covers interiors and exteriors quite well. I have no need for 3d macro shots or hyper-stereo. For comparison there is an ipod touch in front.

    2013-12-13 15.23.40.jpg
    1280 x 720 - 122K
    2013-12-13 15.23.54.jpg
    1280 x 720 - 136K
    2013-12-13 15.24.21.jpg
    1280 x 720 - 120K
  • While I await David Newman's response to the Cineform RAW SDK access query, I looked at Compressed DNG options. BMC already uses it in the BMPCC. It does reduce the storage slightly, and has the advantage of being readable in Davinci Resolve.

    dng4ps-2 is a CHDK project that converts RAW frames into a dng. One of the options is a compressed dng. More details here - https://github.com/crass/dng4ps2

    Ximea also offer a raw to dng conversion in its SDK. http://www.ximea.com/support/wiki/apis/RAW_to_DNG

  • A summary of where we are today - in terms of recording options.

    8-bit 4:2:0 - QuickSync

    8-bit 4:2:2 or 4:4:4 - libjpeg-turbo, AMV2MT or Utvideo or ffv1

    10-bit 4:2:2 - Cineform High or ffv1 PIX_FMT_YUV422P10

    RAW - Cineform RAW or Compressed DNG

  • @Vitaliy_Kiselev I will try CF RAW as well as some other options. See what works out. My package got shipped today.

    VD allows I/O of RAW video - and if RAW2CFRAW - http://www.primehd.net/news/raw-2-cf-raw/ allows input via stdin, the problem is easily solved.

    @kino - "Convergence cannot be adjusted in post"

    This is an excellent description of adjusting convergence in post - some of it specific to AE. http://helpx.adobe.com/after-effects/kb/stereoscopic-3d-effects.html#main_Understanding_convergence_

    Is there something I am missing ?