Showing posts with label photo essays. Show all posts
Showing posts with label photo essays. Show all posts

Tuesday, August 18, 2026

The concept of image gamma

 kw: photo essays, lighting, gamma, image editing, low key, high key, key adjustment, gamma adjustment

I was asked to explain gamma in images. There is a mathematical explanation, but not many folks would have a gut-level understanding of the math. Instead I'll describe the concept: 

Gamma is the relationship between the brightness of the light at every point in a scene and the numbers used to store each point in a pixel and display it. In an image file, adjusting the gamma of the image raises or lowers these numbers to "brighten" or "darken" the image, while keeping the zero and 100% points fixed.

When the gamma equals 1.0 the relationship between light intensity and the stored values is a straight line. In such a case, when a pixel received half the amount of light compared to the brightest pixel in the image, the number stored for it is 0.5 times the maximum possible number. For most digital images, the numbers range from 0 to 255, so the midpoint is 127 (only integers are used, so the extra half a digit is dropped). When gamma is changed for an image to a number other than 1.0, the relationship becomes a curve. The result is an image that appears brighter or darker, as if the exposure had been different.

Adjusting gamma is different from changing the overall brightness. Raising "brightness" using most image editing software just adds the same amount to every pixel's value, and lowering it subtracts a fixed amount from every pixel's value. Just a little of this may be OK for some images, but a more nuanced approach works better.


This is the "Color Curves" tool in GIMP (a freeware program similar to Photoshop). Moving portions of the straight line that goes from lower left to upper right adjusts the relationship between the values in an initial image and those in an adjusted image.

Note that below the histogram the "Curve type" is Smooth. For simple changes, we can click and drag a point on the line up or down. The program obligingly adjusts the image so we can see the result in real time.

If we drag the center of the line upward, for example, the line changes to a curve passing through that point, showing the change caused by adjusting gamma. Dragging a point not at the center uses a different function, related to gamma but not the same.

The next image shows how the curve looks when the center point is raised a little.



The center point started with a value of 128, seen in the "Input...Output" indicators, and it now has been changed to 160.

The whole line was not shifted as a straight line, but is now a curve that passes smoothly from 0 to the midpoint to the upper right at 255.

In terms of gamma, this raises it from 1.0 to a higher amount. The effect on the picture is to brighten the midrange the most, with less and less brightening towards either end of the histogram.

Next I'll show how the red, green, and blue histograms are affected by this change, and then the image itself and its adjusted version. These histograms were produced using IrfanView:



The images I used are small, only 800 pixels across, so the "before" on the left is jittery, and the "after" on the right is positively seismic! In the portion of the histogram that was stretched the values were shifted, which "pulled them apart", leaving "holes" between. The overall shape of the histograms reveal that the values were all shifted to the right (brighter), stretching the leftward (darker) portion and squeezing the rightward portion. 

Next we see first the image I started with and then its adjusted version. The primary visual differences are that more detail is seen in the shadows, the whole shop appears a bit brighter, and there is a little more emphasis on the woman.



The original image was 1,376x768 pixels; these are 800x447. I used a rather short prompt: "The essence of ingenuity with a steampunk vibe", using the Google Flow site, which makes use of the Nano Banana family of art engines for still images. Unless the prompt includes a request for a bright image, or high key, this engine, like all the others I have used, tends to produce medium-to-high contrast, moderately low key (sorta dark) images. Sometimes the image can be quite dark, as we will see.

When I want to adjust gamma only to raise the key of an image, I edit with IrfanView, which has a control to set a numeric value between zero (totally black except those pixels that started out with a value of 255) to 10 (almost totally white). GIMP doesn't use numeric gamma so I don't know the exact value GIMP used for the adjustment I made, but it is probably about 1.2.

Now let's see how gamma adjustment affects images that were deliberately produced at either high key (lots of white) or low key (lots of dark gray and black).

Here is a common treatment of a baby picture: overexposed on a white background. The attached histogram shows that there are very few darker pixels. The slightly dimmer peak at the right is the shadow, barely visible to the left of the baby's head. The "baby pixels" make up the "mountain".


I used a gamma adjustment of 0.75 to bring out more color in the baby's face. Although the shadow is a bit more distinct, I like this picture better overall.


