Zerene Stacker having trouble with coin edges

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

kaleun96
Posts: 270
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Zerene Stacker having trouble with coin edges

Post by kaleun96 »

I'm consistently running into a problem with Zerene Stacker when it comes to focus stacks of coins and am hoping someone here (if not Rik himself) might have some ideas about how to fix it.

The issue is that in a PMax stack (left), the edge of the coin becomes almost translucent and the edges are a bit jagged. While with a DMap stack (right), the edges are smooth and solid but there's a lot out out-of-focus areas where it seems like it has skipped some images in the stack (it may not look too bad in this comparison but there are significantly worse areas elsewhere along the edge). These aren't one-off issues but ones I consistently face so I always stack using both methods and then pick the one that turned out slightly better. I could of course fix either of them with the adjustment tools in Zerene but I take a lot of these photos so i'm looking for something that will be more efficient for my workflow than manual touching-up.

I've also attached screenshots of the full images just so you can get some context.
Attachments
coin_edge_small.jpg
coin_side_by_side_small.jpg
- Cam

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Zerene Stacker having trouble with coin edges

Post by rjlittlefield »

Cam, this exact problem has some unusual aspects so I would be interested to receive a copy of your source images. Please email me as support@zerenesystems.com if that's a possibility.

That said, I think the general problem is that your background is so bright that you're getting troublesome specular reflections of background light glancing off the rounded edges of the coin.

To explain my thinking...

PMax is in the business of showing the strongest detail (local variation in brightness) that is visible in any frame. But it does not care which frame. That is, depth does not matter to PMax. So, when I see bright spots along the edge of the coin in the PMax output, I'm quite confident there were bright spots in those places in some source frames. However, those spots were not necessarily concentrated and bright in the same frames where the surface of the coin was focused.

The fact that you're getting isolated spots of blur in DMap also suggests that something funny is going on in the out-of-focus frames. In DMap, blurred spots are produced when the depth map separates from the physically correct surface, so that DMap ends up selecting pixel values from out-of-focus frames. When the geometry is complicated, like shooting a tree that has foreground/background overlaps in its branches, some amount of depth map separation is inevitable around the foreground/background transitions. But a coin does not have physical overlaps like that. Instead, for DMap to get confused with a coin, it has to be seeing something in out-of-focus frames that makes it think those are the frames that contain "detail" that should be preserved. My best guess is that it's triggering off the edge of the OOF blur of that bright background, as it expands across the face of the coin.

I see two approaches that might be helpful and simple.

First is to adjust the DMap settings to pay more attention to fine detail. To do that, start by going to Options > Preferences > DMap Settings, and drag the Estimation Radius down to smaller numbers. The default setting is 10, which corresponds to considering 21x21 pixel areas. That default evolved to handle stacks shot by newbies, which for various reasons often don't have a lot of fine detail. But in the image you've shown here, there is lots of pixel-level detail that can provide a reliable indication of best focus. For starters, I suggest cranking the estimation radius way down, to around 2 pixels (so, a 5x5 square). Then when DMap pauses to set the contrast threshold, adjust the slider to a level that masks all the background (except for a narrow ring around the coin), and also masks a lot of small spots over the surface of the coin. That combination will force DMap to pay attention to only the finest focused detail, which should make it a lot less sensitive to OOF edges even if they started quite high contrast. I'm thinking that the contrast threshold mask should look something like this: (Note that I've changed the color of the mask to make it easier to see, as described HERE.)
CamsCoinDMapSettingMask.jpg
Second would be to make that background less bright during shooting. I assume you've made it so bright because you eventually want a pure white background in the final image and just shooting it that way seemed like a good idea. The difficulty is that the brighter the background, the more vulnerable you are to stray reflections, causing the effects you've shown here. An alternative is to have less background light when shooting, then use mask selection tools in Photoshop etc. to replace the background in post-processing. It's tempting to think of using a "green screen" technique in which the background is also a different hue that can be used for selection, but that causes reflections around the edge of the coin to pick up the color of the background, which creates an artifact of its own after the background is swapped out. So, I'd be inclined to keep a neutral color, but a uniform brightness, and take advantage of Photoshop's "magic wand" with contiguous pixels to do the selection. In the small sample posted here, it takes just a couple of clicks to get a clean selection of background versus coin in the DMap output.

A third approach, which I think is serious overkill for this application, would be to use structured illumination similar to what's discussed in patta's thread on "How to photograph a profile?" The idea there is to orient the illumination rays so as to eliminate reflections of background except very near the edge. This sort of structured lighting is effective, but I expect it's also far more trouble than it's worth for coins.

