爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5213|回复: 5

[程序设计] matlab求指教

[复制链接]

新浪微博达人勋

发表于 2015-5-29 20:14:30 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
基于稀疏低秩分解的杂草种子配准那篇文章有人知道么,里面有个rasl算法,可以人脸识别配准,它人脸圈划出红绿两种颜色的框,原理是什么,为什么我更改识别区域的话红绿框的大小就不一样了,求大神解答,我是用这个算法配准图像识别猫眼目标的。
这是图片

                               
登录/注册后可看大图

这是部分代码

                               
登录/注册后可看大图

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-5-29 20:27:04 | 显示全部楼层
图片挂了
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2015-5-29 21:03:33 | 显示全部楼层
额。。。图片怎么挂了。。。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-5-29 21:08:07 | 显示全部楼层
  1. % Yigang Peng, Arvind Ganesh, November 2009.
  2. % Questions? abalasu2@illinois.edu
  3. %
  4. % Copyright: Perception and Decision Laboratory, University of Illinois, Urbana-Champaign
  5. %            Microsoft Research Asia, Beijing
  6. %
  7. % Reference: RASL: Robust Alignment by Sparse and Low-rank Decomposition for Linearly Correlated Images  
  8. %            Yigang Peng, Arvind Ganesh, John Wright, Wenli Xu, and Yi Ma. Proc. of CVPR, 2010.
  9. %

  10. % robust batch image alignment example

  11. % clear
  12. clc ;
  13. %clear all;
  14. close all ;

  15. % addpath
  16. addpath RASL_toolbox ;
  17. addpath data ;
  18. addpath results ;

  19. %% define images' path

  20. currentPath = cd;

  21. % input path
  22. imagePath = fullfile(currentPath,'data','LFW') ;
  23. pointPath = fullfile(currentPath,'data','LFW') ; % path to files containing initial feature(eye) coordinates
  24. userName = 'Jacques_Chirac' ;
  25. % one of
  26. % 'Gloria_Macapagal_Arroyo', 'Jennifer_Capriati', 'Laura_Bush',  
  27. % 'Serena_Williams', 'Barack_Obama', 'Ariel_Sharon',
  28. % 'Arnold_Schwarzenegger', 'Colin_Powell', 'Donald_Rumsfeld',
  29. % 'George_W_Bush', 'Gerhard_Schroeder', 'Hugo_Chavez',
  30. % 'Jacques_Chirac', 'Jean_Chretien', 'John_Ashcroft',
  31. % 'Junichiro_Koizumi', 'Lleyton_Hewitt', 'Luiz_Inacio_Lula_da_Silva',
  32. % 'Tony_Blair', 'Vladimir_Putin'

  33. % output path
  34. destRoot = fullfile(currentPath,'results') ;
  35. destDir = fullfile(destRoot,userName) ;
  36. if ~exist(destDir,'dir')
  37.     mkdir(destRoot,userName) ;
  38. end

  39. %% define parameters

  40. % dispaly flag
  41. raslpara.DISPLAY = 1 ;

  42. % save flag
  43. raslpara.saveStart = 1 ;
  44. raslpara.saveEnd = 1 ;
  45. raslpara.saveIntermedia = 0 ;


  46. % for face images
  47. raslpara.canonicalImageSize = [ 120 100  ];
  48. raslpara.canonicalEyeCoords = [ 5  25 ; ...
  49.                                 5 5  ];
  50.                            
  51. % parametric tranformation model
  52. raslpara.transformType = 'SIMILARITY';
  53. % one of 'TRANSLATION', 'SIMILARITY', 'AFFINE','HOMOGRAPHY'

  54. raslpara.numScales = 1 ; % if numScales > 1, we use multiscales

  55. % main loop
  56. raslpara.stoppingDelta = .000001; % stopping condition of main loop
  57. raslpara.maxIter = 250; % maximum iteration number of main loops

  58. % inner loop
  59. raslpara.inner_tol = 1e-6 ;
  60. raslpara.inner_maxIter = 1000 ;
  61. raslpara.continuationFlag = 1 ;
  62. raslpara.mu = 1e-3 ;
  63. raslpara.lambdac = 3 ; % lambda = lambdac/sqrt(m)


  64. %% Get training images

  65. % get initial transformation
  66. transformationInit = 'SIMILARITY';
  67. [fileNames, transformations, numImages] = get_training_images( imagePath, pointPath, userName, raslpara.canonicalEyeCoords, transformationInit) ;


  68. %% RASL main loop: do robust batch image alignment

  69. [D, Do, A, E, xi, numIterOuter, numIterInner ] = rasl_main(fileNames, transformations, numImages, raslpara, destDir);

  70. %% plot the results

  71. layout.xI = 5 ;
  72. layout.yI = 7 ;
  73. layout.gap = 2 ;
  74. layout.gap2 = 1 ;
  75. rasl_plot(destDir, numImages, raslpara.canonicalImageSize, layout)
复制代码

这是主要的代码部分,其中有
% for face images
raslpara.canonicalImageSize = [ 120 100  ];
raslpara.canonicalEyeCoords = [ 5  25 ; ...
                                5 5  ];
我感觉是识别区域的,求大神讲解
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-5-29 21:12:24 | 显示全部楼层

大神我问个愚蠢的问题,怎么正确的发图片啊。。。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-5-30 15:20:19 | 显示全部楼层
求大神啊!!!
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表