Next, here is a low key example. I have made a lot of images of imaginary caves. This is one of a series I call Spelunker's Paradise, based on a 15-word prompt. While cave imagery tends to be low key, this was the darkest of the bunch. The engine was Ideogram in Leonardo AI. The histogram has a big peak near "black" and not much else, and in the image one can see only hints of the scenery.


I use IrfanView with a gamma adjustment of 1.2 or 1.3 for moderately low key images. In this case more drastic treatment is needed; I first used 1.5:


A lot more is visible. Based on my own spelunking experience, this is probably realistic. However, I also tried a gamma adjustment of 2:


If I were going to print the image for hanging on my dining room wall, this is the version I would use. You can see in the histogram that all but a few of the darkest areas have now been pushed to be brighter than nearly all of the first image. If the gamma were to be raised even higher it would look unnatural.

In all the histograms of gamma-adjusted images, the jitter-to-zero shows that when RGB values were changed to be larger, gaps resulted. The human visual system is very forgiving of small glitches in color. If I wanted to produce an image with strongly adjusted gamma, and still have a smoother color histogram, I would upscale the image 2:1 using Upscayl, adjust gamma, then reduce the result again to the original size. The final image would have a smoother histogram and this would also potentially reduce image artifacts that could show up otherwise.

The key takeaway is that adjusting gamma is like changing the exposure after the fact.

Thursday, May 14, 2026

The Bridge Generation

 kw: book reviews, nonfiction, photo essays, millennials, mini-biographies

This picture, taken twenty years ago, shows my father getting tips on cell phone usage from my son, a Millennial. My father, age 84 in this photo, is of the "Greatest Generation", the generation of World War II and the Korean War, and also of the GI Bill and Suburbia. 

I am a Boomer. Having a son when we were more than forty years old, my wife and I skipped a generation ("X") and produced a Millennial, who now has children of his own, and having skipped yet another generation ("Z"), they are of Generation Alpha. (And yes, I was nearly 75 before the first grandchild was born. A friend close to my age became a great-great grandfather the following year.)

As a Digital Native, our son has vague memories of landline phones and TV's no larger than a coffee-table book, but now has a smart phone (smarter than mine) and a TV that would not fit anywhere in my house; he has numerous friends who are still single and others who are married, and is married himself (plus the 2 kids); and he was in the National Guard for a few years just to make ends meet while stuck as a gig worker but now divides managing a tutoring company with being their lead tutor: I'd call him one of the best of the Millennials. He truly lives on the bridge between generations, more so than either a Gen Xer or a Gen Zer could be. I call Millennials the Bridge Generation.

Charlie Wells is a Millennial who has made his success as a writer. Looking around him at his contemporaries, and having interviewed certain ones to gather a range of context and experiences, he has issued What Happened to Millennials: In Defense of a Generation. Note that there is no question mark. The title is a statement, not a question.

In this searching and panoramic book, Mr. Wells illustrates the arc of history through which his generation has passed to date, focusing on five people who agreed to be interviewed on the record. None of them experienced the straight path to adulthood and settled life that was considered "normal" by their parents and grandparents. But perhaps the term should be "ordinary" rather than "normal". The "ordinary" middle-class life path, "Finish your schooling, get a good job, marry young, have two-to-twelve children, own a home, help your kids raise their kids, stay active in your church, retire well, live long, and die contented," can be derailed at any point, and, truthfully, was honored mainly in the breach, in every generation. So why is "the breach", or many breaches, so visible for Millennials?

Quite simply, pervasive technology. I considered retracing the stories of the author's subjects, but decided instead on five characteristics. I conversed with Gemini and we boiled it down to five images that illustrate characteristics that are spread through the book, and a little of each is found in the life story of each of the five subjects. I will leave it to you to read how the author weaves them together.

Digital Natives were born in or after 1981, the year the IBM PC was released. Affordable laptops followed a few years later. In 1992 the first cell phone costing less than $1,000 was on sale, and by 1996, considered the last year a Millennial was born, some phones could be had for less than $500.

