Adding a fence on top of a wall
Adding a [3 foot] fence on top of a wall

That wording and picture suggest a UK location.
It isn't clear to me where exactly you intend to put this fence but if you are adding 3 foot to the height of a wall you are very likely to need planning permission.
The only exception would be if the existing wall is less than 3 foot and is not a boundary wall.
The Governments planning portal says

You will need to apply for planning permission if you wish to erect or add to a fence, wall or gate and:

it would be over 1 metre high and next to a highway used by vehicles (or the footpath of such a highway); or over 2 metres high elsewhere; or
your right to put up or alter fences, walls and gates is removed by an article 4 direction or a planning condition; or
your house is a listed building or in the curtilage of a listed building.
the fence, wall or gate, or any other boundary involved, forms a boundary with a neighbouring listed building or its curtilage.