I hope this helps!

--Rik

kaleun96
Posts: 270
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Re: Zerene Stacker having trouble with coin edges

Post by kaleun96 »

rjlittlefield wrote:
Sun May 29, 2022 11:44 am
Cam, this exact problem has some unusual aspects so I would be interested to receive a copy of your source images. Please email me as support@zerenesystems.com if that's a possibility.

That said, I think the general problem is that your background is so bright that you're getting troublesome specular reflections of background light glancing off the rounded edges of the coin.

To explain my thinking...

PMax is in the business of showing the strongest detail (local variation in brightness) that is visible in any frame. But it does not care which frame. That is, depth does not matter to PMax. So, when I see bright spots along the edge of the coin in the PMax output, I'm quite confident there were bright spots in those places in some source frames. However, those spots were not necessarily concentrated and bright in the same frames where the surface of the coin was focused.

The fact that you're getting isolated spots of blur in DMap also suggests that something funny is going on in the out-of-focus frames. In DMap, blurred spots are produced when the depth map separates from the physically correct surface, so that DMap ends up selecting pixel values from out-of-focus frames. When the geometry is complicated, like shooting a tree that has foreground/background overlaps in its branches, some amount of depth map separation is inevitable around the foreground/background transitions. But a coin does not have physical overlaps like that. Instead, for DMap to get confused with a coin, it has to be seeing something in out-of-focus frames that makes it think those are the frames that contain "detail" that should be preserved. My best guess is that it's triggering off the edge of the OOF blur of that bright background, as it expands across the face of the coin.

I see two approaches that might be helpful and simple.

First is to adjust the DMap settings to pay more attention to fine detail. To do that, start by going to Options > Preferences > DMap Settings, and drag the Estimation Radius down to smaller numbers. The default setting is 10, which corresponds to considering 21x21 pixel areas. That default evolved to handle stacks shot by newbies, which for various reasons often don't have a lot of fine detail. But in the image you've shown here, there is lots of pixel-level detail that can provide a reliable indication of best focus. For starters, I suggest cranking the estimation radius way down, to around 2 pixels (so, a 5x5 square). Then when DMap pauses to set the contrast threshold, adjust the slider to a level that masks all the background (except for a narrow ring around the coin), and also masks a lot of small spots over the surface of the coin. That combination will force DMap to pay attention to only the finest focused detail, which should make it a lot less sensitive to OOF edges even if they started quite high contrast. I'm thinking that the contrast threshold mask should look something like this: (Note that I've changed the color of the mask to make it easier to see, as described HERE.)
Hey Rik, thanks for all the suggestions, will try some of them now and give it a shot. I wasn't aware of the "Estimation Radius" setting and that sounded like a good one to start with so I just gave it a go and the results are much better! Left is the original DMap from earlier, right is the DMap with Estimation Radius set to 2px and the Contrast Threshold set to replicate the example you showed. If you're still interested, I can email you the files if you want to play around with the PMax settings too.
comparison2.jpg
rjlittlefield wrote:
Sun May 29, 2022 11:44 am
Second would be to make that background less bright during shooting. I assume you've made it so bright because you eventually want a pure white background in the final image and just shooting it that way seemed like a good idea. The difficulty is that the brighter the background, the more vulnerable you are to stray reflections, causing the effects you've shown here. An alternative is to have less background light when shooting, then use mask selection tools in Photoshop etc. to replace the background in post-processing. It's tempting to think of using a "green screen" technique in which the background is also a different hue that can be used for selection, but that causes reflections around the edge of the coin to pick up the color of the background, which creates an artifact of its own after the background is swapped out. So, I'd be inclined to keep a neutral color, but a uniform brightness, and take advantage of Photoshop's "magic wand" with contiguous pixels to do the selection. In the small sample posted here, it takes just a couple of clicks to get a clean selection of background versus coin in the DMap output.

