Where/how to learn about digital image processing

I’ve been trying to figure out how the image processing works without much luck.
What I’m interested in is the operations done, not so much about how to use some SW to achieve it. Like, I guess, increasing lightness is adding each pixel colours (R, G, B) the same constant thus adding white, but I wonder, does it affect the hue?
Some things that I’m especially interested in right now are:

  • debayering/demosaicing
  • brightness
  • contrast
  • mapping between colour triangles (colour gamuts?)
    I’ve checked the contents of some books, but they don’t seem to get into these that much, but rather “hurry” to subjects, like object recognition.
    Pointers web pages and book recommendations are apperciated.

Maybe check out rawproc by forum member @ggbutcher ; it’s a unique developer software, allowing you to start from the raw and really go step by step.

8 Likes

This has been asked a couple of times on the forum already, please feel free to take advantage of the search.

I wrote rawproc specifically with your question in mind. It will open your raw with absolutely no processing, and you have to add each step one-by-one to get a pleasing image.

There’s a windows installer and AppImage for version 1.3 at the github repo. As your questions drill down further, the code for gimage.cpp has a boatload of comments on how the individual operations work.

1 Like

Nice links, THANKS! Especially the first one and the Github one.

The match to what I’m after is not that good. I’m rather after the processing itself. And the camera I’m using (for now) is colour astro camera, the only “lens” being a telescope.
And I did search with a couple of different search expressions. But maybe I failed to figure out an effective search expression.

Yes, @kofa already hinted that, and it really looks good. I have to try it. I guess it also works as an “image processing playground” that you can use for trying out different “tricks” and what they do to the image?
Downright excellent!

Sorry, that entry page is indeed just an overview. It however links to several individual digital and computational photography lectures that go deeper into the matter and also provide further references.

1 Like

Good question. The answer, sadly, is: it depends on how you define “hue”. The fundamental problem is that “hue” is a single number that summarises a complex situation.

With some definitions (eg HCL), hue doesn’t change. With others (eg LCHab), it changes slightly.

1 Like

I was thinking about HSV. In that sense, the hue is the angle-coordinate in the “colour disk”. That is, the “actual colour” regardless of brightness or saturation.
On the other hand, it feels like adding a constant value to R, G and B just adds white, but on the other hand, it would change the relative proportions of R, G and B.

You also have to consider beyond the absolute math or physics…perception. ie how we perceive color under different conditions. This is quite important.

This is a good resource

In Camera image processing_Tutorial.pdf (27.5 MB)

This also is a great site

http://www.huevaluechroma.com/index.php

I was thinking about HSV.

In HSV, the hue is unchanged.

In that sense, the hue is the angle-coordinate in the “colour disk”.

That is true for all definitions of “hue” (as far as I know). Hue is always an angle from 0 to 360 degreees, and we can always make a colour disk. But how the angle is defined varies between system. Roughly speaking, there are two type of systems: simple arithmetical systems, and more complex systems that attempt perceptual uniformity.

In the simple arithmetical systems, adding the same constant to the RGB channels doesn’t change hue. In the complex systems, it does, slightly.

(Perhaps I should mention that I am assuming there is no clipping. If an operation causes one channel to clip, that will change the hue.)

Your assumption is right. And thanks for clearing the hue-thing.

The perception is not an issue for me. I’m rather trying (the little I actually can :slight_smile: ) to record facts than affect anyone emotionally. (Well, excluding digging details visible.)

At the moment, my interests are two-fold: at work I’m involved with a thermal image sensor, and at home, I’m figuring out astrophotography. But I guess, that should make it easier, when I don’t need to wrestle with human factors.
The pixel/image manipulations still work pretty much the same way.

I’m here (at the moment - that may change) to find out about the theory of image processing. Maybe I get interested of different kind of photography later. Never say never.

Affinity photo was recently on sale for 50% off and it is a steal at that price… or maybe you have a copy…in anycase

James Ritson has a great series of macros for it related to astrophotography…

Just adding this in based on your interests that you shared and incase you have a copy of Affinity

I think he also has a great set of tone mapping macros…

Most of it is free or contribution only …

I don’t personally do any of this now but it looks vary interesting…

FYI anyways in case its of any use or interest to you…

JR Astrophotography Macros v13 (32-bit & 16-bit)

View PDF Readme

View Video Tutorial

Workflow aids for astrophotography editing, including functions like star eating, motion deconvolution, nonlinear compositing and sharpening and adding star glow. These macros work equally well for both OSC (one shot colour) and monochrome data setups.

  • Perform automated normalisation tone stretching, logarithmic tone stretching, or apply a colour preserving tone stretch (similar to Arcsinh).
  • Multi-Bandpass Sharpening (an implementation of the popular Absolute Point of Focus sharpening method), which enhances perceptual detail and sharpness in a very pleasing way.
  • A variety of composition setups for different data set combinations, e.g. RGB, LRGB, SHO, HOS, HOO, HaOIII, RGB-HSO, HORGB, HORGB-L… the list goes on!
  • Monochrome colour mapping for single grayscale data layers.
  • Add star glow and brilliance to highlight detail.
  • Remove excessive star detail to promote focus on other deep sky objects.
  • Colour range luminosity enhancement to bring out specific detail.
  • Add live, non-destructive star and background masks. Easily reduce background luminosity and star luminosity with additional macros that utilise these live masks so you can easily adjust them non-destructively.
  • Create thresholded star masks.
  • Various sharpening methods: gaussian subtractive sharpening, gaussian kernel edge-mask sharpening, weighted intensity (‘background’) sharpening, non-linear sharpening to avoid ‘panda eyes’ around high contrast star detail.
  • RGB luminosity layers: boost channel detail e.g. for red spectrum objects.
  • Motion deconvolution: remove slight star trailing.

See the included PDF for installation instructions and a detailed explanation of how to use the macros.

Free download

Yes, in the simple arithmetical systems, multiplying each channel by the same constant doesn’t change the hue. The general conditions that need to be satisfied for transformations that don’t modify hues are:

  1. The order of the channels don’t change, ie the same channel is the maximum and the same channel is the minimum.

  2. The following ratio is unchanged:

(mid - min)
-----------
(max - min)

… where max is the maximum value of the three channels, min is the minimum value of the three channels, and mid is the third value.

From condition (2), we can see that multiplying each channel by the same constant doesn’t change the hue, and also that adding the same constant to each channel doesn’t change the hue.

@priort : Interesting link. I have to check it.
I tried to respond yesterday, but I seems that newcomers have daily posting quota, and that posting would have exceeded it. Also sorry, because im my confusion, I didn’t realize, that the “like”-button would probably have worked.

@snibgo : Thanks. Need to keep in mind.

1 Like

That ratio seems to say, that “hue begins after white”?
That is, when the common part (white) is removed.

6 Likes