
Python
lizhiyuanbest
这个作者很懒,什么都没留下…
展开
-
为 Jupyter Notebook指定虚拟环境的 Python 解释器
为 Jupyter Notebook指定虚拟环境的 Python 解释器原创 2021-03-04 16:34:07 · 506 阅读 · 0 评论 -
opencv + python3 利用ros 的 cv_bridge 传送图像消息的一种替代方法
opencv + python3 利用ros 的 cv_bridge 传送图像消息的一种替代方法利用自定义的图像类型代替sensor_msgs/Image, python2可以使用cv_bridge,但是python3不可以使用cv_bridge,所以在python2节点使用cv_bridge,python3不使用cv_bridge, 利用自定义的消息类型在python2和python3节点传送图像数据。1. 自定义图像消息类型 Image_Msg.msgint32 heightint32 widt原创 2020-08-15 15:04:25 · 3391 阅读 · 1 评论 -
PIL图像处理:旋转图像
PIL图像处理:旋转图像旋转包括 transpose() 和 rotate() 两种方式。import matplotlib.pyplot as pltfrom PIL import Imagesrc_img = Image.open(Src_Image_Path)# 旋转方式一img1 = src_img.transpose(Image.ROTATE_180) # 引用固定的常量值img1.show()# 旋转方式二img2 = src_img.rotate(45) # 自原创 2020-08-08 09:42:23 · 1973 阅读 · 0 评论 -
PIL图像处理:读取图像,显示图像,ROI,保存图像
PIL 读取图像,显示图像,ROI,保存图像import matplotlib.pyplot as pltfrom PIL import Imagesrc_img = Image.open(Src_Image_Path)print(src_img.size) # image sizeplt.figure("src_image")plt.imshow(src_img)plt.show()# convert to grayL = src_img.convert('L')L.show()原创 2020-08-08 09:06:47 · 1225 阅读 · 0 评论 -
查看chrome驱动以及下载对应谷歌浏览器版本
Chrome驱动对应chrome浏览器版本原创 2020-04-07 15:04:36 · 3082 阅读 · 0 评论 -
opencv-python的dtype
opencv-python的dtype原创 2020-04-05 14:20:37 · 416 阅读 · 0 评论 -
python跳出双层for循环的解决方法
python跳出双层for循环的解决方法转载 2020-03-30 16:24:34 · 1234 阅读 · 0 评论 -
opencv-python 使用掩模抠图
opencv-python 使用掩模抠图原创 2020-03-30 14:30:37 · 2394 阅读 · 1 评论 -
Python中多层List展平为一层
Python中多层List展平为一层转载 2020-03-30 14:18:17 · 1503 阅读 · 1 评论 -
Python中numpy数组的拼接、合并
Python中numpy数组的拼接、合并转载 2020-03-30 14:14:58 · 999 阅读 · 0 评论 -
numpy找到数组中符合条件的数
numpy找到数组中符合条件的数原创 2020-03-28 14:37:41 · 3001 阅读 · 0 评论 -
python matplotlib 显示opencv的图像
python matplotlib 显示opencv的图像原创 2020-03-28 09:46:10 · 851 阅读 · 0 评论 -
cv2.findContours
TypeError: Layout of the output array image is incompatible with cv::Mat (step[ndims-1] != elemsize or step[1] != elemsize*nchannels)原创 2020-03-27 15:42:44 · 842 阅读 · 0 评论 -
python 引用(import)文件夹下的py文件的方法
python 引用(import)文件夹下的py文件的方法原创 2020-03-27 10:21:58 · 2858 阅读 · 0 评论 -
opencv-python 9.4 拆分及合并图像通道
9.4 拆分及合并图像通道原创 2020-03-26 18:30:01 · 358 阅读 · 0 评论 -
opencv-python 9.3 图像 ROI
9.3 图像 ROI原创 2020-03-26 18:28:48 · 131 阅读 · 0 评论 -
Python3 AttributeError: module 'cv2' has no attribute 'SIFT'
Python3 AttributeError: module 'cv2' has no attribute 'SIFT'原创 2020-03-25 21:55:30 · 1945 阅读 · 0 评论 -
module 'scipy.misc' has no attribute 'imresize'
module 'scipy.misc' has no attribute 'imresize'原创 2020-03-22 15:10:05 · 331 阅读 · 0 评论 -
Python format 格式化函数
Python format 格式化函数转载 2020-03-21 14:59:07 · 113 阅读 · 0 评论 -
python爬虫——随机生成headers
python爬虫——随机生成headers原创 2020-03-20 19:19:04 · 3540 阅读 · 0 评论 -
warnings.filterwarnings("ignore")
warnings.filterwarnings("ignore")原创 2020-03-20 08:49:58 · 16344 阅读 · 2 评论 -
argparse.ArgumentParser()用法解析
argparse.ArgumentParser()用法解析原创 2020-03-19 20:47:04 · 67025 阅读 · 5 评论 -
Python 随机数函数
Python 随机数函数转载 2020-03-07 19:21:18 · 175 阅读 · 0 评论 -
ros 中对一个点利用tf工具旋转,python or C++
ros 中对一个点利用tf工具旋转,python or C++原创 2020-03-07 17:14:36 · 927 阅读 · 4 评论 -
ROS 使用参数以及相应的 .launch 文件编写
ROS学习(三) 使用参数以及相应的 .launch 文件编写原创 2020-03-07 10:16:59 · 372 阅读 · 0 评论 -
tqdm介绍及常用方法
tqdm介绍及常用方法原创 2020-03-05 17:36:55 · 370 阅读 · 0 评论 -
Python isinstance() 函数
Python isinstance() 函数原创 2020-03-05 17:00:09 · 118 阅读 · 0 评论 -
python—OpenCV2中 cv2.VideoCapture(),read(),waitKey()的使用
python—OpenCV2中 cv2.VideoCapture(),read(),waitKey()的使用原创 2020-03-05 16:27:54 · 5874 阅读 · 2 评论 -
Python中关于split和splitext的差别和运用
Python中关于split和splitext的差别和运用原创 2020-03-05 16:18:39 · 243 阅读 · 0 评论 -
Python any() 函数
Python any() 函数原创 2020-03-05 16:14:08 · 191 阅读 · 0 评论 -
pytorch使用 torchvision 的 Transform 读取图片数据
pytorch使用 torchvision 的 Transform 读取图片数据原创 2020-03-04 21:43:05 · 1402 阅读 · 0 评论 -
python 字符串前面加 f
python 字符串前面加 f原创 2020-03-04 19:28:40 · 500 阅读 · 0 评论 -
os.sep用法
os.sep用法原创 2020-02-29 13:35:29 · 965 阅读 · 0 评论 -
python from __future__ import division的作用
python from __future__ import division的作用原创 2020-02-28 14:14:40 · 390 阅读 · 0 评论 -
ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type
ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type原创 2020-02-24 10:28:09 · 316 阅读 · 0 评论 -
Jupyter Notebook 中查看当前 运行哪个python
在运行 Jupyter Notebook时候, 往往由于我们机器上装有多个版本的python, 我们不知道哪个python 是我们正在用的。可以使用sys.executable 查看路径, 如下:import sysprint(sys.executable) 结果为:/home/li/anaconda3/bin/python...原创 2020-02-24 09:58:40 · 2063 阅读 · 0 评论