My generation and the one before went from computers that were bigger than a living room (I have a vacuum tube from a computer of that era), to "mainframes" that averaged 8-10 feet long and 5-8 feet high, and on to PC's, and now smart phones. We didn't take classes in computer science; we invented it. The classes came later. Gen X computer professionals could get degrees in computer science. Millennials and Gen Z don't need to; they can easily write apps for their phones if they're so inclined.

The 9/11 disaster and COVID-19 bookended the formative years of many Millennials. The dramatic shifts in work and work/life balance that ensued morphed into much more work-at-home and gig work. Gig Workers may not be the norm, but they are now the mainstay of technocratic middle America. 

By contrast, an increasing number of the contractors and technicians that show up at my house to fix plumbing, install appliances, and repair stuff are Millennials who usually have foregone going to college in favor of working in the trades. They typically earn more than a college graduate with a Humanities degree or even most Science degrees. Case in point among Gen X: The curator of a museum nearby, a woman of about 50 with a PhD, is married to a Lawyer, "so I can afford to be a scientist."

As I mentioned, many of our son's friends remain unmarried. Some probably don't even date. So far as I can determine, the younger a Millennial is, the less likely he or she is to be married or "looking". And those younger ones are now thirty and older. This trend is continuing among Gen Z. This "Plant Parent" is one type of contented single .

Some of the people Mr. Wells writes about got married, some didn't; some are gay, some straight, and one is bisexual; one is in an "open relationship", also called polyamory; two have children.

Many Millennials retain hobbies or pastimes of their youth. That in itself is not unusual: so do most people, and so do I. The difference is that for a great many Millennials, that pastime is online gaming. This often gets coupled with a bit of nostalgia, "retro" gaming with outdated consoles, for example.

I don't know if I fairly represent my generation. I tried some Nintendo and online games, and dropped them. I like Sudoku and non-action-oriented computer games, but I spend more time on various collecting hobbies of my youth (stamps, rocks). Our son, last I checked, is still playing an online team game (I forgot the name), and his team members now live in various cities across the TriState area, but went to high school together.

Obsessive gaming is mentioned in the book for one of the persons. So is drug addiction, for a different person. I have observed that many drug addicts who finally break free of the habit wind up working in the drug treatment and peer counseling fields. This is the case with the man in the book also.

Everyone passes through an introspective stage. Not everyone "gets over it," but usually between thirty and forty we become more secure inside our own skin. Nonetheless, many Millennials are still trying on different "skins", learning who they ultimately are or will be.

The phenomena of "the Sixties" characterized this stage for my generation. Gen Z is right in the midst of their own, while most Millennials have gotten on with life. As I recall, in one episode of All in the Family, Edith tells her daughter Gloria, "At some point, you have to do the laundry and clean house." The oldest Millennials are now forty-five, and the youngest, about thirty. So I'd say about half of them have "aged out" of the introspective phase. 

This is not really a review of the book, but of the ideas that swirl through it. Whatever age you may be, I am sure reading it will evoke thoughts of your own. If so, I hope you'll come back to this post and add a comment.

Monday, January 12, 2026

Circling the color wheel

 kw: color studies, spectroscopy, colorimetry, spectra, photo essays

