Recent comments

Reply to: LibRaw 0.20.2 Release   4 years 9 months ago

Dear Sir:

1. The list is simply to list the supported cameras, for the users to know. The list is guaranteed not to include all the cameras that are actually supported, only those which we were able to test and only the known aliases - such as camera phones which we were not able to test are not listed, even if the output is in DNG format.

2. There are no plans to make a machine-readable list, not for make/models, not for normalized make/models.

3. The intended use of normalized make/model parameters is explained in the Changelog.txt under "== Normalized make/model =="

4. Using normalized make/model parameter while searching in the camera list may be of some help, albeit very little of it.

Reply to: LibRaw 0.20.2 Release   4 years 9 months ago

So what is the intended use of this list if not that?

David

Reply to: LibRaw 0.20.2 Release   4 years 9 months ago

You can try, but since this list is not intended for the use described above, we do not have an answer to this question.

Reply to: LibRaw 0.20.2 Release   4 years 9 months ago

My old code used imgdata.idata.make and imgdata.idata.model to compare against the compiled in list of supported cameras.

Should I now change that code to use imgdata.idata.normalized_make and imgdata.idata.normalized_model ?

Thanks

Reply to: LibRaw 0.20.2 Release   4 years 9 months ago

apply_profile.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library

Is this to be expected?

Reply to: LibRaw 0.20.2 Release   4 years 9 months ago

I'm compiling the RC2 code with VS2017, and /W3. I'm getting a lot of warnings like these:

1>c:\users\amonra\documents\github\dss\libraw\src\demosaic\dht_demosaic.cpp(176): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
1>c:\users\amonra\documents\github\dss\libraw\src\demosaic\dht_demosaic.cpp(747): warning C4305: '/=': truncation from 'double' to 'float'

Yes, of course I can disable these warnings, but I'd like to be sure it's OK do that?

Thanks
David

Reply to: Fuji X-T4 Compressed Samples   4 years 9 months ago

Yes, samples are welcome (although we have several ones).

If you do not want to share it in public, use WeTransfer service/free option and send samples to info@libraw.org.

Reply to: Fuji X-T4 Compressed Samples   4 years 9 months ago

Thanks for the update Alex and all the work you and the LibRaw team do! If you need samples just let me know I currently have two files I could provide. I look forward to an upcoming release with the lossy support added.

Reply to: Questions about color matrices in colordata   4 years 9 months ago

Hi Iliah,
Thanks for the pointers. I do have an understanding of color science. Its just that with dcraw having multiple properties that describe very similar things, I was just trying to ensure I was using the right ones.

Regards,
Dinesh

Reply to: Fuji X-T4 Compressed Samples   4 years 9 months ago

X-T4 lossless lossy compressed files are not supported for LibRaw yet.

UPD: correction, lossless files are supported, lossy are not.

Reply to: Questions about color matrices in colordata   4 years 10 months ago

You can start here: what does cam_xyz represent, what kind of colour transform, what is it applied to, and what's the result? Before you know the answer the life will be not easy. Put it another way, if you are dealing with colour, it's only logical to start with a bit of study of colour engineering, and not to rely on guessing from the code or trial and error.

Reply to: LibRaw 0.19.5-Release   4 years 10 months ago

Libraw binary distribution for Mac is built using unedited Makefile.dist

Reply to: LibRaw 0.19.5-Release   4 years 10 months ago

make -f Makefile.dist worked on Intel and ARM. I merged both libs with lipo.
Should I change any settings in the Makefile from the default?

Reply to: LibRaw 0.19.5-Release   4 years 10 months ago

We do not have ARM mac hardware, so unable to test. I do not think we'll have it in very nearest future.

You need to rebuild LibRaw by yourself, use Makefile.dist as a starting point.

Reply to: LibRaw 0.19.5-Release   4 years 10 months ago

Hi,
I work currently on the port of my app for macOS 11 on ARM/Intel.
When will be a Universal Binary available?
Thorsten

Reply to: Questions about color matrices in colordata   4 years 10 months ago

pre_mul is not used for normalization. It derived from cam_rgb data (to get daylight wb coeffs)

Reply to: Questions about color matrices in colordata   4 years 10 months ago

Alex,
Please forgive me if I gave the impression that I am trying to replicate DCRAW/libraw.