A third approach, which I think is serious overkill for this application, would be to use structured illumination similar to what's discussed in patta's thread on "How to photograph a profile?" The idea there is to orient the illumination rays so as to eliminate reflections of background except very near the edge. This sort of structured lighting is effective, but I expect it's also far more trouble than it's worth for coins.
You're bang-on in regards to the "green screen" technique as I've tried that in the past myself, instead what I'm using here intended to address some of those issues. I'm using pseudo-axial illumination (pseudo because it's a ring light and thus not perfectly aligned with the lens) for the same reasons mentioned in that thread of patta's, i.e. because it works well for getting clean edges but i'm combining that with a mirror as a background. From some testing with various reflective glasses I noticed that the more reflective the glass, the whiter the background appeared, and seemingly without introducing any reflections that cause flaring or such in the lens. I honestly expected to get reflections back that would make the image useless but surprisingly enough, I don't notice any difference in the appearance of the subject versus when using a non-reflective background.

The problem I have with a standard white background is that it is not bright enough and although it appears "white", as the background approaches the coin's edge you end up with a slight gradient from the off-white to darker whites that make it difficult to separate cleanly from the silver-grey edge of a coin. I can still use the magic wand tool for this in Photoshop but I have to "contract" the selection significantly (and smooth it etc) to get rid off any jagged edges or a faint white outline that remains and is quite apparent when I add a background layer with a dark colour like black. I could make a device to illuminate the white background independent of the coin's illumination but you do have to be careful with light bleed in that case too, because the light will likely be reflecting off the white background at all sorts of angles. So I think the ideal method is still to do all the illumination pseudo-axially if possible.

Up until now, I've been shooting coins on black backgrounds and using the masking tools in Lightroom to make the background properly black. As the edge of the coin tends to fade into the blackness anyway, which is something I stylistically have preferred (since it doesn't make it look like the coin has been placed on an artificial background), I haven't had to do a proper background removal for the coins. But I'm now experimenting with making all my photos have transparent backgrounds so I can change between white and black, or another texture, when desired. For this I think it's best to shoot on a white background and do a proper background removal similar to you have suggested. The issue with shooting on white and changing the background to black, or vice versa, is that you tend to have some remnants of the original background apparent in the coin's edge, even after it has been carefully selected, and unless you contract the selection to remove this "ring" around the coin, the "ring" is very obvious when you change the background colour. Contracting the selection to remove this ring of mixed genuine coin edge and background is an option but it does require the original selection to be quite accurate so that you don't have to remove too much of the actual coin's edge to get rid of the "ring".
mirror.jpg
- Cam

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Zerene Stacker having trouble with coin edges

Post by rjlittlefield »

Excellent! I pulled the latest DMaps into Photoshop so I could layer, align, and flash-to-compare at 600%. The elimination of out-of-focus blobs is striking.

Masking so as to allow background replacement is a tough problem. In real life the edge of the coin should be reflecting the background, and if you're not going to let it do that then the result cannot be accurate. When last I looked, approaching 20 years ago, state-of-the-art green screen techniques essentially tried to identify partial transparency and reflections of the background based on the amount of green screen hue they showed, plus some other AI-ish techniques, and then they essentially backed out the reflections so as to yield an estimated RGB of the subject alone plus an alpha that represented how much of whatever background you applied was supposed to be added to the subject RGB. The papers showed impressive results, even granting those results were probably the best the authors ever got. I would naively hope that similar techniques would now be available in Photoshop or at least in plugins. But it's not an area that I have explored, and my naive hopes often turn out to be no more than that.

As for your source images, yes, I would still like to take a look at those. When you send them, please use some large-file transfer service like Dropbox or Google Drive or wetransfer.com . Direct transfer by email would surely fail because of service limitations.

--Rik

kaleun96
Posts: 270
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Re: Zerene Stacker having trouble with coin edges

Post by kaleun96 »

Sent you an email with a link to download the files Rik, let me know how you get on!

I tried your suggestions on another coin and got great results after initially having the same problems as earlier. Here you can see the result of a one-click magic wand background removal in Photoshop, followed by contracting that selection by 8px to remove a small amount from the edge, and then a zoomed-in look at the edge. For a one-click solution with no other touching-up required, I'm very happy. That's definitely a more than adequate result for my needs. It doesn't have that look you normally get when shooting on a white background and then changing it to a black background in Photoshop where the edges seem unnaturally bright and make the coin stand out relative to the background. Instead, the edges are exposed the same as the rest of the coin (more or less) and they transition to the black background well, though I could also easily add a small inner shadow to help even further. Final image is a slight drop-shadow applied to a replaced white background, which I think is looking very natural as well.

The great thing about this for me is that I can map the background removal and shadow effects to an Action in Photoshop and easily process my images without (hopefully) much need for manual intervention.
bg_remove_1.jpg
bg_remove_2.jpg
bg_remove_3.jpg
bg_remove_4.jpg
- Cam

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Zerene Stacker having trouble with coin edges

Post by rjlittlefield »

