IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Traitement d'images Discussion :

Calcul de contraste d'une image : référence biblio ?


Sujet :

Traitement d'images

  1. #1
    Nouveau membre du Club
    Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Février 2011
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Février 2011
    Messages : 50
    Points : 26
    Points
    26
    Par défaut Calcul de contraste d'une image : référence biblio ?
    Bonjour, j'ai besoin de faire un genre d'autofocus et je souhaite donc utiliser une mesure de contraste pour cela.
    J'ai pour l'instant bricolé du code qui calcule le max du gradient de l'image.
    Ca marche pas trop mal mais c'est sensible au bruit et aux pixels morts.

    J'ai trouvé ce lien fourni par M. Pseudocode :
    http://www.cambridgeincolour.com/tut...-autofocus.htm

    Ils suggèrent de regarder la largeur de l'histogramme dans des petites fenêtres, ce qui semble une bonne idée.
    J'aimerai savoir si vous connaissez des publications scientifiques sur le sujet, ou bien un algo de référence dans une lib de traitement d'image quelconque.

    Merci !

  2. #2
    Nouveau membre du Club
    Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Février 2011
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Février 2011
    Messages : 50
    Points : 26
    Points
    26
    Par défaut
    J'ai trouvé ça dans la doc de Matrox activeMIL:

    Auto-focusing
    You can use the Focus method of the Digitizer control to automatically adjust the lens motor of your camera to a position that produces optimum focus in your images. This method is primarily useful when the quality of the focus in your images is unacceptable and physically moving the grabbed object is not possible.

    The Focus method determines the optimum focus position by grabbing an image at an initial lens position, analyzing the focus quality of the grabbed image, and then grabbing and analyzing an image at a different lens position. The process repeats until the optimum focus position is found. You must add a MoveLens event procedure that physically changes the position of the lens motor between grabs.

    The focus quality of an image (known as its focus indicator) is measured by analyzing its edges. An image with good focus quality (a high focus indicator) has well-defined edges, that is, has a sharp difference in gray-levels between its object edges and its background.

    By default, the Focus method subsamples and filters each grabbed image before analyzing it. This makes it easier to analyze the image. If necessary, you can specify that the subsampling and/or filtering operations be skipped. Skipping these operations will result in a more accurate analysis of the image's focus quality. It is primarily useful to skip these operations when your images contain fine details since subsampling or filtering can remove these details. Note that subsampling the grabbed images increases the speed of the focus operation; filtering the grabbed images slows down the focus operation.

    If necessary, you can specify that only a sub-region of the image be analyzed, using the FocusParameters.FocusRegion property. Analyzing only a sub-region is primarily useful if there are objects at different distances within the camera's field of view. In such a case, each object will have a different optimum focus position, so you need to specify the region on which to focus.

    Search strategies
    The properties of the FocusParameters property specify the minimum, maximum, and starting position of the lens motor. Given these positions, different strategies can be used to find the optimum focus position. These strategies determine how the position is updated (in which direction and by how much) between grabs. They can affect the speed and accuracy of the operation. The default search strategy used by ActiveMIL is the smart-scan strategy.

    Bisection strategy
    The bisection strategy breaks down the given positional range, step-by-step, until it finds the optimum focus position.

    In general, the bisection strategy processes the fewest amount of images.
    However, it is most sensitive to noise and requires that the lens motor travel the greatest distance.


    Refocus strategy
    The refocus strategy scans upward or downward until it finds the optimum focus position or until it reaches the minimum or maximum position. While scanning in one direction, if the focus indicator decreases continuously (indicating an out-of-focus condition), the focus position is returned to its starting point and scanning is started in the opposite direction. By default, if a peak in focus indicator values is found, the next two positions are scanned to make sure the peak is truly the optimum. If necessary, you can change the number of positions used to verify a peak.

    The refocus strategy is the best strategy to use when the current focus position is close to optimum.

    Scan-All strategy
    The scan-all strategy scans, by 1, all positions between the minimum and maximum and returns the position which produced the highest focus indicator.


    The scan-all strategy is the slowest but most accurate.

    Smart-Scan strategy
    The smart-scan strategy performs three refocus searches, each with a smaller positional increment. You specify the initial positional increment; the subsequent increments are factors of the initial one. As with the refocus strategy, the default number of positions used to verify a peak is 2 but can be changed.


    The smart-scan strategy is a compromise between the speed of a bisection and the accuracy of a scan-all.

  3. #3
    Membre expérimenté
    Profil pro
    chercheur
    Inscrit en
    Avril 2004
    Messages
    830
    Détails du profil
    Informations personnelles :
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : chercheur

    Informations forums :
    Inscription : Avril 2004
    Messages : 830
    Points : 1 455
    Points
    1 455
    Par défaut
    Citation Envoyé par neF4ST Voir le message
    Bonjour, j'ai besoin de faire un genre d'autofocus et je souhaite donc utiliser une mesure de contraste pour cela.
    J'ai pour l'instant bricolé du code qui calcule le max du gradient de l'image.
    Ca marche pas trop mal mais c'est sensible au bruit et aux pixels morts.

    J'ai trouvé ce lien fourni par M. Pseudocode :
    http://www.cambridgeincolour.com/tut...-autofocus.htm

    Ils suggèrent de regarder la largeur de l'histogramme dans des petites fenêtres, ce qui semble une bonne idée.
    Il me semble que la bonne quantité à maximiser est le second moment de l'histogramme de la région d'intérêt.

  4. #4
    Rédacteur
    Avatar de pseudocode
    Homme Profil pro
    Architecte système
    Inscrit en
    Décembre 2006
    Messages
    10 062
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Architecte système
    Secteur : Industrie

    Informations forums :
    Inscription : Décembre 2006
    Messages : 10 062
    Points : 16 084
    Points
    16 084
    Par défaut
    Citation Envoyé par Nebulix Voir le message
    Il me semble que la bonne quantité à maximiser est le second moment de l'histogramme de la région d'intérêt.
    Oui, ca semble logique de maximiser la variance afin d'avoir un spectre le plus large possible de valeurs.

    A contrario, une variance faible indiquerait que toutes les valeurs sont proches les unes de autres, ce qu'on observe typiquement quand l'image est floue (les transitions franches blanc/noir sont remplacées par du gris).

    Cela dit, cette technique n'est applicable que si on analyse l'histogramme d'une zone censée avoir une forte variance, c'est à dire une transition franche (un coin, ou un bord par exemple).

  5. #5
    Membre expérimenté
    Profil pro
    chercheur
    Inscrit en
    Avril 2004
    Messages
    830
    Détails du profil
    Informations personnelles :
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : chercheur

    Informations forums :
    Inscription : Avril 2004
    Messages : 830
    Points : 1 455
    Points
    1 455
    Par défaut
    Citation Envoyé par pseudocode Voir le message
    Oui, ca semble logique de maximiser la variance afin d'avoir un spectre le plus large possible de valeurs.

    A contrario, une variance faible indiquerait que toutes les valeurs sont proches les unes de autres, ce qu'on observe typiquement quand l'image est floue (les transitions franches blanc/noir sont remplacées par du gris).

    Cela dit, cette technique n'est applicable que si on analyse l'histogramme d'une zone censée avoir une forte variance, c'est à dire une transition franche (un coin, ou un bord par exemple).
    En fonction de la mise au point, la variance suit une courbe en cloche plus ou moins large selon la variance de l'image idéale. Le critère de mise au point est de ne pas diminuer cette variance. Bien entendu si elle est nulle ...

Discussions similaires

  1. Réglage du contraste d'une image à la souris
    Par pwfsic dans le forum Interfaces Graphiques
    Réponses: 4
    Dernier message: 16/05/2007, 14h45
  2. Luminosité et contraste d'une image
    Par biquet dans le forum Images
    Réponses: 1
    Dernier message: 03/05/2007, 17h35
  3. Modification du contrast d'une image
    Par Bourak dans le forum Langage
    Réponses: 3
    Dernier message: 08/11/2005, 17h37
  4. Calculer la taille d'une image
    Par bigourson dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 05/09/2005, 11h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo