Displacement Map Example

The displacement map filter is found in Photoshop under the menu items: Filter >> Distort >> Displace. A displacement map moves the pixels of an image by an amount that varies depending on the brightness of another image. I will give two examples below.

Example 1: Curvaceous 2.

For example 1, I generated a grayscale image comprising a set of horizontal lines. I converted this image layer to a smart layer (right click on the layer name and select Convert to Smart Object) so I can tweak the filter later with the least amount of effort.

Now organise your source image. I opened this in Photoshop from LR, made it into a smart layer, and saved it as a PSD (Photoshop wants PSD files for the displacement map) in the folder with my horizontal line image (so it is easy to find). Based on past experience, I applied a Gaussian blur filter – without a bit of blurring, the end result can be a bit frizzy. You can play with the filter and adjust the degree of blurring to experiment with the effect on the resulting displacement map image.

Save the modified PSD file and switch back to the horizontal line image.

Next, apply a displacement filter (Filter>>Distort>>Displace). Choose the settings. Horizontal scale indicates how many pixels distance the maximum displacement will be in the horizontal direction. Vertical scale … you guessed it. I chose “stretch to fit” in this example, but it wasn’t necessary since the two images used were the same size at the start. The screen grab to the right shows Repeat Edge Pixels but after seeing the effect, I decided the Wrap Around setting was the one to use for this image.

