自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 python3.7------PCA降维

1、PCA降维代码2、结果3、测试数据25室内,25室外import osimport cv2import numpy as npdef load_dataset(dataset_path, cls_name_list): data = [] label_list = [] # for every class image for cls_name_idx in range(len(cls_name_list)): cls_name = cls

2020-08-20 11:33:32 232

原创 python3.7------LDA分类器

1、LDA实现代码2、测试结果3、测试所用训练数据(25insoor,25outdoor)import numpy as npimport matplotlib.pyplot as pltimport osimport cv2from sklearn.datasets.samples_generator import make_classificationfrom mpl_toolkits.mplot3d import Axes3Dfrom sklearn.discriminant_ana

2020-08-20 11:24:21 1001

原创 python3.7-----机器学习SVM

梳理一下思路1、准备测试图片为25张室内,25张室外作为训练数据任意挑选5张室内五张室外作为测试数据2、图片预处理,提取每张图片的RGB作为特征值,室内室外作为标签[‘indoor’,‘outdoor’]3、用SVC进行分类,最终输出准确率from sklearn import svmimport numpy as npimport osimport cv2#读取数据集def Load_dataset(dataset_path, class_name_list): data =

2020-08-19 20:10:11 267

原创 python——panda模块学习

import pandas as pdimport numpy as np#数据操作# population={'beijing':1242,'shanghai':423142,'guangzhou':244221}# gdp={'beijing':122,'shanghai':4242,'guangzhou':4221}# a=pd.DataFrame({'pop':population,'gdp':gdp})## print(a['gdp'])#a取gdp这一列# print(a.

2020-07-31 15:08:41 257

原创 unity的shader学习笔记

shader基础知识#一、propreties#二、subshader#三、fallback一、unity中使用shaderlab语言进行编写,shaderlab分为三大块,属性、subshader、fallback(1)properties格式:_属性名(“显示名称”,类型)=默认值Properties{ _color("color", 2D) = "white" {}//颜色 _norml("norml", 2D) = "bump" {}//法线 _anbient("anbie

2020-07-29 15:56:18 175

原创 python新手——7.27号练习题

#7.27_1# from numpy import unicode## s=input()# u=unicode(s)# print(u)#7.27_2# li=[2,4,6,8,9]# for i in li:# assert i%2==0#7.27_3# expression=input()# print(eval(expression))#7.27_4# import math# def bin_search(li,element):# bo.

2020-07-27 16:12:19 204

原创 python新手——7.25号练习题

# evenNumber=filter(lambda x:x%2==0,range(1,21))# print(evenNumber)#7.24.1# class American(object):# @staticmethod# def personality():# print('American')# anAmerican=American# anAmerican.personality()# American.personality()#7.

2020-07-27 14:11:17 107

原创 pytjon新手——7.24日练习

#7.24_1# s=input().split(' ')# freq={}# for word in s:# freq[word]=freq.get(word,0)+1## words=freq.keys()# list(words).sort()# for w in words:# print('%s:%d'%(w,freq[w]))#7.24_2# def square(num):# return num**2# print(square(3))

2020-07-24 14:27:51 215

原创 7.23号python新手练习题

#7.23_1# out = []# for num in range(1000,3001):# s=str(num)# if(int(s[0])%2==0 and int(s[1])%2==0 and int(s[2])%2==0 and int(s[3])%2==0):# out.append(s)# print(','.join(out))#7.23_2# s=input()# asum,dsum=0,0# for x in s:# i.

2020-07-23 17:04:07 110

原创 7.22日python新手练习题

#第一题import mathc,h,value=50.,30.,[]items=[x for x in input().split('.')]for i in items: value.append(str(int(round(math.sqrt(2*c*float(i)/h)))))print(','.join(value))#第二题input_str=input()dimensions=[int(x) for x in input_str.split(',')]rowNum

2020-07-23 16:43:15 196 1

原创 python中 operator模块中itemgetter的使用示例

Question:You are required to write a program to sort the (name, age, height) tuples by (编写一个程序,给(姓名,年龄,分数)升序排序)ascending order where name is string, age and height are numbers. The tuplesare input by console. The sort criteria is:1: Sort based on name;

2020-07-23 15:53:56 345

原创 python《计算机视觉编程》第一章笔记——1.4.3形态学,1.4.2有用的scipy模块scipy.os模块,scipy.misc模块。1.5ROF去噪模型

1.4.3形态学:对象计数形态学(数学形态学):度量和分析基本形状的图像处理方法的基本框架和集合。形态学通常用来处理二值图像,也能用于灰度图像。二值图像是指图像的每个像素只能取0或1。scipy.ndimage中的morphology模块可以实现形态学操作。scipy/ndimage中的measurements模块可以实现二值图像的计数和度量功能例子如下:from scipy.ndimage import morphology,measurementsim= array(Image.ope

2020-07-20 15:20:37 361

原创 python计算机视觉编程

@《python计算机视觉处理编程》第一章笔记Python计算机视觉编程笔记,还在学习之中红色:imtools函数 蓝色:函数功能 绿色:拓展知识1、from PIL import Image 输入pillow包,图像缩放,裁剪、旋转、颜色转换pil_im=Image.open(‘D:\RGB\Testpicture\pexels-photo-417173.jpg’) 打开一张图片print(pil_img.size,pil_img.mode,pil_img.format)pil_im=I

2020-07-20 11:36:04 746

空空如也

空空如也

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

TA关注的人

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