I am creating my own RAW processing pipeline but I am relying on libraw to read the CFA and metadata for the color transformation to implement this pipeline.

Due to the lack of documentation, I am just trying to understand how these coefficients work or are meant to be used to make sure I am implementing my pipeline correctly.

For example, for the Google Pixel 3 camera, I had to derive the cam_xyz from rgb_cam. However, the resulting matrix resulted in a strong color cast probably because I did not undo the normalization after doing INV(rgb_cam).

Also, I assumed that cam_mul would be sufficient because they are the as shot WB multipliers but pre_mul appears to be needed because of the cam_rgb normalization.

I am just looking for more information on these.

Thanks for all your help thus far!

Dinesh

Reply to: Questions about color matrices in colordata   4 years 10 months ago

As far as I understood from the previous discussion, you're creating your own postprocessing for RAW.

I do not thing you need to replicate LibRaw/dcraw color processing pipeline.

Reply to: Questions about color matrices in colordata   4 years 10 months ago

Alex,
I noticed that during the computation of rgb_cam from cam_xyz in the cam_xyz_coeff function, there is a normalization that is applied when cam_rgb is computed and the pre_mul is updated. The annotated DCRAW site also does not provide much explanation about this.

The author's comment is "But I don’t fully understand what this tiny little section of code really does. I’d love to hear from someone who can explain it to me."

Given this I have some questions:
1. For camera's (like Google Pixel 3 above), where cam_xyz has to be derived from cmatrix (or rgb_cam) and xyz_rgb, how can I undo the normalization when calculating cam_xyz?

2. During cam_rgb normalization, the pre_mul is updated. So, I assume that the coeffs in pre_mul need to be applied to the RAW data before demosaicing and applying rgb_cam to convert from Camera Space -> sRGB?

3. When should I use cam_mul then?

Dinesh

Reply to: dcraw and libraw mangles image metadata   4 years 10 months ago

There is no such program in LibRaw 'sample code' programs.

One could implement such program using LibRaw or Adobe DNG sdk for raw (dng) decode and something like libtiff for tiff write.

Reply to: dcraw and libraw mangles image metadata   4 years 10 months ago

Apologies for the long response.

Do you have a program that can just convert the dng file to tiff without changing any of the dng's exif metadata?

Reply to: dcraw and libraw mangles image metadata   4 years 10 months ago

Sorry, missed these notices because of *very long* reply:

>> Also properties such as gimbal pitch, yaw, roll among others are removed.
>>Should I give you a copy of this image to take a look at the fields that are removed?

LibRaw::write_tiff_ppm() used in dcraw_emu creates very minimal set of EXIF tags.
There is no plans to extend this.

Reply to: dcraw and libraw mangles image metadata   4 years 10 months ago

I just downloaded the sample image and the exif file; I ran the test and still get the same errors when I try to load the .tiff file.

I ran a exiftool -v and there were some warnings

