LibRaw | reading RAW files from digital cameras | Camera library

 by   LibRaw C++ Version: 0.21.1 License: Non-SPDX

kandi X-RAY | LibRaw Summary

kandi X-RAY | LibRaw Summary

LibRaw is a C++ library typically used in Video, Camera applications. LibRaw has no bugs and it has medium support. However LibRaw has 1 vulnerabilities and it has a Non-SPDX License. You can download it from GitHub.

LibRaw is a library for reading RAW files from digital cameras
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              LibRaw has a medium active ecosystem.
              It has 922 star(s) with 248 fork(s). There are 70 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 5 open issues and 430 have been closed. On average issues are closed in 0 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of LibRaw is 0.21.1

            kandi-Quality Quality

              LibRaw has no bugs reported.

            kandi-Security Security

              LibRaw has 1 vulnerability issues reported (0 critical, 0 high, 1 medium, 0 low).

            kandi-License License

              LibRaw has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              LibRaw releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of LibRaw
            Get all kandi verified functions for this library.

            LibRaw Key Features

            No Key Features are available at this moment for LibRaw.

            LibRaw Examples and Code Snippets

            No Code Snippets are available at this moment for LibRaw.

            Community Discussions

            QUESTION

            How to create raw synthethic images
            Asked 2021-May-23 at 13:32

            I want to perform the color calibration of my camera. That's why I search demosaic algorithm, which can provide the closest color to color of a real object. That's why I want:

            • create synthetic images in OpenCV with known colors
            • mosaic it
            • pass it in an algorithm for estimation of efficiency

            I use libraw for unpacking raw images and OpenCV for processing and storing them.

            So, the question is, is there a library that can provide me different demosaic algorithms(i am ready to convert my synthetic image from Mat to C-style array) where I can pass my mosaic image and receive demosaic image. I think that it is possible to convert my image from tiff to dng and use RawTherapee for demosaicing, but it looks more complicated.

            ...

            ANSWER

            Answered 2021-May-23 at 13:32

            I solved that problem by using dng sdk.

            Pipeline for using class from link in the end of answer is here:

            Source https://stackoverflow.com/questions/67143039

            QUESTION

            Getting the color matrix and white balance info from Camera2 API (for custom raw processing)
            Asked 2020-Apr-30 at 20:04

            I am working at an app where I need to take many pictures (possibly tens of thousands) and they have to be RAW, which I process in native code. Right now I am converting the RAWs to DNGs, and in the native code I unpack them using libraw. I get the white balance color multipliers, and the color matrix from the dng.

            However, converting the raw to dng and then processing the dng takes quite a bit of time, and I would like to skip this step, and process the raw info directly, without the DNG intermediary. But for that I need to get the color matrix and WB values. I did look at the docs, but I didn't find any way on how to do that. Any help would be appreciated.

            ...

            ANSWER

            Answered 2020-Apr-30 at 20:04

            That information is available in the CameraCharacteristics and CaptureResult objects that you pass to DngCreator, specifically fields like:

            https://developer.android.com/reference/kotlin/android/hardware/camera2/CameraCharacteristics#sensor_calibration_transform1 https://developer.android.com/reference/kotlin/android/hardware/camera2/CameraCharacteristics#sensor_color_transform1 https://developer.android.com/reference/kotlin/android/hardware/camera2/CameraCharacteristics#sensor_forward_matrix1 https://developer.android.com/reference/kotlin/android/hardware/camera2/CameraCharacteristics#sensor_reference_illuminant1 https://developer.android.com/reference/android/hardware/camera2/CaptureResult#SENSOR_NEUTRAL_COLOR_POINT

            Most of those fields map basically directly to the DNG spec, but you can try to look at the DngCreator implementation to see how to go from the camera2 API to the DNG fields: https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/jni/android_hardware_camera2_DngCreator.cpp;l=1217

            While there's no official sample for using this information to process a raw buffer, the Android compliance tests include a simple RAW converter in Java, used to confirm that the resulting image reasonably matches the JPEG image provided by the device (to double-check that the various metadata fields are reasonably correct): https://cs.android.com/android/platform/superproject/+/master:cts/tests/camera/src/android/hardware/camera2/cts/rs/RawConverter.java;l=279

            Source https://stackoverflow.com/questions/61463460

            QUESTION

            StorageFile.GetImagePropertiesAsync() gives wrong results when using StorageFileQueryResult with image metadata
            Asked 2020-Feb-27 at 21:47

            Unfortunately, unless I am mistaken, it seems that there is a bug in the StorageFile Query api which makes it unreliable.

            The following example is simple. The steps to reproduce it are:

            -Take a folder and put in only one image, because the sample below assumes you will have only one file.

            -This image should be in PEF format, taken from a Pentax 645Z. You can find the entire project as well as a PEF image here. https://github.com/Ponant/StorageFileQueryResultBug . Put the sample image in one folder, in an indexed location, e.g the Desktop.

            -Install the Raw Image Extension from the Microsoft Store, https://www.microsoft.com/en-us/p/raw-image-extension/9nctdw2w1bh8?activetab=pivot:overviewtab . This extension is based on https://www.libraw.org/ and they support this camera https://www.libraw.org/supported-cameras

            Run the app, you will see two buttons:

            1) Button 1 launches a folder picker, creates a StorageFileQueryResult which allows one to fetch the only file in the folder. Then it calls the Api for the Image properties

            ...

            ANSWER

            Answered 2020-Jan-29 at 01:45

            I took the time install the extension and try out your code. Everything you said is correct. The StorageFile when acquired from a StorageFileQueryResult results in default (wrong) image properties for the PEF file, but works fine with jpg files. This is clearly a bug. Whether the bug is in the framework or in the RAW image extension I do not know. Note that the extension has a lot of negative feedback on the Windows Store.

            There is a reasonable workaround. You don't have to do one file at a time. Instead of using the query you can do this:

            Source https://stackoverflow.com/questions/59955845

            QUESTION

            Error when linking LibRaw to shared object
            Asked 2019-Nov-22 at 12:55

            So, what i'm actually trying to is to build a shared object, that contains a python-includable-module, generated by pybind11. I got it as far as to have no syntax-errors in CLion, but when i try to compile it, it gives the following error:

            ...

            ANSWER

            Answered 2019-Nov-22 at 12:55

            When compiling a shared library on Linux and Macos (and probably other Unixy OSes) all code used in the library needs to be compiled in "position independent mode", this is because the compiler doesn't know where and executable will load your code so has to generate code which can be run from any address.

            To generate PIC code you need to pass the -fPIC flag to GCC.

            Note that all the code you want to compile into your shared library needs to be compiled in PIC mode, this includes code in static libraries. In your case you need to recompile libraw.a with -fPIC enabled.

            Position independent code might be slightly slower but the difference is small so you can probably just compile all your code with -fPIC even if its being used directly in an executable. Apple recommends that all code including executables is position independent. See How much overhead can the -fPIC flag add? for more details about performance.

            Source https://stackoverflow.com/questions/58989803

            QUESTION

            R error: argument to 'which' is not logical
            Asked 2019-Sep-03 at 03:58

            I have a vector with file names. Several of the files in the vector are repeated with different versions. For example

            "ConsoleKit2-1.0.0-x86_64-3"

            "ConsoleKit2-1.0.0-x86_64-4"

            "Cython-0.23.4-x86_64-1"

            "Cython-0.29.12-x86_64-1"

            "GConf-3.2.6-x86_64-3"

            "GConf-3.2.6-x86_64-4"

            "LibRaw-0.17.2-x86_64-1"

            "LibRaw-0.18.12-x86_64-1"

            "M2Crypto-0.23.0-x86_64-1"

            "M2Crypto-0.35.2-x86_64-1"

            "MPlayer-1.2_20160125-x86_64-3"

            "MPlayer-20190418-x86_64-1"

            "Mako-1.0.13-x86_64-1"

            "ModemManager-1.10.4-x86_64-1"

            "ModemManager-1.4.14-x86_64-1"

            "NetworkManager-1.18.1-x86_64-1"

            "NetworkManager-1.2.2-x86_64-2"

            "PyQt-4.11.4-x86_64-1"

            "PyQt-4.12.1-x86_64-3"

            "QScintilla-2.10.8-x86_64-2"

            ...

            ANSWER

            Answered 2019-Sep-03 at 02:03

            Your code doesn't fail in the same way for me. If I run:

            Source https://stackoverflow.com/questions/57764062

            QUESTION

            Issue for Python RAWPY package installation on Windows
            Asked 2018-Dec-29 at 20:42

            I want to read RAW files on Python, and it seems that the Rawpy package is well suited for this. However when trying to install it using the Windows CMD

            ...

            ANSWER

            Answered 2018-Oct-24 at 22:40

            The version available at the time of the post (0.12.0) didn't offer Python 3.7 wheels, therefore pip downloaded the source distribution and tried to compile the package manually. This failed since it requires a more involved development setup.

            A new rawpy version 0.13.0 is released now and offers wheels for Python 3.7 as well. A simple pip install rawpy should then work and download the wheel instead of the source distribution.

            Source https://stackoverflow.com/questions/52925979

            QUESTION

            Why are Python operations 30× slower after calling time.sleep or subprocess.Popen?
            Asked 2018-Nov-09 at 17:21

            Consider the following loop:

            ...

            ANSWER

            Answered 2018-Nov-09 at 16:22

            my guess would be that this is due to the Python code being evicted from various caches in the CPU/memory system

            the perflib package can be used to extract more detailed CPU level stats about the state of the cache — i.e. the number of hits/misses.

            I get ~5 times the LIBPERF_COUNT_HW_CACHE_MISSES counter after the Popen() call:

            Source https://stackoverflow.com/questions/53227478

            QUESTION

            Converting *.raw to *.tiff
            Asked 2018-Sep-08 at 08:38

            There was such a problem. Requires conversion of *.RAW files received the camera 4K NDVI CAMERA for GitUp G3.

            I use libraw.h, which contains dcraw.c. She works with the GitUp Git2 camera format.

            My file she does not recognize it and deduces

            Unsupported file format or not RAW file

            I also tried the raw2dng utility, but also there is an

            Unsupported file format

            Help please find a way to convert this *.RAW file.

            I attach the file (https://yadi.sk/d/sdHHY4jw3aj4Ga).

            Thank you in advance!

            ...

            ANSWER

            Answered 2018-Sep-08 at 08:38

            The problem is solved. For this, I added support for the camera in classes libraw library:

            libraw_cxx.cpp

            dcraw_common.cpp

            dcraw.c

            Here are the parameters:

            Source https://stackoverflow.com/questions/52112606

            QUESTION

            QQuickImageProvider loads only around 1% of raw images
            Asked 2017-Jul-07 at 13:02

            I started to learn Qt and I wanted to make simple list of images in folder with thumbnail. I managed to get it kind of working, but it seems to randomly load only about 1 image in 500 and 1 image in 50 is black (screenshot below). Once scrolled away the thumbnail will probably not load again and some other might load this time. For the raw images I use libraw.

            Few observations:

            7.7.2017 - I tried to check if issue wasn't caused by broken files. Although libraw says thumbnails are jpg, they don't seem to be, because normal browsers are unable to browser neither success nor failed attemps, but better editors can open both the same. So it seems issue isn't with corrupted data being given to QImage

            When I hardcoded few photos to load, when there were fewer photos they almost always loaded properly. With increasing amounts they suddenly could all go black or not load at all. Maybe a multithreading issue?

            Libraw seems to always load files properly. I tested it by printing enough bytes in the middle of the file when it loaded and when it didn't

            When image is black, it thinks everything is fine, when image doesn't load at all it is because QImage has null content.

            When I add one image many times, all copies share the same fate (They all load or they all fail)

            ...

            ANSWER

            Answered 2017-Jul-07 at 13:02

            The issue was very simple. Libraw's jpg thumbnail is actually the original image only as jpg (I was not aware of this, my bad) and QtQuick could not handle the size of images it was supplied. That's why it worked just fine with fewer images but failed terribly with more. The solution than was returning resized thumbnails to much smaller size, ideally exactly the size of the Image in qml.

            Source https://stackoverflow.com/questions/44951632

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install LibRaw

            Public snapshots are published every 7-9 months in the public GitHub repository.
            These versions contain support for new cameras that was added after the previous major release. The API/ABI of public snapshots is not frozen, and may change.
            Public snapshots are always tested on a fairly large user base, and may be considered suitable for use in programs that work with files with known origins (that is, recorded directly by users’ digital cameras). However, public snapshots should not be considered sufficiently reliable for processing files that are specially constructed for vulnerability testing; that is, they should not be used in public services that allow for anonymous processing of files of unknown provenance

            Support

            We cannot guarantee any response to requests submitted via the above methods. If you need a guaranteed response for a bug report and/or for extending technical support, please use the Extended Support option.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/LibRaw/LibRaw.git

          • CLI

            gh repo clone LibRaw/LibRaw

          • sshUrl

            git@github.com:LibRaw/LibRaw.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Camera Libraries

            react-native-camera

            by react-native-camera

            react-native-camera

            by react-native-community

            librealsense

            by IntelRealSense

            camerakit-android

            by CameraKit

            MagicCamera

            by wuhaoyu1990

            Try Top Libraries by LibRaw

            LibRaw-contrib

            by LibRawC++

            DOFCalc

            by LibRawC++