Patent ID: 8587725

Claim:
A method of digitally processing images and/or audio in the form of a plurality of data samples, each data sample having a value representative of a visual or audio property, the method comprising: identifying a first set of data samples having values outside a first predefined range of data values; identifying a second set of data samples having values outside a second predefined range of data values, the second predefined range being within the first predefined range; and applying a non-linear scaling algorithm to the data values of the first and second sets of data samples to generate a set of modified data samples having data values within the first predefined range, wherein the non-linear scaling algorithm includes two or more non-linear scaling factors at least one of which is based on the non-linear response of the human eye in the case of image data and the non-linear response of the human ear in the case of audio data, characterised in that: subsequent to identifying the first set of data samples, determining the number of data samples within the first set having values outside the first range of data values by no more than a predetermined margin; and if the determined number of data samples is no more than a predetermined number then performing no further method steps, otherwise performing the remaining method steps.