Method for identifying film type

Abstract: A method for identifying the film type of a color input medium having picture and film border areas and which is scanned to produce an input image having a multiplicity of color separations having portions corresponding to the picture and border areas, the method including the steps of creating picture histograms of the picture area of the input image, defining a dark level and a bright level for each of the picture histograms and identifying a film type by comparing the dark and bright levels to predetermined thresholds defining predetermined characteristics of a given film type.

Description: The present invention relates to automatic detection of negative and positive slides. As is known in the art, color separation scanners process negative and positive slides in different ways. Therefore, prior art scanners require some indication from the operator as to whether the input medium to be scanned is a positive or negative slide. Example methods of providing indications are via a specific button or mechanical switch, or selecting from a menu on a screen. The requirement of repeated indication can be irritating, troublesome and can cause time consuming mistakes, especially with scanners which automatically load input media to be scanned. In US-A- 4,829,371 a color scanner is disclosed which discriminates the type of film, for example color negative vs. color positive, in accordance with the light transmittance of an unexposed portion of the film. Apparatus is described in which the spectral transmittance is compared with outputs produced by a reference voltage generator. The present invention provides apparatus and method for automatically determining whether an input medium is a positive or negative slide. There is provided in accordance with the present invention a method for identifying the film type of a color input film having picture and film border areas and which is scanned to produce an input image having a multiplicity of color separations having portions corresponding to said picture and border areas, the method comprising the steps of creating for each color separation a picture density histograms of said picture area of said input image; defining a dark level and a bright level for each of said picture histograms; and identifying a film type by comparing said dark and bright levels to predetermined thresholds defining predetermined characteristics of a given film type. Further in accordance with the present invention the input image is comprised of pixels and the step of creating said picture histograms includes the step of eliminating pixels the luminance of which differs from the luminance of neighboring pixels by more than a predetermined minimal luminance level. Additionally in accordance with the present invention the step of creating picture histograms includes the step of eliminating pixels the luminance of which differ from the luminance of neighboring pixels by less than a predetermined maximal luminance value. In accordance with the present invention the step of creating picture histograms includes the steps of creating first histograms from said input image and defining said picture histograms as those portions of said first histograms extending from the origin to a first gap of at least a predetermined size. Further in accordance with the present invention the multiplicity of color separations comprise red, blue and green color separations, wherein said dark and bright levels include red dark and bright levels, green dark and bright levels, blue dark and bright levels and luminance dark and bright levels. Additionally in accordance with the present invention the step of identifying includes the step of determining whether the red dark level is darker than one of the predetermined density thresholds corresponding to red dark levels, which predetermined density threshold is within the range 1.44 - 2.25. Still further in accordance with the present invention the step of identifying includes the step of determining whether the blue bright level is brighter than one of the predetermined density thresholds corresponding to blue bright levels, which predetermined density threshold is within the range of 0.27 - 1.0. In accordance with the present invention the step of identifying includes the step of determining whether the luminance bright level is brighter than one of the predetermined thresholds corresponding to luminance dark levels, which predetermined threshold is within the density range of 0.38 - 0.85. Further in accordance with the present invention the step of identifying includes the step of determining transmission ratios between the red and green dark levels, the red and blue dark levels, the red and green bright levels and the red and blue bright levels. Still further in accordance with the present invention the step of identifying includes the step of determining whether the transmission ratio between the red and green dark levels is smaller than one of the predetermined thresholds corresponding to the ratio between red and green dark levels, which predetermined threshold is between 0.2 and 0.9. Additionally in accordance with the present invention the step of identifying includes the step of determining whether the transmission ratio between the red and blue dark levels is smaller than one of the predetermined thresholds corresponding to the ratio between red and blue dark levels, which predetermined threshold is between 0.1 and 0.7. In accordance with the present invention the step of identifying includes the step of determining whether the transmission ratio between the red and green bright levels is smaller than one of the predetermined thresholds corresponding to the ratio between red and green bright levels, which predetermined threshold is between 0.2 and 0.9. Further in accordance with the present invention the step of identifying includes the step of determining whether the transmission ratio between the red and blue bright levels is smaller than one of the predetermined thresholds corresponding to the ratio between red and blue bright levels, which predetermined threshold is between 0.1 and 0.7. Additionally in accordance with the present invention the dark levels are generally slightly brighter and the bright levels are generally slightly brighter than a predetermined percentage of the pixels of the image. Still further in accordance with the present invention the step of identifying includes the steps of determining transmission ratios between the red and green dark levels, the red and blue dark levels, the red and green bright levels and the red and blue bright levels, determining whether: a) the red dark level is darker than one of the predetermined thresholds corresponding to red dark levels; b) the blue bright level is brighter than one of the predetermined thresholds corresponding to blue dark levels; c) the luminance bright level is brighter than one of the predetermined thresholds corresponding to luminance bright levels; d) the transmission ratio between the red and green dark levels is smaller than one of the predetermined thresholds corresponding to the ratio between red and green dark levels; e) the transmission ratio between the red and blue dark levels is smaller than one of the predetermined thresholds corresponding to the ratio between red and blue dark levels; f) the transmission ratio between the red and green bright levels is smaller than one of the predetermined thresholds corresponding to the ratio between red and green bright levels; g) the transmission ratio between the red and blue bright levels is smaller than one of the predetermined thresholds corresponding to the ratio between red and blue bright levels; producing a weighted average of at least two results of parts a - g of the second step of determining and utilizing the weighted average to determine the film type. BRIEF DESCRIPTION OF THE DRAWINGS The present invention will be understood and appreciated more fully from the following detailed description taken in conjunction with the drawings in which: Fig. 1A is a color illustration of a positive slide; Fig. 1B is a color illustration of a negative slide; Fig. 1C is a schematic illustration of a 35mm negative slide; Fig. 2 is a flow chart illustration of a method of identifying negative and positive slides; Fig. 3A is a graphical illustration of a histogram of transmission levels from a negative slide before processing, useful in the method of Fig. 2; Fig. 3B is a graphical illustration of a histogram of transmission levels from a negative slide after processing, useful in the method of Fig. 2; Fig. 4 is a graphical illustration of a histogram showing how the histogram can be used to define a dark level and a bright level, useful in the method of Fig. 2; Figs. 5A and 5B are graphical illustrations of histograms of positive and negative slides, respectively, showing the relative location of dark levels for red signals; and Figs. 6A and 6B are graphical illustrations of histograms of positive and negative slides, respectively, showing the relative location of bright levels for blue signals. DETAILED DESCRIPTION OF PRESENT INVENTION Reference is now made to Figs. 1A and 1B which are color illustrations of an exemplary color positive slide 8 and an exemplary color negative slide 9, respectively. Each slide 8 and 9 has a picture area 10 and a film border area 12 where within the picture area 10 of the color positive 8 is a positive grey scale 20 and within the picture area 10 of the color negative slide 9 is a negative grey scale 22, indicating the range of grey values in the respective picture area 10. As can be seen from Figs. 1A and 1B, the color negative slide 9 is characterized by a strong cast, which is typically a shade of orange, and a low dynamic range. The strong cast is particularly noticeable in the film border area 12 of negative slide 9 and the low dynamic range is noticeable when comparing the positive grey scale 22 with that of the negative grey scale 20. The variety of grey tones is less in positive grey scale 22 than in negative grey scale 20. In accordance with the present invention, the above-described characteristics are utilized in identifying the presence of negative and positive slides. Another characteristic of some negative slides 9 is illustrated in Fig. 1C to which reference is now briefly made. Fig. 1C schematically illustrates a 35mm negative which, as is known in the art, has perforations 24 in the film border area 12. The present invention can accommodate this characteristic. Reference is now made to Fig. 2 which illustrates, in flow chart format, a method for identifying negative and positive slides. The method of the present invention receives as input a digital image of an input medium, which is either a negative slide 9 or a positive slide 8. The digital image is a description of the input medium separated into its color separation components, typically in the Red-Green-Blue (RGB) color coordinate system. As is known in the art, the digital image is divided into a plurality of pixels (pixel elements) each of which has three RGB values which are typically in light transmission units. The present invention provides a method of analyzing the input image. Through histogram analysis of the three color separations, the highlight and shadow density of the input image is computed. Since perforations 24 may add very bright values to the three separation histograms, artificially expanding the dynamic range of the negative slide 9 and since erratic scanning may place perforations 24 in the picture area 10, these values are eliminated in two ways: a) only "dynamic areas", areas with a sufficient (but not too large) transmission difference between neighboring pixels, are included in the histograms; and b) since histograms of negative slides 9 typically contain a large gap between values associated with both the film border 12 and perforations 24 and those associated with the picture area 10, the histograms only include data up to the large gap (see Fig. 3A). Finally, quantitative criteria are used on the histograms produced after the elimination described hereinabove to determine whether the input medium is a positive or negative slide. The method of the present invention begins, in step 30, by increasing the signal-to-noise ratio of the data of the input image. This can be accomplished by substituting, for each pixel, the average transmission value of the pixels in a n x m window around and including the pixel. The values of n and m depend on the resolution of the original image and on the physical size of the input medium. An example window might be of size 3x3 or 9x9. Step 30 produces a filtered image. In step 32, a "luminance separation" L is produced from the filtered image to provide an indication of the brightness throughout the filtered image. As is known in the art and as described on page 101 of the book The Reproduction of Color , by R.W.G. Hunt, Fountain Press, England, 1975, incorporated herein by reference, the luminance for any given pixel is approximately a weighted average of the transmission values of the three (red, green and blue) color separations for that pixel. The function for the luminance L can be written as follows: L = a 1 R + a 2 G + a 3 B where the weights, a 1 , a 2 and a 3 depend on the specific scanner used. Typically, a 1 varies between 0.2 and 0.5, a 2 varies between 0.3 and 0.8 and a 3 varies between -0.2 and 0.2. As is known in the art, the luminance is measured in density units where density is the negative log of the ratio of transmitted light to incident light. In step 34, areas of very high contrast, such as typically occur at the edges between the perforations 24 and the film border 12, and areas of very low contrast, such as typically occur within the perforations 24 and the film border 12, are eliminated. If because of erratic scanning of the film frame, the perforations 24 appear within the picture area 10, this elimination process prevents at least some portion of perforations 24 from affecting the analysis. The elimination is typically performed by first calculating the density difference, or alternatively, the luminance ratio, between a given pixel and its closest neighbors, typically the four closest neighbors. The density is indicated as: density = -log(transmitted L/incident L) Only if the maximum difference, or ratio, produced is between two predetermined values, defined herein as dif_min and dif_max, is the pixel utilized in later steps of the method. Dif_min and dif_max typically range between 0.01 - 0.7 density units for dif_min and between 0.2 - 2.3 density units for dif_max. Alternatively, the mean difference can be utilized. In step 36, those pixels which have not been eliminated in step 34 are utilized to produce four histograms, one each for the red, green, blue and luminance separations. The histograms are graphs whose domains are transmission levels and whose ranges are the number of pixels having a given transmission level. In step 38 any data from the perforations 24 which was not eliminated in step 34 is removed from each histogram. The data from the perforations 24 is typically much brighter than the data from the rest of the negative slide. This is shown in Fig. 3A, to which reference is now briefly made, where the transmission levels of data from perforations 24 are higher and separate from the data, shown as a curve 40, of the rest of the negative slide. Therefore, in step 38, the highest transmission level of the histogram is redefined as the transmission level at the end of curve 40. The result of step 38 is shown in Fig. 3B. The end of curve 40 is defined as the first transmission level for which the sum of the histogram values for a window succeeding the current transmission level is less than a predetermined threshold T. The end of curve 40 is found by first determining the transmission level having the largest number of pixels (i.e. a peak 41 of the histogram) and then performing the window calculations. It will be appreciated that, since the histogram graphs number of pixels versus transmission levels, an integral under curve 40 within a window represents a percentage of the number of pixels in the filtered image. The window is typically of a predetermined number K transmission levels wide, where K is typically between 5 - 100 transmission levels for a 12 bit resolution scanner and T is typically between 0.0 - 5 percent of the total number of pixels. In step 42 dark levels and bright levels are determined for each histogram. The dark and bright levels, denoted D and B, are illustrated in Fig. 4 to which reference is now briefly made. Fig. 4 shows a typical histogram divided into three regions, R1, R2 and R3. The dark level is at the border of regions R1 and R2 and the bright level is at the border of regions R2 and R3. The dark levels, denoted DR, DG, DB and DL for the red, green, blue and luminance separations, respectively, are those transmission levels just below which are a predetermined percentage, %D, of the pixels. Similarly, the bright levels, denoted BR, BG, BB and BL for the red, green, blue and luminance separations, respectively, are those transmission levels just below which are a predetermined percentage %B of the pixels. Using Fig. 4 as an example, the dark level D and the bright level B are determined such that they divide the histogram into three regions R1, R2, R3, which comply with the following equations: S R1 /(S R1 + S R2 + S R3 ) = %D S R3 /(S R1 + S R2 + S R3 ) = %B where %D and %B are predetermined values, and S Ri is the sum of the histogram values in the region R i . Example values for %D and %B are between 0.01% - 5% and between 90% - 100%, respectively. It will be noted that to avoid problems of noise, the very darkest and the very brightest possible transmission levels are not selected; rather, transmission levels fairly close to the darkest and brightest transmission levels are selected. Because of the strong orange cast of color negative slides, the red dark level, DR, is at a high transmission level with respect to the other dark levels of the negative slide and with respect to the red dark level of a positive slide. This is shown in Figs. 5A and 5B, to which reference is now briefly made, which respectively illustrate histograms for positive and negative slides. As can be seen, the red dark level DR is at a higher transmission level in Fig. 5B than it is in Fig. 5A. The blue dark level is at a relatively low transmission level and the green dark level is between the red and blue dark levels. The bright levels of negative slides show similar features: the red bright level is at a high transmission level, the green bright level is at a medium transmission level and the blue bright level is at a low transmission level, with respect to each other and with respect to the corresponding bright level of a positive slide. Figs. 6A and 6B, to which reference is now briefly made, respectively illustrate histograms for positive and negative slides for blue signals. As can be seen, the blue bright level BB is at a higher transmission level in Fig. 6A than it is in Fig. 6B. The discussion hereinabove indicates that, for any slide, the ratios between its red and green dark and bright levels and red and blue dark and bright levels are determinable and can be used to identify negative slides or positive slides. In step 44, the ratios described hereinabove are calculated. Furthermore, as mentioned hereinabove, a positive slide is generally much brighter than a negative slide. Therefore, the luminance bright level BL is much higher for a positive than for a negative slide. These characteristics are used to identify positive and negative slides in the tests described hereinbelow. Each test, on its own, can positively identify a positive or negative slide. Alternatively, the tests can be combined in any desired combination to more definitively identify a positive or negative slide. The selection of the tests depends on the required sensitivity and specificity of the identification. Furthermore, a combined weighted average of the results of all of the tests can be calculated to use as a quantitative criteria for identification. It is noted that the tests are written herein such that a TRUE result identifies a positive slide. The thresholds are expressed in density units, but the equivalent transmission values can be used instead. In step 46 the following tests are performed: 1) Is the red dark level DR less than a threshold density value r_dark_th which typically ranges between 2.25 - 1.44? 2) Is the blue bright level BR greater than a threshold density value b_bright_th, which typically ranges between 0.27 - 1.0 ? 3) Is the luminance bright level BL larger than a threshold density value l_bright_th which typically ranges between 0.38 - 0.85 ? 4) Is the transmission ratio rg_d between the red and green dark levels smaller than a threshold value rg_d_th which typically ranges between 0.2 - 0.9 ? 5) Is the transmission ratio rb_d between the red and blue dark levels smaller than a threshold value rb_d_th, which typically ranges between 0.1 - 0.7 ? 6) Is the transmission ratio rg_b between the red and green bright levels smaller than a threshold value rg_b_th which ranges between 0.2 - 0.9 ? 7) Is the transmission ratio rb_b between the red and blue bright levels smaller than a threshold value rb_b_th which typically ranges between 0.1 - 0.7 ? It will be appreciated by persons skilled in the art that the present invention is not limited to what has been particularly shown and described hereinabove. Rather the scope of the present invention is defined only by the claims which follow:

