src

图像直方图均衡化

守給你的承諾、 提交于 2020-03-09 13:46:18
作业要求 编写一个图像直方图均衡化程序,g=histequal4e(I),其中I是8比特图像 代码 ''' # 8th 编写一个图像直方图均衡化程序,g=histequal4e(I),其中I是8比特图像 ''' import numpy as np from PIL import Image import matplotlib . pyplot as plt #einstein.tif #lena512color.jpg # mandril_color.jpg src = Image . open ( "mandril_color.jpg" ) . convert ( 'L' ) # 转换成灰度 src = np . array ( src ) #print(src) src_dim_1 = src . flatten ( ) # 变成一维,用于绘制直方图 # 直方图均衡化函数 def histequal4e ( img ) : src_size = src . shape img_dim_1 = img . flatten ( ) pixel_num = len ( img_dim_1 ) eq_img = np . zeros ( src_size ) # 创建画布 index_set = np . zeros ( 256 , dtype = int ) # 0-255

TAB + 滚动 + 时间间隔点击

天涯浪子 提交于 2020-03-08 18:30:23
<!DOCTYPE HTML PUBddC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <script type="text/javascript" src="http://luxury.bjhoutai.com/js/jquery-1.8.2.min.js"></script> </head> <style> ul,ol,p,dt,dd,dl,h1,h2,h3,h4,h5,h6,form { padding:0; margin:0; } img {border:0;} li {list-style:none;} a {text-decoration:none;} a:hover {text-decoration:underline;} .clear{ clear:both;} a

音频和视频

自闭症网瘾萝莉.ら 提交于 2020-03-08 13:49:48
<!DOCTYPE html> <html lang="en"> <head > <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <marquee behavior="scroll" bgcolor="yellow" direction="right" scrollamount="1" loop="2" onmouseout="this.start()" onmouseover="this.stop()" >网易云MV</marquee> <video src="./../../../数据库/MV/萧全 - 社会摇.mp4" style="width:1000px;text-align: center; " controls></video> <audio src="./../../../数据库/音乐/屈原叔叔 - 盛夏的果实(Cover:莫文蔚).mp3" style="width: 200px;"; controls></audio> </body> <!-

02 IO

