Personal View site logo
Make sure to join PV on Telegram or Facebook! Perfect to keep up with community on your smartphone.
3D 3K 12-bit RAW camera project
  • 133 Replies sorted by
  • 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.

  • 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.

  • 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.

  • 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/-

  • 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!

  • 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 ?

  • 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

  • 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?

  • Yes - its the bit swapping. The PGR bit order is messed up, so I had to do nibble and bit swapping. Can you capture 1080p24 with the RAW12 option.

  • Also, the build is the debug build - without optimizations.

  • When I try capturing 1080p24 with the RAW12 option, it captures some frames properly, but many are dropped. Sometimes the program crashes and the feed from the Flea3 is terminated.

  • Are you using the Intel USB3 drivers or the Point Gray ones ? Can you open DriverControlGui and confirm that the Point Gray drivers are being used ?

    If you connect a USB stick to your laptop, can you see the USB stick ?

    With the PGR drivers, you will only be able to use the USB3 ports for a PGR USB3 camera. You would need to manually swap them using the GUI to use any other USB3 devices.

  • I've tried using the Intel USB3 driver and the Point Grey one. Both ways, the program lags the same amount.

  • Try this release build for DNG - https://dl.dropboxusercontent.com/u/9906333/FlyCap2.exe Also, make sure you are using streaming mode not buffered. This one will generate the correct DNG header for any resolution you are using.

  • The new build has eliminated the lagging. Whether I use the streaming or buffered mode, the capture is as smooth as the stock program. And the DNGs now open up in Photoshop. Great progress!

    In Photoshop, the DNGs have a couple problems. One, they have a lot of stippling, particularly in dark areas. Could something be wrong with the debayer that's being done on them? Two, Photoshop is bringing them in somewhat overexposed compared to when I captured them in FlyCap.

    One interesting thing I noticed - regardless of whether I have color processing enabled, the DNGs come out looking the same. This is convenient since it means I can monitor what I'm capturing in color.

  • can you post a screenshot of the stippling?

  • Here's a screenshot of the stippling. image

  • is that stippling or sensor noise? do you see it with dng generated with dancinec?

  • It definitely doesn't look like any sensor noise I've encountered when debayering via FlyCapture, such as with the YUV422 mode. I've seen the same stippling in every DNG I've created with DANcinec. I've also tried using DANcinec to export a debayered TIFF, but even then, the stippling is present.

  • Have you tried dark frame subtraction and bad pixel removal first ? Using one of the astrophysics software. Like Pixelfixer or Deep Sky Stacker

  • Dan suggested that it could be fpn. On closer look, that looks like the case. In this case, dark frame subtraction would mitigated some of the problem. And temporal noise removal like Neat Video would help.

  • I did a couple tests to evaluate whether it's FPN.

    First, I recorded 70 frames with the lens cap on and the gain set high, then I averaged those frames in Photoshop. The result is an almost pure black frame - no obvious FPN. If I boost the exposure of the average frame by +8 in Photoshop, I'm able to see some faint vertical lines and a couple hot pixels, but nothing severe. I tried subtracting the average dark frame from a normal frame shot with the same settings, but it didn't help at all with the stippling.

    Second, I recorded 400 frames of panning across a room, both in and out of focus. After converting these frames to a minimally compressed video file, I'm unable to see any FPN. The noise seems utterly random.

    Out of curiosity, I also shot some sunny outdoor footage with the gain at minimum. Regardless of the low gain, I get the same stippling. It's more or less just as bad as footage shot at high gain in low light.

  • Do you think its the XYZ to RGB matrix ?

  • I will use this site as a reference, and print out DNGs with various matrices. Then I will pass them to you - so you can process them. http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html

    Once we can figure out what works, I will incorporate them into DNG headers.

  • Can you post this image on dropbox so I can download it ?