LibRaw is for software developers. Many users of digiKam, Krita and some other RAW processing software are happy with these programs (which, in turn, uses LibRaw via libkdcraw).
Anyway, LibRaw distribution includes several command-line tools. Take a look to half_mt utility which is similar to 'dcraw -h', but much faster in batch processing on multi-CPU/multicore machines
I also have absolutely no clue.
I wrote a Microsoft Visual Basic program to select the pictures that I like and the ones that I don't like, and them send all the 'good' ones to my usb key so I take it out to print.
My friend saw my program and asked if I could include the capability to read .raw files in addition to the .jpgs, so I got here. Absolutely no clue.
I understand that this is a library, and my program should include it in the project and then call it. But that's it. Anyone can help?
(I remember the first time I opened the BASIC shell, and I had no idea... a friend sat by my side to teach me and in ten minutes I was programming like crazy... so yeah, it should be easy when someone shows you... but without it...)
Hi!
Just compiled and tried out some different stuff in bin folder. Checked into dcraw_emu and I am used to work with the piping command in dcraw.
-c Write image data to standard output
Is piping working somehow with libraw or what,s the reason it isn,t?
Thanks
/D
Ok, thanks for answers.
By the way. maybe you can answer. I,ve been exlporing the use of icc profiles in dcraw and also tried this in dcraw_emu. This works with -p [profile.icc] but I never get the colors right. It,s always washed out. Almost like dcraw is defaulting to raw color when using icc profiles? when trying the same profiles in photoshop or lightroom the colors are always right. Would be nice to have your point of view about this issue.
Thanks again.
/D
Yes, I did. It works(I think) and applies the icc profile. Gamma is correct but colors are faded.
My output command goes like this
dcraw_emu -T -a -p profile.icc my.dng
My output when running dcraw_emu in terminal looks like this
LibRaw-0.17.2/bin/.libs/dcraw_emu [OPTION]... [FILE]...
-c float-num Set adjust maximum threshold (default 0.75)
-v Verbose: print progress messages (repeated -v will add verbosity)
-w Use camera white balance, if possible
-a Average the whole image for white balance
-A <x y w h> Average a grey box for white balance
-r <r g b g> Set custom white balance
+M/-M Use/don't use an embedded color matrix
-C <r b> Correct chromatic aberration
-P <file> Fix the dead pixels listed in this file
-K <file> Subtract dark frame (16-bit raw PGM)
-k <num> Set the darkness level
-S <num> Set the saturation level
-n <num> Set threshold for wavelet denoising
-H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)
-t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW)
-o [0-5] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)
-o file Output ICC profile
-p file Camera input profile (use 'embed' for embedded profile)
-j Don't stretch or rotate raw pixels
-W Don't automatically brighten the image
-b <num> Adjust brightness (default = 1.0)
-q N Set the interpolation quality:
0 - linear, 1 - VNG, 2 - PPG, 3 - AHD, 4 - DCB
5 - modified AHD,6 - AFD (5pass), 7 - VCD, 8 - VCD+AHD, 9 - LMMSE
10-AMaZE
-h Half-size color image (twice as fast as "-q 0")
-f Interpolate RGGB as four colors
-m <num> Apply a 3x3 median filter to R-G and B-G
-s [0..N-1] Select one raw image from input file
-4 Linear 16-bit, same as "-6 -W -g 1 1
-6 Write 16-bit linear instead of 8-bit with gamma
-g pow ts Set gamma curve to gamma pow and toe slope ts (default = 2.222 4.5)
-T Write TIFF instead of PPM
-G Use green_matching() filter
-B <x y w h> use cropbox
-F Use FILE I/O instead of streambuf API
-timing Detailed timing report
-fbdd N 0 - disable FBDD noise reduction (default), 1 - light FBDD, 2 - full
-dcbi N Number of extra DCD iterations (default - 0)
-dcbe DCB color enhance
-eeci EECI refine for mixed VCD/AHD (q=8)
-esmed N Number of edge-sensitive median filter passes (only if q=8)
-acae <r b>Use chromatic aberrations correction
-aline <l> reduction of line noise
-aclean <l c> clean CFA
-agreen <g> equilibrate green
-aexpo <e p> exposure correction
-dbnd <r g b g> debanding
-mmap Use mmap()-ed buffer instead of plain FILE I/O
-mem Use memory buffer instead of FILE I/O
-disars Do not use RawSpeed library
-disinterp Do not run interpolation step
-dsrawrgb1 Disable YCbCr to RGB conversion for sRAW (Cb/Cr interpolation enabled)
-dsrawrgb2 Disable YCbCr to RGB conversion for sRAW (Cb/Cr interpolation disabled)
-disadcf Do not use dcraw Foveon code either if compiled with demosaic-pack-GPL2
I am curious if it is possible to add any other info to the output such as color space? A bit contradictory since an icc should contain colorspace information one would think?
I see. It was worth a try :). For what it,s worth, the same limitations occur in dcraw so I assume the code is coming from there.
Sorry all questions but do you perhaps know a starting point being able to add 1D and/or 3D luts in dcraw/libraw?
Yes, postprocessing code (after raw data read/unpack) is completely imported from dcraw without much improvement in functions.
Both 1D and 3D luts looks easy to implement assuming you've working code that replaces pixel value in place.
Assuming you're working in linear space in 'camera color', the best place to implement your code is convert_to_rgb_loop() function. It gets linear profile (out_cam[3][4]) that converts from camera space to output rgb. You may replace it with your code.
This function is already 'virtual', so it is very easy to implement any color conversion in derived class.
Good evening Alex. Would you kindly guide me a few steps forward with your suggestion? In dcraw I find the place where different color space is written. If I want to create something like linear to log, where would I change numbers? Where would I found these figures?
Thanks in advance
LibRaw is for software developers
LibRaw is for software developers. Many users of digiKam, Krita and some other RAW processing software are happy with these programs (which, in turn, uses LibRaw via libkdcraw).
Anyway, LibRaw distribution includes several command-line tools. Take a look to half_mt utility which is similar to 'dcraw -h', but much faster in batch processing on multi-CPU/multicore machines
-- Alex Tutubalin @LibRaw LLC
Dummy here
I also have absolutely no clue.
I wrote a Microsoft Visual Basic program to select the pictures that I like and the ones that I don't like, and them send all the 'good' ones to my usb key so I take it out to print.
My friend saw my program and asked if I could include the capability to read .raw files in addition to the .jpgs, so I got here. Absolutely no clue.
I understand that this is a library, and my program should include it in the project and then call it. But that's it. Anyone can help?
(I remember the first time I opened the BASIC shell, and I had no idea... a friend sat by my side to teach me and in ten minutes I was programming like crazy... so yeah, it should be easy when someone shows you... but without it...)
Sorry, no ideas on C/C++
Sorry, no ideas on C/C++ library integration with VisualBasic.
-- Alex Tutubalin @LibRaw LLC
About -c stdout command
Hi!
Just compiled and tried out some different stuff in bin folder. Checked into dcraw_emu and I am used to work with the piping command in dcraw.
-c Write image data to standard output
Is piping working somehow with libraw or what,s the reason it isn,t?
Thanks
/D
Unfortunately, no piping in
Unfortunately, no piping in dcraw_emu
-- Alex Tutubalin @LibRaw LLC
Ok, thanks for answers.
Ok, thanks for answers.
By the way. maybe you can answer. I,ve been exlporing the use of icc profiles in dcraw and also tried this in dcraw_emu. This works with -p [profile.icc] but I never get the colors right. It,s always washed out. Almost like dcraw is defaulting to raw color when using icc profiles? when trying the same profiles in photoshop or lightroom the colors are always right. Would be nice to have your point of view about this issue.
Thanks again.
/D
Have you compiled dcraw
Have you compiled dcraw/Libraw with lcms?
-- Alex Tutubalin @LibRaw LLC
Yes, I did. It works and
Yes, I did. It works(I think) and applies the icc profile. Gamma is correct but colors are faded.
My output command goes like this
dcraw_emu -T -a -p profile.icc my.dng
My output when running dcraw_emu in terminal looks like this
I am curious if it is
I am curious if it is possible to add any other info to the output such as color space? A bit contradictory since an icc should contain colorspace information one would think?
Sorry, dcraw_emu is 'demo for
Sorry, dcraw_emu is 'demo for library users' (so, for app developers), not for end-user.
It is very limited in functions.
-- Alex Tutubalin @LibRaw LLC
I see. It was worth a try :).
I see. It was worth a try :). For what it,s worth, the same limitations occur in dcraw so I assume the code is coming from there.
Sorry all questions but do you perhaps know a starting point being able to add 1D and/or 3D luts in dcraw/libraw?
Yes, postprocessing code
Yes, postprocessing code (after raw data read/unpack) is completely imported from dcraw without much improvement in functions.
Both 1D and 3D luts looks easy to implement assuming you've working code that replaces pixel value in place.
Assuming you're working in linear space in 'camera color', the best place to implement your code is convert_to_rgb_loop() function. It gets linear profile (out_cam[3][4]) that converts from camera space to output rgb. You may replace it with your code.
This function is already 'virtual', so it is very easy to implement any color conversion in derived class.
-- Alex Tutubalin @LibRaw LLC
Thanks a lot for telling. I
Thanks a lot for telling. I see what I can come up with here.
Thanks again.
/D
Good evening Alex. Would you
Good evening Alex. Would you kindly guide me a few steps forward with your suggestion? In dcraw I find the place where different color space is written. If I want to create something like linear to log, where would I change numbers? Where would I found these figures?
Thanks in advance
convert_to_rgb operates in
convert_to_rgb operates in linear space (from raw color space to linear output).
Final gamma conversion is done in dcraw_make_mem_image() or in dcraw_ppm_tiff_writer() calls
-- Alex Tutubalin @LibRaw LLC