# by movie on 2019/12/18 import matplotlib.pyplot as plt import numpy as np from skimage import measure import cv2 # import the necessary packages def mse(imageA, imageB): # the 'Mean Squared Error' between the two images is the # sum of the squared
循环 shell中for循环的表现形式: 1.数字段形式 for i in {1..10};do echo $i;done 还支持按规定的步数进行跳跃的方式实现列表for循环,例如计算1-100内所有的奇数之和. sum=$((sum+i)) ....} do let "sum+=i" done echo "sum=$sum" 2.详细列出(字符且项数不多)for f in file1 file2 file3 file4 file5;do echo $f;done
常用模块介绍 一.time模块 在Python中,通常有这几种方式来表示时间: 时间戳(timestamp):通常来说,时间戳表示的是从1970年1月1日00:00:00开始按秒计算的偏移量.我们运行"type(time.time())",返回的是float类型. 格式化的时间字符串(Format String) 结构化的时间(struct_time):struct_time元组共有9个元素:(年,月,日,时,分,秒,一年中第几周,一年中第几天,夏令时) import time pri