Recently I was cleaning out an area in the garage and came across an old lamp for illuminating display cases. The glass bulb is about a quarter meter (~10") long. It's been hiding in a box for decades, ever since I stopped trying to keep an aquarium. It has a long, straight filament, which makes it a great source of incandescent light for occasional spectroscopic studies I like to do.


(The metal bar seen here is the filament support. The filament itself is practically invisible in this photo.)

This prompted me to rethink the way I've been setting up spectroscopy. Before, I had a rather clumsy source-and-slit arrangement. I decided to try a reflective "slit", that is, a thick, polished wire. As a conceptual test I set up a long-bladed screwdriver with a shaft having a diameter of 4.75mm. It isn't as badly beat up as most of my tools, and the shaft, some 200 mm long, is fresh and shiny. Based on these tests, I can use a thinner wire, in the 1-2 mm range, for a sharper slit. Later I may set up a lens to focus light on the wire for a brighter image.

I threw together a desk lamp and baffle arrangement, put the camera on a tripod with a Rainbow Symphony grating (500 lines/mm) mounted in a plastic disk that fits inside the lens hood, and produced these spectra. I also made a test shot with my Samsung phone and the grating, to see if I had sufficient brightness. Then I put various bulbs in the desk lamp and shot away. Here are the results. Each of the photos with my main camera shows the "slit" (screwdriver) along with the spectrum, to facilitate calibration and alignment of the spectra. Not so the cell phone image, which I fudged into place for this montage. The montage was built in PowerPoint.


The first item I note is the difference in color response between my main camera and the cell phone. The camera's color sensor cells have very little overlap between the three primary color responses, red, green and blue, so the yellow part of the spectrum is nearly skipped. The rapid fading in blue is a consequence of the very small amount of blue light an incandescent lamp produces. The cell phone sensor has more color overlap, more similar to the eye.

The two spectra in the middle of the sequence are both of mercury-vapor compact fluorescent bulbs. The white light bulb takes advantage of a few bright mercury emission lines, and adds extra blue, yellow, and orange colors with phosphors, which are excited by the ultraviolet (filtered out and not seen) and by the deep blue mercury emission line that shows as a sharp blue line. In the UV lamp, a "party light", the ultraviolet line at 365 nm is the point, and visible light is mostly filtered out; just enough is allowed out so that you know the lamp is on. There is also a phosphor inside that converts shortwave UV from mercury's strongest emission line as 254 nm to a band in the vicinity of the 365 nm and 405 nm lines; it shows as a blue "fuzz" here. The camera sensor has a UV-blocking filter, which doesn't quite eliminate the 365 nm line, so you can see a faint violet line where I marked it with an arrow. The emission lines visible in this spectrum are:

  • 365 nm, near UV
  • 405 nm, deep blue
  • 436 nm, mid-blue (barely visible, directly below the mid-blue line shown in the Compact Fluorescent spectrum)
  • 546 nm, green
  • 577 & 579 nm, yellow, a nice doublet, and I'm glad the system could show them both
  • 615 nm, red-orange, quite faint

I was curious to see if my "bug light" was really filtering out all the blue and UV light, and it seems that it is. There are still insects that get attracted to it, probably because they see the green colors. The "warm white" spectrum shows that the blue LED excitation wavelength is at about 415 nm, with a width of about 20 nm. Modern phosphors used in LED bulbs are quite wide band, as we see here, which makes them much better for showing true colors than the CFL bulbs we used for several years.

With a bit of careful looking, we can see that the LED bulbs don't have red emission quite as deep as the incandescent lamp does. That is the reason that for some purposes specialty lamps such as the CREE branded bulbs have a special phosphor formula with a longer-wavelength red end.

I also got to thinking about the way most of us see colors these days, on the screen of a computer or phone. The digital color space contains exactly 16,777,216 colors. Each primary color, R, G, and B, are represented as a number between 0 and 255, although they are very frequently represented as hexadecimal numbers from #00 to #FF, where "F" represents 15 and "FF" represents 255. The fully saturated spectral colors, also called pure colors, for which at least one of the three primaries is always #00 and at least one is always #FF, are then comprised of six sets of 255 colors, for a total of 1,520 virtual spectral colors…except that 2/3 of them are red-blue mixes that are not spectral colors. They are the purples. Note that violet is the bluest blue and is not considered a purple color, at least in color theory. The rest of the sixteen million colors have values "inside" the numerical space defined by the "corners" of the RGB space.

I prepared a chart of the pure colors, a dozen sections of the full "color wheel", which we will see is actually a color triangle. The RGB values for the end points of each strip are shown at their ends. "7F" equals 127, halfway from 00 to FF. They are separated as to spectral colors and purples.


To name the twelve colors at the ends of these sections, in order, with full primary colors in CAPS and the halfway points in lower case:

RED - orange - YELLOW - chartreuse - GREEN - aqua - CYAN - sky blue - BLUE - purple - MAGENTA - maroon - and back to RED.

To see why I spoke of "color triangle" let us refer to the CIE Colorimetry chart, based on publications in 1931 that are still the definitive work on human color vision. I obtained the following illustration from Wikipedia, but it was low resolution, so I used Upscayl with the Remacri model to double the scale.


There is a lot on this multipurpose chart. Careful work was put into the color representations. Though they are approximate, they show in principle how the spectrum "wraps around" a perceptual horseshoe, with the purples linking the bottom corners. The corners of the white triangle are the locations in CIE color space of the three color phosphors in old cathode-ray-tube TV sets. The screens of phones or computers or modern television sets use various methods to produce colors, but all their R's cluster near the Red corner of the diagram, all the B's cluster near the Blue corner, and all the G's are in the region between the top tip of the white triangle and the tight loop at the top of the horseshoe. Getting a phosphor or emitter that produces a green color higher up in that loop is expensive, and so it is rare.

I added bubbles and boxes to the chart to show where the boundaries of the colored bars are in the upper illustration:


 

I think this makes it clear that the "color wheel" we all conceptualize turns into a "color triangle" when it is implemented on our screens. All the colors our screens can produce are found inside the triangle anchored by the R, G, and B color emitters.

Monday, September 15, 2025

A star in a circle in Nevada

 kw: photo essays, investigations, maps, satellite photographs

It is interesting to peruse odd things people post about what they've seen on Google Maps or Google Earth. Recently I saw a few items that include these coordinates: 37°24'05.7"N, 116°52'06.1"W, which are easier to enter into GEarth (which I used) or GMaps as 37.40158, -116.86781. When you do, this appears:


Note, the accuracy of the coordinates with degrees-minutes-seconds, in tenths of a second, is just over 3 meters or 10 feet. The accuracy of coordinates with decimal degrees, reported to five digits after the decimal point, is 1.1 meters or 3.6 feet. I converted the one to the other, and the fifth decimal is effectively a guard digit, having excess precision.

What is this circle-star figure in the Nevada desert? Spoiler alert, if you want to call it that: I still don't know. This is a report of a journey that hasn't reached the destination. The outer circle is 242.5 m (796 ft) in diameter. The inner circle is less regular, and is about 150 m (490 ft) across. The figure is not really very large.

I first looked back in time, which is why I did this in Google Earth. The earliest clear satellite photo is from 2003, where it appears that some recent activity had taken place:


I shifted the view a little when making this screen capture, to show a series of small craters in the desert floor to the east of the figure. The craters are about 10 m (~34 ft) in diameter. I'll return to them in a moment.

The six squares in the six triangles each contain some darkish object. In 2003, which is less clear, they look like they may be battle tanks. This closeup of the area in 2022 shows something quite different:


Three of the items are seen. They look like missiles. I can't even guess about the object at the center of the figure. This is the sharpest image available at present. I wonder what the missiles are defending?

The 10 meter craters are probably bomb craters. They are much too small to represent nuclear munitions. This image shows craters from fission bomb tests in the 1950's at the Nevada Test Site (as it was popularly called):


This image has the same scale as the prior two. The central blast-exit holes are much larger than 10 m, and the collapse craters are in the 100-150 m range. Here is an overview of a 7x10 km portion of the Nevada Test Site as it appears today:

This area is about 80 km (50 mi) SSE of the circle-star figure we are looking at. The Test Site is in an area now administered by the Dept. of Energy, while our figure is in the middle of the Tonopah Test Range. Both are portions of the Nellis Air Force Range Complex, and entirely surrounded by BLM lands.

I would say that our figure is in a pole of inaccessibility. I decided to look nearby for more clues. About 2.5 km (~1.5 mi) to the west we find an interesting complex:


This image from 2022 shows three walled areas. What look like structures are really various things. The block to the left appears to contain ammunition dumps. The brown square inside a small walled area at lower center seems to be a very old metal building with holes in the roof. What look like small buildings to the right and upper center are mostly various assemblages of shipping containers. Note the black shadows of some kinds of pillars at the corners and midpoints of the walls around two of the sections. Based on a visit I made to a Minuteman missile silo I made many years ago, I surmise that these are motion detectors. I looked back into time:


The images are dated. The earliest one that is somewhat clear is from 2003. The image from 1985 (Landsat, which was the epitome of high resolution at the time!), shows at least that the complex was there already. I suspect it dates from the 1950s. The pillars are seen in the 2014 image, not before. Each image shows a different arrangement of shipping containers. The ammunition bunkers, if that is what they are, appeared after 2014 and before 2020 (which I didn't show here). The square brown thing also appeared after 2014. That's all I can extract from these images at this resolution.

Another area about 3 km (~2 mi) NNE of our figure looks like an early layout for the roads of a suburb:

The area of this image is 3.5x5 km. I included the circle-star so we can see how close it is. The dark spots along cross-shaped portion midway along the connecting road may look like dwellings at this scale, but they are really arrangements of shipping containers.

For this area also I looked into the past. I went back until the "roads" looked fresh, in 2006. The prior year, they are not present at all:


The option that comes to mind is the intention to build a fake suburb to blow up with a nuclear bomb, such as was done elsewhere; a video about one is here. The atmospheric test ban treaty (1963) would have put an end to it.

Earlier I called this area a "pole of inaccessibility." When you enter the coordinates of this point into Google Maps, it is labeled Pahrump, Nevada. However, the actual town of Pahrump is 150 km (93 mi) to the NNE. The nearest paved highway is US 95 (quite different from I-95 along the east coast), about 20 km (12 mi) to the SW. I could find no roads of any kind connecting US 95 to the dirt roads in this area.

Some dirt roads go north, but not in any straightforward way. A broad valley between this area and US 6 some 75-80 km (47-50 mi) to the north is crisscrossed by ephemeral dirt roads. US 6 goes between Tonopah and the real Pahrump, and further to the NE. In other directions, the picture is the same. I suspect the only way to get "here" is by helicopter…unless you walk, and can carry about ten gallons of drinking water. Even in winter the dry Nevada air will suck at least a gallon per day out of you; been there, done that.

Searching out roads to the north I encountered this (the area is about 10x16 km, or 7x10 mi):


Near the center of the concentric circular arcs is a hiking area called "Nye's Giant Target" on Google Maps; it has the sublabel "(small)". This image is from 2012, when the lines were clearer; they have suffered wear through time. Maybe this is a desert version of a crop circle…

There you have it. My speculations, or rather semi-educated guesses. There's no solution to these mysteries outside of military records that have probably been almost forgotten. It is simply fun to traipse around—virtually—to see what is out there.

Friday, September 05, 2025

Fluorescence on the porch

 kw: photo essays, fluorescence, ultraviolet, spectra, diffraction gratings

This is a look into a bag of plastic rings taken from cottage cheese containers, illuminated with a UV "party light", or "black light". A number of food products are sold with such rings sealing the tops. They are polypropylene, which is not fluorescent by itself; manufacturers add a fluorescent tracer for reasons known only to them.

I happened upon this when I saw a glint of blue on a sunny day, in the grass near a Dunkin Donuts shop. It turned out to be a piece of plastic from a soup container. Later I found that the plastic rings that seal my favorite brand of cottage cheese are the same material. I like fluorescent stuff, so I've been collecting these ever since, as UV detectors. As you may conclude, I eat cottage cheese a lot; I have some with my breakfast at least twice weekly.

You may have heard of UV-detecting beads. They slowly change color in sunlight or when exposed to a UV lamp. There are several colors, but they all are clear once they've been away from a source of UV for a few minutes. The bonus of the fluorescent plastic is that it responds instantly.

Here I have a piece of the plastic hanging from a curtain rod in our sun porch. Some UV-sensitive beads are hanging with it, but their color change was rather subtle at the time this picture was taken. The blue tint of the plastic ring is evident…not overpowering, but evident.

This is a fresh ring. I noticed that, after six months in the sunny window, the ring that was there wasn't showing such bright fluorescence, and appeared more greenish. I replaced it with this new one and took it into my workshop to evaluate.

This photo under UV light shows the old ring on the right and a new one on the left. To the camera, they look very similar, but they look quite different by eye. This is at least partly because the camera sensor's color response is different from that of our eyes, and partly because the sensor can record UV, which is invisible to us. Also in the photo is a syringe I use for lubricating small parts, and also a reflection of the illuminating lamp, seen at the top of the photo. The desktop is dark brown Formica.

I decided to take a crude spectrum of these two pieces of plastic under UV illumination. I used this diffraction grating from Rainbow Symphony (the current price is $15 for a pack of 25). 

This grating has 500 lines/mm, which corresponds to 12,700 lines/inch. I have an old sheet of grating material from Edmund Scientific with 13,600 lines /inch, or 535 lines/mm, but it is harder to handle than these convenient slide mounts. Rainbow Symphony also sells gratings with 1,000 lines/mm, for those who want to photograph spectra at higher resolution.

This is the spectrum of the party light, tilted so that a sliver shows past the lampshade, at the left, with the main spectral lines noted. The filter isn't perfect, so visible lines of mercury come through. The very strong line pair centered on 406 nm gives the lamp its distinctive bluish-violet look, but it appears pure blue to the camera. There is also a faint orange-red line that I surmise is fluorescence from the filter material inside the lamp; mercury doesn't have a 620 nm line. Note how the 578 nm line pair appears yellow-green in the photo; to the eye it appears yellow-orange.

The UV wavelength that makes the plastic fluoresce is 365 nm. The camera can see it, as the photo shows. It is not visible to the eye, unless you have had a cataract operation; the natural lens of the eye is yellowish and filters it out. The strongest spectral line of mercury is 256 nm, but that won't pass through glass. A phosphor in the lamp filter fluoresces at 365 nm, increasing the efficiency of the lamp.

For reference, sunscreen and UV blocking sunglasses need to filter out all wavelengths shorter than 400 nm, or even 450 nm (mid-blue). In commercials, UVA refers to wavelengths near 365 nm, and UVC refers to 256 nm and nearby wavelengths. The middle range, called UVB, in the 320 nm range, doesn't have a convenient mercury spectral line to use for testing. Sunlight has a continuous spectrum of light that makes it through the atmosphere, from 180 nm in the deep UV (UVD) to 2,000 nm (mid-infrared).

This is a montage of the spectra of the two rings. I could have sharpened them by adding a slit above, but these spectra serve the purpose. The upper part shows the fresh plastic ring's spectrum. It fluoresces in the range from blue to green, with blue being brighter. The mix of blue and green makes the fluorescence of the ring look blue-white rather than deep blue.

The lower part shows the spectrum of the old, faded ring. There is less blue, but the green is unchanged. Thus, to the eye it appears greenish and dimmer when sitting in sunlight. That gives me a good reason to keep a bagful of these rings. About twice yearly I need to replace the "UV detector" in my porch window with a fresh ring.

These are useful to me, to remind me to wear sunglasses outside. I already have cataracts, but they aren't so bad that I need cataract surgery…yet. The more diligent I am to protect my eyes from UV, the longer I can do without it.

Sunday, March 30, 2025

An image and its squeezed version

 kw: ai experiments, simulated intelligence, art generation, photo essays

Time to drop the other shoe. The first image is the square rendering that Gemini produced when asked to create "A desert scene with exaggerated mesas and steep mountains around an alluvial valley, extremely clear air, digital art". I used IrfanView to resize from 2048x2048 to 2048x1152, for use as wallpaper on an HD monitor. Note that the air isn't as clear as I'd have liked, but the training images probably all have haze in the background.







Saturday, March 29, 2025

Squeezing a generated image

 kw: ai experiments, simulated intelligence, art generation, photo essays

I find various ways to get around the "square image" limitation of Gemini. Dall-E3 also makes square images initially, but then one at a time you can select "Resize" and "4:3", which actually produces an image 1792x1024, or 7:4. I used Dall-E3 as a test bed, using a prompt that requests a vertically-exaggerated image. It could then be vertically squeezed from square to a 16:9 aspect ratio and still look realistic, or at least pleasing. One of these three images was produced by the Resize function, and then cropped to 16:9, and the other two began as square images that were squeezed by anisotropic resizing in IrfanView to 16:9. Let me know in a comment if you can see which of the three is the unique one, unsqueezed.






Thursday, January 30, 2025

Training matters – a lot!

 kw: experiments, simulated intelligence, generative art, photo essays

The following two images share something important:



What is that something? It is this prompt:

The essence of ingenuity

I selected the first image because it is the best of the images that includes a person, and the best overall. The other is shown because it is the best of those that do not include human figures (the great majority). These, and other images to be seen below, share one other, possibly equally important attribute: Each is the cream of between ten and forty images generated by that prompt in a particular art generator, as influenced by various settings offered by the different programs.

I used the prompt above with five art generators: Dall-E3 (Bing's Image Creator), DreamStudio, Gemini (which runs Imagen 3), ImageFX (Imagen 3 running in Google Labs), and Leonardo AI. I frequently use one or more of these programs to produce wallpaper for my computer, which has HD screens with 1920x1080 pixels. Thus, these were all produced with a "16x9" setting. In another post I'll get into the actual pixel ratios the programs use and how I cope with that.

My current session resulted in 22 images. When I noticed I had substituted "innovation" for "ingenuity" while working with DreamStudio, I went back and worked with it some more, producing four more images.

My workspace is the Downloads folder. I run Google One and my main storage area for images is OneDrive. I do this to keep intermediate or early files, that may be discarded later, from being transferred to OneDrive or backed up. Once I have a final set of images to keep I move them to permanent folders in the Pictures area.

A montage of six of the images will help me describe other aspects of my methods:


We have here a screen capture from the Downloads folder. Each program has its method of naming a file. Dall-E3 (DE3) uses a long string of alphanumerics, which probably encode the binary seed and other information. Right after I download an image I rename the file according to a scheme I worked out that includes an abbreviation for the program name, the date, a sequence number, the prompt, and a prompt modifier. In the cases shown here the modifiers, if used, are suffixes. For three of them the modifier is "retro panavision", and you can see that the program responded with Steampunk cameras in various settings. For two images I added "cinematic landscape", which yielded a filmlike atmosphere. Then "digital art", which was the first suffix I tried, also produced a steampunk vibe, and included some persons. Note that each of these images is one of many; others weren't kept. Let's look at some more:


DreamStudio includes the seed number in the file name, so I retained it. It also includes the first 30 characters of the prompt. Note the word "innovation", an error on my part. Thus the lower three images are a kind of ringer. We'll come back to DS. Above them are the first three items from ImageFX. When you download one of these, the file name is just "image_fx_". If the file isn't renamed, the next one is "image_fx_(2)", and so forth. ImageFX doesn't keep your history. It is free and there is no paid version.

The image I kept from running it without a modifier shows five apparently ingenious people doing stuff. When I added "digital art", I got abstract art. I downloaded four of these, two shown here, and two in the next montage:


Three of the abstract images look like impressionistic evocations of a galaxy. ImageFX offers buttons to push to add modifiers, or you can type your own. "Cinematic landscape" yielded a city scape in a valley; I've noticed that many pictures made from a prompt that mentions "landscape" have the "X" arrangement we all learned in kindergarten. The upper arms of the X are the flanks of mountains and the lower arms outline a river valley. Finally, "retro panavision" produced, not a camera, but an ingenious tinkerer in his workshop. This is my most favorite from this project, which is why I set it at the top of the post. Another montage:


These are the Leonardo AI offerings. This program will of course pay attention to modifiers or suffixes as normal parts of the prompt. I offers a rich set of Style and Substyle settings, which I abbreviated in the early part of the file names. Note that five of these images have a Steampunk look. That's not just because I like Steampunk, but because with certain Styles, with this prompt, that's nearly all that was offered. I really like the produce market image. I consider it "most different" from the others.

We round out the experience by making up the error I made when I ran DreamStudio the first time. Here is the final montage:


With DS, one can add modifiers, and there are also 16 Styles you can set with a button, including "Enhance" and "Digital Art". Without a Style set, we get kind of clunky Steampunk, at upper left. With "Enhance", the results were all architectural! "Cinematic" yielded Steampunk vibe on a city-wide scale.

Looking at all these makes me wonder what training data was used for each of the programs. I also wonder if the preset Styles in some of them have training subsets associated with them. All I can do at present is to continue to experiment, so I get a feel for the kind of vibe or atmosphere I want a picture to have.

These programs all had very different training sets. Short prompts like the one used here bring this out the best. However, even very long prompts cannot force conformity. There is just too much latitude in an image for every detail to be pinned down. This is one reason I keep lots and lots of images from these experiments. When I am considering a picture I want to produce, I can look through my "collection" as an archive, a library of "looks".

But…nothing beats playing around with the prompt's wording, suffixes, modifiers, Styles, etc., etc. I'll show one more favorite, a bigger version of one of these last four:


It's kind of compelling…