随笔分类 - Anaconda
摘要:import xml.etree.ElementTree as ET # 加载XML文档 tree = ET.parse('example.xml') # 获取根元素 root = tree.getroot() # 遍历XML文档中的元素 for child in root: print(child
阅读全文
摘要:# coding: utf-8 # 打开摄像头并灰度化显示 import cv2 as cv camera_id = "rtsp://admin:1222@192.168.0.218:554/jingli/realmonitor?channel=1&subtype=0" # 0表示摄像头的编号 ca
阅读全文
摘要:pip install open3d (wind_2021) H:\PytorchProject\xinru_project\project_2023051202> (wind_2021) H:\PytorchProject\xinru_project\project_2023051202> (wi
阅读全文
摘要:CJJC项目实验环境配置 (base) D:\> (base) D:\>conda create -n wind_2022 python==3.7 Solving environment: done ## Package Plan ## environment location: D:\Anacon
阅读全文
摘要:python opencv addWeighted import cv2 # Load the image img = cv2.imread('20230222100736979.jpg') # Adjust the brightness brightness = 50 adjusted = cv2
阅读全文
摘要:python opencv图片旋转任意角度 import cv2 # Load the image img = cv2.imread("20230222100736979.jpg") # Get the image dimensions height, width = img.shape[:2] #
阅读全文
摘要:python opencv GaussianBlur import cv2 # Load the image img = cv2.imread('20230222100736979.jpg') # Apply a Gaussian blur with a kernel size of 5x5 blu
阅读全文
摘要:python通过文件操作字典 python把字典保存到文件中 python从文件中加载字典 import json my_dict = { 'Apple': 4, 'Banana': 2, 'Orange': 6, 'Grapes': 11,'area1':[[23,56],[66,12],[68,
阅读全文
摘要:import pyrealsense2.pyrealsense2 as rs import configparser import numpy as np import time import csv import cv2 config_pro = configparser.ConfigParser
阅读全文
摘要:python np.array截取 import numpy as np list1 = np.array([[1,1,1,222],[4,4,4,6],[2,2,2,555],[6,6,6,888],[9,9,9,111]]) list2 = list1[2:,] print(list1) pri
阅读全文
摘要:yolov5训练栏杆检测模型日志记录 (wind_2021) H:\PytorchProject\yolov5_train_xinru_2023050901> (wind_2021) H:\PytorchProject\yolov5_train_xinru_2023050901> (wind_202
阅读全文
摘要:PIL resize from PIL import Image # Open the image img = Image.open("20230222100736979.jpg") # Resize the image img = img.resize((img.width*2, img.heig
阅读全文
摘要:python opencv Sharpened import cv2 import numpy as np # Load the image img = cv2.imread('20230222100736979.jpg') # Define the sharpening kernel kernel
阅读全文
摘要:python 调用java import subprocess # Replace "path/to/java/program" with the actual path to your Java program java_program_path = "path/to/java/program"
阅读全文
摘要:import cv2 import numpy as np from matplotlib import pyplot as plt img = cv2.imread('20230222100736979.jpg', 0) hist = cv2.calcHist([img], [0], None,
阅读全文
摘要:python opencv 分割像素通道 import cv2 import numpy as np # Load the image img = cv2.imread('path/to/image.jpg') # Split the image into its channels b, g, r
阅读全文
摘要:python 操作csv 写csv import csv with open('path/to/file.csv', 'w', newline='') as csvfile: writer = csv.writer(csvfile, delimiter=',', quotechar='"', quo
阅读全文
摘要:python操作excel pip install openpyxl 写: import openpyxl # Load the workbook workbook = openpyxl.load_workbook('path/to/file.xlsx') # Select the workshee
阅读全文
摘要:python opencv putText import cv2 # Load image img = cv2.imread("image.jpg") # Define text to draw text = "Hello, World!" # Define position to draw tex
阅读全文
摘要:python播放视频 pip install pygame import pygame pygame.init() # Set the dimensions of the window screen = pygame.display.set_mode((640, 480)) # Load the v
阅读全文