[Warning = ValueConv GPSTimeStamp: Argument "undef" isn't numeric in addition (+)]

  ExifToolVersion = 11.88
  FileName = DJI_0325.tiff
  Directory = images
  FileSize = 59887440
  FileModifyDate = 1593857589
  FileAccessDate = 1593857589
  FileInodeChangeDate = 1593857595
  FilePermissions = 33204
  FileType = TIFF
  FileTypeExtension = TIF
  MIMEType = image/tiff
  ExifByteOrder = II
  + [IFD0 directory with 23 entries]
  | 0)  SubfileType = 0
  | 1)  ImageWidth = 5472
  | 2)  ImageHeight = 3648
  | 3)  BitsPerSample = 8 8 8
  | 4)  Compression = 1
  | 5)  PhotometricInterpretation = 2
  | 6)  ImageDescription = 
  | 7)  Make = Hasselblad
  | 8)  Model = L1D-20c
  | 9)  StripOffsets = 1872
  | 10) SamplesPerPixel = 3
  | 11) RowsPerStrip = 3648
  | 12) StripByteCounts = 59885568
  | 13) XResolution = 300 (300/1)
  | 14) YResolution = 300 (300/1)
  | 15) PlanarConfiguration = 1
  | 16) ResolutionUnit = 2
  | 17) Software = dcraw v9.26
  | 18) ModifyDate = 2020:02:15 14:41:53
  | 19) Artist = 
  | 20) ExifOffset (SubDirectory) -->
  | + [ExifIFD directory with 4 entries]
  | | 0)  ExposureTime = 0.005 (5000/1000000)
  | | 1)  FNumber = 5 (5000000/1000000)
  | | 2)  ISO = 100
  | | 3)  FocalLength = 10.26 (10260000/1000000)
  | 21) ICC_Profile (SubDirectory) -->
  | + [ICC_Profile directory with 10 entries, 496 bytes]
  | | ProfileHeader (SubDirectory) -->
  | | + [BinaryData directory, 128 bytes]
  | | | ProfileCMMType = 
  | | | ProfileVersion = 528
  | | | ProfileClass = mntr
  | | | ColorSpaceData = RGB 
  | | | ProfileConnectionSpace = XYZ 
  | | | ProfileDateTime = 0 0 0 0 0 0
  | | | ProfileFileSignature = acsp
  | | | PrimaryPlatform = 
  | | | CMMFlags = 0
  | | | DeviceManufacturer = none
  | | | DeviceModel = 
  | | | DeviceAttributes = 0 0
  | | | RenderingIntent = 0
  | | | ConnectionSpaceIlluminant = 0.9642 1 0.82491
  | | | ProfileCreator = 
  | | | ProfileID = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  | | 0)  ProfileCopyright = auto-generated by dcraw
  | | 1)  ProfileDescription = sRGB gamma 2.222 toe slope 4.5
  | | 2)  MediaWhitePoint = 0.95045 1 1.08905
  | | 3)  MediaBlackPoint = 0 0 0
  | | 4)  RedTRC = curv...
  | | 5)  GreenTRC = curv...
  | | 6)  BlueTRC = curv...
  | | 7)  RedMatrixColumn = 0.43608 0.2225 0.01393
  | | 8)  GreenMatrixColumn = 0.38509 0.71689 0.09709
  | | 9)  BlueMatrixColumn = 0.14305 0.06061 0.71402
  | 22) GPSInfo (SubDirectory) -->
  | + [GPS directory with 10 entries]
  | | 0)  GPSVersionID = 2 2 0 0
  | | 1)  GPSLatitudeRef = N
  | | 2)  GPSLatitude = xxx
  | | 3)  GPSLongitudeRef = E
  | | 4)  GPSLongitude = xxx
  | | 5)  GPSAltitudeRef = 0
  | | 6)  GPSAltitude = 500 (500/1)
  | | 7)  GPSTimeStamp = undef undef undef (0/0 0/0 0/0)
  | | 8)  GPSMapDatum = 
  | | 9)  GPSDateStamp = 
  Warning = ValueConv GPSTimeStamp: Argument "undef" isn't numeric in addition (+)
  Warning = ValueConv GPSTimeStamp: Argument "undef" isn't numeric in addition (+)

