3

I'm starting from a photograph of a relief, lit from above, something like https://en.wikipedia.org/wiki/File:UnfinishedStele-NefertitiPouringWineIntoAkhenatensCup.png

I want to extract the underlying image as if the relief had been printed onto paper. Whereas Emboss takes a kind of 'differential' of elevation, I want to 'integrate' it, so for example low values will be given to pixels above a shadow and below a light part of the image.

In GIMP, I've tried 'Edge Detect', but it's adding more complexity, not simplifying. I don't think a Convolution Matrix will help either, as I want to colour the whole elevated area, not just that near a shadow or highlight. I'm wondering if I need a GIMP Python script or any other software will help.

Sorry, this question may be more to do with image processing than graphic design, but it is to be used for a graphic. It may be possible to trace and recreate the image, but I wondered if it could be done in software.

  • "Deboss" is the term for sinking an area into it's surrounding, whereas "Emboss" means to raise the area. – Scott Jan 12 at 20:50
  • @Scott Thanks, but that wasn't what I meant. I don't want to create something with an etched effect, but to reverse either an emboss or an imprint into a flat-looking image, reversing any '3D' effect to 2D. – Cedric Knight Jan 12 at 22:31
3

In fact there are a range of tools for extracting and extrapolating "texture maps" for 3D modeling textures based in a single input photo, and they can create heightmaps, reliefmaps, base colour maps etc etc. I think this might get you the results you want.

I would first run a perspective correction, and then apply such a tool.

The one I use most (Allegorithmic's B2M) isn't freeware, but there are freeware tools out there, including Materialize, AwesomeBump, and NormalMap Online which are pretty decent equivalents, including, if my memory serves, somewhere there's a GIMP plugin or two for this task type.


I've some results from doing a very rough and quick session of what I'd mentioned above as a proposed workflow - I spent about two minutes in Affinity Photo, first with the perspective correction and then with the clone brush and inpainting tools, then pushed the resulting image into Allegorithmic's Bitmap to Material application, where I set no special parameters and output only a few of the available dozen or so output types; very little manual time in this session at all.

I don't know if any of these images will answer your need individually, but I think perhaps by combining a couple, you will have almost exactly what you need (I'll leave that call up to you) but I think the curvature map could be combined with the base colour and then use the height map as the main driver / mask and you'd be there.

Curvature Map Curvature Map

Base Colour Base Colour

Bump Map Bump Map

Height Map Height Map

Normal Map Normal Map

Displacement Map enter image description here

Hope this helps some.

P.S. - I looked again, and in Affinity Designer I overlaid the base colour map and the height map (height map on top with multiply opacity mode) and was able to do a quick manual trace - it's only rough, but just in case it helps...

PNG export of SVG vector trace PNG save of an SVG vector trace

  • Thanks. The Normalmap GIMP plugin (included in gimp-plugin-registry Debian package) does have an option to create a height map from a normal map. Unfortunately I think it won't work properly on my image because it has no x-normal (red) info, even after I alter the blue curve to add z-normal. – Cedric Knight Jan 13 at 13:20
  • @CedricKnight - updated with more details and example images – GerardFalla Jan 15 at 0:05
0

You do not want especially little. You want a piece of software which can deduce the outlines of those planar non-chiseled areas from the luminance variations in a photo. That's a statistical pattern matching problem, only a complex one because there's no discrete set of possiblities where to choose from. You cannot apply any straightforward inverse transformation because the edge slope varies in an unknown way along the edge and the lights and colors do the same.

My advice: forget it and do it in the hard way. Draw a clipping path. Try to find other works of the same historic subject. Comparing with them you can probably make a plausible guess where the clipping path really should be. Here's my attempt which contains only a part of the image:

enter image description here

  • Thanks, and I may well have to resort to that. The lasso tool may help to an extent, although one area of difficulty is where the lighting is parallel to the outline and so raised areas are of the same colour as the surrounding . The human eye can do it instantaneously, and I can actually envisage an algorithm or Python-Fu that integrates and normalises given light direction and colour (finding what those values given an arbitrary image is a separate problem). – Cedric Knight Jan 12 at 22:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.