METHOD AND APPARATUS FOR CORRECTION OF COLOUR CAST IN A DIGITAL IMAGE

Abstract: The invention relates to a method and an apparatus for the analysis and correction of colour casts in a digitally represented image. According to a preferred embodiment, the crominance contents of the image may be transformed by use of a Hough-transformation or the like transformation, wherein the line structures in the carthesic system of co-ordinates for the crominance content is transformed to a representation in a Hough-diagram in the form of a polar system of co-ordinates, since such line structure is hereby transformed into a point structure. The Hough-diagram is examined with a view to finding a cell in the diagram which has the highest value and the cell found is saved. Subsequently cells are neutralized in the Hough-diagram within a predetermined angular distance, and the Hough-diagram is re-examined with a view to finding that diagram cell which, following neutralization, has the highest value. The cell found is saved and the cells saved which represent the maximae in the Hough-diagram are used to determine the intersecting points for lines in the crominance content system, and said intersecting points are used to evaluate the discolouration of the image.

Description: METHOD AND APPARATUS FOR CORRECTION OF COLOUR CAST IN A DIGITAL IMAGE. The invention relates to a method of correcting colour casts in digitally represented images and comprising the features disclosed in the introductory part of claim 1, and an apparatus having the features disclosed in the in¬ troductory part of claim 16. The term colour cast is used to designate the colour de¬ viations of a photograph from what is expected. That is, it is experienced that the colours represented in a given photograph deviates from what is considered correct. The phenomenon of colour casts relates exclusively to photo- graphs since they are considered representations of im¬ pressions from the surroundings, and during the evalua¬ tion of the representation they are compared to our expe¬ rience of how the world looks. Colour casts occur either as a result of a mistake on the photographer's part or a mistake in the photographic pro¬ duction of the photograph, or it may be due to the fact that the photograph does not reflect the prevailing vis¬ ual conditions. In the photographic production of the photograph, colour casts may occur if the development does not correspond to the film used, or if the film or the chemical development process is faulty. Mistakes may also occur in connection with a scanning of the image. The scanning equipment may be operated in a wrong manner or the scanner may be calibrated wrongly. Lastly, the transforma ion between the colour models of the different apparatuses may be faulty. Images with colour casts are experienced as wrong or poor even if the the photograph is a technically correct representation of the surround- ings which has merely been recorded in unusual visual conditions . Colour casts are the result of a subjective phenomenon which originates in our expectations to a subject, but the expectation has a certain general character thereby allowing guidelines to be established for the correction to be carried out of the photograph in order to make it meet the non-formulated expectations . This is among oth¬ ers discussed in "Color in Business, Science and Indus¬ try", by D.B. Judd et al., 3rd edition, John Wiley & Sons Inc., New York, ISBN 0-471-45212-2. The colour fidelity of a photograph describes the colour authenticity with which a photograph reproduces the original subject. In order to obtain such authenticity, a variety of conditions must be allowed for in the photo¬ graphic process . Over the years, this discovery has resulted in a tech¬ nique which allows a lithographer to correct a photo- graph. The technique presupposes the presence in the pho- toghraph of areas which may be considered neutral. They may be completely light or completely dark areas . The correction of the colour planes is divided into three in¬ dependent areas, the most light areas being designated highlights, the most dark areas being designated shade and the grey shades therebetween being designated inter¬ mediate shades. Much experience and insight are required for carrying out adequate correction of a photograph. Even to an experienced lithographer the process will be lengthy. A variety of software packages for the correc¬ tion of colour casts is already available. Examples in¬ clude Adobe Photoshop® and Corel PhotoPaint® which are colour processing programmes whose function is to adjust colour planes in highlights, shades and intermediate shades, respectively. It requires that the lithographer in charge is capable of evaluating which pixels are neu- tral and which planes are to be corrected in order to ob¬ tain the desired neutrality. The only programme which comprises a function for the correction of colour casts is the image processing pro¬ gramme LinoColor® available from the Linotype-Hell AG company. LinoColor® corrects colour casts by determining a shade and a highlight point in the image, and the op¬ erator may subsequently choose to perform corrections in the shade, in the highlight or in both places. The effect of the discolouration correction may be controlled in several steps thereby allowing for a strong, a standard, a weak, or no correction at all. The grey-balance problem is discussed among others by R.W. Huboi et al. in the article "Exposure Determination Methods for Color Printing: The Concept of Optimum Cor¬ rection Level", Journal of SMPTE, vol. 65, pp. 205-215, 1956. Therein statistical methods are used to find a good statistic predictor which may be used in a regression. In "A Physical Color Balance Model for Digital Image Processing", SPSC, 42nd annual conference, pp 205-215, 1986, Hsien-Che Lee points to a deterministic solution model wherein it is utilized that the reflections from plane, homogeneous surfaces vary with different illumina¬ tions . The change in the reflections entails changes in the colour intensity, whereas the chromatic information remains unchanged. In a colour model where the chromatic information is separated from the intensity, e.g L*a*b* or a CIE-chromaticity diagram, the individual elements of the image or pixels originating in the reflection of the surface will be represented as a curve which converges towards the neutral point of the colour model. In case several heterogeneous surfaces are involved, several curves will be formed which converge towards the neutral point. This knowledge is utilized today by an experienced opera¬ tor, typically a lithographer, who examines a photograph, selecting some significant areas, estimates the bias for the photograph on the basis of these areas and his expe¬ rience. The procedure continues iteratively until the op¬ erator is pleased with the result. It is the object of the invention to provide a method of correcting colour casts in naturalistic photographs, the term naturalistic photographs being used to designate digitally represented photographs which are recordings of actual sceneries . The photographs may be produced photo- graphicly and subsequently scanned in to obtain a digital representation, or they may be registered digitally from the outset by means of a CCD camera or the like. A section of a photograph and a photograph composed of several other naturalistic photographs are also comprised by the term e naturalistic photograph. This object is achieved by a method of the kind described in the introductory part, wherein the method is distin¬ guished in comprising the features given in the charac¬ terizing part of claim 1. In accordance with the features given in claim 1, exami- nation of a portion of or all the crominance dimensions of the colour spectre for the presence of completely or fully hidden line-of-convergence structures, allows two or more line-of-cσnvergence structures to be determined as parameterized functions, and enables the determination of at least one mutual intersection on the basis of these line-of-convergence structures, which makes it possible to analyse a given digitially represented photograph and to determine whether it is correctable or not. Exemplary colour spectres with separate crominance and luminance dimensions include CIE-L*u*v*, CIE-L*a*b and YCC. The term line-of-convergence structures is understood as the formation of a line of the points depicted and repre- sented in the crominance spectre of a photograph. Such line formation is usually not readily visible but may be determined by means of prior art methods for the identi¬ fication or determination of lines in photographs . A usual photograph will thus in the spectre of crominance be represented by a point fog where the mutual correla¬ tion is not readily apparent. However, this problem is known in a wide variety of contexts, such as photographic analysis (for the photographic plane itself), electron paths, etc., and the principles underlying the methods known from these applications can be utilized by the pre¬ sent technique with suitable modifications . If the crominance content for a photograph is substan¬ tially constant, the luminance dimension may be omitted, since the crominance content may be analysed as an aggre¬ gate summed-up structure. Thus, the invention is based on the discovery that the colours of a photograph converge towards neutral when the light source colour is neutral due to surface reflec¬ tions. Conversely, if the colour of the light source is not neutral, the colours in a given photograph will con¬ verge towards the colour of the light source. This con¬ vergence may occur in any chosen colour representation standard in its plane or spectre of crominance, since the known standards comprise a neutral point or more specifi- cally an neutral axis which follows the axis of lumi¬ nance. The invention provides the basis for identifying these lines of convergence. However, the teachings of the invention also take their starting points in the fact that a photograph with a dis¬ colouration or the like colouration error originating in the light source and/or surface reflections may be cor¬ rected directly by shifting the entire colour representa- tion, so that the intersecting point of the lines of con¬ vergence coincides with the neutral point or the axis of the system of co-ordinates . This surprisingly simple correction may thus provide a natural and reproductive correction without the use of manual or subjective methods and is particularly advanta¬ geous compared to methods which do not comprise light or dark reference planes or where said reference planes in themselves have a wrong shade of a colour. Thus, the invention presents not only a substantial tech¬ nical advantage over the prior art methods as it may be implemented as an automated process. According to the in¬ vention it is thus also possible to correct photographic material with a reproduceable result where known methods do not suffice. So to speak, the method utilizes the convergence of the reflections which occur as a reaction to the prevailing light conditions, since they jointly form that line for the ideal colour present in the perspective which forms the basis of the analysis or correction of the photograph or the photographic representation. It is a further characteristic feature of the invention that an evaluation count is obtained for an occurring colouration defect or a discolouration found, from which it may be determined whether the photograph is correct¬ able or not and, in the affirmative, that a correction may be carried out so as to reconstruct the ideal and natural colour composition of the photograph by correct¬ ing the data of the photograph to obtain a correct or substantially correct neutral point. Furthermore, it should be noted that the method utilizes lines of convergence which, in practice, represent the reflection shades which, all things being equal, means that the method is simplified and becomes more reliable as the number of reflection shades present increases . By combining histograms with polarly represented co¬ ordinates, a simple and more clear way of finding the dominating line structures which are to be or may be used as a starting point for the determination of intersecting points . Of course, it is within the scope of the invention to use other methods for the identification af the lines of con¬ vergence present in the crominance dimension. An alternative method within the scope of the invention may e.g. be implemented iteratively as, taking one's starting point in a photographic representation in a crominance spectre, a number of probable line of conver¬ gence components may be selected, and subsequently it is checked whether the remaining points corresponding to said line are actually to be considered a part of a line, and in that case to parameterize the same. If the point is false, the procedure should subsequently be repeated in accordance with given guidelines. In accordance with the features described in claim 2, the division of the colour spectre into colour cells consti¬ tuted of quantized crominance and luminance axes enables a practical embodiment since such representation will be suitable for the processing of larger amounts of photo¬ graphic data. The individual photographic points or pixels will thus be depicted in colour cells. In accordance with claim 3, determination of at least two coinciding intersections from which non-coinciding inter¬ sections are subsequently separated makes it possible to optimize the quality and the reproduceability of the analysis made, since determination of a suitable amount of intersection which suits the purpose makes it possible sort out any false intersections, should they deviate substantially form the remaining intersections found. A sufficient amount of intersecting points may for cer¬ tain applications be 3-5. In accordance with claim 4, by allowing the angle between the line-of-convergence structures in the crominance spectre for the determination of the intersection or - sections to exceed 10°, preferably 25°, it is possible to initially reduce the uncertainty associated with the intersections found, since any uncertainty in the deter¬ mination of the angles of the lines of convergence struc- tures in the colour spectre provides a reduced uncer¬ tainty on the intersecting point found as the angle in¬ creases. This applies in particular when the calculations on one or more levels are quantized. In accordance with claim 5, by weighting the pixels pres¬ ent in the crominance dimension, the further option of identifying the line of convergences present becomes available, or that of simplifying the necessary calcula¬ tions since the colours which occur infrequently will not be weighted equally with the colours that occur fre- quently. One method of weighting these pixels could be a logarith¬ mic histogram in the colour spectre. In accordance with claim 6, by allowing the examination of the crominance dimension of the colour spectre to com¬ prise an approximation of part of or all of the carthesic crominance representation of all the pixels to a parame- terised function via a Hough-transformation, a practical embodiment according to the invention is obtained, as the pixels in the colour spectre may be approximized to any parameterised function. In some types of colour spectres, the line-of-convergence structures will thus be arcuate curves, which is why in this case the Hough- transformations may be used for the approximation of ar¬ cuate line-of-convergence structures. In accordance with claim 7, by allowing the Hough- transformation approximate part of or all the carthesic crominance representation of the pixels (x,y) to a polar representation (θ,p), since the polar representation is quantised in θ,p whereby the line representation is de¬ picted in an accumulator cell constituted of the respec- tive θ,p-quantised co-ordinates, an advantageous embodi¬ ment according to the invention is obtained. Since the accumulator cell which obtains the highest value corresponds to the line on which most pixels are situated, it will be suitable on the basis of these accu¬ mulator cells to carry out the further calculations in connection with the determination of intersections on the basis of the accumulator cells having the highest value. In accordance with claim 8, by approximating the pixels in the colour spectre to a straight line in a polar sys¬ tem of co-ordinates via a Hough-transformation using the fomula xcosθ + ysinθ=p wherein x and y represent the carthesic representation in one plane of a colour spectre, θ represents the angle to the axis of abscissa and p is the angular distance from origo to the line, a practical embodiment according to the invention is provided since several of the most used colour spectres for the representation of digital photo¬ graphs will contain straight line-of-convergence struc¬ tures . In accordance with claim 9, by approximating the colour spectre to a straight line in a polar system of co¬ ordinates via a modified Hough-transformation following the formula xcosθ + ysinθ = pHι og (a*,b*) wherein x and y represent the carthesic representation in a plane of a colour spectre, θ represents the angle to the axis of abscissa, and p is the angular distance from origo to the line, and wherein H log (a*,b*) = p log (∑U(a*,b*)) U(a*,b*) being a unit function which is summed-up over the entire x,y plane, a particularly advantageous embodi¬ ment according to the invention is obtained, since the scaling of a point on a line in the x,y plane is con- tained in the approximation. In practise this allows for the calculation of very well defined line-of-convergence structures. The use of a logarithm function in this context is asso- ciated with the exemplary advantage that it is avoided that two or three - colours dominate and that other line- of-convergence structures drown. In accordance with claim 10, by letting the intersections of the line-of-convergence structures ( x,y) be found by the formula x = (p - ysinθ)/cosθ, and y = (plcosθ2 - p2cosθl)/sin(θl-θ2) , wherein pl,θl represent the co-ordinates of the one line in the polar representation in the form of a point or an accumu¬ lator cell in the polar Hough diagram, p2,θ2 represent the co-ordinates of the second line, and p,θ are any of the two lines co-ordinates, a simple calculation of in¬ tersections between two lines is obtained which may by used in a corresponding manner for all the line-of- convergence structures found. In accordance with claim 11, selecting iteratively on or more line candidates in the crominance dimension and sub¬ sequently carrying out a summation of the square on the distance of pixels to the line candidate, the line candi¬ date being selected from among pixels where the summation assumes a minimum, a further advantageous embodiment ac¬ cording to the invention is obtained since an iterative calculation of found line candidates may in some in¬ stances be advantageous and simple. The method employed is also called the least square method. In accordance with claim 12, subsequent correction of the data of the digitally represented photograph depending on said intersectional relation whereby the intersecting point of the line structure is displaced to or near to the neutral point of the colour spectre or the colour plane provides effective and reproductive correction of colour style or other colouration defects in the photo¬ graph. The method may be adapted to various applications on the basis of knowledge of the colour reproduction properties of currently used printers or reproduction equipment whereby the use of the reproduction equipment becomes less critical. Of course, the correction should be adapted to the chosen colour standard. In accordance with claim 13, linear correction of cromi¬ nance data of the digitally represented photograph de- pending on said intersecting relation, whereby the inter¬ secting point of the line structures is shifted to or near to the neutral point of the colour spectre or the colour plane, provides a surprising and simple correction of a photograph with colour casts or other colouration defects, since the total colour spectre may so to speak an a whole be shifted in such a manner that the neutral point(s) found in the analysis coincide(s) with the theo¬ retical neutral point for the chosen colour standard. In accordance with claim 14, subdivision of the colour spectre into a number of luminance layers, and separate analysis of one or more luminance layers make it possible to perform a more detailed examination of a photograph and its colour conditions, since each luminance layer thus well defines a crominance dimension which may be ex- amined separately. A sufficient number of luminance layers may e.g. be five for a number of applications . In accordance with claim 15, separate correction of each luminance layer, if correction is possible, provides an effective possibility of obtaining good and reliable pho¬ tographic correction. It will also be possible to sort out corrections found in specific luminance layers. In accordance with claim 16, implementation of the method in a computer for the processing of digital photographic data provides optimum utilization of the invention since analysis and correction may be carried out automatically and most advantageously without any manual surveillance. If other measures are taken to ensure that the crominance contents of the photographic element group is substan¬ tially constant, it will suffice in the determination of the colour distance to concentrate exclusively on the relative positioning of the points along the luminance axis . Since the photograph is a matrix structure, the pixel element group may advantageously be constituted of photo¬ graphic elements within a rectangular frame. If several highlight or shade areas are available, discolouration estimates may be made for each of these areas, and the spreading of or variance in these discolouration esti- mates may be used to assess the quality or the unambigu- ity of the relevant discolouration. The invention will now be described with reference to preferred embodiments and with reference to the drawings, wherein Figure 1 schematically illustrates the L*a*b*-colour spectre wherein the plane expanded by a* and b* contains the chromatic information; Figure 2 shows a surface plot for a test photograph in the L*a*b* colour spectre to illustrate the positions of the visible colours; Figure 3 illustrates three plots of the surface of the structure produced for a picture in the L*a*b colour spectre; Figure 4 shows an a*b*-diagram from a test photograph for illustration of the colour distribution of the photograph; Figure 5 illustrates the same photograph as Figure 4, the frequency of the colours within a cell being recorded whereby the colours most fre- quently occuring will appear the darkest; Figures 6,7 illustrate the effect of a Hough transforma¬ tion, the lines strucures shown in Figure 6, however, being transformed into point struc- tures in Figure 7; Figure 8 illustrates a route diagram for determining the line structure in a diagram corresponding to Figure 5; Figures 9,10 show results of the Hough-transformation in a test photograph, Figure 9 showing the re¬ sult from a conventional Hough-transformation while Figure 10 shows the result of a modi- fied Hough-transformation; and Figure 11 shows the insertion of lines determined in the method illustrated in Figure 8 where the lines were inserted into the diagram illus- trated in Figure 5, and wherein the inter¬ secting point of the lines is used as an es¬ timate of the discolouration of the photo¬ graph. In a first method the discolouration of a photograph is determined in accordance with the L*a*b* representation, the luminance and crominance contents of the photographic elements being separated as shown in Figure 1. Other col¬ our models where this is also the case may also be used, e.g. the CMYK model which is recommended by CIE. In his above-mentioned article, Judd et al. accounts for the representation of the visible colours in the L*a*b model. The model is as shown in Figure 1. An example of a colour photograph's representation in the L*a*b*-model is shown in Figure 2. Here the informa¬ tion is contained in a cube which provides improved il¬ lustration of the colour distribution of a photograph compared to the normal L*a*b*-model where the crominance parameters are situated on a surface in a plane, and wherein the crominance parameters are depicted along an axis perpendicular to this plane. Shade and highlight will be situated at the extreme points of the L*-axis. Figure 3 is a representation from which it will appear that there is a discolouration in the b*-orientation. The noise occurs in limited form and it may be reduced by a low pace or a median filtration. However, in this context it may have some adverse effects since a general filtration will produce an interpolation and thus destroy minor shadow/highlight points and require a separate run- through of the photograph which will reduce the time available for the correction. The method according to the invention is based on the discovery that colours converge towards neutral. For many photographs the diagram is star-shaped. What could be observed was that when the photograph was cor- rected for colour casts it would most often look like the centre of the star, corresponding to neutral in the col¬ our spectre. The plot in Figure 4 is a corresponding plot in the L*a*b*-colour spectre for a test photograph. With some ingenuity, there may be observed a tendency to the centre of the three-armed star being situated at appr. (a*,b*)=(-4,-7) . It is inconvenient but possible to de¬ termine the centre of a binary chromaticity diagram since the colours which rarely occur in the photograph are scaled equally with the colours which occur frequently. In a histogram the number of times the colour occurs in the photograph is summed up and this number may be trans¬ ferred onto a chromaticity diagram like H(a*,b*) = ∑U(a*,b*) Formula 1 x,y U(a*,b*) is a unit function which always has the result 1, and x,y indicates that summations are carried out throughout the whole photograph. The result of such his- togram is that two to three dominating colours are visi¬ ble in the plot. To avoid this, it is chosen to use a logarithmic histogram defined as follows Hiog (a*,b*) = log(∑U(a*,b*) ) Formula 2 The result will appear from Figure 5. The use of a histo¬ gram makes it possible to observe how colours converge towards a centre. By following the darkest areas in the histogram, two lines which intersect in a point corre¬ sponding to (a*,b*) = (-4,-7) may clearly be perceived. In order to reach the point towards which convergence is directed, it is necessary to approximate "the arms" in the plot by means of a parameterized function. The plot in Figure 5 indicates that a successful approximation is a straight line. By using a parameterised function, the option of carrying out analytical or iterative calculations on the line structures thus becomes available. One method of approximating structures to a parameterised function is by using a Hough-transformation. A Hough- transformation may be used to approximate structures to any function. To approximate lines, the algorithm maps colinear points from a carthesic system of co-ordinates (x,y) to a point in a polar system of co-ordinates (θ,p) . The relation between the systems of co-ordinates may be written as xcosθ + ysinθ = p Formula 3 wherein p represents the angular distance from origo to the line and θ is the angle to the axis of abscissa, cf. Figure 6. If in a photograph there are n colinear points in the (x,y) system of co-ordinates, the solving of for¬ mula 3 will yield n curves in the (θ,p) system of co¬ ordinates . All curves will intersect in one and only one point corresponding to the θ,p parameters for the line. The magnitude of calculation is enormous since formula 3 needs to be solved for all points within the (x,y) system of co-ordinates following which the intersection for all solutions is to be found. In order to reduce the calcula¬ tion magnitude the (θ,p) system of co-ordinates is quan¬ tised. This is done by dividing the θ and p axes into in¬ tervals whereby a number of so-called accumulator cells is formed in the (θ,p) system of co-ordinates, cf. Figure 7. For each θ interval the corresponding p value is cal¬ culated which is rounded off to the most proximate p in¬ terval and the relevant accumulator cell is counted. The accumulator cell which reaches the highest value corre¬ sponds to the line which contains most points . The accu- racy of the parameterisation is determined by the size of the accumulator cells . The traditional Hough-transformation is based on points which corresponds to binary depictions . As illustrated in Figure 4, a part of the information is lost due to the use of a binary histogram which means that the Hough- transformation in the histogram is transferred to the parameterisation. One way of modifying the Hough-transformation to effect transfer of the information contained in the histogram is to accumulate the scaling of a point to a line. This will modify formula 3 into xcosθ + ysinθ = pH lo „ <**.&*> Formula A wherein Hι og (a*,b*) is defined like in Formula 2. Tests have been performed with both types of Hough- transformations and the results will appear from Figures 9 and 10. In the test θ m i n =-π/2 and θ max = π/2. This in¬ terval is quantised in 50 steps which yields a maximum quantising error of π/100∞2°. The interval p depends on the size of the histogram. If the histogram has the size n x n, Pmin = -n and p max - 2n,which is quantised in 3n steps, which yields a maximum quantising error of 0.5. The Hough-diagram is to be used for finding intersections between lines which requires reasonable disparallelism between the lines . This means that the selection of line sections from the Hough-diagram should be effected step¬ wise to ensure that the quantising error does not domi¬ nate the result. A calculation of the exact quantising error has not been effected since this result would be a function of pι ( P 2 , B± t θ 2 ,k, cf. formula 5. But with a disparallelism of π/8 and pi = p 2 = n, the quantifying error in (y,x)-coordinates will be about 1 which is rea¬ sonable for this application. In order to ensure that this requirement is met, the method outlined in Figure 8 is used to find candidates for converging lines . The intersection between two lines, θi, pi and θ 2 , P 2 ma y in (x,y) be expressed as X = ( p - ysinθ ) /cosθ , and y = ( plcos0 £ - P 2 COSΘ 1 ) /sin (θι ,θ 2 ) Formula 5 For the calculation of x, both θi, pi and Θ 2 , P 2 ma y be used. In order to compare the conventional Hough-transformation to the modified version, the intersections between the first four lines are intended for both types of transfor¬ mations . The results are given in Table 1. The results for the conventional Hough transformation are very am¬ biguous . This is due to the fact that the Hough- transformation actually expresses the maximum length in the binary plot in Figure 4. Conversely, the modified Hough-transformation is very unambiguous. All intersec¬ tions are in the proximity of (x,y) = (32,46), or in the proximity of L*a*b*-coordinates (a*,b*) = (-5,-9). If this is compared to the point of convergence which was observed in the histogramme, Figure 4, it is surprising how unambiguously the intersections have been determined. In Figure 11 the fine lines have been inserted into the logarithmic histogram for the photograph. When line parameterisation of a histogram for a photo¬ graph is carried out, the point of convergence for the entire photograph is found. As already shown, the discol¬ ouration is not a global imbalance, but an imbalance as a function of L* . It is possible to use the modified Hough- transformation in various sections of the photograph so that the point of convergence is found as a function of L* in the sense that the colour spectre is divided into a number of luminance spectres, e.g. five, following which they are examined separately in the crominance dimension. The modified Hough-method has been used on quite a number of photographs . With the method which utilizes the fact that all colours converge towards neutral, it is possible to find the grey balance in all points of the L*-axis provided a suffi¬ cient amount of different colours is found in the rele¬ vant area. In that case the method is extremely suitable. It is a further advantage of the method that it is possi- ble to calculate the uncertainty in the intersection of the lines of convergence found. Finally it should be repeated that alternative and suit¬ able methods may be used for selecting or determining the line-of-convergence structures in addition to the methods described herein.