Cam, thank you for the further information and access to your source images.

I'm very happy to hear that you have found an effective way of meeting your goals.

At the same time, I want to share some of my own observations and thoughts about the sample stack that you sent. Given your overall situation, most or all of what I have to say is probably irrelevant nitpicking. But maybe there's something in here that will be useful later.

The short summary is that it looks like all your problems were caused by the illumination setup, which essentially places a very bright ring of light behind the edge of the subject.

The explanation begins by noting that when the edge of the subject is focused, all is well. In that situation the very bright background is simply seen by the camera as blown-out white, RGB=[255,255,255]. There is not much effect on the appearance of the coin itself. However, when the edge of the coin is not focused, very bright light from the background merges with the out-of-focus edge of the coin, and because the background is so bright, the camera then sees a lot of that merged area as also blown-out white. The net effect is that when the edge of the coin is not focused, the blown-out white area and its rather sharp OOF edge intrude into the area of the coin near the coin's edge. This directly causes obvious problems for the stacking algorithms, particularly for Zerene Stacker PMax and for Helicon Focus Method C, both of which look for "detail" at all size scales. In addition, the virtual erosion of the coin's edge causes more subtle effects on scale estimation, as the alignment algorithm struggles with the conflict between real scale changes in the middle of the coin that are caused by optics, and bogus scale changes at the edge of the coin that are caused by erosion of the edge. Fortunately, in the stack I looked at the effects on scale estimation are small enough they they are not easily seen.

Here are some images to illustrate what I'm talking about.

First, here is a simple GIF animation of the edge of the coin, as it appears when well focused and maximally out of focus. These images are aligned so that the face of the coin stays in one place and size, but then the apparent edge of the coin moves by something like 20 pixels because of blowing out most of the area where OOF coin merges with the very bright background.

Image


Then, here is a graph of scale correction as calculated by Zerene Stacker's alignment method. The red curve comes from a stacking run in which source images were cropped to exclude edges of the coin, while the blue curve comes from a different stacking run that processed the whole frame at once. Note that when processing the whole frame, which includes the progressively eroded edges, the algorithm estimates and "corrects" for a systematically larger amount of apparent scale change between front and back of the stack.

Image


Finally, here is a second animation, this time showing a small area near the edge of the coin, as stacked, corresponding to the two conditions illustrated in the previous graph. The thing I find interesting here is that the geometry of the coin is changing slightly. The lower right corner shows only slight differences in brightness, with no differences in geometry, while the upper left corner shows an easily visible stretching of the shape. I hasten to add, however, that the stretching is easily visible in this animation only because I've gone looking for it in an area where it is particularly pronounced. Considering the whole face of the coin at the same time, I have trouble detecting the stretch even when I'm looking for it.

Image

I hope this is helpful!

--Rik

soldevilla
Posts: 684
Joined: Thu Dec 16, 2010 2:49 pm
Location: Barcelona, more or less

Re: Zerene Stacker having trouble with coin edges

Post by soldevilla »

in my museum work I usually take photos on a black velvet background, with the object raised to blur the dust that the velvet may have, and placing white paper on the velvet, so that only a black ring can be seen through the camera. This way I keep the specular reflection of the edge of the object and at the same time a black area that allows me a very easy cut with Threshold. Hope this can help.

kaleun96
Posts: 270
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Re: Zerene Stacker having trouble with coin edges

Post by kaleun96 »

rjlittlefield wrote:
Mon May 30, 2022 6:57 pm
Cam, thank you for the further information and access to your source images.

I'm very happy to hear that you have found an effective way of meeting your goals.

At the same time, I want to share some of my own observations and thoughts about the sample stack that you sent. Given your overall situation, most or all of what I have to say is probably irrelevant nitpicking. But maybe there's something in here that will be useful later.

The short summary is that it looks like all your problems were caused by the illumination setup, which essentially places a very bright ring of light behind the edge of the subject.

The explanation begins by noting that when the edge of the subject is focused, all is well. In that situation the very bright background is simply seen by the camera as blown-out white, RGB=[255,255,255]. There is not much effect on the appearance of the coin itself. However, when the edge of the coin is not focused, very bright light from the background merges with the out-of-focus edge of the coin, and because the background is so bright, the camera then sees a lot of that merged area as also blown-out white. The net effect is that when the edge of the coin is not focused, the blown-out white area and its rather sharp OOF edge intrude into the area of the coin near the coin's edge. This directly causes obvious problems for the stacking algorithms, particularly for Zerene Stacker PMax and for Helicon Focus Method C, both of which look for "detail" at all size scales. In addition, the virtual erosion of the coin's edge causes more subtle effects on scale estimation, as the alignment algorithm struggles with the conflict between real scale changes in the middle of the coin that are caused by optics, and bogus scale changes at the edge of the coin that are caused by erosion of the edge. Fortunately, in the stack I looked at the effects on scale estimation are small enough they they are not easily seen.
Thanks for the in-depth explanation, even though I have something that appears to be working for now, I'm interested in improving it even further if possible because it's likely these problems will become an issue in the future with some coins.