Apply the filter and see what effect you get. If it isn’t what you want try one of the following:
* change the settings of the displacement filter. Increase or decrease the displacement scales etc. Since this is a smart object layer, you can double click the Displace filter for the layer and the filter will open and after applying the new settings, the smart layer will update to the new settings.
* have a play with the image used for the displacement map. Tweak the contrast levels, apply local adjustments, apply artistic filters etc… to adjust the source (if you are using smart layers the edits and filters will be non-destructive so you can try out lots of settings quicly. Unfortunately you will need to re-apply the displacement filter in the other image to see what effect the tweaks to the displacement map have had.

Example 2: A woodland scene

Here I have a bit of Scandinavian woodland. Just for fun, I am applying a wavy displacement map image. For this I made repeated gradients to make horizontal stripes, then added a wave filter to give it a bit of wobble in the vertical direction. Since this image is already blurred, there was no need to apply a Gaussian blur filter to smooth out any jagged bits.

Switching back to the woodland I apply a displacement filter – actually I added two, one 5pixel horizontal displacement with the horizontal lines, then added another displacement with the wavy version (you can see two Displace filters under the Smart Filters:

OK, so this isn’t going to win a prize, but hopefully it serves to illustrate the approach.

Here are some other ideas. Use a displacement map to apply a canvas texture or other texture to your image (use an image of canvas, tree bark, something else as the displacement map image); make a reflection on water by applying a displacement map to generate distortion to match the waves in the water; make colour or pattern overlays wrap round a shape using a distortion map.

Further references

Posted in Advanced Edits, Artistic, compositing, Post-Processing, Resources, Software | Leave a comment

Krita

Krita is a free and open source graphics editor for Windows, Mac OS and Linux. It is designed primarily for graphic artists for digital painting and 2D animation, but it is also a competent editor for photos. Its user interface has the usual features with multiple configurable tool panels and straightforward menus. Workspaces can be customised to suit your workflow.

Krita supports layers and masks, blending modes, a wealth of non-destructive filters (with real-time preview), different colour models (RGB, CYMK, Lab etc, and so on. It supports at least some RAW file formats, but lacks a sophisticated RAW processing back end (ie no equivalent of Adobe Camera Raw). If you want, however, you can process your RAW files in powerful free programs like DarkTable or RawTherapee (or Adobe Camera Raw – also a free download at present), then export to TIFF or PSD to import into Krita for further processing.

Posted in Software | Tagged | Leave a comment

Up-Scaling images

Introduction

From time to time you may find you just don’t have enough pixels in your image. For example you may want to make a huge print from your image (or a smaller print from a cropped part of your image). Just enlarging the image will produce a blocky or pixellated image. Fortunately there are better approaches. The example below relates to Photoshop and Lightroom, but if you are using other software, it is likely you will have access to similar alternatives.

Upscaling/Resampling options

In Photoshop, you up-scale images using the menu Image>>Image Size. In the screen grab below I am changing an image 232 x 147 pixels at 18 pixels per inch up to 72 pixels per inch (928x 588 pixels) – ie a 4-times enlargement in each dimension. Note that the resample box is checked. You can choose to adjust the size by entering new width or height (note the chain link to the left of the width/height boxes – if you click this the height and width will be bracketed by a thin line and this setting keeps the width and height locked so they change in proportion), or you can change the resolution (in my case I changed it from 18 to 72, a 4-times increase). This changes the horizontal and vertical resolution so the aspect ratio remains unchanged.

Note that a 4-times increase in linear dimensions is dramatic! I only chose this to highlight the differences in the results for up-scaling.

With resampling ticked, you get some options for the algorithm used to up-scale the image. The automatic setting will attempt to choose the best option, but you can also manually select the setting to suit your needs/the characteristics of the image you are processing.

Here are some examples. Note you may need to click the images to get the full size image for best comparison – the HTML page might resize the images to fit your screen so you will be looking at a resized resized image.

Original image downsized to one quarter to make a starting point for up-scaling tests..Note that a 4x up-scaling is fairly dramatic. every 4×4 pixel block has been averaged to a single pixel. ie you convert 16 pixels to one pixel – you throw away 93.75% of the original pixels. Now, how good can the up-scaling be to restore the quality lost?

Upscaled 4x, using nearest neighbour. The simplest method. Each pixel becomes a 4×4 block of the same colour. Note the pixelated appearance, particularly visible around edges.

The image below used bicubic (smooth gradients) interpolation, which takes generates the new pixels using an algorithm using a weighted average of the surrounding pixels. A much better result than the nearest neighbour interpolation.

bicubic

Below I used the bicubic Smoother (enlargement) setting. very similar to the Bicubic (smooth gradients) but perhaps a little more detail/contrast on the eye lashes.

Below I used the preserve details (enlargement) setting. This brings out more fine texture in the skin and a bit more contrast on the lashes.

Here is an original image. Note the sharpness of the eye and the smooth texture in the skin. It shows you cannot throw away 94% of the pixel data and expect to magically restore it without loss of quality.

This is the original image before downsizing/up-scaling to show the ultimate quality of the original

There is one more option to consider. In Adobe Camera Raw based programs (eg Lightroom and Photoshop) you can also get an additional up-scaling algorithm “Enhance” which uses Artificial Intelligence algorithms to enlarge a RAW image by a factor of 2. You can actually use this algorithm on non-RAW images by opening them in the Adobe Camera Raw (ACR) application, but I suspect the results will be worse without the extra information buried in the RAW file. See https://helpx.adobe.com/camera-raw/using/enhance.html for more details. In the image below is a screen clip of part of a compare images panel in LR. The left side is the enhanced version (2x) of the image on the right. It looks to do a fairly good job. Note this is not a good comparison with the resizing examples above, as this is enlarging the original image and only using a 2x enlargement.

UPDATE (2022):

Topaz Labs make an AI based program, Gigapixel AI, that can do an excellent job resizing images. It works as a plugin to Photoshop too. But take care to check the output – sometimes it introduces some glaring artefacts.

Further resources

https://www.howtogeek.com/718002/how-to-use-photoshop-and-lightrooms-super-resolution-feature/

https://www.adobe.com/au/creativecloud/photography/discover/increase-resolution.html

https://helpx.adobe.com/photoshop/using/resizing-image.html

Posted in Advanced Edits, Basic Edits, How-to, Post-Processing, Workflow | Leave a comment

Monochrome

A commonly asked question is what subjects are best for monochrome?  I have been casting my mind over this and I cannot give an answer. Thinking back over the last year, I have made monochrome landscapes, cityscapes, seascapes, portraits, photojournalism, nature … I don’t think I have made any monochrome abstracts lately, but then I haven’t made many abstracts of any sort recently , but swirling patterns of smoke might be good in monochrome, for example. So, I’m not sure it’s a question of what subjects should be in monochrome, as when would I make a captured image into a monochrome.  Colour is powerful. We see the world in colour, and colour dominates many of the images we see. However colour can also distract our attention. A simple monochrome conversion is just a button click away, so it is easy to get a quick preview… for example in Lightroom I can create a virtual copy, convert to B&W (LR has a standard B&W, but also a suite of monochrome presets you can apply at the click of a button). Here are a couple of versions of a photo I took in Spain. In this case I thought the blue of the sky drew the eye away from the rest, so I thought the mono was a good option. I had a play on the mono version – selectively darkened the sky and strengthened the contrast (easy to do in mono), and lightened some of the detail in the canopy. I think the mono worked out quite well.

OK, that’s an architectural example. How about something different.

Here I think the skin colour warms the image; the mono version is harder, more gritty, better suited to conveying the hard life of the homeless man in New York.

Here is another reason to convert to mono:

In the colour version the bright colours in the background distract the attention from the story – the chainsaw racing competition. The blue marquee roof and bag in the background, the orange helmet, the red cowling on the saw and the red flash on the pants don’t add to the story. By converting to monochrome (and cloning out the other competitor on the right margin, I remove the distractions so you can focus on the story. You see better the spray of sawdust and the falling disk of wood.

Here is another, on a photojournalism theme – Sam Bell waterskiing at the Moomba festival in Melbourne in 2019.

Again, I don’t feel the colours in the colour version add to the story. By converting to monochrome (and cloning out the other tow rope) I think the story conveyed is at least as powerful, though in this case I think it works in colour too.

OK, just for variety, here is another

In this case, the brightly coloured costumes are central to the story. Whilst the monochrome version depicts the scene, I don’t think it coveys the narrative as powerfully. Maybe I should try a version where I select everything except the dancers, and desaturate the colours in the background. This might help to focus the eye more on the dancers, removing the crowd as a background distraction.

Here is a landscape

It’s a scene with virtually no useful colour – the tones and lines are the story. Monochrome is a perfect choice.

Whilst I have given a few examples here, I am not sure if there is an easy answer to what images make the best monochrome. But here are some rules of thumb to consider:

  • Does colour add to the story?
  • Are there colourful distractions that need diminishing?
  • Is the story of the image in the lines and tones?
  • Could a monochrome conversion add drama to an image?

These examples have all used conversion to Black and White. You can also make monochrome with different tones – sepia (warm tones) and cyanotype (cold tones) are two examples. These tinted conversions can convey a mood or tone, perhaps, better than plain B&W. Again, experiment and see what you like. Also look at other people’s images – what monochrome conversions have they used? what toning? Learn from examples.

As with many such questions, there is no one answer. The best bet is to experiment with your own images and see what you like in Mono vs colour.

Additional Resources:

Posted in Advanced Edits, Artistic, Basic Edits, Post-Processing | Leave a comment

Links to some creative photography online magazines

Here are a couple of creative photography magazines that Paul Spence directed us to in the Creative SIG in Feb 2021

https://issuu.com/thephotoartisticlife

https://www.artistsdownunder.com.au/

Posted in Uncategorized | Leave a comment

Photography: Legal Issues

It is worthwhile for photographers to acquaint themselves with some legal issues that pertain to photographic activities. The Arts Law Centre of Australia has compiled a number of information sheets that give relevant advice. In particular:

Note that the artslaw.com.au links above are specifically made for the laws in Australia, and may not be as relevant in foreign countries. If you are planning to travel, it might be worth investigating some issues that are relevant to your destinations.

In some places photography may be restricted – take care near military or police establishments as well as major infrastructure and travel/transit facilities. Recently, in Rome I was forced to delete some images I had made of historic buildings – there were paramilitary/police in the square in front of it, and such people and their gear should not be photographed. One day I was photographing squirrels bouncing around the roadside trees in Leicester, only to be accosted by a military person requiring me do stop and remove the images. Apparently the trees were an avenue outside the walls of a military base. Neither I nor the squirrels were aware of the sensitivities of the area over the 4 metre high brick wall. Travel in India and it is hard not to be assailed by children wanting you to take their photo. Take photos of children in some other countries and you may find yourself arousing suspicion and attracting unwanted attention.

Most places restrict use of cameras in places like airports and railway stations. Photography rights may be restricted in museums, galleries, churches and the like. If you are unsure, it does not harm to ask the locals what is allowed.

Posted in Uncategorized | Tagged , , | Leave a comment

Geoff’s photo doodler – Advanced Menu

As I add functionality to the program I have started a second menu to provide more space to place the controls. When you have loaded the image to draw, you can activate the Advanced menu by pressing the A key. If the advanced menu is showing, pressing A will hide it.

The algorithm used for movement of the “pen” as it draws, is to select a number of possible destinations at Line step length from the current point in the general direction the pen is currently moving (adjusted by the Samples selecting direction and Direction Range parameters). To allow more flexibility, you can substitute a different image to provide the brightness levels for this algorithm. Here are some examples: first with the default original image; second with a plain gray image; third with an edit of the original image that emphasises some of the edges and textures.

By default, the original image is used as the mask image to guide the pen movement (selecting the next point as the closest match to brightness of the current point). You can see here that lines tend to align with textures in the feathers, for example.
Using a featureless mask image means the pen movements will not be guided by structures in the original image. The line paths are more random and do not pick up paths from the underlying image.
Using a custom mask might provide regions that “capture” the pens or cause the pens to follow particular lines. Here I have made a mask by using a find-edge filter, blurring this slightly, and painting out the detail in the bill. The drawn lines tend to align with structures in the mask image.

The Mouse Attractiveness setting in line drawing modep allows you to direct where the pens move. If you set a high value for this parameter and then click on the drawing as it develops, the pens will be drawn towards the mouse cursor location. You can use this to dynamically increase the density of drawn lines to different parts of the image.

Auto adjust circle size works in circle drawing mode. This will reduce the size of circles drawn on the image depending on the amount of detail in the area around the circle centre.

Note the variation in circle size with the Auto adjust circle size control selected. Areas without fine detail such as the background at top right get larger circles that areas with fine detail such as the eyes.

Another way to focus line drawing is to apply a Pen initiator mask. This is an image where brighter areas will preferentially get pens starting when you reset a drawing. Black areas on the pen initiator mask image will get few or no pens, though the pens may wander into those areas as the drawing develops.

The Pen initiator mask allows you some control over where the pens start drawing the lines. Here the pen initiator mask image is a black canvas with a white area centred on the middle of the image where the cat is positioned in the source image. Line drawing is dense over the cat, but a few lines have wandered from their starting position to meander over the background to give some hints of the detail there.

Posted in Advanced Edits, Post-Processing, Software | Tagged , , , , | Leave a comment

Blend If

Blend if is a powerful tool in the layer properties in Photoshop (other software may have similar functionality – explore your documentation). Open the layer properties and you find an Advanced Blending block and Blend If block in the central column. You can use this to selectively define which parts of a layer are “blended” with underlying layers.

You can apply Blend-If to image layers. With Blend If can, for example, replace a blue sky with another layer without having to make complex selections or turn a green-screen transparent so you can see an underlying image where the green screen shows on the top layer.

You can apply Blend-If to adjustment layers so the adjustment selectively applies to parts of the underlying image (for example to darken a sky with an exposure adjustment that applies only for blue areas, or to bring up the shadows by applying an adjustment only over the darker areas.

Here is an example. Here I have an image of the Carillon in Canberra against a cloudless blue sky (layer 0). I have added a layer with a cloudy sky (layer 1). I opened the layer style dialog for Layer 1 (double click on the layer thumbnail). I have set the Blend-If to act on Blue colours, and on the underlying layer (the carillon) I have dragged the lower control triangle on the “underlying Layer” control to limit the range of blues where the blending occurs. OK, there is a wedge of blue sky showing through at the top. This can be easily fixed by duplicating a section of Layer 1 (clouds) that covers this blue – just one quick selection; we let Blend If do all the fiddly bits of selection around the trees and the structure.

Blend if can also be used when making more creative composite images and in applying textures selectively… have a play with the controls and see what they can do for you

Rather than more-inventing of the wheel, here are some resources on the web that give instructions on how to use Blend If:

Resources

Posted in Advanced Edits, Artistic, compositing, Post-Processing | Tagged , , , , , | Leave a comment

Select and Mask

Photoshop’s Select and Mask tool replaces the Refine Edge dialog of previous versions with new, added features, and better “refinement” but at the cost of increased complexity. Rather than re-invent the wheel, I will direct you to some resources which should get you up to speed with this tool.

Using Select and Mask to refine the edge of a very crude selection.

Note that I recommend using the selection to make a layer mask to hide the background pixels (non-destructive editing), rather than inverting the selection and deleting the background pixels. With a mask, you can always go back later and tweak the mask. If you delete the pixels, there is no going back.

Adobe Resources

Adobe’s training site has a page that outlines all of the tools in the workspace and includes a video by Adobe educator Julianne Kost that works through an example using the refine edge tool. https://helpx.adobe.com/photoshop/using/select-mask.html.

Another Adobe video here shows how to fine tune a selection with Select and mask. https://helpx.adobe.com/photoshop/how-to/make-precise-selections-in-select-mask.html.

Another from Adobe gives a technique that uses a brush made from hair on another image to paint in hair strands on your current image, where the background is too challenging for the select and mask tool to get good separation between hair and background. https://helpx.adobe.com/photoshop/how-to/select-mask-hair.html

Non-Adobe resources

This page covers a range of selection techniques including select and mask. https://www.photography-raw.com/photoshop-selections-select-mask/

Here is another video that works through an example image using select and mask. https://fstoppers.com/photoshop/how-use-photoshops-select-and-mask-workspace-570263

And here is a text and pictures work-through of select and mask from HowToGeek. https://www.howtogeek.com/289255/how-to-make-more-precise-selections-with-photoshops-select-and-mask/

Posted in Uncategorized | Leave a comment

Creating realistic shadows

When compositing it is not enough to simply paste an object onto a background. If you do, it will look artificial and pasted. Shadows are what link the pasted object to the background. Creating realistic shadows requires some technical skills, but also a keen eye for what shadows look like.

Here is an example. The image below of a whiteboard marker illuminated with a large light source. The original photo shows soft shadows, darker close to the marker, and darker in the core. Now, clone out the shadow and we have the image on the right, that looks like the marker is floating and not in any way connected to the background.

Here are some things to think about when you are making shadows to anchor your cut-and-paste objects:

  • What sort of light do you have. Point sources (eg sunshine/moonshine/single light globe etc) give sharp shadows; broad sources (eg light coming in through a window from the sky on the shady side of the house; something in a shaded area; an overcast day etc) give soft, diffuse shadows.
  • What colour is the shadow? diffuse light from a blue sky tends to be bluish; Light bouncing from a coloured surface will be coloured by the surface; light under tree shade tends to be greenish; flash light from a soft-box tends to be whiter.
  • Shadows are seldom pure black. Usually there is some light in the shadowed area. Look at the shadow example above. The shadowed area is far from black. Some light from the softbox goes around the marker to illuminate the background. Some light also bounces off other objects and adds light to the shadowed area. The texture of the background is visible. If you just paint black to make a shadow, it won’t look realistic unless you have some transparency to let the texture show. If some of the light bounces off coloured objects to fill in the shadow area, the bounced light will take a colour cast from the surfaces it bounces off. If you have two light sources with different colour balance, the shadows will take different colour balances depending on which light is filling in the shadow.
  • Is there more than one source of light? For example, someone standing in a street at night might have hard shadows from the street lamp, and soft shadows from the light from a cafe window. Depending on the brightness, the shadows will be different densities and colour balance (eg orangish light from the cafe window will paint an orange glow on the pavement; where there is shadow, the orange light is absent, so the shadow will look slightly bluish.
  • How far or near are the lights – this affects the brightness as well and the hardness of the shadow edges.
  • What direction are the light sources. The shadows need to extend in a direction that is consistent with the direction(s) light source(s). Take care where different subjects are added in different positions relative to the light source. For example consider a night scene with people on a street with a single street light. For people between the camera and the light, the shadow will fall towards the camera. For a person underneath the street light, the shadow will be spread around their feet. For a person further away than the light, the shadow will fall to the rear of the image.
  • The size of a shadow changes depending on the orientation of the light, the subject and the surface the shadow falls on. Your shadow near midday is a small puddle of dark around your feet. Approaching sunset, with the sun just over the horizon, your shadow on flat ground will be very long.
  • Think about the surface onto which the shadow is cast. The shadow of a person falling on the ground will be a different shape to the shadow of that person that falls on a wall. A shadow falling on a textured surface needs to retain the texture.

Consider the image below. Note the complicated lighting – 3 different side lights in the tunnel (and another behind the camera), plus light from the tunnel end; but the dominant light is the one at the top left of the frame. Lining up the objects, the shadow from the head needs to be hitting the lowest point on the right side wall; the cyclist’s body is shadowed to fill the whole side wall; the cycle wheels are shadowed on the roof. The lights further along the tunnel cast a shadow forward but much fainter, as they are further away. OK, this isn’t perfect (it was a quick play for amusement), but thinking about the imperfections will help you think about what I should have done with the shadows.

Rather than try to explain the mechanics driving photoshop (or your favourite software), I refer you in the Resources section to some useful guides online.

Resources

Here are some useful links:

Posted in Advanced Edits, Basic Edits, compositing, How-to, Post-Processing | Tagged , , , , , | 1 Comment