WO2010133547A1 - Method and device for processing a digital image - Google Patents

Method and device for processing a digital image Download PDF

Info

Publication number
WO2010133547A1
WO2010133547A1 PCT/EP2010/056734 EP2010056734W WO2010133547A1 WO 2010133547 A1 WO2010133547 A1 WO 2010133547A1 EP 2010056734 W EP2010056734 W EP 2010056734W WO 2010133547 A1 WO2010133547 A1 WO 2010133547A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
angle
inclination
contours
rectilinear
Prior art date
Application number
PCT/EP2010/056734
Other languages
French (fr)
Inventor
Estelle Lesellier
Antoine Chouly
Original Assignee
St-Ericsson Sa (St-Ericsson Ltd)
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by St-Ericsson Sa (St-Ericsson Ltd) filed Critical St-Ericsson Sa (St-Ericsson Ltd)
Publication of WO2010133547A1 publication Critical patent/WO2010133547A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/243Aligning, centring, orientation detection or correction of the image by compensating for image skew or non-uniform image deformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/48Extraction of image or video features by mapping characteristic values of the pattern into a parameter space, e.g. Hough transformation

Definitions

  • the estimate comprises a detection of a pertinent rectilinear contour of the image and a computation of an angle of orientation of the pertinent rectilinear contour relative to the said axis, the angle of inclination of the image being deduced from the said angle of orientation.
  • the initial detection means is also capable of rejecting isolated contours.
  • the device for processing one or more digital images may be included in an apparatus for capturing digital images.
  • FIG. 3 illustrates schematically a histogram of the distribution of the pixels of the image
  • FIG. 5 illustrates schematically yet another method of application of the method for processing a digital image
  • - Figure 6 illustrates schematically a method of application of the method for processing several digital images
  • FIG. 10 illustrates schematically an embodiment of a wireless communication apparatus comprising a device for processing one or more digital images.
  • Figure 1 shows schematically the main phases of an example o f a method of processing a digital image Pi.
  • This method comprises an estimate S l of an angle of inclination of the image Pi relative to an axis of the image AxH.
  • the frame Cdi comprises a height B4,B2 and a width B 1 ,B3 defining the number of pixels of the image Pi.
  • the frame Cdi of the image Pi corresponds to the traditional viewing frame, or to the display, of an apparatus for capturing images.
  • the axis of the image AxH may be oblique, for example on a diagonal of the image, vertical or horizontal.
  • the axis of the image will be horizontal or vertical.
  • the horizon line LHZ instead of being horizontal as in reality, is inclined at an angle (X H which corresponds to the angle of inclination of the image relative to the horizontal.
  • the estimation step S l makes it possible to estimate this angle of inclination (X H .
  • This estimation step S l comprises a step S I l of detecting a pertinent rectilinear contour of the image and a step S 12 of computing an angle of orientation of the pertinent rectilinear contour relative to the said axis. Moreover, during this computation step S 12, the angle o f inclination of the image is deduced from the said angle of orientation.
  • This step also makes it possible to delete certain non-pertinent contours of the image.
  • Figure 2 shows schematically the main phases of the step S I l for detecting a pertinent rectilinear contour.
  • the step S I l for detecting a pertinent rectilinear contour comprises a step for detecting several contours of the image S i l l , a processing step S l 12 and a step S l 13 for selecting the pertinent rectilinear contour.
  • the principle of detecting contours consists in identifying the pixels of a digital image that correspond to a sudden change in light intensity, that is to say a gradient of a contour.
  • the step S i l l for detecting contours of the image makes it possible to establish a binary table which contains the contours of the image Pi. It is possible to establish this table with the aid of filters which measure the gradients of the contours of the image. It is possible, for example, to apply a Sobel filter to the image Pi, but there are also other filters such as the Prewitt filters or Canny filters.
  • the essential contours of the image are retained by comparing the absolute value of the computed gradient with a threshold.
  • This threshold may be between 3% and 5% of the maximum value of the gradients of the image. Preferably, this threshold is equal to 4% of the maximum value of the gradients of the image.
  • the binary table then contains the contours of the image Pi having a gradient above the said threshold. This binary table is directly associated with the original digital image. In this table, the pixels belonging to a contour are for example represented by 1 and the pixels belonging to uniform or very slightly textured portions of the image are for example represented by 0.
  • this step S i l l for detecting contours of the image may comprise a step SR for rejecting the isolated contours.
  • this rejection step SR each pixel that is an element of a contour is identified in the binary table and if this pixel does not have neighbours (with a value at 0 in the binary table) the said pixel is eliminated because it is considered to belong to an isolated contour.
  • the pixel has at least one neighbour (with a value at 1 in the binary table) the said pixel is retained, because it is considered to belong to an unisolated contour.
  • This step S i l l for detecting contours of the image may also comprise a step of detection reliability.
  • this step of detection reliability the number of pixels that belong to at least one contour is compared relative to a first reliability threshold.
  • This first reliability threshold can be computed as a function of the size of the digital image Pi. This first reliability threshold may be equal to 10% of the total number of pixels in the image. Below this first reliability threshold, it is considered that the step S i l l for detecting contours of the image is not reliable and the processing method is stopped, while the processing continues if this is not the case.
  • the processing step S l 12 makes it possible to distinguish the rectilinear contours from the said contours detected in the previous step S i l l .
  • This processing step S l 12 comprises a conversion step S20 and a computation step S21.
  • the Cartesian coordinates (x,y) of the pixels belonging to the detected contours are converted into sinusoidal curves.
  • This step may be carried out, for example, with the aid of a Hough transform applied to the binary table established during the previous step S i l l .
  • the Hough transform is a technique for the recognition of shapes, well known to those skilled in the art, such as for example of the rectilinear contours of an image.
  • the principle of the Hough transform consists in converting each pixel from Cartesian coordinates (x,y) into a sinusoidal curve according to the equation (1 ) :
  • - p indicates the length of the line segment that links a pixel of a rectilinear contour of the image with the centre of the image Pi, the said segment being perpendicular to the said rectilinear contour;
  • (p, ⁇ ) are the polar coordinates of the rectilinear contours of the image.
  • the angle of orientation of the rectilinear contour ⁇ i is deduced as a function of its polar angle ⁇ , that is to say as a function of the angle of the line segment, according to the equation (2) :
  • the rectilinear contours Ci of the image are the stand PPL, the top portion of the parasol HPL, and the horizon line LHZ. Moreover, the angle ⁇ axis of the axis of the image AxH relative to the main border B l is zero.
  • the pixels belonging to one and the same rectilinear contour Ci of the image have their respective sinusoidal curves which all have a common point of intersection. This point of intersection therefore has as its coordinates the polar coordinates (p, ⁇ ) of the rectilinear contour Ci of the image.
  • the computation step S21 consists in computing the polar coordinates (p, ⁇ ) of the rectilinear contours amongst the detected contours.
  • a sinusoidal curve is determined for each pixel belonging to a contour (with a value at 1 in the binary table).
  • Each intersection between at least two curves then corresponds to the polar coordinates (p, ⁇ ) of a rectilinear contour of the image Ci.
  • N pixels are aligned on a rectilinear contour Ci
  • N sinusoidal curves associated respectively with each of the pixels will then be determined.
  • These N sinusoidal curves will all have a point of intersection, the polar coordinates of which (p, ⁇ ) correspond to the polar coordinates of the rectilinear contour Ci.
  • a polar table is generated comprising the polar coordinates (p, ⁇ ) of the detected rectilinear contours.
  • the step S l 13 for selecting the pertinent rectilinear contour makes it possible to identify a pertinent rectilinear contour from the said rectilinear contours obtained in the previous processing step S l 12.
  • this selection step S l 13 it is possible to quantify the angles of orientation ⁇ i of the rectilinear contours according to a sampling pitch, for example equal to 0.5 ° . This quantification makes it possible to limit the number of computations to determine the pertinent rectilinear contour of the image.
  • the user restricts, during this selection step S l 13 , the angles of orientation ⁇ i determined in a range centred on the axis of the image. It is possible to take, for example, a range of restriction of between ⁇ axis - 10° and ⁇ axis+ 10°, where ⁇ axis is the angle of the axis of the image relative to the main border of the image. This limits the selection of the pertinent rectilinear contour to the rectilinear contours that are close to the axis of the image.
  • This quantification and this restriction of the angles o f orientation make it possible to generate a second quantified polar table comprising the quantified polar coordinates (ps, ⁇ s) of the detected rectilinear contours having an angle of orientation ⁇ i lying in the range of restriction.
  • a weight is assigned to each rectilinear contour of the said table as a function, for example, of the value of the gradient of the contour, of the number of pixels belonging to the contour, of the colour or of the average luminance of the contour, of the position of the contour in the image, for example of the position of the contour relative to the centre of the image, etc. This weighting makes it possible to more easily determine the pertinent rectilinear contour of the image.
  • this determination it is also possible to prefer this determination by eliminating the selected rectilinear contours that do not contain a sufficient number of pixels.
  • the rectilinear contours having a number of pixels below a pertinence threshold are eliminated, for example this pertinence threshold may be equal to 30% of the maximum between the height and the width of the image Pi.
  • the pertinence threshold is equal to 30% of the height of the image when a vertical axis of the image is used.
  • the pertinence threshold is equal to 30% of the width of the image when a horizontal axis of the image is used.
  • the step S l 13 for selecting the pertinent rectilinear contour may also comprise a step SHI for computing a histogram of the distribution of the number of pixels belonging to the rectilinear contours as a function of the angles of orientation ⁇ i of the rectilinear contours. This histogram may be computed based on one of the polar tables generated in the previous processing step S l 12, by selecting, for each angle value ⁇ , ⁇ s, the predominant rectilinear contour, for example the rectilinear contour having the largest number of pixels.
  • the histogram obtained is analysed in order to select the pertinent rectilinear contour that has the largest number of pixels.
  • the pertinent rectilinear contour of the image will be the horizon line LHZ because it contains more pixels than the rectilinear contour corresponding to the stand of the parasol PPL or to the top portion of the parasol HPL.
  • the angle of inclination of the image (X H is estimated by computing a weighted average around the angle corresponding to the maximum of the histogram. This weighted average is taken for angles of orientation ⁇ i lying in the range between ⁇ axis- 10° and ⁇ axis + 10°, where ⁇ aX is is the angle of the axis of the image relative to the main border of the image.
  • - ⁇ i indicates the angle of orientation of a rectilinear contour relative to the axis of the image
  • - i index of the rectilinear contour
  • FIG. 3 shows schematically a histogram of the distribution of the number of pixels N belonging to the rectilinear contours as a function of the angles of orientation ⁇ i of the rectilinear contours.
  • Figure 4 shows schematically another method of application o f the method of processing a digital image. Certain elements described in Figure 1 above have also been transferred to Figure 4. Moreover, an additional vertical axis AxV has been shown on the image.
  • two axes of the image Pi are determined in order to increase the robustness of the estimate of the angle of inclination of the image.
  • the two axes of the image are distinct, that is to say that they have an angle different from one another relative to the main border of the image B l .
  • these axes may be oblique, vertical or horizontal.
  • two axes will be chosen having an angle of 90° between them.
  • the first axis is vertical AxV and the second axis is horizontal AxH relative to the main border of the image B l .
  • a first step S l H for estimating a first angle of inclination of the image ⁇ relative to the horizontal axis of the image and a second step S lV for estimating a second angle of inclination of the image ⁇ v relative to the vertical axis of the image are carried out.
  • a third estimation step S3 is carried out in which the final angle of inclination of the image (X F relative to the first and second estimated angles (XH, ⁇ v is estimated.
  • this third estimation step S3 if the first and second step S l H, S lV provide two respective angles an, ⁇ v, that is to say if these two steps are valid, a final angle of inclination of the image ⁇ F relative to the first and second estimated angles ⁇ pi, ⁇ v is estimated, otherwise the final angle of inclination of the image ⁇ p is equal to one of the said angles of inclination au, or ⁇ v corresponding to the step of estimation considered to be valid.
  • the said final angle of inclination of the image ⁇ F is equal to a weighted average between the said first and second angles of inclination an, ay.
  • the obtained angles of inclination are close to one another in absolute value, of the order of a few degrees.
  • one and the same restriction range is used, for example two centred ranges of ⁇ 10°, for each axis of the image AxH, AxV. Therefore, the rectilinear contours that are close, of the order of a few degrees, of each axis of the image
  • AxH, AxV are selected. This weighted average therefore makes it possible to estimate an angle of inclination of the image that is representative of the real angle of inclination of the image.
  • the weighted average is zero.
  • the final angle of inclination of the image (X F is then zero and reflects the fact that two pertinent contours that have an opposite inclination have been detected and that it is not possible to determine an angle representative of the inclination of the image.
  • the first estimation step S lH provides the first angle of inclination of the image (X H corresponding to the angle of inclination of the horizon line LHZ relative to the horizontal axis of the image AxH.
  • the second estimation step S lV provides the second angle of inclination of the image ⁇ v corresponding to the angle of inclination of the stand of the parasol PPL relative to the vertical axis of the image AxV.
  • the stand of the parasol PPL is considered to be the pertinent rectilinear contour relative to the vertical axis AxV because it contains more pixels than the top portion of the parasol HPL.
  • the weighted average is then taken between the said first and second angles of inclination (X H , ⁇ v.
  • the horizon line LHZ corresponds to the contour that has the largest number of pixels and therefore the greatest weight relative to the stand of the parasol PPL.
  • the final angle o f inclination of the image ⁇ , F is then provided which is approximately equal to the first angle of inclination (X H corresponding to the horizon line LHZ which has the largest number of pixels relative to the stand of the parasol PPL.
  • Figure 5 shows schematically another method of application o f the method for processing a digital image. Certain elements described in the previous figures have also been transferred to Figure 4.
  • this method of application two distinct axes of the image Pi are determined, that is to say two axes which have a different angle from one another relative to the main border of the image B l .
  • two axes will be chosen that have an angle of 90° between them.
  • the first axis AxV is vertical and the second axis AxH is horizontal relative to the main border of the image B l .
  • a first step S l I l H for detecting the rectilinear contours relative to the horizontal axis AxH and a second step S l I l H for detecting the rectilinear contours relative to the vertical axis AxV are carried out.
  • a step S6 for preselecting the rectilinear contours is carried out based on the ratio between the absolute values of the vertical and horizontal gradients. Specifically, for each pixel of the image, the ratio
  • This preselection step S6 makes it possible to reject the contours having angles of inclination relative to the vertical axis AxV or horizontal axis AxH that are greater than the authorized value ⁇ max . In other words, this preselection step S6 makes it possible to reduce the number of computations to be made in the subsequent steps.
  • a processing step S 1 12H and a step S 1 13H for selecting the pertinent rectilinear contour are carried out based on the preselected contours relative to the horizontal axis AxH. These steps for processing S 1 12H and for selection S 1 13H make it possible to estimate a first angle of inclination of the image ⁇ relative to the horizontal axis of the image.
  • a processing step S l 12V and a step S l 13V for selecting the pertinent rectilinear contour are carried out based on the preselected contours relative to the vertical axis AxV. These steps for processing S l 12V and for selection S l 13V make it possible to estimate a second angle of inclination of the image ay relative to the vertical axis of the image.
  • an estimation step S3 is carried out in which the final angle of inclination of the image (X F relative to the first and second estimated angles an, ay is estimated.
  • This estimation step S3 corresponds to the step S3 described in Figure 4 above.
  • this method when this method is applied to the three components Y, U, V of a digital image, it is possible to compare the three results obtained. For example, if the variation of the three results is below a threshold, the final angle of inclination of the image will be equal to a weighted average of the three results, otherwise the final angle o f inclination of the image will be equal to the result provided by the method applied on the luminance Y of the image.
  • Figure 6 shows schematically a method of application of a method for processing several digital images.
  • the method described in the above figures is applied to several successive digital images of a video Vi.
  • the processing method comprises a step S4 for selecting a number of images of the said video Vi, then the step S l for estimating the angle of inclination of the image described in the above figures for each selected image. Therefore, it is possible to correct the inclination of each image of the video.
  • the angle of inclination of an image of the video can be equal to an average of the angles of inclination of the previous images.
  • Figure 7 represents schematically a device for processing a digital image 1 which is capable of applying the method described in the above figures.
  • This device for processing a digital image 1 comprises an estimation means 2 for estimating an angle of inclination of the image
  • This estimation means 2 comprises a detection means 3 for detecting a pertinent rectilinear contour of the image Pi and a computation means 4 for computing an angle of orientation of the pertinent rectilinear contour relative to the said axis and for computing the angle of inclination of the image as a function of the said angle of orientation.
  • This detection means 3 comprises an initial detection means 5 for detecting contours of the image, a processing means 6 for distinguishing the rectilinear contours from the said detected contours, the said processing means 6 comprising a conversion means 7 for converting Cartesian coordinates of each pixel of the said detected contours into a sinusoidal curve and a second computation means 8 for computing polar coordinates of the rectilinear contours as a function of the points of intersection of the said obtained sinusoidal curves.
  • the detection means 3 comprises a selection means 9 for selecting the said pertinent rectilinear contour from the said obtained rectilinear contours.
  • this selection means 9 comprises a third computation means 10 for computing a histogram of the distribution o f the number of pixels belonging to the rectilinear contours as a function of the angles of orientation of the rectilinear contours.
  • the selection means 9 is also capable of selecting the said pertinent rectilinear contour from those having the largest number of pixels.
  • Figure 8 shows schematically an embodiment of the device for processing a digital image 1.
  • the device for processing a digital image 1 comprises a first estimation means 2H for estimating a first angle of inclination relative to a first axis of the image, a second estimation means 2V for estimating a second angle of inclination relative to a second axis of the image, and a third estimation means 20 for estimating a final angle of inclination of the image.
  • Figure 9 shows schematically an embodiment of a device 1 1 for processing several digital images.
  • This device 1 1 is capable of processing several successive digital images of a video Vi.
  • the device 1 1 comprises a second selection means 30 for selecting a number of images of the said video Vi, a device 1 for processing a digital image 1 in which the estimation means 2 is capable of estimating the angle of inclination of each selected image.
  • this device 1 1 may comprise a homogenization means 31 for homogenizing the angles of inclination of the images of the video.
  • This homogenization means 31 is capable of estimating an angle of inclination of an image of the video deduced from the said estimated angles of inclination of the previous images.
  • Figure 10 shows schematically a wireless communication apparatus 40 comprising an apparatus 41 for capturing digital images.
  • the wireless communication apparatus 40 comprises a case 42 and an antenna 43 for transmitting/receiving digital data.
  • a wireless communication apparatus may be, for example, a cellular telephone.
  • the apparatus 41 for capturing digital images is capable of capturing images Pi and/or videos Vi.
  • This apparatus 41 for capturing digital images comprises a device 1 for processing a digital image and a device 1 1 for processing several digital images.
  • This method and this device are suitable for the various formats of a digital image (RGB, YUV, Lab, HSV).

Abstract

Method for processing a digital image comprising an estimate (S1) of an angle of inclination of the image relative to an axis of the image.

Description

Method and device for processing a digital image
The invention relates to the processing of a digital image and in particular the processing of its inclination.
In particular, the invention relates to digital images obtained with the aid of a digital image capturing apparatus.
The invention applies advantageously but not limitingly to individual digital images, or photographs, and to the digital images of a video.
An apparatus for capturing digital images is understood to be a digital apparatus capable of capturing digital photographs and videos, such as a camera, a camcorder, a mobile telephone camera, a computer camera etc. Currently, the inclination of the content of an image (a line o f horizon, of skyscrapers, of trees, etc.) relative to the borders of the frame of the image is a frequent problem that occurs when an image is captured.
The inclination of the content of the image may originate from the fact that new cameras provide a digital display in order to view the images before capture and which replaces the traditional viewfinder.
Consequently, the user has to hold the camera at a reading distance, o f approximately 25 cm, in order to correctly view the displayed images, which means that the camera is no longer immobilized by the face. In addition, when the camera which displays the image is at a distance from the user, the latter distinguishes less clearly the inclination o f the image with the borders of the frame of the capturing apparatus.
This undesired inclination may also occur when the user presses the button to trigger an image capture and causes an undesired movement of the camera. This phenomenon is amplified even more as the cameras become increasingly light.
It will be noted also that a slight undesired inclination of the content of the captured image will be perceptible when the image is displayed on a computer screen or on a television having a display size that is greater than the camera which captured the image.
Certain digital cameras display, in the digital display, a fixed grid. But this method is not sufficiently effective because it is based on a subjective visual estimate of the user who must adapt the position of the grid relative to the image before capture. This manipulation of the camera is therefore not sufficiently precise.
Methods for processing images are used by image-retouching software programs, but it is again the user who has to determine the correct inclination of the image to be retouched. According to one aspect, a method for processing a digital image is proposed comprising an estimate of an angle of inclination of the image relative to an axis of the image, and more particularly relative to the frame of the image, for example relative to an axis defined relative to the frame of the image, this axis being able to be horizontal, vertical or inclined.
This estimate is advantageously made in an automated manner. In other words, it is made without the intervention of the user and without taking into account in particular of the subjective perception of the user. It is therefore possible to measure the inclination of a camera in a captured digital image.
It is possible, by virtue of an estimate of the inclination of the image relative to an axis of the image, to display this estimate on a digital camera before the image is captured, also called "previewing", offering the user the possibility of correcting the inclination of the camera.
It is possible to display, for example, the value of the angle o f inclination, or a line representing the inclination relative to a fixed grid in the display before the user captures the image or the video. It is also possible to automatically restore the correct inclination of the image after capture by carrying out a reverse rotation of the image relative to the estimated angle of inclination, and this can be done irrespective of the content of the image.
Advantageously, the estimate comprises a detection of a pertinent rectilinear contour of the image and a computation of an angle of orientation of the pertinent rectilinear contour relative to the said axis, the angle of inclination of the image being deduced from the said angle of orientation. It is thus possible to provide a not very complex and not very costly method for measuring the angle of inclination of a digital image relative to an axis of the image. This is particularly suitable for items of apparatus for capturing digital images having limited capabilities in computing power, in bandwidth, in electric power storage and in memory storage.
According to one method of application, the detection of the pertinent rectilinear contour comprises a detection of contours of the image, a processing comprising a conversion of the Cartesian coordinates of each pixel of the said detected contours in a sinusoidal curve and a computation of the polar coordinates of the rectilinear contours as a function of the points of intersection of the said obtained sinusoidal curves, so as to distinguish the rectilinear contours from the said detected contours, and a selection of the said pertinent rectilinear contour from the said obtained rectilinear contours. It is therefore possible to specify the estimate of the angle of inclination of the image by detecting several contours of the image so as to prefer the selection of a pertinent contour from the said detected contours.
According to yet another method of application, the said pertinent rectilinear contour is selected from the rectilinear contours having an angle of orientation lying in a range centred on the axis o f the image.
This limits the number of computations to determine the pertinent rectilinear contour. The selection of the said pertinent rectilinear contour may comprise a computation of a histogram of the distribution of the number of pixels belonging to the rectilinear contours as a function o f the angles of orientation of the rectilinear contours, and the said pertinent rectilinear contour is chosen from those having the largest number of pixels.
This provides a criterion for selecting the pertinent contour which is simple to apply.
The detection of contours of the image may also comprise a rejection of the isolated contours.
It is therefore possible to accelerate the processing of the image by discarding the non-pertinent contours.
According to one method of application, the method comprises a first estimate of a first angle of inclination relative to a first axis o f the image, a second estimate of a second angle of inclination relative to a second axis of the image, and a third estimate of a final angle o f inclination of the image, the said final angle of inclination of the image being equal to a weighted average between the said first and second angles of inclination if the difference between the said first and second angles of inclination is below a threshold, or, if it is not, to one of the said angles of inclination.
This improves the robustness of the estimate of the angle of inclination. By using two axes, a more accurate method of determining the angle of inclination of the image is provided. According to another method of application, the method applies to the processing of several successive digital images of a video; the method comprises a selection of a number of images of the said video, and an estimate of the angle of inclination of each selected image. This makes it possible to estimate the camera shake which appears in a video.
According to another aspect, a device for processing a digital image is proposed.
This device comprises an estimation means for estimating an angle of inclination of the image relative to an axis of the image.
Advantageously, the said estimation means comprises a detection means for detecting a pertinent rectilinear contour of the image and a computation means for computing an angle of orientation of the pertinent rectilinear contour relative to the said axis, the angle of inclination of the image being deduced from the said angle o f orientation.
According to one embodiment, the detection means comprises an initial detection means for detecting contours of the image, a processing means for distinguishing the rectilinear contours from the said detected contours, the said processing means comprising a conversion means for converting Cartesian coordinates of each pixel of the said detected contours into a sinusoidal curve and a second computation means for computing polar coordinates of the rectilinear contours as a function of the points of intersection of the said obtained sinusoidal curves, and a selection means for selecting the said pertinent rectilinear contour from the said obtained rectilinear contours.
According to yet another embodiment, the selection means is capable of selecting the said pertinent rectilinear contour from the rectilinear contours having an angle of orientation lying in a range centred on the axis of the image.
The selection means may comprise a third computation means for computing a histogram of the distribution of the number of pixels belonging to the rectilinear contours as a function of the angles o f orientation of the rectilinear contours, and is also capable of selecting the said pertinent rectilinear contour from those having the largest number of pixels.
The initial detection means is also capable of rejecting isolated contours.
According to one embodiment, the device comprises a first estimation means for estimating a first angle of inclination relative to a first axis of the image, a second estimation means for estimating a second angle of inclination relative to a second axis of the image, and a third estimation means for estimating a final angle of inclination o f the image, the said final angle of inclination of the image being equal to a weighted average between the said first and second angles o f inclination if the difference between the said first and second angles of inclination is below a threshold, or, if it is not, to one of the said angles of inclination.
According to another embodiment, the device is capable of processing several successive digital images of a video, the said device comprising a second selection means for selecting a number o f images of the said video, in which the estimation means is capable o f estimating the angle of inclination of each selected image.
The device for processing one or more digital images may be included in an apparatus for capturing digital images.
Such an apparatus for capturing images may also be included in a wireless communication apparatus.
Other advantages and features will appear on examination o f the detailed description of methods of application and of embodiments of the invention, which are in no way limiting, and of the appended drawings in which: - Figure 1 illustrates schematically the main phases of a method of application of the method for processing a digital image;
- Figure 2 illustrates schematically the main phases of the step of detecting a pertinent rectilinear contour;
- Figure 3 illustrates schematically a histogram of the distribution of the pixels of the image;
- Figure 4 illustrates schematically another method of application of the method for processing a digital image;
- Figure 5 illustrates schematically yet another method of application of the method for processing a digital image; - Figure 6 illustrates schematically a method of application of the method for processing several digital images;
- Figure 7 illustrates schematically an embodiment of a device for processing a digital image;
- Figure 8 illustrates schematically another embodiment of the device for processing a digital image;
- Figure 9 illustrates schematically an embodiment of the device for processing several digital images; and
- Figure 10 illustrates schematically an embodiment of a wireless communication apparatus comprising a device for processing one or more digital images.
Figure 1 shows schematically the main phases of an example o f a method of processing a digital image Pi.
This method comprises an estimate S l of an angle of inclination of the image Pi relative to an axis of the image AxH.
The image Pi comprises a frame Cdi comprising four borders
B l to B4. In addition, the frame Cdi comprises a height B4,B2 and a width B 1 ,B3 defining the number of pixels of the image Pi. Usually, the frame Cdi of the image Pi corresponds to the traditional viewing frame, or to the display, of an apparatus for capturing images.
Note a main border B l of the frame Cdi of the image Pi as being the bottom horizontal border of the frame of the image.
Relative to this main border B l , the axis of the image AxH may be oblique, for example on a diagonal of the image, vertical or horizontal. Preferably, the axis of the image will be horizontal or vertical.
In the example illustrated in Figure 1 , the axis of the image AxH is the horizontal axis. This image shows schematically a parasol PL furnished with a stand PPL and a top portion HPL, the said paraso l PL being planted on a beach PLG with an inclined horizon line LHZ.
In this instance it can be seen that the horizon line LHZ, instead of being horizontal as in reality, is inclined at an angle (XH which corresponds to the angle of inclination of the image relative to the horizontal. The estimation step S l makes it possible to estimate this angle of inclination (XH.
This estimation step S l comprises a step S I l of detecting a pertinent rectilinear contour of the image and a step S 12 of computing an angle of orientation of the pertinent rectilinear contour relative to the said axis. Moreover, during this computation step S 12, the angle o f inclination of the image is deduced from the said angle of orientation.
There are several digital image formats. The "RGB" format or "Red, Green and Blue", the "YUV" format, or "Luminance, Chrominance-Blue and Chrominance-red" , the "Lab" format or "Lightness, red-green axis range and yellow-blue axis range", the "HSV" format or "Hue, Tone and Value" etc.
All these formats have the common point of defining each pixel of the digital image with the aid of three components which define a colorimetric space.
The step S I l of detecting a pertinent rectilinear contour may be carried out based on one of the three components of an image, irrespective of its format. Preferably, the digital images Pi processed are converted to the "YUV" format and the step S l for estimating an angle of inclination is carried out based on the luminance component
Y . It is also possible to apply the processing method to the other components U and V of the image in order to increase the robustness of the method.
Advantageously, a step for reducing the noise of the digital image Pi is carried out in which filters are applied to the image Pi, such as for example low-pass or Gaussien filters known to those skilled in the art. This step prior to the detection step S I l makes it possible to reduce the complexity of the image-processing method.
This step also makes it possible to delete certain non-pertinent contours of the image.
It is also possible to reduce the size of the digital image Pi which, in particular, makes it possible to reduce the number of computations during the processing of the image Pi. This reduction in the size of the image Pi also makes it possible to delete certain non- pertinent contours of the image.
Figure 2 shows schematically the main phases of the step S I l for detecting a pertinent rectilinear contour.
The step S I l for detecting a pertinent rectilinear contour comprises a step for detecting several contours of the image S i l l , a processing step S l 12 and a step S l 13 for selecting the pertinent rectilinear contour.
The principle of detecting contours consists in identifying the pixels of a digital image that correspond to a sudden change in light intensity, that is to say a gradient of a contour. The step S i l l for detecting contours of the image makes it possible to establish a binary table which contains the contours of the image Pi. It is possible to establish this table with the aid of filters which measure the gradients of the contours of the image. It is possible, for example, to apply a Sobel filter to the image Pi, but there are also other filters such as the Prewitt filters or Canny filters.
During this step S i l l of detecting contours of the image, the essential contours of the image are retained by comparing the absolute value of the computed gradient with a threshold. This threshold may be between 3% and 5% of the maximum value of the gradients of the image. Preferably, this threshold is equal to 4% of the maximum value of the gradients of the image. The binary table then contains the contours of the image Pi having a gradient above the said threshold. This binary table is directly associated with the original digital image. In this table, the pixels belonging to a contour are for example represented by 1 and the pixels belonging to uniform or very slightly textured portions of the image are for example represented by 0.
In addition, this step S i l l for detecting contours of the image may comprise a step SR for rejecting the isolated contours. In this rejection step SR, each pixel that is an element of a contour is identified in the binary table and if this pixel does not have neighbours (with a value at 0 in the binary table) the said pixel is eliminated because it is considered to belong to an isolated contour. In the other case, if the pixel has at least one neighbour (with a value at 1 in the binary table) the said pixel is retained, because it is considered to belong to an unisolated contour.
This step S i l l for detecting contours of the image may also comprise a step of detection reliability. During this step of detection reliability, the number of pixels that belong to at least one contour is compared relative to a first reliability threshold. This first reliability threshold can be computed as a function of the size of the digital image Pi. This first reliability threshold may be equal to 10% of the total number of pixels in the image. Below this first reliability threshold, it is considered that the step S i l l for detecting contours of the image is not reliable and the processing method is stopped, while the processing continues if this is not the case.
The processing step S l 12 makes it possible to distinguish the rectilinear contours from the said contours detected in the previous step S i l l . This processing step S l 12 comprises a conversion step S20 and a computation step S21.
During this conversion step S20, the Cartesian coordinates (x,y) of the pixels belonging to the detected contours are converted into sinusoidal curves. This step may be carried out, for example, with the aid of a Hough transform applied to the binary table established during the previous step S i l l . The Hough transform is a technique for the recognition of shapes, well known to those skilled in the art, such as for example of the rectilinear contours of an image.
The principle of the Hough transform consists in converting each pixel from Cartesian coordinates (x,y) into a sinusoidal curve according to the equation (1 ) :
p = x -cosθ + ysin θ equation (1 )
in which
- p indicates the length of the line segment that links a pixel of a rectilinear contour of the image with the centre of the image Pi, the said segment being perpendicular to the said rectilinear contour;
-θ indicates the angle of the line segment relative to the axis AxH of the image.
In other words, (p,θ) are the polar coordinates of the rectilinear contours of the image. Moreover, the angle of orientation of the rectilinear contour θi is deduced as a function of its polar angle θ, that is to say as a function of the angle of the line segment, according to the equation (2) :
θi = θ - θaxis - 90° equation (2)
in which - θi indicates the angle of orientation of the rectilinear contour relative to the axis of the image
- θaxis: indicates the angle of the axis of the image AxH relative to the main border of the image B l . For example, in the image example described in Figure 1 , the rectilinear contours Ci of the image are the stand PPL, the top portion of the parasol HPL, and the horizon line LHZ. Moreover, the angle θaxis of the axis of the image AxH relative to the main border B l is zero. According to the Hough transform, the pixels belonging to one and the same rectilinear contour Ci of the image have their respective sinusoidal curves which all have a common point of intersection. This point of intersection therefore has as its coordinates the polar coordinates (p,θ) of the rectilinear contour Ci of the image. The computation step S21 consists in computing the polar coordinates (p,θ) of the rectilinear contours amongst the detected contours.
By applying this Hough transform to the binary table containing the contours of the image Pi, a sinusoidal curve is determined for each pixel belonging to a contour (with a value at 1 in the binary table). Each intersection between at least two curves then corresponds to the polar coordinates (p,θ) of a rectilinear contour of the image Ci.
In other words, if N pixels are aligned on a rectilinear contour Ci, N sinusoidal curves associated respectively with each of the pixels will then be determined. These N sinusoidal curves will all have a point of intersection, the polar coordinates of which (p,θ) correspond to the polar coordinates of the rectilinear contour Ci.
During this processing step S l 12, a polar table is generated comprising the polar coordinates (p,θ) of the detected rectilinear contours.
The step S l 13 for selecting the pertinent rectilinear contour makes it possible to identify a pertinent rectilinear contour from the said rectilinear contours obtained in the previous processing step S l 12.
During this selection step S l 13 , it is possible to quantify the angles of orientation θi of the rectilinear contours according to a sampling pitch, for example equal to 0.5 ° . This quantification makes it possible to limit the number of computations to determine the pertinent rectilinear contour of the image.
In order to further limit the number of computations, the user restricts, during this selection step S l 13 , the angles of orientation θi determined in a range centred on the axis of the image. It is possible to take, for example, a range of restriction of between θaxis- 10° and θaxis+ 10°, where θaxis is the angle of the axis of the image relative to the main border of the image. This limits the selection of the pertinent rectilinear contour to the rectilinear contours that are close to the axis of the image.
Advantageously, it is also possible to quantify the values of p of the rectilinear contours as a function of the size of the image.
This quantification and this restriction of the angles o f orientation make it possible to generate a second quantified polar table comprising the quantified polar coordinates (ps,θs) of the detected rectilinear contours having an angle of orientation θi lying in the range of restriction.
It is also possible to weight the quantified polar table. During this weighting step, a weight is assigned to each rectilinear contour of the said table as a function, for example, of the value of the gradient of the contour, of the number of pixels belonging to the contour, of the colour or of the average luminance of the contour, of the position of the contour in the image, for example of the position of the contour relative to the centre of the image, etc. This weighting makes it possible to more easily determine the pertinent rectilinear contour of the image.
It is also possible to prefer this determination by eliminating the selected rectilinear contours that do not contain a sufficient number of pixels. The rectilinear contours having a number of pixels below a pertinence threshold are eliminated, for example this pertinence threshold may be equal to 30% of the maximum between the height and the width of the image Pi. According to another example, the pertinence threshold is equal to 30% of the height of the image when a vertical axis of the image is used. According to another example, the pertinence threshold is equal to 30% of the width of the image when a horizontal axis of the image is used.
It will be noted that, if no rectilinear contour has a number o f pixels above the pertinence threshold, it is considered that the step S l 13 for selecting the pertinent rectilinear contour is not reliable and the processing method is stopped, whereas the processing continues otherwise.
The step S l 13 for selecting the pertinent rectilinear contour may also comprise a step SHI for computing a histogram of the distribution of the number of pixels belonging to the rectilinear contours as a function of the angles of orientation θi of the rectilinear contours. This histogram may be computed based on one of the polar tables generated in the previous processing step S l 12, by selecting, for each angle value θ,θs, the predominant rectilinear contour, for example the rectilinear contour having the largest number of pixels.
Then, the histogram obtained is analysed in order to select the pertinent rectilinear contour that has the largest number of pixels.
For the image described in Figure 1 , the pertinent rectilinear contour of the image will be the horizon line LHZ because it contains more pixels than the rectilinear contour corresponding to the stand of the parasol PPL or to the top portion of the parasol HPL.
When the histogram is analysed, the angle of inclination of the image (XH is estimated by computing a weighted average around the angle corresponding to the maximum of the histogram. This weighted average is taken for angles of orientation θi lying in the range between θaxis- 10° and θaxis+ 10°, where θaXis is the angle of the axis of the image relative to the main border of the image.
This weighted average can be computed according to the equation (3) : equation (3)
Figure imgf000016_0001
- θi : indicates the angle of orientation of a rectilinear contour relative to the axis of the image; - i : index of the rectilinear contour;
- Histogram(θi) : value of the weight assigned to the rectilinear contour having θi as the angle of orientation.
It is possible also to carry out an additional histogram- reliability step, in which the variation of the histogram around the estimated value of the angle of inclination of the image (XH is evaluated. If the computed variation is above a tolerance threshold, it is considered that the histogram computation step SHI is not reliable and the processing method is stopped, whereas, if it is reliable, the processing continues. Figure 3 shows schematically a histogram of the distribution of the number of pixels N belonging to the rectilinear contours as a function of the angles of orientation θi of the rectilinear contours.
Figure 4 shows schematically another method of application o f the method of processing a digital image. Certain elements described in Figure 1 above have also been transferred to Figure 4. Moreover, an additional vertical axis AxV has been shown on the image.
In this method of application, two axes of the image Pi are determined in order to increase the robustness of the estimate of the angle of inclination of the image. The two axes of the image are distinct, that is to say that they have an angle different from one another relative to the main border of the image B l .
With respect to this main border B l , these axes may be oblique, vertical or horizontal.
Preferably, two axes will be chosen having an angle of 90° between them. In a preferred method of application, the first axis is vertical AxV and the second axis is horizontal AxH relative to the main border of the image B l .
In this preferred method of application, a first step S l H for estimating a first angle of inclination of the image απ relative to the horizontal axis of the image and a second step S lV for estimating a second angle of inclination of the image αv relative to the vertical axis of the image are carried out.
Additionally, a third estimation step S3 is carried out in which the final angle of inclination of the image (XF relative to the first and second estimated angles (XH, αv is estimated.
During this third estimation step S3 , if the first and second step S l H, S lV provide two respective angles an, αv, that is to say if these two steps are valid, a final angle of inclination of the image αF relative to the first and second estimated angles αpi, αv is estimated, otherwise the final angle of inclination of the image αp is equal to one of the said angles of inclination au, or αv corresponding to the step of estimation considered to be valid.
When the first two estimation steps S l H and S lV are valid, the said final angle of inclination of the image αF is equal to a weighted average between the said first and second angles of inclination an, ay.
It will be noted that the obtained angles of inclination are close to one another in absolute value, of the order of a few degrees. Specifically, during the steps S l 13 for selecting the pertinent rectilinear contour relative to each axis of the image AxH, AxV, one and the same restriction range is used, for example two centred ranges of ±10°, for each axis of the image AxH, AxV. Therefore, the rectilinear contours that are close, of the order of a few degrees, of each axis of the image
AxH, AxV are selected. This weighted average therefore makes it possible to estimate an angle of inclination of the image that is representative of the real angle of inclination of the image.
If one of the two angles corresponds to a predominant rectilinear contour, the angle of this contour will have a greater weight in the computation of the final angle of inclination of the image (XF.
Moreover, if the estimated angles (XH, αv are equal in absolute value, corresponding to rectilinear contours having an identical weight but have opposite signs, then the weighted average is zero. In this case, the final angle of inclination of the image (XF is then zero and reflects the fact that two pertinent contours that have an opposite inclination have been detected and that it is not possible to determine an angle representative of the inclination of the image. For example, based on the image described in Figure 4, the first estimation step S lH provides the first angle of inclination of the image (XH corresponding to the angle of inclination of the horizon line LHZ relative to the horizontal axis of the image AxH. The second estimation step S lV provides the second angle of inclination of the image αv corresponding to the angle of inclination of the stand of the parasol PPL relative to the vertical axis of the image AxV. Specifically, the stand of the parasol PPL is considered to be the pertinent rectilinear contour relative to the vertical axis AxV because it contains more pixels than the top portion of the parasol HPL. During the third estimation step S3 , since the two estimates
S l H, S lV are valid, the weighted average is then taken between the said first and second angles of inclination (XH, αv. Moreover, in this example, the horizon line LHZ corresponds to the contour that has the largest number of pixels and therefore the greatest weight relative to the stand of the parasol PPL.
Based on the computed weighted average, the final angle o f inclination of the image α,F is then provided which is approximately equal to the first angle of inclination (XH corresponding to the horizon line LHZ which has the largest number of pixels relative to the stand of the parasol PPL.
Figure 5 shows schematically another method of application o f the method for processing a digital image. Certain elements described in the previous figures have also been transferred to Figure 4. In this method of application, two distinct axes of the image Pi are determined, that is to say two axes which have a different angle from one another relative to the main border of the image B l .
Preferably, two axes will be chosen that have an angle of 90° between them. In a preferred method of application, the first axis AxV is vertical and the second axis AxH is horizontal relative to the main border of the image B l .
In this preferred method of application, a first step S l I l H for detecting the rectilinear contours relative to the horizontal axis AxH and a second step S l I l H for detecting the rectilinear contours relative to the vertical axis AxV are carried out.
Then, a step S6 for preselecting the rectilinear contours is carried out based on the ratio between the absolute values of the vertical and horizontal gradients. Specifically, for each pixel of the image, the ratio |grad(ver)|/|grad(hor)| , where:
- grad(ver)| : the absolute value of the gradient of the pixel on the vertical axis AxV;
- |grad(hor)| : the absolute value of the gradient of the pixel on the horizontal axis AxH; is computed. The computation of the ratio of the gradients grad(ver)|/|grad(hor)| makes it possible to exclude the contours the ratio of which is outside a range
Ir=[tan(θmax); l/tan(θmax)] , where θmax is the maximum angle that the rectilinear contours must have relative to each of the vertical and horizontal axes. That is to say that the detected contour will be rejected if tan(θmax) < |grad(ver)|/|grad(hor)| < l/tan(θmax) for all the pixels of the contour in question. This preselection step S6 makes it possible to reject the contours having angles of inclination relative to the vertical axis AxV or horizontal axis AxH that are greater than the authorized value θmax. In other words, this preselection step S6 makes it possible to reduce the number of computations to be made in the subsequent steps.
Then, a processing step S 1 12H and a step S 1 13H for selecting the pertinent rectilinear contour are carried out based on the preselected contours relative to the horizontal axis AxH. These steps for processing S 1 12H and for selection S 1 13H make it possible to estimate a first angle of inclination of the image απ relative to the horizontal axis of the image. Moreover, a processing step S l 12V and a step S l 13V for selecting the pertinent rectilinear contour are carried out based on the preselected contours relative to the vertical axis AxV. These steps for processing S l 12V and for selection S l 13V make it possible to estimate a second angle of inclination of the image ay relative to the vertical axis of the image.
Then, an estimation step S3 is carried out in which the final angle of inclination of the image (XF relative to the first and second estimated angles an, ay is estimated. This estimation step S3 corresponds to the step S3 described in Figure 4 above. As a variant, it is possible to apply the estimate of the angle o f inclination that has just been described to the three components of the pixels of the image and to correlate the results by weighting each result as a function of the pertinence of perception of the component.
Moreover, when this method is applied to the three components Y, U, V of a digital image, it is possible to compare the three results obtained. For example, if the variation of the three results is below a threshold, the final angle of inclination of the image will be equal to a weighted average of the three results, otherwise the final angle o f inclination of the image will be equal to the result provided by the method applied on the luminance Y of the image.
Figure 6 shows schematically a method of application of a method for processing several digital images.
In this method of application, the method described in the above figures is applied to several successive digital images of a video Vi. The processing method comprises a step S4 for selecting a number of images of the said video Vi, then the step S l for estimating the angle of inclination of the image described in the above figures for each selected image. Therefore, it is possible to correct the inclination of each image of the video. In another method of application, it is possible to carry out a homogenization step S5 in which the value of the angle of inclination of an image relative to the values of the angles of inclination of the previous (that is to say past) images is estimated. For example, during this homogenization step S5 , the angle of inclination of an image of the video can be equal to an average of the angles of inclination of the previous images.
With the aid of these estimated angles of inclination, it is possible to smooth the captured video in order to attenuate the camera shake perceived in the original video.
Figure 7 represents schematically a device for processing a digital image 1 which is capable of applying the method described in the above figures.
This device for processing a digital image 1 comprises an estimation means 2 for estimating an angle of inclination of the image
Pi relative to an axis of the image.
This estimation means 2 comprises a detection means 3 for detecting a pertinent rectilinear contour of the image Pi and a computation means 4 for computing an angle of orientation of the pertinent rectilinear contour relative to the said axis and for computing the angle of inclination of the image as a function of the said angle of orientation.
This detection means 3 comprises an initial detection means 5 for detecting contours of the image, a processing means 6 for distinguishing the rectilinear contours from the said detected contours, the said processing means 6 comprising a conversion means 7 for converting Cartesian coordinates of each pixel of the said detected contours into a sinusoidal curve and a second computation means 8 for computing polar coordinates of the rectilinear contours as a function of the points of intersection of the said obtained sinusoidal curves.
Moreover, the detection means 3 comprises a selection means 9 for selecting the said pertinent rectilinear contour from the said obtained rectilinear contours. Moreover, this selection means 9 comprises a third computation means 10 for computing a histogram of the distribution o f the number of pixels belonging to the rectilinear contours as a function of the angles of orientation of the rectilinear contours. The selection means 9 is also capable of selecting the said pertinent rectilinear contour from those having the largest number of pixels.
All these means can be achieved by software or also in the form of logic circuits. Figure 8 shows schematically an embodiment of the device for processing a digital image 1.
In this embodiment, the device for processing a digital image 1 comprises a first estimation means 2H for estimating a first angle of inclination relative to a first axis of the image, a second estimation means 2V for estimating a second angle of inclination relative to a second axis of the image, and a third estimation means 20 for estimating a final angle of inclination of the image.
Figure 9 shows schematically an embodiment of a device 1 1 for processing several digital images. This device 1 1 is capable of processing several successive digital images of a video Vi. The device 1 1 comprises a second selection means 30 for selecting a number of images of the said video Vi, a device 1 for processing a digital image 1 in which the estimation means 2 is capable of estimating the angle of inclination of each selected image. Moreover, this device 1 1 may comprise a homogenization means 31 for homogenizing the angles of inclination of the images of the video. This homogenization means 31 is capable of estimating an angle of inclination of an image of the video deduced from the said estimated angles of inclination of the previous images. Figure 10 shows schematically a wireless communication apparatus 40 comprising an apparatus 41 for capturing digital images.
The wireless communication apparatus 40 comprises a case 42 and an antenna 43 for transmitting/receiving digital data. Such a wireless communication apparatus may be, for example, a cellular telephone.
The apparatus 41 for capturing digital images is capable of capturing images Pi and/or videos Vi.
This apparatus 41 for capturing digital images comprises a device 1 for processing a digital image and a device 1 1 for processing several digital images.
This method and this device are suitable for the various formats of a digital image (RGB, YUV, Lab, HSV).

Claims

1. Method for processing a digital image, characterized in that it comprises an estimate (S l ) of an angle of inclination of the image relative to an axis of the image.
2. Method according to Claim 1 , in which the estimate (S l) comprises a detection (S I l ) of a pertinent rectilinear contour of the image and a computation (S 12) of an angle of orientation of the pertinent rectilinear contour relative to the said axis, the angle of inclination of the image being deduced from the said angle of orientation.
3. Method according to Claim 2, in which the detection (S I l ) of the pertinent rectilinear contour comprises a detection (S i l l ) of contours of the image, a processing (S l 12) comprising a conversion (S20) of the Cartesian coordinates of each pixel of the said detected contours in a sinusoidal curve and a computation (S21 ) of the polar coordinates of the rectilinear contours as a function of the points of intersection of the said obtained sinusoidal curves, so as to distinguish the rectilinear contours from the said detected contours, and a selection (S 1 13) of the said pertinent rectilinear contour from the said obtained rectilinear contours.
4. Method according to Claim 3, in which the said pertinent rectilinear contour is selected (S l 13) from the rectilinear contours having an angle of orientation lying in a range centred on the axis of the image.
5. Method according to one of Claims 3 and 4, in which the selection (S l 13) of the said pertinent rectilinear contour comprises a computation of a histogram (SHI) of the distribution of the number of pixels belonging to the rectilinear contours as a function of the angles of orientation of the rectilinear contours, and the said pertinent rectilinear contour being chosen from those having the largest number of pixels.
6. Method according to one of Claims 3 to 5, in which the detection (S i l l ) of contours of the image comprises a rejection (SR) of the isolated contours.
7. Method according to one of Claims 1 to 6, also comprising a supply of an indication of the estimated angle of inclination.
8. Method for processing a digital image comprising a first estimate (S l H) of a first angle of inclination relative to a first axis of the image according to one of Claims 1 to 7, a second estimate (S lV) of a second angle of inclination relative to a second axis of the image according to one of Claims 1 to 7, and a third estimate (S3) of a final angle of inclination of the image, the said final angle of inclination of the image being equal to a weighted average between the said first and second angles of inclination if the first and second estimates (S lH5S lV) are valid, or, if not valid, to one of the said angles of inclination.
9. Method for processing several successive digital images of a video, comprising a selection (S4) of a number of images of the said video, and an estimate (S l , S3) of the angle of inclination of each selected image according to one of Claims 1 to 8.
10. Device for processing a digital image ( 1 ), characterized in that it comprises an estimation means (2) for estimating an angle of inclination of the image relative to an axis of the image.
1 1. Device according to Claim 10, in which the said estimation means (2) comprises a detection means (3) for detecting a pertinent rectilinear contour of the image and a computation means (4) for computing an angle of orientation of the pertinent rectilinear contour relative to the said axis, the angle of inclination of the image being deduced from the said angle of orientation.
12. Device according to Claim 1 1 , in which the detection means (3) comprises an initial detection means (5) for detecting contours of the image, a processing means (6) for distinguishing the rectilinear contours from the said detected contours, the said processing means (6) comprising a conversion means (7) for converting Cartesian coordinates of each pixel of the said detected contours into a sinusoidal curve and a second computation means (8) for computing polar coordinates of the rectilinear contours as a function of the points of intersection of the said obtained sinusoidal curves, and a selection means (9) for selecting the said pertinent rectilinear contour from the said obtained rectilinear contours.
13. Device according to Claim 12, in which the selection means (9) is capable of selecting the said pertinent rectilinear contour from the rectilinear contours having an angle of orientation lying in a range centred on the axis of the image.
14. Device according to one of Claims 12 and 13 , in which the selection means (9) comprises a third computation means ( 10) for computing a histogram of the distribution of the number of pixels belonging to the rectilinear contours as a function of the angles of orientation of the rectilinear contours, and is also capable of selecting the said pertinent rectilinear contour from those having the largest number of pixels.
15. Device according to one of Claims 12 to 14, in which the initial detection means (5) is also capable of rejecting isolated contours.
16. Device for processing a digital image comprising a first estimation means (2H), according to one of Claims 10 to 15 , for estimating a first angle of inclination relative to a first axis of the image, a second estimation means (2V), according to one of Claims 10 to 15 , for estimating a second angle of inclination relative to a second axis of the image, and a third estimation means (20) for estimating a final angle of inclination of the image, the said final angle of inclination of the image being equal to a weighted average between the said first and second angles of inclination if the first and second estimates (S l H, SIV) are valid, or, if not valid, to one of the said angles of inclination.
17. Device for processing several successive digital images o f a video ( 1 1 ), comprising a second selection means (30) for selecting a number of images of the said video, a device ( 1 ) according to one of Claims 10 to 16, in which the estimation means (2,20) is capable of estimating an angle of inclination of each selected image.
18. Apparatus for capturing digital images (41 ) comprising a device for processing one or more digital images ( 1 , 1 1 ) according to any one of Claims 10 to 17.
19. Apparatus according to Claim 18, comprising display means capable of displaying an indication of the angle of inclination estimated by the processing device of one or of several digital images (1 , 1 1) according to any one of Claims 10 to 17.
20. Wireless communication apparatus (40) comprising an apparatus for capturing digital images (41 ) according to one of Claims 18 and 19.
PCT/EP2010/056734 2009-05-18 2010-05-17 Method and device for processing a digital image WO2010133547A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR0953286 2009-05-18
FR0953286A FR2945649A1 (en) 2009-05-18 2009-05-18 METHOD AND DEVICE FOR PROCESSING A DIGITAL IMAGE

Publications (1)

Publication Number Publication Date
WO2010133547A1 true WO2010133547A1 (en) 2010-11-25

Family

ID=41467312

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2010/056734 WO2010133547A1 (en) 2009-05-18 2010-05-17 Method and device for processing a digital image

Country Status (2)

Country Link
FR (1) FR2945649A1 (en)
WO (1) WO2010133547A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5568571A (en) * 1992-12-14 1996-10-22 University Microfilms, Inc. Image enhancement system
DE19700318A1 (en) * 1997-01-08 1998-07-09 Heidelberger Druckmasch Ag Method for determining the geometry data of scanning templates
US7065261B1 (en) * 1999-03-23 2006-06-20 Minolta Co., Ltd. Image processing device and image processing method for correction of image distortion
WO2007132679A1 (en) * 2006-05-15 2007-11-22 Sanyo Electric Co., Ltd. Image inclination correction device and image inclination correction method
WO2009001512A1 (en) * 2007-06-27 2008-12-31 Panasonic Corporation Imaging apparatus, method, system integrated circuit, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5568571A (en) * 1992-12-14 1996-10-22 University Microfilms, Inc. Image enhancement system
DE19700318A1 (en) * 1997-01-08 1998-07-09 Heidelberger Druckmasch Ag Method for determining the geometry data of scanning templates
US7065261B1 (en) * 1999-03-23 2006-06-20 Minolta Co., Ltd. Image processing device and image processing method for correction of image distortion
WO2007132679A1 (en) * 2006-05-15 2007-11-22 Sanyo Electric Co., Ltd. Image inclination correction device and image inclination correction method
US20090244308A1 (en) * 2006-05-15 2009-10-01 Yukio Mori Image Inclination Correction Device and Image Inclination Correction Method
WO2009001512A1 (en) * 2007-06-27 2008-12-31 Panasonic Corporation Imaging apparatus, method, system integrated circuit, and program

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
J.J. HULL, S.L. TAYLOR: "Document Analysis Systems II", 1998, WORLD SCIENTIFIC, article J.J. HULL: "Document image skew detection: Survey and annotated bibliography", pages: 40 - 64, XP002562656 *
LEAVERS V F: "Shape Detection in Computer Vision using the Hough Transform", 1992, SPRINGER, ISBN: 9783540197232, article "Chapitres 3 et 4", XP002562657 *
ROBERT ADELMANN ED - PENG YANG ET AL: "Mobile Phone Based Interaction with Everyday Products - On the Go", NEXT GENERATION MOBILE APPLICATIONS, SERVICES AND TECHNOLOGIES, 2007. NGMAST '07. THE 2007 INTERNATIONAL CONFERENCE ON, IEEE, PISCATAWAY, NJ, USA, 1 September 2007 (2007-09-01), pages 63 - 69, XP031142481, ISBN: 978-0-7695-2878-6 *

Also Published As

Publication number Publication date
FR2945649A1 (en) 2010-11-19

Similar Documents

Publication Publication Date Title
EP1800259B1 (en) Image segmentation method and system
US8698916B2 (en) Red-eye filter method and apparatus
US7796822B2 (en) Foreground/background segmentation in digital images
EP1710747A1 (en) Method for extracting person candidate area in image, person candidate area extraction system, person candidate area extraction program, method for judging top and bottom of person image, system for judging top and bottom, and program for judging top and bottom
CN109190617B (en) Image rectangle detection method and device and storage medium
JP2004310475A (en) Image processor, cellular phone for performing image processing, and image processing program
CN111183630B (en) Photo processing method and processing device of intelligent terminal
US8026954B2 (en) System and computer-readable medium for automatic white balancing
CN103942523A (en) Sunshine scene recognition method and device
WO2010133547A1 (en) Method and device for processing a digital image
CN113936017A (en) Image processing method and device
US8897589B2 (en) Method of detecting subject of image and imaging device thereof
CN116800938A (en) Curtain alignment method, device, terminal and medium for projector
CN116389699A (en) Color correction method and device, electronic equipment and storage medium
CN112381820A (en) Evaluation method based on sharpness of group of photos in same scene
JPH06300543A (en) Glossy material extraction device
Nedelcu et al. Hybrid sensor visible+ near infrared demosaicing
Zhiwei et al. A demosaicing algorithm based on adaptive edge sensitive and fuzzy assignment in CMOS image sensor
Mancuso Image Processing for Digital Still Cameras
IE20050040U1 (en) Red-eye filter method and apparatus using pre-acquisition information
IES84150Y1 (en) Red-eye filter method and apparatus using pre-acquisition information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10726448

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10726448

Country of ref document: EP

Kind code of ref document: A1