91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 127KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-13
  • 語言: Matlab
  • 標簽: 圖像??變化檢測??

資源簡介

利用MATLAB程序?qū)Σ煌瑫r間的兩張圖片進行變化檢測,找出其中的變化部分

資源截圖

代碼片段和文件信息

/*?salient?region?detection
?*?image?format:?raw?PGM
?*
?*?described?in:
?*?A?Simple?Method?for?Detecting?Salient?Regions
?*?Paul?L.?Rosin
?*?Pattern?Recognition?vol.?42?no.?11?pp.?2363-2371?2009.
?*
?*?Paul?Rosin
?*?September?2007
?*/

#include?
#include?
#include?

#ifndef?FALSE
#?define?FALSE?0
#?define?TRUE?(!FALSE)
#endif

#define?SQR(x)??????????((x)*(x))

#define?MAX_SIZE?2000

#include?“pgmio.h“

int?kernel[3][3]?=?{{121}?{000}?{-1-2-1}};

unsigned?char?image[MAX_SIZE][MAX_SIZE];
int?dt_image[MAX_SIZE][MAX_SIZE];
unsigned?char?tmp[MAX_SIZE][MAX_SIZE];
unsigned?char?thresh[MAX_SIZE][MAX_SIZE];

double?edges[MAX_SIZE][MAX_SIZE];
double?summed_dt[MAX_SIZE][MAX_SIZE];

int?heightwidthdepth;

main(argcargv)
int?argc;
char?*argv[];
{
????int?itxy;
????char?*infile*outfile*maskfile*saliencyfile;

????infile?=?outfile?=?maskfile?=?saliencyfile?=?NULL;

????/*?parse?command?line?*/
????for(i?=?1;?i?????????if?(argv[i][0]?==?‘-‘)?{
????????????switch(argv[i][1])?{
????????????????case?‘i‘:
????????????????????i++;
????????????????????infile?=?argv[i];
????????????????????break;
????????????????case?‘m‘:
????????????????????i++;
????????????????????maskfile?=?argv[i];
????????????????????break;
????????????????case?‘o‘:
????????????????????i++;
????????????????????outfile?=?argv[i];
????????????????????break;
????????????????case?‘s‘:
????????????????????i++;
????????????????????saliencyfile?=?argv[i];
????????????????????break;
????????????????default:
????????????????????printf(“unknown?option?%s\n“argv[i]);
????????????????????options(argv[0]);
????????????}
????????}
????????else?{
????????????printf(“unknown?option?%s\n“argv[i]);
????????????options(argv[0]);
????????}
????}

????if?((infile?==?NULL)?||?(outfile?==?NULL))
????????options(argv[0]);

????read_pgm(imageinfile&width&height&depth);

????sobel(imageedges);
????/*?for?consistency?with?my?original?implementation
???????I?rescale?and?copy?the?edges?into?an?8?bit?image
????*/
????rescale(edgestmp);

????for?(y?=?0;?y?????????for?(x?=?0;?x?????????????summed_dt[x][y]?=?0;

????for?(t?=?4;?t?????????//?threshold
????????for?(y?=?0;?y?????????????for?(x?=?0;?x?????????????????if?(tmp[x][y]?>?t)
????????????????????thresh[x][y]?=?0;
????????????????else
????????????????????thresh[x][y]?=?255;

????????//?perform?DT
????????dt(threshdt_image);

????????//?running?DT?sum
????????for?(y?=?0;?y?????????????for?(x?=?0;?x?????????????????summed_dt[x][y]?+=?dt_image[x][y];
????}

????/*?set?corners?to?average?for?the?time?being?*/
????summed_dt[0][0]?=?(summed_dt[1][0]?+?summed_dt[0][1])?/?2;
????summed_dt[0][height-1]?=?(summed_dt[1][height-1]?+?summed_dt[0][height-2])?/?2;
????summed_dt[width-1][0]?=?(summed_dt[width-2][0]?+?summed_dt[width-1][1])?/?2;
????summed_dt[width-1][height-1]?=?(summed_dt[width-2][height-1]?+?summe

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????154416??2007-09-24?10:26??19021.pgm
?????文件??????????80??2007-09-24?10:29??Makefile
?????文件????????2383??2009-08-05?17:34??pgmio.h
?????文件????????1304??2009-08-28?13:11??README
?????文件???????10140??2009-08-28?13:12??salient_regions.c

評論

共有 條評論