摘要: 对原灰度图像每个像素点进行线性操作,aX+b=X_new a=1,b=0时不变 b!=0时所有灰度值上/下移 a>1时对比度上升 0<a<1时对比度减小 a<0时暗区变亮,亮区变暗,图像求补 pic=imread('pic/coltogray/1.jpg'); gray_pic=rgb2gray(p 阅读全文
posted @ 2019-07-08 21:06 Wangtn 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 灰度级数k,k=2^b,称该图像为b比特图像。 降低灰度级数是靠2的幂次方 网上代码:https://blog.csdn.net/silence2015/article/details/68927360 function changereduce_factor(imgpath,reduce_fact 阅读全文
posted @ 2019-07-07 10:44 Wangtn 阅读(7950) 评论(0) 推荐(0) 编辑
摘要: Traceback (most recent call last): File "<ipython-input-15-7fa9988e38ef>", line 1, in <module> runfile('E:/experiment/paper1/train.py', wdir='E:/exper 阅读全文
posted @ 2019-05-27 10:05 Wangtn 阅读(4810) 评论(0) 推荐(0) 编辑
摘要: AttributeError: 'builtin_function_or_method' object has no attribute 'reshape' 读取.mat文件时,copy没加括号 阅读全文
posted @ 2019-05-18 09:11 Wangtn 阅读(4677) 评论(0) 推荐(0) 编辑
摘要: 没有同时更新theta(1)和theta(2) function [theta, J_history] = gradientDescent(X, y, theta, alpha, num_iters) %GRADIENTDESCENT Performs gradient descent to lea 阅读全文
posted @ 2019-04-10 20:16 Wangtn 阅读(412) 评论(0) 推荐(0) 编辑
摘要: function J = computeCost(X, y, theta) %COMPUTECOST Compute cost for linear regression % J = COMPUTECOST(X, y, theta) computes the cost of using theta 阅读全文
posted @ 2019-04-10 19:46 Wangtn 阅读(399) 评论(0) 推荐(0) 编辑
摘要: Unsupervised learning allows us to approach problems with little or no idea what our results should look like. We can derive structure from data where 阅读全文
posted @ 2019-03-13 19:37 Wangtn 阅读(191) 评论(0) 推荐(0) 编辑
摘要: In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationshi 阅读全文
posted @ 2019-03-12 11:11 Wangtn 阅读(288) 评论(0) 推荐(0) 编辑
摘要: list是一个类,用中括号括上,逗号分隔,元素可以是数字,字符,字符串,也可以是嵌套列表,布尔类型。 1.通过索引取值 li=[1,12,9,'age',['wangtianning',[19,'10'],123],'alex'] #通过索引取值 print(li[0]) 2.通过切片取值 #通过切 阅读全文
posted @ 2019-02-27 11:19 Wangtn 阅读(677) 评论(0) 推荐(0) 编辑
摘要: 1.join #将字符中的每一个元素按照指定分隔符进行拼接 test='你说话带空格' print(test) t=' ' x='_' print(t.join(test)) print(x.join(test)) 2.split str = "Line1-abcdef \nLine2-abc \n 阅读全文
posted @ 2019-02-23 10:00 Wangtn 阅读(212) 评论(0) 推荐(0) 编辑