Claims: A method for identifying the film type of a color input film having picture (10) and film border (12) areas and which is scanned to produce an input image having a multiplicity of color separations having portions corresponding to said picture and border areas, the method comprising the steps of: creating for each color separation a picture density histograms of said picture area of said input image; defining a dark level and a bright level for each of said picture histograms; and identifying a film type by comparing said dark and bright levels to predetermined thresholds defining predetermined characteristics of a given film type. A method according to claim and wherein said input image is comprised of pixels and said step of creating picture histograms includes the step of eliminating pixels the luminance of which differs from the luminance of neighboring pixels by more than a predetermined minimal luminance level. A method according to claim and wherein said input image is comprised of pixels and said step of creating picture histograms includes the step of eliminating pixels the luminance of which differ from the luminance of neighboring pixels by less than a predetermined maximal luminance value. A method according to claim 1 and wherein said step of creating picture histograms includes the steps of creating first histograms from said input image and defining said picture histograms as those portions of said first histograms extending from the origin to a first gap of at least a predetermined size. A method according to claim 1 wherein said multiplicity of color separations comprise red, blue and green color separations, wherein said dark and bright levels include red dark and bright levels, green dark and bright levels, blue dark and bright levels and luminance dark and bright levels. A method according to claim 5 and wherein said step of identifying includes the step of determining whether said red dark level is darker than one of said predetermined thresholds corresponding to red dark levels. A method according to claim 6 and wherein said predetermined density threshold is within the range 1.44 - 2.25. A method according to claim 5 and wherein said step of identifying includes the step of determining whether said blue bright level is brighter than one of said predetermined thresholds corresponding to blue bright levels. A method according to claim 8 and wherein said predetermined density threshold is within the range of 0.27 - 1.0. A method according to claim 5 and wherein said step of identifying includes the step of determining whether said luminance bright level is brighter than one of said predetermined thresholds corresponding to luminance dark levels. A method according to claim 10 and wherein said predetermined threshold is within the density range of 0.38 - 0.85. A method according to claim 5 and wherein said step of identifying includes the step of determining transmission ratios between said red and green dark levels, said red and blue dark levels, said red and green bright levels and said red and blue bright levels. A method according to claim 12 and wherein said step of identifying includes the step of determining whether said transmission ratio between said red and green dark levels is smaller than one of said predetermined thresholds corresponding to said ratio between red and green dark levels. A method according to claim 13 and wherein said predetermined threshold is between 0.2 and 0.9. A method according to claim 12 and wherein said step of identifying includes the step of determining whether said transmission ratio between said red and blue dark levels is smaller than one of said predetermined thresholds corresponding to said ratio between red and blue dark levels. A method according to claim 15 and wherein said predetermined threshold is between 0.1 and 0.7. A method according to claim 12 and wherein said step of identifying includes the step of determining whether said transmission ratio between said red and green bright levels is smaller than one of said predetermined thresholds corresponding to said ratio between red and green bright levels. A method according to claim 17 and wherein said predetermined threshold is between 0.2 and 0.9. A method according to claim 12 and wherein said step of identifying includes the step of determining whether said transmission ratio between said red and blue bright levels is smaller than one of said predetermined thresholds corresponding to said ratio between red and blue bright levels. A method according to claim 19 and wherein said predetermined threshold is between 0.1 and 0.7. A method according to claims 2 and 5 and wherein said dark levels are brighter than a first predetermined percentage of said pixels of said image and said bright levels are brighter than a second predetermined percentage of said pixels of said image. A method according to claim 5 and wherein said step of identifying includes the steps of: determining transmission ratios between said red and green dark levels, said red and blue dark levels, said red and green bright levels and said red and blue bright levels; determining whether: a) said red dark level is darker than one of said predetermined thresholds corresponding to red dark levels; b) said blue bright level is brighter than one of said predetermined thresholds corresponding to blue dark levels; c) said luminance bright level is brighter than one of said predetermined thresholds corresponding to luminance bright levels; d) said transmission ratio between said red and green dark levels is smaller than one of said predetermined thresholds corresponding to said ratio between red and green dark levels; e) said transmission ratio between said red and blue dark levels is smaller than one of said predetermined thresholds corresponding to said ratio between red and blue dark levels; f) said transmission ratio between said red and green bright levels is smaller than one of said predetermined thresholds corresponding to said ratio between red and green bright levels; g) said transmission ratio between said red and blue bright levels is smaller than one of said predetermined thresholds corresponding to said ratio between red and blue bright levels; producing a weighted average of at least two results of parts a - g of said second step of determining; and utilizing said weighted average to determine said film type.

Inventors: GOVRIN OMRI, GOVRIN, OMRI
Applicants: SCITEX CORP LTD, SCITEX CORPORATION LTD.
Application year: 1993
Main classification: H04N1
IPC codes: G06T7, H04N1, G06T1, G03B27