Claims: C l a i m s 1. A method of analysing and optionally correcting colour casts or colouring errors in a digitally repre- sented image, wherein each photograph is represented by a number of pixels or photographic points in a colour space with separate crominance and luminance dimensions c h a r a c t e r i z e d in that a) part of or all of the crominance dimensions of the colour space are examined to establish completely or partially hidden line-of-convergence structures, b) that two or more line-of-convergence structures are determined as parameterized functions, and that c) on the basis of these line-of-convergence struc¬ tures at least one mutual intersecting point is estab- lished for determining the colour convergence of the digitally represented image. 2. A method according to claim 1, characterized in that the colour space is divided into colour cells which consist of the quantised axes of crominance and lumi¬ nance. 3. A method according to claims 1 or 2, character¬ ised in that at least two coincidental intersections are determined which are subsequently used for sorting out non-coincidental intersections. 4. A method according to claims 1-3, characterised in that the angle between the line-of-convergence struc- tures for determining the intersection(s) in the cromi¬ nance space exceeds 10°, preferably 25°. 5. A method according to claims 1-4, characterized in a weighting of the image points present in the cromi¬ nance dimension. 6. A method according to claims 1-5, characterized in that the examination of the carthesic crominance di¬ mension of the colour space comprises an approximation of a portion of or all of the image points to a parameter- ised function via a Hough-transformation. 7. A method according to claim 6, characterized in that the Hough-transformation approximates a portion of or all of the carthesic crominance representation (x,y) of all the photographic points to a polar representation (θ,p) as the polar representation is quantised in θ,p in such a manner that the line representation is depicted in an accumulator cell which consists of the respective θ,p- quantised co-ordinates . 8. A method according to claims 6 or 7 , character¬ ised in that the image points in the colour space are ap¬ proximated to a straight line in a polar system of co¬ ordinates via a Hough-transformation according to the formula xcosθ + ysinθ = p wherein x and y represents the carthesic representation in a plane of a colour spectre, θ represents the angle to the axis of abscissa and p is the angular distance from origo to the line. 9. A method according to claims 6 or 7, character- ised in that the image points in the colour space are ap¬ proximated to a straight line in a polar system of co- ordinates via a modified Hough-transformation according to the formula xcosθ + ysinθ = pHι og (a*,b*), wherein x and y designate the carthesic representation in a plane of a colour space, θ designates the angle to the axis of abscissa, p is the angular distance from origo to the line, and wherein pHι og (a*,b*) = plog(∑U(a*,b*)) the U(a*,b*) being a unit function which is summed up throughout the entire x,y-plane. 10. A method according to claims 6-9, characterised in that the intersections (x,y) of the line-of- convergence structures are found as expressed by: x = (p - ysinθ) /cosθ, and y = (ρlcosθ2 - p2cosθl)/sin(θl-θ2) , wherein p,θ represent the coordinates of the one line in the po- lar representation in the form of a point or an accumula¬ tor cell in the polar Hough-diagram, p2,Q2 represent the co-ordinates of the second line, and p,θ is any one of the coordinates of the two lines . 11. A method according to claims 1-5, characterized in that one or more line candidates are selected in the crominance dimension whereupon a summation of the square of the distance of pixels to the line candidate is car¬ ried out, the line candidate being selected from among the pixels where the summation assumes a minimum. 12. A method according to claim 1-11, characterised in that the data of the digitally represented image are subsequently corrected depending on said intersection ra¬ tios in such a manner that the intersecting points of the line structures are shifted to or near to the neutral point of the colour spectre or the colour plane. 13. A method according to claims 1-12, characterized in that the data of the digitally represented image are subsequently corrected linearly depending on said inter¬ secting ratios in such a manner that the intersecting point of the line structures is displaced to or near to the neutral point of the colour spectre or the colour plane. 14. A method according to claims 1-13, characterised in that the colour space is subdivided into a number of luminance layers, and that one or more luminance layers are analysed separately. 15. A method according to claims 14, characterised in that each luminance layer is corrected separately if correction is possible. 16. An apparatus for the correction of colour casts in a digitally represented image according to the method of claims 1-15, characterised in that the method is im¬ plemented in a computer for the processing of digital im¬ age data. 17. An apparatus according to claim 16, character¬ ised in that the computer comprises means for the control of the colour application of a printing unit into a me¬ dium. 18. An apparatus according to claim 16, character¬ ised in that the computer comprises means for the control of the colour representation on a computer or television screen.

Inventors: SCHISTAD BERNHARD, SCHISTAD, BERNHARD
Applicants: PURUP PREPRESS AS, SCHISTAD BERNHARD, PURUP PREPRESS A/S, SCHISTAD, BERNHARD
Application year: 1996
Main classification: G06T5
IPC codes: G06T1, G06T7, H04N1