混江龙づ霸主 提交于 2020-03-07 20:28:33
核心类 对象想要被传输, 需要通过序列化来将对象编程“序列”. 字符集对字符流的影响. 字符流底层还是字节流. 分隔符 public class IOTest { public static void main(String[] args) { // TODO Auto-generated method stub String path = "C:\\JavaWork\\eclipse-workspace\\MyProject01\\src\\smart_production.JPG"; String path2 = "C:/JavaWork/eclipse-workspace/MyProject01/src/smart_production.JPG"; String path3 = "C:" + File.separator + "JavaWork" + File.separator + "eclipse-workspace" + File.separator + "MyProject01" + File.separator + "src" + File.separator + "smart_production.JPG"; System.out.println(path); System.out.println(path2); System.out.println(path3)

Vue 自定义图片/src懒加载

拥有回忆 提交于 2020-03-06 15:05:37
if ( ! Array . prototype . remove ) { Array . prototype . remove = function ( item ) { if ( ! this . length ) return var index = this . indexOf ( item ) ; if ( index > - 1 ) { this . splice ( index , 1 ) ; return this } } } var init = { lazyLoad : false , default : 'image/billnull.png' } var listenList = [ ] ; var imageCatcheList = [ ] ; const isAlredyLoad = ( imageSrc ) => { if ( imageCatcheList . indexOf ( imageSrc ) > - 1 ) { return true ; } else { return false ; } } //检测图片是否可以加载,如果可以则进行加载 const isCanShow = ( item ) => { if ( typeof item == 'undefined' ) return false ; var ele = item . ele

eclipse错误的解决(collect2: 错误:ld 返回 1)

我怕爱的太早我们不能终老 提交于 2020-03-05 10:18:57
一、eclipse报错: 08:40:28 **** Incremental Build of configuration Debug for project codetest **** make all Building target: codetest Invoking: GCC C Linker gcc -o "codetest" ./src/nmeac/context.o ./src/nmeac/generate.o ./src/nmeac/generator.o ./src/nmeac/gmath.o ./src/nmeac/info.o ./src/nmeac/parse.o ./src/nmeac/parser.o ./src/nmeac/sentence.o ./src/nmeac/sum.o ./src/nmeac/time.o ./src/nmeac/tok.o ./src/nmeac/util.o ./src/codetest.o ./src/nmeac/generate.o:在函数‘nmea_gsv_npack’中: /home/ppp/work/codetest/Debug/../src/nmeac/generate.c:119:对‘ceil’未定义的引用 ./src/nmeac/gmath.o:在函数‘nmea_calc_pdop’中: /home

Linux下同时复制多个文件

♀尐吖头ヾ 提交于 2020-03-03 13:17:52
方法一 使用cp命令 cp /home/usr/dir/{file1,file2,file3,file4} /home/usr/destination/ 需要注意的是这几个文件之间不要有空格 具有共同前缀 cp /home/usr/dir/file{1..4} ./ 复制的文件是file1, file2, file3, file4 方法二 使用python脚本 shutil库 import os,sys,shutil ### copies a list of files from source. handles duplicates. def rename(file_name, dst, num=1): #splits file name to add number distinction (file_prefix, exstension) = os.path.splitext(file_name) renamed = "%s(%d)%s" % (file_prefix,num,exstension) #checks if renamed file exists. Renames file if it does exist. if os.path.exists(dst + renamed): return rename(file_name, dst, num + 1) else:

HTML学习(二)

点点圈 提交于 2020-03-03 00:36:48
文章目录 图片标签 属性 超链接标签 表格标签 属性 原格式输出 尖括号的输出 图片标签 加载一张图片: < img src = " ./img/Aida.png " /> < img src = " img/head.jpg " /> 可以看到图片的末尾不会换行,所以图片标签是行内元素。 属性 长宽 : 改变图片的大小,可以写成像素,也可以写成百分比。 width="200px" height="200px" 注:当只写宽或者只写高的时候,图片会将长宽等比例的放大缩小 使用网络资源 只需要在src中写入对应图片的地址即可 < img src = " https://www.baidu.com/img/bd_logo1.png?where=super " > 不安全,被别人删了就加载不出来了 标题 <img src="img/109951163723944814.gif" title="ITMan 现状" alt = "图片加载失败" > title : 当鼠标悬浮在图片上的时候会出现 alt :当图片加载失败的时候会出现 超链接标签 点击可以跳转到另一个界面 文本 <!-- 本地资源 --> < a href = " dome02.html " > 跳转 </ a > <!-- 网络资源 --> < a href = " http://www.baidu.com " > 百度 <

python(6)-shutil模块

余生颓废 提交于 2020-03-02 22:44:01
高级的 文件、文件夹、压缩包 处理模块 shutil.copyfileobj(fsrc, fdst[, length]) 将文件内容拷贝到另一个文件中: #源码 def copyfileobj(fsrc, fdst, length=16*1024): """copy data from file-like object fsrc to file-like object fdst""" while 1: buf = fsrc.read(length) if not buf: break fdst.write(buf) #复制文件 import shutil f = open('settings.py', 'rb') f1 = open('aaa.py', 'wb') shutil.copyfileobj(f, f1, length=20) f.close() f1.close() shutil.copyfile(src, dst) 拷贝文件 #源码i def copyfile(src, dst): """Copy data from src to dst""" if _samefile(src, dst): raise Error("`%s` and `%s` are the same file" % (src, dst)) for fn in [src, dst]: try: st

解决maven 项目中的 java.lang.NoClassDefFoundError

半腔热情 提交于 2020-03-02 17:51:03
这是由于 java 编译后的 class 文件没有指定正确引起的 项目名称上【右击】 ---> 【 Properties 】 ---> 【 Java Build Path 】 ---> 【 Source 】 ---> 【看看报 NoClassDeFoundError 的类是哪一个源目录,并选中】 ---> 【看下面的 Default output folder 】 ---> 【发现不是 target/classes 】 ---> 【 Edit 】 补充: maven的"约定优于配置" 所谓的"约定优于配置",在maven中并不是完全不可以修改的,他们只是一些配置的默认值而已。但是使用者除非必要,并不需要去修改那些约定内容。maven默认的文件存放结构如下: /项目目录 /target/classes 编译之后的class文件 /src/main 工程源代码目录 /src/main/resource 工程的资源目录 /src/test 单元测试目录 /src/main/java 工程java源代码目录 /src/test/java pom.xml 用于maven的配置文件 /src 源代码目录 /target 输出目录,所有的输出物都存放在这个目录下 每一个阶段的任务都知道怎么正确完成自己的工作,比如compile任务就知道从src/main/java下编译所有的java文件