Kevin Reid AG6YO

Dec 20, 2024 20:07
I updated my answer to mention the negative color component problem.
Dec 20, 2024 18:15
But I am not familiar with best practice for adapting to out-of-gamut colors, so I cannot comment very much there.
Dec 20, 2024 18:14
For a simple example of how tone mapping interacts with color, if you start with a real-valued nonlinear function and apply it to to each RGB channel independently, then you have an overall tone-mapping function that desaturates bright colors, which is in one sense an accident of the math, but it also generally produces perceptually good results compared to trying to preserve color and remap only intensity.
Dec 20, 2024 18:10
I'm not sure of the proper terminology here. Tone-mapping in the general case does include possible color shifts, but it might be more correct to talk about “gamut mapping”.
Dec 20, 2024 16:38
But, most of the pixels in your current scene shouldn't end up greater than 1 in the final output. Your current scene doesn't contain e.g. the sun, or any bright reflections. The point of not clamping is to avoid disrupting what individual rays are doing, but individual rays each have a very small contribution to the final image.
Dec 20, 2024 16:36
Then in the final stage, when you do need to store the output in an actual image that will be displayed on an actual screen, if you are not writing a HDR output file, you need to perform tone mapping which decides how to handle the greater-than-1 (“overexposed”) values. Clamping to a maximum of 1 is the simplest possible tone mapping function.
Dec 20, 2024 16:33
Clamping to min 0 is also a display limitation but it's about the display gamut, not brightness, so you will get better color by not doing that until the final output after all accumulation (averaging) is done, because two out-of-gamut colors might mix to an in-gamut color.
Dec 20, 2024 16:33
In general, you should always be using non-clamped rather than clamped RGB (at least, not clamped to max 1) for any value representing light passing through your scene. The 1 value does not mean anything physical whatsoever; it only represents the maximum output of the display device (in SDR) or the arbitrary “reference white level” (in HDR).
Dec 20, 2024 16:07
It shouldn't matter whether you accumulate rays in XYZ or linear RGB as long as you don't do anything at all non-linear to it before you average.
Dec 20, 2024 16:06
Regarding the difference between the two procedures you describe, I'm not sure, but the obvious potential culprit is "Convert to sRGB. Clamp to [0,1]. Average.". Clamping is a non-linear process, so you should average before you clamp.
Dec 20, 2024 16:02
By "sampling" I meant: sampling from that distribution, however you do it. Either strategy should work. I do not have any actual experience with sampling in path tracing and cannot advise you what would be better there.
Dec 20, 2024 09:42
“a function to convert directly from wavelength to RGB” — That function is just combining the two operations “determine the intensity of D65 at that wavelength” and “find the RGB representation of this color of monochromatic light”. That’s a reasonable thing to do since they both depend on wavelength. The disadvantage is that it bakes in D65, so you can’t specify an arbitrary SPD for each light source, only change the RGB components of the result (which is basically doing the white-balance step I mentioned) and so you don't have control over the behavior within the scene of the full spectrum.
Dec 20, 2024 09:42
@TomClabault “Also, is there a way to avoid "sampling" the distribution?” — No, because each ray’s direction is wavelength-dependent, so you can’t use one ray for more than a single wavelength, so you’re always sampling in some sense.
Dec 20, 2024 09:42
"If I choose D65 as my distribution, it's rather the diamond that is going to match the background, correct?" — Yes, that's correct. But if you hard-code just D65 then you will still have a problem if you want to work with non-white light sources. Starting with the SPD as the definition of the light’s color means everything is consistent. (I added a paragraph on why you shouldn’t start with RGB.)
 

 The Pod Bay

General discussion for space.stackexchange.com. Check our sche...
Dec 10, 2020 00:49
Well, whatever color name one uses, to my eye, the added color in the flame does look like copper. So, no mystery about the color — just that nobody's said how the copper got there.
Dec 9, 2020 23:48
(and judging by the way the metal crumpled in-place just before the fireball, it indeed hit the ground square on, too hard)
Dec 9, 2020 23:45
And, his word on the landing trouble: "Fuel header tank pressure was low during landing burn, causing touchdown velocity to be high & RUD" — twitter.com/elonmusk/status/1336809767574982658?s=20
Dec 9, 2020 23:43
I was wondering about the green (and searching space.stackexchange.com about it) myself and found a prior mention of "Vaporized some copper" ( twitter.com/elonmusk/status/1093428938871779328) but not any explanation of where the copper came from.
 

 Ham Shack