I'm a bit unsure about the exact problem you're describing though so I've taken a screenshot of the OOF edge from the first image in the stack I sent you. Is the problem the lighter "ring" around the edge of the coin that is intruding into the "actual" edge? If so, this is an effect I usually see with all backgrounds, regardless of brightness or colour (white or black) so I'm thinking perhaps you are describing something else I'm not noticing?
edge.jpeg
rjlittlefield wrote:
Mon May 30, 2022 6:57 pm
Here are some images to illustrate what I'm talking about.

First, here is a simple GIF animation of the edge of the coin, as it appears when well focused and maximally out of focus. These images are aligned so that the face of the coin stays in one place and size, but then the apparent edge of the coin moves by something like 20 pixels because of blowing out most of the area where OOF coin merges with the very bright background.

Image


Then, here is a graph of scale correction as calculated by Zerene Stacker's alignment method. The red curve comes from a stacking run in which source images were cropped to exclude edges of the coin, while the blue curve comes from a different stacking run that processed the whole frame at once. Note that when processing the whole frame, which includes the progressively eroded edges, the algorithm estimates and "corrects" for a systematically larger amount of apparent scale change between front and back of the stack.

Image


Finally, here is a second animation, this time showing a small area near the edge of the coin, as stacked, corresponding to the two conditions illustrated in the previous graph. The thing I find interesting here is that the geometry of the coin is changing slightly. The lower right corner shows only slight differences in brightness, with no differences in geometry, while the upper left corner shows an easily visible stretching of the shape. I hasten to add, however, that the stretching is easily visible in this animation only because I've gone looking for it in an area where it is particularly pronounced. Considering the whole face of the coin at the same time, I have trouble detecting the stretch even when I'm looking for it.

Image

I hope this is helpful!

--Rik
This is all really interesting and helpful so thanks for taking the time to look into this!

In terms of the scaling and edge "movement", I always thought this was just due to the perspective changing since I'm bringing the lens closer to the subject with each photo, but if I understand you correctly, you're saying it's a combination of this perspective change AND the blown-out background "eroding" the edge by different amounts depending on the focus? So, in other words, when maximally OOF, the edge is the most "eroded" by the background and as the edge transitions to becoming more in-focus, this effect is lessened? The end result is that the software thinks the edge is moving more than is explained by perspective shift alone?

If I've understood you correctly, are you then suggesting that a less bright background may help solve this issue? If you like I could send you another stack, using either a piece of white paper or maybe some 60/40 teleprompter glass as a background. I already have some stacks with these backgrounds of a different coin but I think they could be used for this if needed.
- Cam

kaleun96
Posts: 270
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Re: Zerene Stacker having trouble with coin edges

Post by kaleun96 »

soldevilla wrote:
Tue May 31, 2022 2:23 am
in my museum work I usually take photos on a black velvet background, with the object raised to blur the dust that the velvet may have, and placing white paper on the velvet, so that only a black ring can be seen through the camera. This way I keep the specular reflection of the edge of the object and at the same time a black area that allows me a very easy cut with Threshold. Hope this can help.
Thanks for the suggestion. I've been using a black velvet background for all my coin photos the past few years but it doesn't work well for all coins as some have relatively dark edges (particularly if there are horn silver or similar deposits on the edge) and it can also be difficult to tell where the edge really starts and stops. This is more of an issue on thicker coins since the edges on ancient coins are rarely smooth and uniform so you have parts that over-hang other bits of the edge and cast shadows or are just less exposed and these areas can be quite difficult to illuminate without making the entire edge too bright.

So in general I've found that shooting on black backgrounds is good if you want to keep the black background and just make it blacker, but if you want to then put the coin on a white background it becomes more tricky to do so if the coin has irregular or dark edges.
- Cam

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Zerene Stacker having trouble with coin edges

Post by rjlittlefield »

