图像处理

学习图像处理知识---EmguCV3.4图像ArUco Marker Detection--DetectorParameters 结构体

匿名 (未验证) 提交于 2019-12-03 00:28:02
好久没有更新了图像处理 ArUco Marker Detection 在Emgu.CV.Aruco Namespace 命名空间中。--重要的检测结构体DetectorParameters Structure public double AdaptiveThreshConstant //用于找外轮廓的灰阶值 Double ,默认7. public int AdaptiveThreshWinSizeMin 对应最小窗口, public int AdaptiveThreshWinSizeStep public int CornerRefinementMaxIterations public DetectorParameters . RefinementMethod CornerRefinementMethod public double CornerRefinementMinAccuracy public int CornerRefinementWinSize public double ErrorCorrectionRate public int MarkerBorderBits public double MaxErroneousBitsInBorderRate public double MaxMarkerPerimeterRate public double

TensorFlow 图像处理

匿名 (未验证) 提交于 2019-12-03 00:26:01
__author__ = 'ding' ''' TensorFlow 图像处理 ''' import tensorflow as tf import matplotlib.pyplot as plt image_raw_data = tf.gfile.FastGFile( './path/to/picture1.jpeg' , 'rb' ).read() with tf.Session() as sess: # 将图像以jpeg的格式解码从而得到图像对应的三维矩阵 # tf.image_decode_png 函数对png格式图形进行解码。解码之后得到一个张量 # tf.image_decode_jpeg 函数对jpeg格式图形进行解码。 img_data = tf.image.decode_jpeg(image_raw_data) print(img_data.eval()) img_data = tf.image.convert_image_dtype(img_data, dtype=tf.uint8) # # 导出 # img_export(img_data) # # # 调整尺寸 # img_size(img_data) # # # 裁剪 # img_fill_cut(img_data) # # # 翻转 # img_transposed(img_data) # # #

Matlab图像处理学习笔记(4)

匿名 (未验证) 提交于 2019-12-03 00:21:02
1. canny hough roberts sobel prewitt LoG canny edge bw bw1=edge(I,’sobel’); bw2=edge(I,’roberts’); bw3=edge(I,’prewitt’); - bw=edge(‘log’) canny bw=edge(‘canny’); bw=edge(I,’canny’,thresh,sigma); thresh [] sigama 1 canny 2. Hough Hough (1) hough() (2) houghpeaks() (3) houghlines() 2 3. 1 im2bw graythresh 4 文章来源: Matlab图像处理学习笔记(4)

图像处理之图像的平滑与锐化

匿名 (未验证) 提交于 2019-12-03 00:11:01
图像处理之图像的平滑与锐化 概念: 锐化就是通过增强高频分量来减少图象中的模糊,因此又称为高通滤波。锐化处理在增强图象边缘的同时增加了图象的噪声。 平滑与锐化相反,就是滤掉高频分量,从而达到减少图象噪声,使图片变得有些模糊。 一、灰度化 灰度化,也就是黑白化,就是将图像进行黑白处理,使其失去色彩。而从像素点出发,就是使各个像素点的三种颜色分量R、G、B的值相同。 常用的黑白化的方法有三种: 第一种是最大值法(Maximum): 第二种就是平均值法(Average): 第三种是加权平均值法(Weighted Average): 鉴于本人只使用了第二种,所以就先贴上第二种的代码: src=imread('background.bmp'); [m,n,channel]=size(src); desc=zeros(m,n); desc=double(desc); for i=1:m for j=1:n for k=1:channel desc(i,j)=desc(i,j)+src(i,j,k); end desc(i,j)=desc(i,j)/3; end end imshow(uint8(desc)); 二、锐化 锐化就是通过增强高频分量来减少图象中的模糊,因此又称为高通滤波。锐化处理在增强图象边缘的同时增加了图象的噪声。 常用的锐化模板是拉普拉斯(Laplacian)模板

IDL图像处理(1)

匿名 (未验证) 提交于 2019-12-03 00:06:01
一.图像统计 1.统计三剑客:median()函数,skewness()函数,kurtosis()函数,分别用于计算中值,偏度系数,峰度系数。输入数组,出来一个数。 2.直方图统计函数: result=histogram(array,nbins=value,binsize=value,locations=var,min=value,max=value,omin=var,omax=var) 这里面nbins设置最小间距数目,而binsize可用于设置最小间距,不设置的话间距为1。 max和min设置参与统计的最大值和最小值。 3.众数的统计可以通过得到直方图出现最多灰度值来实现。 histogram=histogram(data,omin=-1,omax=1) max=max(histogram,index) max函数中的index用于接收最大值所在的数的索引号。 二 图像增强 1.线性增强: result=byscl(array,min=value,max=value,top=value) min设置进行拉伸前你要进行拉伸的最小值,max同理,top设置如果大于max的值将拉伸值top设置的值。 2.直方图均衡 自适应直方图均衡: result = adapt_hist_equal ( array , top = value ) file = dialog_pickfile ()