There's no such errors in the raw file

  ExifToolVersion = 11.88
  FileName = DJI_0325.DNG
  Directory = /home/blubee/PICTURES
  FileSize = 41454818
  FileModifyDate = 1581748912
  FileAccessDate = 1581757918
  FileInodeChangeDate = 1581757918
  FilePermissions = 33279
  FileType = DNG
  FileTypeExtension = DNG
  MIMEType = image/x-adobe-dng
  ExifByteOrder = II
  + [IFD0 directory with 43 entries]
  | 0)  SubfileType = 1
  | 1)  ImageWidth = 160
  | 2)  ImageHeight = 112
  | 3)  BitsPerSample = 8 8 8
  | 4)  Compression = 7
  | 5)  PhotometricInterpretation = 6
  | 6)  Make = Hasselblad
  | 7)  Model = L1D-20c
  | 8)  PreviewImageStart = 45450
  | 9)  Orientation = 1
  | 10) SamplesPerPixel = 3
  | 11) PreviewImageLength = 29218
  | 12) Software = 10.00.11.04
  | 13) ModifyDate = 2020:02:15 14:41:53
  | 14) SubIFD (SubDirectory) -->
  | + [SubIFD directory with 27 entries]
  | | 0)  SubfileType = 0
  | | 1)  ImageWidth = 5568
  | | 2)  ImageHeight = 3648
  | | 3)  BitsPerSample = 16
  | | 4)  Compression = 1
  | | 5)  PhotometricInterpretation = 32803
  | | 6)  StripOffsets = 830690
  | | 7)  SamplesPerPixel = 1
  | | 8)  RowsPerStrip = 3648
  | | 9)  StripByteCounts = 40624128
  | | 10) PlanarConfiguration = 1
  | | 11) CFARepeatPatternDim = 2 2
  | | 12) CFAPattern2 = 0 1 1 2
  | | 13) CFAPlaneColor = 0 1 2
  | | 14) CFALayout = 1
  | | 15) BlackLevelRepeatDim = 2 2
  | | 16) BlackLevel = 4096 4093 4093 4095 (4096/1 4093/1 4093/1 4095/1)
  | | 17) WhiteLevel = 65535
  | | 18) DefaultScale = 1 1 (1/1 1/1)
  | | 19) DefaultCropOrigin = 4 4 (4/1 4/1)
  | | 20) DefaultCropSize = 5464 3640 (5464/1 3640/1)
  | | 21) BayerGreenSplit = 0
  | | 22) AntiAliasStrength = 1 (100/100)
  | | 23) BestQualityScale = 1 (1/1)
  | | 24) ActiveArea = 0 96 3648 5568
  | | 25) OpcodeList3 = ....0L.@.`...  ?..!.B..?..!.B...@)..@.K.@..r@...@..\@.a@...?...[snip]
  | | 26) DefaultUserCrop = 0 0 1 1 (0/1 0/1 1/1 1/1)
  | + [SubIFD1 directory with 15 entries]
  | | 0)  SubfileType = 1
  | | 1)  ImageWidth = 960
  | | 2)  ImageHeight = 640
  | | 3)  BitsPerSample = 8 8 8
  | | 4)  Compression = 7
  | | 5)  PhotometricInterpretation = 6
  | | 6)  PreviewImageStart = 74668
  | | 7)  SamplesPerPixel = 3
  | | 8)  RowsPerStrip = 640
  | | 9)  PreviewImageLength = 756022
  | | 10) PlanarConfiguration = 1
  | | 11) YCbCrCoefficients = 0.299 0.587 0.114 (299/1000 587/1000 114/1000)
  | | 12) YCbCrSubSampling = 2 2
  | | 13) YCbCrPositioning = 2
  | | 14) ReferenceBlackWhite = 0 255 128 255 128 255 (0/1 255/1 128/1 255/1 128/1 255/1)
  | 15) ApplicationNotes (SubDirectory) -->
  | + [XMP directory, 8192 bytes]
  | | About = DJI Meta Data
  | | ModifyDate = 2017-09-14
  | | CreateDate = 2017-09-14
  | | Make = DJI
  | | Model = Test_Pro
  | | Format = image/dng
  | | GPSLatitude = xxx
  | | GPSLongitude = xxx
  | | AbsoluteAltitude = +500.17
  | | RelativeAltitude = +199.90
  | | GimbalRollDegree = +0.00
  | | GimbalYawDegree = -128.70
  | | GimbalPitchDegree = -89.90
  | | FlightRollDegree = +3.10
  | | FlightYawDegree = -89.90
  | | FlightPitchDegree = -7.00
  | | CamReverse = 0
  | | GimbalReverse = 0
  | | SelfData = DJI Self data
  | | Version = 7.0
  | | HasSettings = False
  | | HasCrop = False
  | | AlreadyApplied = False
  | 16) ExifOffset (SubDirectory) -->
  | + [ExifIFD directory with 26 entries]
  | | 0)  ExposureTime = 0.005 (1/200)
  | | 1)  FNumber = 5 (500/100)
  | | 2)  ExposureProgram = 2
  | | 3)  ISO = 100
  | | 4)  ExifVersion = 0230
  | | 5)  DateTimeOriginal = 2020:02:15 14:41:53
  | | 6)  CreateDate = 2020:02:15 14:41:53
  | | 7)  ExposureCompensation = 0 (0/10)
  | | 8)  MaxApertureValue = 2.971 (2971/1000)
  | | 9)  MeteringMode = 2
  | | 10) LightSource = 1
  | | 11) Flash = 0
  | | 12) FocalLength = 10.26 (10260/1000)
  | | 13) FileSource = 3
  | | 14) SceneType = 1
  | | 15) ExposureMode = 0
  | | 16) WhiteBalance = 0
  | | 17) DigitalZoomRatio = 1 (1/1)
  | | 18) FocalLengthIn35mmFormat = 28
  | | 19) SceneCaptureType = 0
  | | 20) GainControl = 0
  | | 21) Contrast = 0
  | | 22) Saturation = 0
  | | 23) Sharpness = 0
  | | 24) SerialNumber = 0K8TFAA0020268
  | | 25) LensInfo = 28 28 2.8 11 (280/10 280/10 280/100 1100/100)
  | 17) GPSInfo (SubDirectory) -->
  | + [GPS directory with 7 entries]
  | | 0)  GPSVersionID = 2 3 0 0
  | | 1)  GPSLatitudeRef = N
  | | 2)  GPSLatitude = xxx
  | | 3)  GPSLongitudeRef = E
  | | 4)  GPSLongitude = xxx
  | | 5)  GPSAltitudeRef = 0
  | | 6)  GPSAltitude = 500 (500/1)
  | 18) DNGVersion = 1 4 0 0
  | 19) DNGBackwardVersion = 1 3 0 0
  | 20) UniqueCameraModel = Hasselblad L1D-20c
  | 21) ColorMatrix1 = 1.2385 -0.7159 -0.0657 -0.0982 1.0352 0.0721 0.0457 0.0241 0.743[snip]
  | 22) ColorMatrix2 = 0.731 -0.2746 -0.0646 -0.2991 1.0847 0.2469 0.0163 0.0585 0.6324[snip]
  | 23) AnalogBalance = 1 1 1 (1000000/1000000 1000000/1000000 1000000/1000000)
  | 24) AsShotNeutral = 0.3372859025 1 0.6052009456 (256/759 256/256 256/423)
  | 25) BaselineExposure = 0 (0/100)
  | 26) BaselineNoise = 1 (100/100)
  | 27) BaselineSharpness = 1 (100/100)
  | 28) LinearResponseLimit = 1 (100/100)
  | 29) CameraSerialNumber = 0K8TFAA0020268
  | 30) ShadowScale = 1 (1/1)
  | 31) DNGPrivateData = [ae_dbg_info:.....d...dd. ....&^.....j.c.....7.......>.][ae_hi[snip]
  | 32) CalibrationIlluminant1 = 17
  | 33) CalibrationIlluminant2 = 21
  | 34) ProfileName = Embedded
  | 35) ProfileHueSatMapDims = 18 6 1
  | 36) ProfileHueSatMapData1 = 0 1 1 0.538309991359711 1.08341300487518 1 0.4128620028[snip]
  | 37) ProfileHueSatMapData2 = 0 1 1 -0.644068002700806 1.12516498565674 1 -1.43428194[snip]
  | 38) ProfileEmbedPolicy = 0
  | 39) NoiseProfile = 8.108e-05 6e-08
  | 40) OriginalDefaultFinalSize = 0 0
  | 41) OriginalBestQualitySize = 0 0
  | 42) OriginalDefaultCropSize = 0 0
Reply to: dcraw and libraw mangles image metadata   4 years 10 months ago

Here are tiff file produced by dcraw_emu -T (from github/LibRaw/master branch) and result of exiftool -v3 tiff-file: https://www.dropbox.com/sh/6q9d3hd10z8x06m/AAA7QgHY9yf_KFK38JmZ5WF9a?dl=0

There are no tags 0xa40.. in this file.

Reply to: dcraw and libraw mangles image metadata   4 years 10 months ago

apologies about the output, I sent a sample DNG file through the contact link.

I am still getting errors when trying to open the .tiff files

TIFFFieldWithTag: Internal error, unknown tag 0xa406.
TIFFFieldWithTag: Internal error, unknown tag 0xa407.
TIFFFieldWithTag: Internal error, unknown tag 0xa408.
TIFFFieldWithTag: Internal error, unknown tag 0xa409.
TIFFFieldWithTag: Internal error, unknown tag 0xa40a.
TIFFFieldWithTag: Internal error, unknown tag 0xa40b.

I am using colmap; which uses freeimage to import supported files. DNG files are unsupported but TIFF's are.

I think those unknown() values trips up freeimage.

Pages