自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

善哉丶丶的博客

进步一丢丢就是进步一丢丢

  • 博客(17)
  • 收藏
  • 关注

原创 [实战][图像处理]电视机后盖板的螺孔定位

本项目的要求是在给出的电视机后盖板的图片中,找到相应的螺孔的位置,其实就是一个实际的工业问题,赋予工业机器人能够自动拧螺丝的技能:图片大约500张解决思路:在我的理解里,可以以我所要定位的螺丝钉的位置为中心点,来总览整张图片,可以发现,干扰区域可以大体分为四个方向,上方的电视机凹陷,左方的电视后盖孔洞,下方的电视机后盖孔洞,右方的电视机凹陷。之所以说他们是干扰项,是因为他们对于二值化操...

2018-09-26 11:08:57 964

原创 [图像处理]图像的锐化处理

锐化处理:锐化处理的主要目的是突出图像中的细节或增强被模糊的细节。锐化处理所讨论的重点是微分性质,恒定灰度区域、突出的开头与结尾,沿着灰度级斜坡处的特性。一阶微分:af/ax = f(x+1)-f(x)二阶微分:a2f/a2x = f(x+1)+f(x-1)-2f(x)两种不同方式对于锐化处理的影响:1、沿着整个斜坡,一阶微分都不为零,而二阶微分后,非零值只出现在斜坡的起点和终点,所以说,一阶微分...

2018-03-18 15:31:39 4904

原创 [图像处理]图像的平滑处理

空间滤波:某些邻域处理工作是操作邻域的图像像素值以及相应的雨邻域有相同维数的子图像的值,这些子图像可以被称为滤波器、掩摸、核。在滤波器子图像中的值使系数值,而不是像素值。线性平滑:对于每一个像素点的灰度值用它的邻域值来代替,其邻域的大小为:N*N,N一般取奇数。线性平滑虽然降低了噪声,但同时也模糊了图像的边缘和细节,这是这一类滤波器的通病。非线性平滑:不对所有像素都用他的邻域平均值来代替,而是取一...

2018-03-18 14:51:58 3300

原创 [图像处理]图像的几何变换

1、图像的平移变换设dx为水平偏移,dy为垂直偏移,则平移变换公式为:x = x0 + dxy = y0 + dy在代码实现的问题上由于图像在内存中倒放,当垂直偏移为10时,应该使图像向下方移动10但是图像倒放所以会向上移动10解决方法就是从下往上取值,先取(height-1-j)详细情况如下:void jiheBianHuan::PingYi(int m_Xmove,int m_Ymove){...

2018-03-18 14:33:11 488

原创 [图像处理]图像的灰度变换

图像的灰度变换是图像的一种点处理算法,指图像任意点的增强仅仅依赖于该点的灰度值。而在下一节将会使用的是图像的模板变换。1.图像的反转变换灰度级为[0,L-1]则:反转变换为:g(x,y)=L-1-f(x,y)其中g(x,y)位输出图像,f(x,y)为输入图像。2.图像的对数变换此种变换使一窄带低灰度输入图像转换映射为一宽带输出图像:y = a + log(1+x)/b其中a控制曲线的垂直偏移量,b...

2018-03-18 14:31:25 1638

原创 TensorFlow实现Cifar-10数据集训练

from models.tutorials.image.cifar10 import cifar10,cifar10_inputimport tensorflow as tfimport time# -----------定义常量-------------------max_steps = 3000batch_size = 128data_dir = 'cifar-10-batches-...

2018-03-15 11:59:22 2318

原创 [OpenCV]访问图像中的像素调整对比度亮度

访问图像中的像素的方法:1.指针访问:#为了简化指针运算,Mat类提供了ptr函数可以得到图像任意行的首地址Mat outputImage = img.clone();int row = outputImage.rows;int col = outputImage.cols*outputImage.channels();for (int i = 0; i < row; i++){ ...

2018-03-08 19:37:37 464

原创 [OpenCV]基础图像容器Mat

一、Mat是一个类,有两个数据部分组成:矩阵头(包含矩阵尺寸、存储方法、存储地址等信息)和一个指向存储所有像素值的矩阵指针(根据所选存储方法的不同,矩阵可以是不同的维数)。因此挡在程序中传递图像并创建副本时,大的开销是由矩阵造成的,而不是信息头。二、为了解决这个问题,OpenCV使用了引用计数机制,让每个Mat对象有自己的信息头,但共享一个矩阵。这通过让矩阵指针指向同一地址而实现。而拷贝构造函数则...

2018-03-08 18:03:37 180

原创 [LeetCode]Find All Numbers Disappeared in an Array

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.Could yo...

2018-03-08 10:25:41 144

原创 [OpenCV]图像的载入、显示、输出

先来看一个简单的OpenCV的程序:#include <iostream>#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>using namespace cv;int main() { // 读入一张图片(游戏原画) Mat img = imread("...

2018-03-07 18:48:31 266

原创 [LeetCode]Move Zeroes

Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after calling your fun...

2018-03-07 11:30:22 121

原创 [LeetCode]Invert a binary tree.

Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1思路:立马想到递归,出口立马想到是root为NULL。问题就在与循环体上,既然是反转左右树,那么以任意节点为例,只需要将其左树的值转为右树的值,右树的值转为左树...

2018-03-07 10:53:52 125

原创 [LeetCode]Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.For example:Given binary tree [3,9,20,null...

2018-03-07 10:34:10 133

原创 [LeetCode] Single Number

Given an array of integers, every element appears twice except for one. Find that single one.思路:1)可以使用python字典,遍历一遍数组,将出现次数设为value,将数值设为key。最后找出出现次数为1的键值。2)由于所有的数只有一个出现一次可以使用set()选出所有不重复的数字乘二再减原数组集合结果...

2018-03-06 12:38:35 141

原创 [LeetCode]Merge Two Binary Trees

Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to merge them into a new binary tree....

2018-03-06 10:54:00 206

原创 TensorFlow实现简单MNIST

# ------------------载入MNIST数据集-----------------------from tensorflow.examples.tutorials.mnist import input_dataimport tensorflow as tfmnist= input_data.read_data_sets("MNIST_data",one_hot=True)ses...

2018-03-05 16:30:18 354

原创 [LeetCode]Hamming Distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note:0 ≤ x, y < 231Exam...

2018-03-05 12:53:10 154

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除