kaleun96 wrote:
Tue May 31, 2022 3:41 am
In terms of the scaling and edge "movement", I always thought this was just due to the perspective changing since I'm bringing the lens closer to the subject with each photo, but if I understand you correctly, you're saying it's a combination of this perspective change AND the blown-out background "eroding" the edge by different amounts depending on the focus? So, in other words, when maximally OOF, the edge is the most "eroded" by the background and as the edge transitions to becoming more in-focus, this effect is lessened? The end result is that the software thinks the edge is moving more than is explained by perspective shift alone?
Yes, that all sounds correct.

Perspective change alone will make the entire coin change size on sensor, by a ratio that depends on depth of the stack and distance between subject and entrance pupil. In your case, that change is about 2.5% from front to back, corresponding to a depth-to-distance ratio around 1:40. This change of overall scale is a big first-order effect, but it's one that can be perfectly fixed by stacking software's scale adjustment.

Perspective change alone also makes the change of scale be slightly different between the front and back of the subject. That is, parts of the subject that are closer to the entrance pupil change size by a little more than parts that are farther away. This difference in scale changes causes the subject to look like it's changing shape by a little, just due to perspective.

However, this apparent change of shape due to perspective is a small second order effect, roughly proportional to the depth-to-distance ratio squared. In your case that would be only 0.06%, which turns out to be roughly 10 times smaller than the effect that I'm seeing due to blown-out OOF background affecting the apparent position of the edge.

All of which just provides more detail behind your excellent summary:"the software thinks the edge is moving more than is explained by perspective shift alone".
If I've understood you correctly, are you then suggesting that a less bright background may help solve this issue?
Yes. As a rule of thumb, edges appear to move "away from the light" as they go out of focus. If the background is brighter than the subject, then the estimated position of the edge moves inward toward the subject; if the background is dark, then the estimated position moves outward toward the background. So the ideal situation, from this very limited standpoint, is for the background to be the same average brightness as the subject. But of course that kind of background would be mostly useless for your larger goal of separating background from subject. So from the standpoint of overall value, I expect that choosing the best background is a balancing act, and I simply don't know where the best point is for what you're trying to accomplish.

For whatever it's worth, my intuition says that soldevilla's approach sounds close to ideal. But if you've tried that, and it doesn't work for your subjects, then the most likely cause is that my intuition is wrong.

--Rik

kaleun96
Posts: 270
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Re: Zerene Stacker having trouble with coin edges

Post by kaleun96 »

rjlittlefield wrote:
Tue May 31, 2022 4:23 pm
If I've understood you correctly, are you then suggesting that a less bright background may help solve this issue?
Yes. As a rule of thumb, edges appear to move "away from the light" as they go out of focus. If the background is brighter than the subject, then the estimated position of the edge moves inward toward the subject; if the background is dark, then the estimated position moves outward toward the background. So the ideal situation, from this very limited standpoint, is for the background to be the same average brightness as the subject. But of course that kind of background would be mostly useless for your larger goal of separating background from subject. So from the standpoint of overall value, I expect that choosing the best background is a balancing act, and I simply don't know where the best point is for what you're trying to accomplish.

For whatever it's worth, my intuition says that soldevilla's approach sounds close to ideal. But if you've tried that, and it doesn't work for your subjects, then the most likely cause is that my intuition is wrong.

--Rik
Thanks Rik, that's very useful to know. I'll continue experimenting and see how I go. In terms of the black felt approach - which I've been using for ~2 years except I don't replace the background with another colour, I just make it pure black - I tried it again with some new 3D printed "cones" that surround the coin to illuminate the edges. These new cones work much better than what I was using previously as they're less transparent and at a perfect 45 degree angle, and they do seem to illuminate the edge without making it too bright. However, I run into the same issues I've had in the past with black backgrounds, although there is a definite improvement. As you can see in the gif below, the selection tool is still picking up the darker cracks, folds, and crevices (common to ancient coins), and thinking they're part of the background. Some of this could be smoothed out by expanding the selection a few pixels to remove the uneven edges but the larger intrusions would require more manual intervention and that's something I'm hoping to avoid. I used the same coin as in the previous examples and this is actually one of the better coins in terms of the edge profile as it's relatively smooth and doesn't have any major overhanging sections. The toning and deposits on the edge are also not as extreme as is common to find on other coins so in a way this example is almost a "best case scenario".

Not to say this method can never work, I'm sure it can, I think it might just take more effort to get the edge illumination just right (not too bright, not too dark), and you may have to sacrifice a little bit more time in the edit.
selection.gif
- Cam

Post Reply Previous topicNext topic