• 【图像处理】基于形状提取和模式匹配组合的面部特征点提取方法(Matlab代码实现)


     👨‍🎓个人主页:研学社的博客 

    💥💥💞💞欢迎来到本博客❤️❤️💥💥

    🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

    ⛳️座右铭:行百里者,半于九十。

    📋📋📋本文目录如下:🎁🎁🎁

    目录

    💥1 概述

    📚2 运行结果

    🎉3 参考文献

    🌈4 Matlab代码实现

    💥1 概述

    文献来源:

    [1] Y. Ohkawa, C. H. Suryanto, K. Fukui, "Fast Combined Separability Filter for Detecting Circular Objects", The twelfth IAPR conference on Machine Vision Applications (MVA) pp.99-103, 2011.

    [2] K. Fukui, O. Yamaguchi, "Facial feature point extraction method based on combination of shape extraction and pattern matching", Systems and Computers in Japan 29 (6), pp.49-58, 1998.

    本文包含来自[1]和[2]的算法的实现和使用示例,用于检测给定图像中的圆形对象。
    [2] 中的算法称为可分离性滤波器,它通过滑动窗口在整个图像中使用圆形的掩模滤波器计算费舍尔准则。通过费舍尔准则的计算,我们得到了一个可分离性图,其中局部峰最有可能是圆形物体的中心。为了加快 [2] 的计算速度,[1] 的工作近似于具有四个组合矩形的圆形形状,并在计算中使用积分图像。详情请参考[1]和[2]。

    📚2 运行结果

     

     

     

     

     

     

    部分代码:

    Im = imread('testimages/cheek.jpg');
    gr = double(rgb2gray(Im));
    figure(40);clf;
    image(Im);
    axis equal tight;
    title('Original parts of face');

    tic
    circMap = zeros(size(gr,1),size(gr,2));
    for nR = 8:2:12, %multiple scales of separability filter's size (radius)
        r=nR; % radius (please refer to [2])
        r1=nR; % inner circle radius (please refer to [2])
        r2=nR; % outer circle radius (please refer to [2])
        cMap = cvtCircleSepFilter(gr, r, r1, r2);
        circMap = max(circMap, cMap);
    end
    timerequired=toc;
    fprintf('Time required: %g seconds\n',timerequired);

    figure(41);clf;
    subplot(1,2,1);
    imagesc(cMap);
    axis equal tight;
    title('Separability map (circular filter)');

    subplot(1,2,2);
    image(imfuse(gr,cMap));
    axis equal tight;
    title('Fused image (circular filter)');

    % find local peaks
    nTH = 0.2; % threshold for local peaks 
    S1 = imfuse(gr,cMap);
    PL = cvtFindLocalPeakX(cMap,1,nTH);
    for H=1:size(PL,2)
        % draw cross at each local peak (cross size is relative to the peak value)
        S1 = cvtDrawCross(S1, PL(2,H),PL(1,H),round(10*PL(3,H)),[255,255,255]);
    end
    figure(42);clf;
    image(S1);
    axis equal tight;
    title(['Local peaks > ' num2str(nTH) ' (original circular filter)'],'fontweight','bold');

    Im = imread('testimages/cheek.jpg');
    gr = double(rgb2gray(Im));
    figure(40);clf;
    image(Im);
    axis equal tight;
    title('Original parts of face');

    tic
    circMap = zeros(size(gr,1),size(gr,2));
    for nR = 8:2:12, %multiple scales of separability filter's size (radius)
        r=nR; % radius (please refer to [2])
        r1=nR; % inner circle radius (please refer to [2])
        r2=nR; % outer circle radius (please refer to [2])
        cMap = cvtCircleSepFilter(gr, r, r1, r2);
        circMap = max(circMap, cMap);
    end
    timerequired=toc;
    fprintf('Time required: %g seconds\n',timerequired);

    figure(41);clf;
    subplot(1,2,1);
    imagesc(cMap);
    axis equal tight;
    title('Separability map (circular filter)');

    subplot(1,2,2);
    image(imfuse(gr,cMap));
    axis equal tight;
    title('Fused image (circular filter)');

    % find local peaks
    nTH = 0.2; % threshold for local peaks 
    S1 = imfuse(gr,cMap);
    PL = cvtFindLocalPeakX(cMap,1,nTH);
    for H=1:size(PL,2)
        % draw cross at each local peak (cross size is relative to the peak value)
        S1 = cvtDrawCross(S1, PL(2,H),PL(1,H),round(10*PL(3,H)),[255,255,255]);
    end
    figure(42);clf;
    image(S1);
    axis equal tight;
    title(['Local peaks > ' num2str(nTH) ' (original circular filter)'],'fontweight','bold');

    Im = imread('testimages/cheek.jpg');
    gr = double(rgb2gray(Im));
    figure(40);clf;
    image(Im);
    axis equal tight;
    title('Original parts of face');

    tic
    circMap = zeros(size(gr,1),size(gr,2));
    for nR = 8:2:12, %multiple scales of separability filter's size (radius)
        r=nR; % radius (please refer to [2])
        r1=nR; % inner circle radius (please refer to [2])
        r2=nR; % outer circle radius (please refer to [2])
        cMap = cvtCircleSepFilter(gr, r, r1, r2);
        circMap = max(circMap, cMap);
    end
    timerequired=toc;
    fprintf('Time required: %g seconds\n',timerequired);

    figure(41);clf;
    subplot(1,2,1);
    imagesc(cMap);
    axis equal tight;
    title('Separability map (circular filter)');

    subplot(1,2,2);
    image(imfuse(gr,cMap));
    axis equal tight;
    title('Fused image (circular filter)');

    % find local peaks
    nTH = 0.2; % threshold for local peaks 
    S1 = imfuse(gr,cMap);
    PL = cvtFindLocalPeakX(cMap,1,nTH);
    for H=1:size(PL,2)
        % draw cross at each local peak (cross size is relative to the peak value)
        S1 = cvtDrawCross(S1, PL(2,H),PL(1,H),round(10*PL(3,H)),[255,255,255]);
    end
    figure(42);clf;
    image(S1);
    axis equal tight;
    title(['Local peaks > ' num2str(nTH) ' (original circular filter)'],'fontweight','bold');

    🎉3 参考文献

    部分理论来源于网络,如有侵权请联系删除。

    [1] Y. Ohkawa, C. H. Suryanto, K. Fukui, "Fast Combined Separability Filter for Detecting Circular Objects", The twelfth IAPR conference on Machine Vision Applications (MVA) pp.99-103, 2011.

    [2] K. Fukui, O. Yamaguchi, "Facial feature point extraction method based on combination of shape extraction and pattern matching", Systems and Computers in Japan 29 (6), pp.49-58, 1998.

    🌈4 Matlab代码实现

  • 相关阅读:
    Winform +OpenCvSharp更换证件照底色
    【QT】Qt中Websocket的使用
    Elasticsearch:如何从 Elasticsearch 集群中删除数据节点
    Vue/ Vue ELement框架、表单效验正则属性、兜底效验(点击登录后会验证文本框是否满足条件)
    linux网络编程-socket-函数及TCP通信实现
    57. 插入区间
    Day10--配置uni-app的开发环境
    IDA* AcWing 181. 回转游戏
    餐饮美食网页设计(HTML+CSS+JavaScript)
    【测试开发】一个5年测试开发的成长经验,大学毕业就开启他的职业生涯......
  • 原文地址:https://blog.csdn.net/weixin_46039719/article/details/127913518