Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Reading luma values from image

New Here ,
Apr 17, 2016 Apr 17, 2016

Hi,

I'd like to make create a plugin that changes an image's saturation based on luma values, similar to Davinci resolve's Lum VS Sat curve.

How can I read the luma values of an image? I couldn't find any image manipulation methods in the SDK, but perhaps I'm not looking at the right place.

Thanks

Attached the Lum VS Sat curve from DR.

lum_vs_sat.png

TOPICS
SDK
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 17, 2016 Apr 17, 2016

The SDK API won't let you change individual pixel values, which is what I think would be required to change the saturation of a pixel based on its luminosity.

The SDK does let you change the same develop settings you can change in the user interface (e.g. exposure), via photo:applyDevelopPreset(), the undocumented photo:applyDevelopSettings(), and LrDevelopController.  But none of the sliders in the user interface would let you accomplish your end, so you can't do it with the SDK.

You could write

...
Translate
LEGEND ,
Apr 17, 2016 Apr 17, 2016

The SDK API won't let you change individual pixel values, which is what I think would be required to change the saturation of a pixel based on its luminosity.

The SDK does let you change the same develop settings you can change in the user interface (e.g. exposure), via photo:applyDevelopPreset(), the undocumented photo:applyDevelopSettings(), and LrDevelopController.  But none of the sliders in the user interface would let you accomplish your end, so you can't do it with the SDK.

You could write an external editing application (e.g. in C++ or Swift) that provides such a feature for TIFFs.  You'd interface it to LR as an "external editing plugin", like the Nik plugins.   But I don't think this was what you're thinking of.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2016 Apr 17, 2016

Manipulating images pixel by pixel by myself is out of my depth.

Thanks for the quick responce.

I  wish Adobe would include these features in Lightroom or Camera RAW.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 17, 2016 Apr 17, 2016

You can create a custom camera profile which allows you to replicate this for RAW images.  See DNG SDK for details on the camera profiles.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2016 Apr 17, 2016

I'm not a professional developer or proficient in C\C++.  I wanted to use the luma v saturation near the end of my post processing workflow as an integrated part of Lightroom. If I had to choose whether to mess around with DNGs put the finishing touch on Resolve, I'd go for the later.

Again, thanks for the help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 03, 2022 May 03, 2022

My man, I've been justr struggling with doing something like luma adjustments becouse vibrance and saturation sliders just pumps up saturation in sooo bad way in many pictures. Skin goes brown red and only way to resolve it is tones of individual masks. I'd love to see simple "luma" tab added to curve tool so much.
I don't really know anything about programming it but I'm looking hard for plugin or something. Is there anything new in the topic?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 03, 2022 May 03, 2022
LATEST

"Is there anything new in the topic?"

 

Since the last post in 2016, two new tools have been added:

 

- The Color Grading panel lets you adjust Hue / Saturation / Luminance for Highlights, Midtones, and Shadows separately.

 

- A a single Luminance Range mask let you select the range of luminance values you want to adjust and then adjust the local Saturation slider. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines