上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 图像的基本运算 一. 点运算:对图像的每个像素点的灰度值按一定映射关系进行运算。 线性点运算:线性点运算可以对整体图像进行增量或减暗。 如:s=a*r+b 2.非线性点运算:非线性点运算可以对某些感兴趣的点灰度范围扩展,相对抑制不感兴趣的灰度区域。 对数变换:s=clog(1+r),若r>=0,可以 阅读全文
posted @ 2021-01-15 22:03 Maxwell· 阅读(1655) 评论(0) 推荐(0) 编辑
摘要: 图像数字化就是将连续图像离散化,其工作包括两个方面: 取样和量化。 采样:就是把一幅连续图像在空间上分割成M×N个网格,每个网格用一亮度值来表示。一个网格称为一个像素。M×N的取值满足采样定理。 量化:就是把采样点上对应的亮度连续变化区间转换为单个特定数码的过程。量化后,图像就被表示成一个整数矩阵。 阅读全文
posted @ 2021-01-15 16:36 Maxwell· 阅读(3970) 评论(0) 推荐(1) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; int main(){ int n; cin>>n; for(int i=2;i<=n;i++){ while(n!=0){ if(n%i== 阅读全文
posted @ 2021-01-12 21:04 Maxwell· 阅读(55) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; int greatest_common_divisor1(int a,int b){ //辗转相减法 while(a!=b){ if(a>b) 阅读全文
posted @ 2021-01-12 20:28 Maxwell· 阅读(67) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; void k_system(int n,int k){ //n:十进制数,k为进制 int t=n; int m=0; int a[10]; 阅读全文
posted @ 2021-01-10 22:33 Maxwell· 阅读(373) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; bool hui_number(int n){ int t=n; int k=0; int a[10]; while(t>0){ //提前数的 阅读全文
posted @ 2021-01-10 22:23 Maxwell· 阅读(54) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; bool Narcissistic_number(int n){ int t=n; int a[3]; int k=0; while(t>0) 阅读全文
posted @ 2021-01-10 21:54 Maxwell· 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 用一维数组或二维数组打印杨辉三角 #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; int a[15][15]; int aa[1024]; void yang_2D(){//二维数组打印杨辉 阅读全文
posted @ 2021-01-10 21:04 Maxwell· 阅读(74) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; bool prime(int x){ for(int i=2;i*i<=x;i++){ if(x%i==0) return false; } 阅读全文
posted @ 2021-01-10 17:31 Maxwell· 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 思路(大根堆): 部分堆排序: 从某根节点开始,看左右孩子的值是否大于根节点。 若根节点不为最大值,找到左右孩子的最大值和根节点交换。 交换后破坏了下一级堆,则需要对下一级堆继续用以上方法排序。 建立堆: 从最后一个节点开始,找到父节点,从父节点遍历到根节点,用堆排序,最后就建立一个排好序的堆。 空 阅读全文
posted @ 2020-07-09 22:58 Maxwell· 阅读(170) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页