• A Computational Approach to Edge Detection

    1986年canny据信噪比准则、定位精度准则、单边缘相应准则提出了最优化的边缘检测算子canny边缘检测算法

    0
    23
    6.97MB
    2015-12-20
    11
  • An Adaptive Canny Edge Detector using Histogram Concavity Analysis

    开关型中值滤波,滤除高斯滤波滤出不了的脉冲噪声,再对题第直方图进行凹度分析来序曲双阈值,以改善传统canny算子人工设定阈值的缺陷

    0
    53
    942KB
    2015-12-20
    10
  • 电子万年历系统

    #include<stdio h> #include<conio h> #include<stdlib h> int g MonthDays[13] {0 31 28 31 30 31 30 31 31 30 31 30 31}; 定义全局数组 函数声明 int LeapYear int n ; 判断闰年与否 int CountYearDays int year ; 计算从公元1 1到某年12 31一共多少天 int CountMonthDays int month ; 计算某年一月一日到12月31日的天数 void Menu void ; 输出系统提供的功能选项 提示用户进行选择 void ListMonth int days int t ; 用来按规定格式输出一个月的日历 void Search1 void ; 用来显示一年12个月的日历 void Search2 void ; 用来显示某年某个月的日历 void Search3 void ; 用来显示某天是星期几 void main { int select; while 1 { Menu ; 功能选择 scanf "%d" &select ; switch select { case 1:Search1 ;break; select 1 case 2:Search2 ;break; case 3:Search3 ;break; case 0:printf " n t谢谢使用 再见 n" ;exit 0 ; default:printf " n t按键错误 请重新选择 n" ; } } } 功能:判断闰年 参数:n为需要判断的年份 返回:是闰年返回1 不是返回0 主要思路:用if语句判断某一年是否为闰年 int LeapYear int n { if n%4 0&&n0 0 ||n%400 0 return 1 ; else return 0 ; } 功能:计算从公元元年到公元(year 1)年的总天数 参数:Year为年份 返回:总天数 主要思路:用for循环计算天数 int CountYearDays int year { int i flag days 0; for i 1;i<year;i++ { flag LeapYear i ; if flag days days+366; else days days+365; } return days ; } 功能:计算当年前 mouth 1 个月的天数 参数:month为月份 返回:当年前(month 1)个月份的天数 主要思路:用for循环计算天数 int CountMonthDays int month { int i days 0; for i 1;i<month;i++ { days days+g MonthDays[i]; } return days ; } 功能:显示系统菜单 参数:无 返回:无 主要思路:用printf输出菜单 void Menu void { printf " n" ; printf " t n" ; printf " t n" ; printf " t 欢迎使用万年历系统 n" ; printf " t n" ; printf " t n" ; printf " n" ; printf " t 请输入您要查询的内容: n n" ; printf " t 1 显示某年的日历 n" ; printf " t 2 先是某年某月的日历 n" ; printf " t 3 显示某天是星期几 n" ; printf " t 0 退出系统 n n" ; printf " t 请选择输入 0 3 :" ; } 功能:按规定格式输入一个月的日历 参数:days表示要输入这个月的天数 t表示这个月的1号是星期几 返回:无 主要思路:主要采用for输出日历 void ListMonth int days int t { int i j; printf "星期日 星期一 星期二 星期三 星期四 星期五 星期六 n " ; for i 1;i< days;i++ { if i 1 { for j 0;j<t;j++ { printf " " ; 每个汉字占2列 3个汉字6列 再加3个空格 共9个空格 } } printf " % 7d" i ; 空两个 以左对齐的方式输出 if i+t %7 0 printf " n" ; } } 功能:输出制定年份全年12月份的日历 参数:无 返回:无 主要思路:主要采用for循环输出每个月的日历 void Search1 void { int year t k flag days; printf " 请输入年份:" ; scanf "%d" &year ; flag LeapYear year ; t CountYearDays year +1 %7; for k 1;k< 12;k++ { days g MonthDays[k]; if flag&&k 2 days 29; printf " n%d月 n n" k ; ListMonth days t ; t t+days%7 %7; printf " n" ; if k%3 0 { printf "按任意键继续 n" ; getch ; 函数功能是输入一个字符且不回显 定义在conio h中 } } } 功能:输出某年某个月的日历 参数:无 返回:无 主要思路:通过调用函数计算天数 在输出日历 void Search2 void { int t year month flag days ydays mdays alldays; printf "请输入年月(如2004 4): " ; scanf "%d %d" &year &month ; ydays CountYearDays year ; mdays CountMonthDays month ; days g MonthDays[month]; flag LeapYear year ; if flag { if month>2 { mdays++; } else if month 2 days 29; } alldays ydays+mdays+1; t alldays%7; printf " n %d年%d月 n n" year month ; ListMonth days t ; printf " n" ; } 功能:输出某一天是星期几 参数:无 返回:无 主要思路:通过调用函数计算天数 在计算并输出这一天是星期几 void Search3 void { int t year month day flag ydays mdays alldays; printf "请输入年月日(如2004 4 3):" ; scanf "%d %d %d" &year &month &day ; ydays CountYearDays year ; mdays CountMonthDays month ; flag LeapYear year ; if flag&&month>2 { mdays++; } alldays ydays+mdays+day; t alldays%7; printf " n %d年%d月%d日:" year month day ; switch t { case 0:printf "星期日" ;break; case 1:printf "星期一" ;break; case 2:printf "星期二" ;break; case 3:printf "星期三" ;break; case 4:printf "星期四" ;break; case 5:printf "星期五" ;break; case 6:printf "星期六" ;break; }; }">#include<stdio h> #include<conio h> #include<stdlib h> int g MonthDays[13] {0 31 28 31 30 31 30 31 31 30 31 30 31}; 定义全局数组 函数声明 int LeapYear int n ; 判断闰年与否 int CountYearDays int year ; 计算从公元1 1到某年12 31一共多少天 int [更多]

    5
    277
    169KB
    2015-04-30
    10
  • 分享小兵

    成功上传3个资源即可获取
关注 私信
上传资源赚积分or赚钱