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, 2019 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. Jan 12, 2019 at 22:31

3 Answers 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. Jan 13, 2019 at 13:20
  • @CedricKnight - updated with more details and example images Jan 15, 2019 at 0:05

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). Jan 12, 2019 at 22:42

Somebody's working on it for you... https://cseweb.ucsd.edu/~ravir/pamipolarize_final.pdf

The photo unforunately cannot be ordinary. It must be shot by a special camera which also records how the light is polarized in every pixel. The surface cannot be full matt. Some gloss is needed to have enough non-random polarization to calculate the 3D surface .

  • Welcome to GDSE! that is a fascinating paper, but please edit your answer to include some information besides a link as links frequently get broken and then the answer is meaningless.
    – Alith7
    Sep 8, 2020 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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