General discussion for ham.stackexchange.com
Nov 18, 2020 16:25
(For the record, I've just created a private chat room to discuss the matter.)
Nov 18, 2020 16:09
I see. I pinged Mike but he isn't online at the moment and I don't have context.
Nov 18, 2020 16:04
(looks like chat.stackexchange.com is having some problems.)
Nov 18, 2020 15:59
Depends on the situation:
For public information, a post on Meta is appropriate. If you've been contacted by moderator message, all moderators can see the replies. If it needs to be private otherwise, we can create a private chat room.
Nov 6, 2020 19:45
Sure, that makes sense for a comprehensive canonical answer.
Nov 3, 2020 23:58
@MikeWaters I understand rclocher3 to be proposing writing a canonical question: that is, one written to be more general than a typical example of its kind. "I'm receiving a signal I don't recognize. How do I find out more?" — rather than a question with specific recordings, frequencies, etc.
Oct 24, 2020 00:47
Of course, I could and haven't…
Oct 24, 2020 00:47
I wish someone would post an argument for or against.
Oct 19, 2020 19:51
I would have recommended creating a meta question to gather arguments & votes for/against before adding the tag. It's not too late now.
Oct 19, 2020 19:49
(and therefore whether they should read or ignore those questions, if they're reading rather than writing)
Oct 19, 2020 19:49
It's not objective enough to have a clearly defined scope so that people can understand which questions it belongs on.
Oct 19, 2020 19:48
I mean the tag shouldn't exist; it's not a very useful classification. Something being a "beginner question" depends on where you're beginning from.
Oct 19, 2020 19:24
@MikeWaters I don't think that tag is a good idea. meta.stackexchange.com/questions/59077/…
 
Aug 27, 2020 22:54
You're welcome. Bye!
Aug 27, 2020 22:51
Sometimes working on that simplification process can even let you find the problem yourself!
Aug 27, 2020 22:51
I'd recommend that you post a new question to catch the attention of someone who is. However, before you do that, please try to simplify your code — it'll make it easier for someone to help you. Try to make a smaller example that demonstrates the same problem (all one class in the output), even if it doesn't even attempt to compute the answer you actually want.
Aug 27, 2020 22:50
So it is. Unfortunately, I'm not very knowledgeable about the uses of classifiers.
Aug 27, 2020 22:49
OK, are you all set now?
Aug 27, 2020 22:45
That should fix the error.
Aug 27, 2020 22:45
(It's a property on the collection, not the individual features.)
Aug 27, 2020 22:45
That way you get the band_order property preserved.
Aug 27, 2020 22:44
var samples = addClass(A_samples, 1)
    .merge(addClass(B_samples, 2))
    .copyProperties(A_samples);
Aug 27, 2020 22:44
Oh, I see.
Aug 27, 2020 22:43
Er, sorry, that was irrelevant, since stack isn't being used as training data.
Aug 27, 2020 22:43
Oh. stack is not from Image.sample()
Aug 27, 2020 22:42
Though, I notice the documentation says "This argument is optional if the input collection contains a 'band_order' property, (as produced by Image.sample)." Since we're in fact using Image.sample, I don't know why that isn't applying here.
Aug 27, 2020 22:41
Yes, same idea for any classifier.
Aug 27, 2020 22:41
Or if you wanted to train on all of the bands it would be {features: samples, inputProperties: bandnames} since you already have var bandnames. But I'm not a ML expert and can't tell you whether training on all the bands is a good idea or a bad one.
Aug 27, 2020 22:40
change this to .train({features: samples, inputProperties: [<insert your property/band names here>]})
Aug 27, 2020 22:39
var cls = ee.Clusterer.wekaKMeans({init:3, nClusters:9, maxIterations:100, seed:587})
                              .train(samples);
Aug 27, 2020 22:39
to list the properties you want your classifier to be trained to classify based on
Aug 27, 2020 22:38
You need to specify the inputProperties parameter to train()