图像处理――(源)均值滤波(blue)、高斯滤波(GaussianBlue)函数编程实现

匿名 (未验证) 提交于 2019-12-02 23:48:02
1 #include <opencv2/opencv.hpp> 2 #include <opencv2/core/core.hpp> 3 #include <opencv2/highgui/highgui.hpp> 4 #include <iostream> 5 #include <stdlib.h> 6 using namespace cv ; 7 using namespace std ; 8 9 10 void MeanFilter_my1 ( const Mat & src , Mat & dst , int ksize ) //均值滤波 11 { 12 CV_Assert ( ksize % 2 == 1 ); 13 14 int * kernel = new int [ ksize * ksize ]; 15 for ( int i = 0 ; i < ksize * ksize ; i ++) 16 kernel [ i ] = 1 ; 17 Mat tmp ; 18 int len = ksize / 2 ; 19 tmp . create ( Size ( src . cols + len , src . rows + len ), src . type ()); //添加边框 20 dst . create ( Size ( src . cols , src .

图像处理---《获取图像的像素指针、像素范围的处理、掩膜应用》

匿名 (未验证) 提交于 2019-12-02 23:43:01
图像处理---《图片的掩膜处理-->提高图像的亮度》   学习:针对一张图片,(1)如何获取图像的像素指针、(2)像素范围的处理、(3)掩膜应用 /*************************************************************************************** 作者:@WP20190612环境:VS2010 + OpenCV2.4.3 功能:掩膜操作---提高图像的对比度 说明: 知识1:获取图像的像素指针 CV_Assert(myImage.depth()==CV_8U); Mat.ptr<uchar>(int i=0); 获取像素矩阵的指针,索引i表示第几行,从0开始计数 const uchar* current=myImage.ptr<uchar>(row); 获取当前行的指针 p(row, col)=current[col]; 获取当前像素点p(row, col)的像素值 要点---要明确哪个像素指针可以调整,哪里不可以调整 知识点2: 像素范围的处理 saturate_cast<uchar>, 确保RGB值 范围在0~255之间。 saturate_cast<uchar>(-100) 返回0; saturate_cast<uchar>(288) 返回255; saturate_cast<uchar>(100)

图像处理学习 1

匿名 (未验证) 提交于 2019-12-02 23:39:01
imread函数 用法: A = imread(filename.fmt) 根据文件名filename读取灰度获彩色图像。 返回的数组A包含图像数据。 若文件包含灰色图像,A是M*N的数组;若文件名包含真彩图像,A是M*N*3的数组。、 double(y) 表示将参数y转为双精度浮点类型,如果y是字符,将返回字符的 ASCII码 值。 matlab中 uint16函数 的用法; 1.函数用法:将输入参数映射到无符号16位范围之内, subplot(m,n,p) 生成m*n个子图,当前激活第p个子图。 axis函数 可以用于操作普通的坐标属性( 轴的缩放和外观)。 axis( [xmin xmax ymin ymax] ) :可以设置当前坐标轴 x轴 和 y轴的限制范围 rgb2gray 是matlab内部一种处理图像的函数,通过消除图像色调和饱和度信息同时保留亮度实现将将RGB图像或彩色图转换为 灰度图像 ,即 灰度化 处理的功能,调用这个功能的格式是I = rgb2gray(RGB),意思是将真彩色图像RGB转换为灰度强度图像I grid on 是matlab中的一种 函数 ,表示在画图的时候添加网格线。 在MATLAB中,通过 函数imadjust() 进行 图像灰度的调整 ,该函数调用格式如下: J=imadjust( I,[low_in;high_in],[low_out

图像处理三:图像变形forward warping和inverse warping

匿名 (未验证) 提交于 2019-12-02 23:03:14
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yql_617540298/article/details/84817597 一、图像变形 假设原图像为f(u,v),扭曲的目标图像是g(x,y) 1. forward warping 2. inverse warping 二、python图像变形 import cv2 import math import numpy as np #加载一个灰度图像 image = cv2.imread('F:/a.jpg',cv2.IMREAD_GRAYSCALE) #获取高、宽 rows,cols = image.shape ''' rows = height (y轴) cols = width (X轴) ''' #创建一个空图像 output = np.zeros(image.shape,dtype = image.dtype) #垂直方向变形 for i in range(rows): for j in range(cols): offset_x = int(50.0*math.cos(2*math.pi*i/180.0)) offset_y = 0 if j+offset_x < cols:#X轴方向 output[i,j] = image[i,(j+offset_x)%cols] else