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

Signal Discussion :

Détection de points d'intérêts 1D


Sujet :

Signal

  1. #1
    Membre à l'essai
    Femme Profil pro
    Chercheur en informatique
    Inscrit en
    Février 2012
    Messages
    14
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Chercheur en informatique
    Secteur : Enseignement

    Informations forums :
    Inscription : Février 2012
    Messages : 14
    Points : 19
    Points
    19
    Par défaut Détection de points d'intérêts 1D
    Bonjour,

    je veux faire la détection des points d’intérêts (Harris-Laplace) 1d mais il existe une problème dans le code puisque cela me donne des points n'appartenant pas à la courbe :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    X=rand(100,1);
    plot(X)
    pt  = kp_harrislaplace(X);
    x=pt(:,1);                    
    y=pt(:,2);
    for i=1:100
        z(i)=X(x(i),y(i));
    end
    hold on; plot(z,'r*')
    Merci.

  2. #2
    Modérateur

    Homme Profil pro
    Ingénieur en calculs scientifiques
    Inscrit en
    Août 2007
    Messages
    4 639
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Ingénieur en calculs scientifiques

    Informations forums :
    Inscription : Août 2007
    Messages : 4 639
    Points : 7 614
    Points
    7 614
    Par défaut
    Bonjour,

    étant donné que tu ne nous montres pas la fonction kp_harrislaplace, je ne vois pas trop comment on pourrait t'aider...
    Pour une bonne utilisation des balises code c'est ici!
    Petit guide du voyageur MATLABien : Le forum La faq Les tutoriels Les sources


    La nature est un livre écrit en langage mathématique. Galilée.

  3. #3
    Membre à l'essai
    Femme Profil pro
    Chercheur en informatique
    Inscrit en
    Février 2012
    Messages
    14
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Chercheur en informatique
    Secteur : Enseignement

    Informations forums :
    Inscription : Février 2012
    Messages : 14
    Points : 19
    Points
    19
    Par défaut
    Bonjour,
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    la fonction de kp_harrislaplace
    function points = kp_harrislaplace(img)
        % Extract keypoints using Harris-Laplace algorithm
        %
        % Author :: Vincent Garcia
        % Date   :: 05/12/2007
        %
        % INPUT
        % =====
        % img    : the graylevel image
        %
        % OUTPUT
        % ======
        % points : the interest points extracted
        %
        % REFERENCES
        % ==========
        % K. Mikolajczyk and C. Schmid. Scale & affine invariant interest point detectors.
        % International Journal of Computer Vision, 2004
        %
        % EXAMPLE
        % =======
        % points = kp_harrislaplace(img)
     
        % IMAGE PARAMETERS
        img         = double(img(:,:,1));
        img_height  = size(img,1);
        img_width   = size(img,2);
     
        % SCALE PARAMETERS
        sigma_begin = 1.5;
        sigma_step  = 1.2;
        sigma_nb    = 13;
        sigma_array = (sigma_step.^(0:sigma_nb-1))*sigma_begin;
     
     
        % PART 1 : HARRIS
        harris_pts = zeros(0,3);
        for i=1:sigma_nb
     
            % scale (standard deviation)
            s_I = sigma_array(i);   % intégration scale
            s_D = 0.7*s_I;          % derivative scale %0.7
     
            % derivative mask
            x  = -round(3*s_D):round(3*s_D);
            dx = x .* exp(-x.*x/(2*s_D*s_D)) ./ (s_D*s_D*s_D*sqrt(2*pi));
            dy = dx';
     
            % image derivatives
            Ix = conv2(img, dx, 'same');
            Iy = conv2(img, dy, 'same');
     
            % auto-correlation matrix
            g   = fspecial('gaussian',max(1,fix(6*s_I+1)), s_I);
            Ix2 = conv2(Ix.^2, g,  'same');
            Iy2 = conv2(Iy.^2, g,  'same');
            Ixy = conv2(Ix.*Iy, g, 'same');
     
            % interest point response
            %cim = (Ix2.*Iy2 - Ixy.^2)./(Ix2 + Iy2 + eps);				% Alison Noble measure.
            k = 0.06; cim = (Ix2.*Iy2 - Ixy.^2) - k*(Ix2 + Iy2).^2;	% Original Harris measure.
     
            % find local maxima on neighborgood
            [l,c,max_local] = findLocalMaximum(cim,3*s_I);%3*s_I
     
            % set threshold 1% of the maximum value
            t = 0.2*max(max_local(:));
     
            % find local maxima greater than threshold
            [l,c] = find(max_local>=t);
     
            % build interest points
            n = size(l,1);
            harris_pts(end+1:end+n,:) = [l,c,repmat(i,[n,1])];
        end
     
     
        % PART 2 : LAPLACE
        % compute scale-normalized laplacian operator
        laplace_snlo = zeros(img_height,img_width,sigma_nb);
        for i=1:sigma_nb
            s_L = sigma_array(i);   % scale
            laplace_snlo(:,:,i) = s_L*s_L*imfilter(img,fspecial('log', floor(6*s_L+1), s_L),'replicate');
        end
        % verify for each of the initial points whether the LoG attains a maximum at the scale of the point
        n   = size(harris_pts,1);
        cpt = 0;
        points = zeros(n,3);
        for i=1:n
            l = harris_pts(i,1);
            c = harris_pts(i,2);
            s = harris_pts(i,3);
            val = laplace_snlo(l,c,s);
            if s>1 && s<sigma_nb
                if val>laplace_snlo(l,c,s-1) && val>laplace_snlo(l,c,s+1)
                    cpt = cpt+1;
                    points(cpt,:) = harris_pts(i,:);
                end
            elseif s==1
                if val>laplace_snlo(l,c,2)
                    cpt = cpt+1;
                    points(cpt,:) = harris_pts(i,:);
                end
            elseif s==sigma_nb
                if val>laplace_snlo(l,c,s-1)
                    cpt = cpt+1;
                    points(cpt,:) = harris_pts(i,:);
                end
            end
        end
        points(cpt+1:end,:) = [];
     
        % SET SCALE TO 3*SIGMA FOR DISPLAY
        %points(:,3) = 3*sigma_array(points(:,3));
        if points(cpt+1:end,:) is empty
        end
    end

  4. #4
    Modérateur

    Homme Profil pro
    Ingénieur en calculs scientifiques
    Inscrit en
    Août 2007
    Messages
    4 639
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Ingénieur en calculs scientifiques

    Informations forums :
    Inscription : Août 2007
    Messages : 4 639
    Points : 7 614
    Points
    7 614
    Par défaut
    Dans la description du code donné par l'auteur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    The input image must be a gray level image.
    Pour une bonne utilisation des balises code c'est ici!
    Petit guide du voyageur MATLABien : Le forum La faq Les tutoriels Les sources


    La nature est un livre écrit en langage mathématique. Galilée.

Discussions similaires

  1. Détection des points d'intérêts avec OpenCV
    Par daoudasylla dans le forum Bibliothèques, systèmes et outils
    Réponses: 2
    Dernier message: 17/04/2015, 20h17
  2. Détection des points d'intérêt dans une séquence vidéo
    Par miss_angel dans le forum Traitement d'images
    Réponses: 3
    Dernier message: 15/12/2011, 13h52
  3. Points d'intérêt de Harris
    Par faroukus dans le forum OpenCV
    Réponses: 4
    Dernier message: 01/05/2008, 19h58
  4. Détection de points d'intersection
    Par Garsouille dans le forum OpenCV
    Réponses: 1
    Dernier message: 24/07/2007, 22h50

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