OpenCV

文章目录

  • OpenCV学习报告
    • 读取图片和网络摄像头
      • 1.1 图片读取
      • 1.2 视频读取
        • 1.1.1 读取视频文件
        • 1.1.2读取网络摄像头
    • OpenCV基础功能
    • 调整、裁剪图像
      • 3.1 调整图像大小
      • 3.2 裁剪图像
    • 图像上绘制形状和文本
      • 4.1 图像上绘制形状
      • 4.2图像上写文字
    • 透视变换
    • 图像拼接
    • 颜色检测
    • 轮廓检测
    • 人脸检测
      • 9.1静态图片
      • 9.2 摄像头
    • 实战
      • 10.1虚拟绘画
      • 10.2纸张扫描
      • 10.3 车牌检测器
    • 参考资料

OpenCV学习报告

读取图片和网络摄像头

1.1 图片读取

import cv2
# read image
img = cv2.imread("Resources/dnn.jpg")
cv2.imshow("Output",img)
cv2.waitKey(0)

在这里插入图片描述

1.2 视频读取

1.1.1 读取视频文件

import cv2
# read video
cap = cv2.VideoCapture("Resources/test_video.mp4")
while True:success,img = cap.read()cv2.imshow("Video",img)if cv2.waitKey(1) & 0xFF == ord('q'):break

在这里插入图片描述

1.1.2读取网络摄像头

import cv2
# read webcam
cap = cv2.VideoCapture(0)
cap.set(3,640) #width
cap.set(4,480) #height
cap.set(10,100)while True:success,img = cap.read()cv2.imshow("Video",img)if cv2.waitKey(1) & 0xFF == ord('q'):break

在这里插入图片描述

OpenCV基础功能

import cv2
import numpy as np
# basic function
img = cv2.imread("Resources/dnn.jpg")
kernel = np.ones((5,5),np.uint8)# 灰度转换
imgGray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
# 图像模糊
imgBlur = cv2.GaussianBlur(imgGray,(7,7),0)
# 边缘检测
imgCanny = cv2.Canny(img,100,100)
# 膨胀
imgDialation = cv2.dilate(imgCanny, kernel,iterations=1)
# 腐蚀
imgEroded = cv2.erode(imgDialation,kernel,iterations=1)# cv2.imshow("Output",img)
cv2.imshow("Gray Image",imgGray)
cv2.imshow("Blur Image",imgBlur)
cv2.imshow("Blur Image",imgCanny)
cv2.imshow("Dialation Image",imgDialation)
cv2.imshow("Eroded Image",imgEroded)cv2.waitKey(0)

在这里插入图片描述
在这里插入图片描述

调整、裁剪图像

3.1 调整图像大小

import cv2# resize imageimg = cv2.imread("Resources/lambo.PNG")
print(img.shape)imgResize = cv2.resize(img,(300,200))
print(imgResize.shape)cv2.imshow("Image",img)
cv2.imshow("Image Resize",imgResize)cv2.waitKey(0)

在这里插入图片描述

3.2 裁剪图像

import cv2img=cv2.imread("Resources/lambo.PNG")
cv2.imshow('image',img)print(img.shape)#height,width,dpthcrop_img=img[100:400,50:500]
cv2.imshow('crop image',crop_img)cv2.waitKey(0)

在这里插入图片描述

图像上绘制形状和文本

4.1 图像上绘制形状

import cv2
import numpy as np
# shapes and texts
img = np.zeros((512,512,3),np.uint8)
cv2.imshow('oringin image',img)cv2.line(img,(0,0),(img.shape[1],img.shape[0]),(0,255,0),3)
cv2.imshow('line image',img)cv2.rectangle(img,(0,0),(250,350),(0,0,255),2)
cv2.imshow('rectangle image',img)cv2.circle(img,(400,500),30,(255,255,0),5)
cv2.imshow('circle image',img)cv2.waitKey(0)

在这里插入图片描述

4.2图像上写文字

import cv2
import numpy as npimg = np.zeros((512,512,3),np.uint8)
cv2.imshow('oringin image',img)cv2.putText(img,"OPENCV",(300,200),cv2.FONT_HERSHEY_COMPLEX,1,(0,150,0),1)
cv2.imshow("putText01 Image",img)
cv2.putText(img,"I LOVE XD",(100,300),cv2.FONT_HERSHEY_COMPLEX,1,(0,150,0),1)
cv2.imshow("putText02 Image",img)cv2.waitKey(0)

在这里插入图片描述

透视变换

import cv2
import numpy as np
# warp perspective
img = cv2.imread("Resources/cards.jpg")width,height = 250,350
pts1 = np.float32([[111,219],[287,188],[154,482],[352,440]])
pts2 = np.float32([[0,0],[width,0],[0,height],[width,height]])
matrix = cv2.getPerspectiveTransform(pts1,pts2)
imgOutput = cv2.warpPerspective(img,matrix,(width,height))cv2.imshow("Image",img)
cv2.imshow("Output",imgOutput)cv2.waitKey(0)

在这里插入图片描述

图像拼接

import cv2
import numpy as np
# join images
def stackImages(scale,imgArray):rows = len(imgArray)cols = len(imgArray[0])rowsAvailable = isinstance(imgArray[0], list)width = imgArray[0][0].shape[1]height = imgArray[0][0].shape[0]if rowsAvailable:for x in range ( 0, rows):for y in range(0, cols):if imgArray[x][y].shape[:2] == imgArray[0][0].shape [:2]:imgArray[x][y] = cv2.resize(imgArray[x][y], (0, 0), None, scale, scale)else:imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)if len(imgArray[x][y].shape) == 2: imgArray[x][y]= cv2.cvtColor( imgArray[x][y], cv2.COLOR_GRAY2BGR)imageBlank = np.zeros((height, width, 3), np.uint8)hor = [imageBlank]*rowshor_con = [imageBlank]*rowsfor x in range(0, rows):hor[x] = np.hstack(imgArray[x])ver = np.vstack(hor)else:for x in range(0, rows):if imgArray[x].shape[:2] == imgArray[0].shape[:2]:imgArray[x] = cv2.resize(imgArray[x], (0, 0), None, scale, scale)else:imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0].shape[0]), None,scale, scale)if len(imgArray[x].shape) == 2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)hor= np.hstack(imgArray)ver = horreturn verimg = cv2.imread('Resources/dnn.jpg')
imgGray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)imgStack = stackImages(0.5,([img,imgGray,img],[img,img,img]))# imgHdr = np.hstack((img,img))
# imgVer = np.vstack((img,img))
# cv2.imshow("Horizontal",imgHdr)
# cv2.imshow("Vertical",imgVer)cv2.imshow("ImageStack",imgStack)cv2.waitKey(0)

在这里插入图片描述

颜色检测

import cv2
import numpy as np
# color dectiondef empty(a):pass
'''连接图片'''
def stackImages(scale,imgArray):rows = len(imgArray)cols = len(imgArray[0])rowsAvailable = isinstance(imgArray[0], list)width = imgArray[0][0].shape[1]height = imgArray[0][0].shape[0]if rowsAvailable:for x in range ( 0, rows):for y in range(0, cols):if imgArray[x][y].shape[:2] == imgArray[0][0].shape [:2]:imgArray[x][y] = cv2.resize(imgArray[x][y], (0, 0), None, scale, scale)else:imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)if len(imgArray[x][y].shape) == 2: imgArray[x][y]= cv2.cvtColor( imgArray[x][y], cv2.COLOR_GRAY2BGR)imageBlank = np.zeros((height, width, 3), np.uint8)hor = [imageBlank]*rowshor_con = [imageBlank]*rowsfor x in range(0, rows):hor[x] = np.hstack(imgArray[x])ver = np.vstack(hor)else:for x in range(0, rows):if imgArray[x].shape[:2] == imgArray[0].shape[:2]:imgArray[x] = cv2.resize(imgArray[x], (0, 0), None, scale, scale)else:imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0].shape[0]), None,scale, scale)if len(imgArray[x].shape) == 2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)hor= np.hstack(imgArray)ver = horreturn ver# 调整滑动条的位置来改变图像的颜色阈值,从而实现对图像的颜色分割或过滤
path = 'Resources/lambo.PNG'
framWidth = 640
framHeight = 480cap = cv2.VideoCapture(path)
cap.set(3,framWidth) #width
cap.set(4,framHeight) #height
cap.set(10,150)cv2.namedWindow("TrackBars")
cv2.resizeWindow("TrackBars",640,240)
cv2.createTrackbar("Hue Min","TrackBars",0,179,empty)  # hue
cv2.createTrackbar("Hue Max","TrackBars",179,179,empty)
cv2.createTrackbar("Sat Min","TrackBars",0,255,empty) # saturation
cv2.createTrackbar("Sat Max","TrackBars",255,255,empty)
cv2.createTrackbar("Val Min","TrackBars",0,255,empty)  # value
cv2.createTrackbar("Val Max","TrackBars",255,255,empty)while True:img = cv2.imread(path)imgHSV = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)h_min = cv2.getTrackbarPos("Hue Min","TrackBars")h_max = cv2.getTrackbarPos("Hue Max", "TrackBars")s_min = cv2.getTrackbarPos("Sat Min", "TrackBars")s_max = cv2.getTrackbarPos("Sat Max", "TrackBars")v_min = cv2.getTrackbarPos("Val Min", "TrackBars")v_max = cv2.getTrackbarPos("Val Max", "TrackBars")# print(h_min,h_max,s_min,s_max,v_min,v_max)lower = np.array([h_min,s_min,v_min])upper = np.array([h_max,s_max,v_max])#用掩码对原始图像进行位运算mask = cv2.inRange(imgHSV,lower,upper)imgResult = cv2.bitwise_and(img,img,mask=mask) #二值图像# cv2.imshow("Original",img)# cv2.imshow("HSV",imgHSV)# cv2.imshow("Mask", mask)# cv2.imshow("Result", imgResult)imgStack = stackImages(0.6, ([img, imgHSV], [mask, imgResult]))cv2.imshow("Stacked Images", imgStack)cv2.waitKey(1)

在这里插入图片描述

轮廓检测

import cv2
import numpy as np#contours / shape detectiondef stackImages(scale,imgArray):rows = len(imgArray)cols = len(imgArray[0])rowsAvailable = isinstance(imgArray[0], list)width = imgArray[0][0].shape[1]height = imgArray[0][0].shape[0]if rowsAvailable:for x in range ( 0, rows):for y in range(0, cols):if imgArray[x][y].shape[:2] == imgArray[0][0].shape [:2]:imgArray[x][y] = cv2.resize(imgArray[x][y], (0, 0), None, scale, scale)else:imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)if len(imgArray[x][y].shape) == 2: imgArray[x][y]= cv2.cvtColor( imgArray[x][y], cv2.COLOR_GRAY2BGR)imageBlank = np.zeros((height, width, 3), np.uint8)hor = [imageBlank]*rowshor_con = [imageBlank]*rowsfor x in range(0, rows):hor[x] = np.hstack(imgArray[x])ver = np.vstack(hor)else:for x in range(0, rows):if imgArray[x].shape[:2] == imgArray[0].shape[:2]:imgArray[x] = cv2.resize(imgArray[x], (0, 0), None, scale, scale)else:imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0].shape[0]), None,scale, scale)if len(imgArray[x].shape) == 2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)hor= np.hstack(imgArray)ver = horreturn verdef getContours(img):contours,hierarchy = cv2.findContours(img,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE)for cnt in contours:area = cv2.contourArea(cnt)print(area)if area>500:cv2.drawContours(imgContour,cnt,-1,(255,0,0),3)#计算轮廓曲线长度peri = cv2.arcLength(cnt,True)print(peri)approx = cv2.approxPolyDP(cnt,0.02*peri,True)print(len(approx))objCor = len(approx)x,y,w,h = cv2.boundingRect(approx)# 图形分类if objCor == 3: objectType = "Tri"elif objCor == 4 :aspRatio = w / float(h)if aspRatio > 0.98 and aspRatio < 1.03: objectType = "Square"else: objectType = "Rectangle"elif objCor > 4: objectType = "Circles"else: objectType = "None"cv2.rectangle(imgContour,(x,y),(x+w,y+h),(0,255,0),2)cv2.putText(imgContour,objectType,(x+(w//2)-10,y+(h//2)-10),cv2.FONT_HERSHEY_COMPLEX,0.7,(0,0,0),2)path = 'Resources/shapes.png'
img = cv2.imread(path)
imgContour = img.copy()imgGray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
imgBlur = cv2.GaussianBlur(imgGray,(7,7),1)
imgCanny = cv2.Canny(imgBlur,50,50)
getContours(imgCanny)imgBlank = np.zeros_like(img)
imgStack = stackImages(0.8,([img,imgGray],[imgCanny,imgContour]))cv2.imshow("Stack",imgStack)cv2.waitKey(0)

在这里插入图片描述

人脸检测

9.1静态图片

import cv2
# face detection
faceCascade = cv2.CascadeClassifier("Resources/haarcascade_frontalface_default.xml")
img = cv2.imread("Resources/dnn.jpg")
imgGray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)faces = faceCascade.detectMultiScale(imgGray,1.1,4)for(x,y,w,h) in faces:cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
cv2.imshow("Result",img)cv2.waitKey(0)

在这里插入图片描述

9.2 摄像头

import cv2faceCascade = cv2.CascadeClassifier("Resources/haarcascade_frontalface_default.xml")cap = cv2.VideoCapture(0)
cap.set(3,640) #width
cap.set(4,480) #height
cap.set(10,100)while True:success,img = cap.read()cv2.imshow("Video",img)imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)faces = faceCascade.detectMultiScale(imgGray, 1.1, 4)for (x, y, w, h) in faces:cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 0), 2)cv2.imshow("Result", img)if cv2.waitKey(1) & 0xFF == ord('q'):break

在这里插入图片描述

实战

10.1虚拟绘画

import cv2
import numpy as npframeWidth = 640
frameHeight = 480
cap = cv2.VideoCapture(0)
cap.set(3, frameWidth)
cap.set(4, frameHeight)
cap.set(10, 150)# 想要检测的颜色
myColors = [[0,89,0,98,255,255], [0,47,0,97,255,255], [0,66,0,179,255,255], [0,54,0,98,255,255]]
# 想要绘制的颜色  BGR
myColorValues = [[51, 153, 255],[0, 255, 0],[255,0,0],[0,255,255]]
# 绘制的点的列表
myPoints = []  ## [x , y , colorId ]"""获取想要绘制的,及对应的颜色"""
def findColor(img, myColors, myColorValues):imgHSV = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)count = 0newPoints = []for color in myColors:lower = np.array(color[0:3])upper = np.array(color[3:6])mask = cv2.inRange(imgHSV, lower, upper) x, y = getContours(mask)  # 想要绘制的点cv2.circle(imgResult, (x, y), 20, myColorValues[count], cv2.FILLED)  # 将点绘制在图上if x != 0 and y != 0:newPoints.append([x, y, count])  # 将点添加到 newPoints列表中,count为想要绘制颜色的编号count += 1return newPoints  def getContours(img):contours, Heriachy = cv2.findContours(img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) x, y, w, h = 0, 0, 0, 0for cnt in contours:area = cv2.contourArea(cnt)if area > 500:# cv2.drawContours(imgResult, cnt, -1, (255, 0, 0), 3)peri = cv2.arcLength(cnt, True)approx = cv2.approxPolyDP(cnt, 0.02 * peri, True)x, y, w, h = cv2.boundingRect(approx)  return x + w // 2, y  """把点绘制在画布上"""
def drawOnCanvas(myPoints, myColorValues):for point in myPoints:cv2.circle(imgResult, (point[0], point[1]), 20, myColorValues[point[2]], cv2.FILLED)while True:success, img = cap.read()imgResult = img.copy()newPoints = findColor(img, myColors, myColorValues)  # 想要绘制的点if len(newPoints) != 0:for newP in newPoints:myPoints.append(newP)if len(myPoints) != 0:drawOnCanvas(myPoints, myColorValues)  # 将点绘制在画布上cv2.imshow("Result", imgResult)if cv2.waitKey(1) & 0xFF == ord('q'):break

利用颜色检测滑杆来得出笔的颜色

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

10.2纸张扫描

import cv2
import numpy as npwidthImg=480
heightImg =640img = cv2.imread("Resources/1.jpg")"""图像预处理"""
def preProcessing(img):imgGray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)imgBlur = cv2.GaussianBlur(imgGray,(5,5),1)imgCanny = cv2.Canny(imgBlur,200,200)kernel = np.ones((5,5))imgDial = cv2.dilate(imgCanny,kernel,iterations=2)imgThres = cv2.erode(imgDial,kernel,iterations=1)return imgThres'''获取最大轮廓角点'''
def getContours(img):biggest = np.array([])maxArea = 0contours,Heriachy= cv2.findContours(img,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE)for cnt in contours:area = cv2.contourArea(cnt)if area>5000:peri = cv2.arcLength(cnt,True)approx = cv2.approxPolyDP(cnt,0.02*peri,True)if area >maxArea and len(approx) == 4:biggest = approxmaxArea = area#绘制轮廓(biggest仅仅包含矩形的轮廓)cv2.drawContours(imgContour, biggest, -1, (255, 0, 0), 20)return biggest'''矩形角点的重新处理:按照一定的顺序排列(左上,右上,左下,右下)'''
def reorder (myPoints):myPoints = myPoints.reshape((4,2))#四个角点myPointsNew = np.zeros((4,1,2),np.int32)#点按照一定的顺序重新排列add = myPoints.sum(1)#将点进行x+y计算,myPointsNew[0] = myPoints[np.argmin(add)] #和最小的点为左上角点myPointsNew[3] = myPoints[np.argmax(add)]#和最大的点为右下角点diff = np.diff(myPoints,axis=1)#将点进行x-y差异计算myPointsNew[1]= myPoints[np.argmin(diff)]#差异最小的点为右上myPointsNew[2] = myPoints[np.argmax(diff)]#差异最大的点为左下return myPointsNew'''鸟瞰转换'''
def getWarp(img,biggest):#矩阵角点的处理,按照一个统一顺序排列biggest = reorder(biggest)pts1 = np.float32(biggest)pts2 = np.float32([[0, 0], [widthImg, 0], [0, heightImg], [widthImg, heightImg]])matrix = cv2.getPerspectiveTransform(pts1, pts2)#鸟瞰图imgOutput = cv2.warpPerspective(img, matrix, (widthImg, heightImg))#得到的鸟瞰图,边缘有其他背景,所以裁剪边缘,并将裁剪后的图像,重新调整为原来窗口大小。imgCropped = imgOutput[20:imgOutput.shape[0]-20,20:imgOutput.shape[1]-20]imgCropped = cv2.resize(imgCropped,(widthImg,heightImg))return imgCropped'''图像堆叠显示'''
def stackImages(scale,imgArray):rows = len(imgArray)cols = len(imgArray[0])rowsAvailable = isinstance(imgArray[0], list)width = imgArray[0][0].shape[1]height = imgArray[0][0].shape[0]if rowsAvailable:for x in range ( 0, rows):for y in range(0, cols):if imgArray[x][y].shape[:2] == imgArray[0][0].shape [:2]:imgArray[x][y] = cv2.resize(imgArray[x][y], (0, 0), None, scale, scale)else:imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)if len(imgArray[x][y].shape) == 2: imgArray[x][y]= cv2.cvtColor( imgArray[x][y], cv2.COLOR_GRAY2BGR)imageBlank = np.zeros((height, width, 3), np.uint8)hor = [imageBlank]*rowshor_con = [imageBlank]*rowsfor x in range(0, rows):hor[x] = np.hstack(imgArray[x])ver = np.vstack(hor)else:for x in range(0, rows):if imgArray[x].shape[:2] == imgArray[0].shape[:2]:imgArray[x] = cv2.resize(imgArray[x], (0, 0), None, scale, scale)else:imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0].shape[0]), None,scale, scale)if len(imgArray[x].shape) == 2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)hor= np.hstack(imgArray)ver = horreturn verwhile True:imgresize = cv2.resize(img,(widthImg,heightImg))imgContour = imgresize.copy()imgThres = preProcessing(imgresize)biggest = getContours(imgThres)if biggest.size != 0:# 鸟瞰转换imgWarped = getWarp(imgresize, biggest)imageArray = ([imgresize,imgThres],[imgContour,imgWarped])cv2.imshow("ImageWarped", imgWarped)else:imageArray = ([imgContour, img])# 图像堆叠显示stackedImages = stackImages(0.5, imageArray)cv2.imshow("WorkFlow", stackedImages)cv2.waitKey(0)

在这里插入图片描述

10.3 车牌检测器

import cv2frameWidth = 640
frameHeight = 480
nPlateCascade = cv2.CascadeClassifier("Resources/haarcascade_russian_plate_number.xml")
minArea = 200
color = (255,0,255)cap = cv2.VideoCapture(0)
cap.set(3, frameWidth)
cap.set(4, frameHeight)
cap.set(10,150)
count = 0while True:success, img = cap.read() imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) #车牌检测numberPlates = nPlateCascade.detectMultiScale(imgGray, 1.1, 10)for (x, y, w, h) in numberPlates:area = w*hif area >minArea:#绘制矩形cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 255), 2)#绘制文字cv2.putText(img,"Number Plate",(x,y-5),cv2.FONT_HERSHEY_COMPLEX_SMALL,1,color,2)imgRoi = img[y:y+h,x:x+w]cv2.imshow("ROI", imgRoi)cv2.imshow("Result", img)if cv2.waitKey(1) & 0xFF == ord('s'):cv2.imwrite("Resources/Scanned/NoPlate_"+str(count)+".jpg",imgRoi)cv2.rectangle(img,(0,200),(640,300),(0,255,0),cv2.FILLED)cv2.putText(img,"Scan Saved",(150,265),cv2.FONT_HERSHEY_DUPLEX,2,(0,0,255),2)cv2.imshow("Result",img)cv2.waitKey(500)count +=1break

在这里插入图片描述

按s键后可保存车牌

在这里插入图片描述

参考资料

ChatGPT (openai.com)

RGB Color Codes Chart 🎨 (rapidtables.com)

图像基本操作 - 【布客】OpenCV 4.0.0 中文翻译 (apachecn.org)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/114779.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【Nacos】使用Nacos进行服务发现、配置管理

Nacos Nacos是 Dynamic Naming and Configuration Service 的首字母简称&#xff0c;一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。 版本说明&#xff1a;版本说明 alibaba/spring-cloud-alibaba Wiki GitHub <properties><java.version>…

传统分拣弊端明显,AI机器视觉赋能物流行业包裹分类产线数智化升级

随着电子商务的快速发展&#xff0c;物流行业的包裹数量持续增长&#xff0c;给物流企业带来了巨大的运营压力。目前&#xff0c;国内大型物流运转中心已开始采用机器视觉自动化设备&#xff0c;但多数快递公司处于半自动化状态&#xff0c;中小型物流分拣中心目前仍靠人工录入…

AI机器视觉赋能电池缺陷检测,深眸科技助力新能源行业规模化发展

新产业周期下&#xff0c;新能源行业风口已至&#xff0c;现代社会对于新能源电池产品需求量加大&#xff0c;对产品的质量安全也更加重视。当前&#xff0c;传统的检测方法已经不能满足新能源电池行业的发展&#xff0c;越来越多的厂商开始应用创新机器视觉技术与产品于生产环…

Python 实战之ChatGPT + Python 实现全自动数据处理/可视化详解

本文目录 一、引言 二、成果演示——口述式数据可视化 三、远原理述 四、实现过程 &#xff08;一&#xff09;环境配置 &#xff08;二&#xff09;申请OpenAI账号 &#xff08;一&#xff09;调用ChatGPT API &#xff08;二&#xff09;设计AI身份&#xff0c;全自动处理数据…

java基于微信小程序的讲座预约系统的研究与实现

博主介绍&#xff1a;✌程序员徐师兄、7年大厂程序员经历。全网粉丝30W、csdn博客专家、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ 文章目录 1 简介2 技术栈第三章 系统分析3.1初步需求分析 3.2 系统用例分析3.2.1 公告管理用例分析3.2.2 系…

华为云新生代开发者招募

开发者您好&#xff0c;我们是华为2012UCD的研究团队 为了解年轻开发者的开发现状和趋势 正在邀请各位先锋开发者&#xff0c;与我们进行2小时的线上交流&#xff08;江浙沪附近可线下交流&#xff09; 聊聊您日常开发工作中的产品使用需求 成功参与访谈者将获得至少300元京…

实现智能指针shared_ptr(难度3)(源码与测试用例)

本作业主要考察&#xff1a;复制控制/动态内存管理/模板编程/基于引用计数的智能指针原理/测试驱动开发 实现代码完成下面的my_shared_ptr以及main函数中的测试用例 本实现主要是利用复制控制来增加引用计数实现智能指针。 #include <iostream> #include <vector&g…

骨传导耳机十大品牌怎么选,骨传导耳机十大品牌排行榜分享

作为一个拥有20多款骨传导耳机来说&#xff0c;我也算是资深的使用者了&#xff0c;在骨传导耳机刚开始兴起的时候&#xff0c;我就开始接触了&#xff0c;近几年越来越多的骨传导耳机品牌诞生&#xff0c;我也是入手了不少&#xff0c;所以也算是对骨传导耳机非常熟悉了&#…

Flutter的未来与趋势,23年还学吗?

随着移动应用市场的不断扩大&#xff0c;跨平台开发框架的需求也越来越大。Flutter框架可以帮助开发者在不同平台上快速开发高质量的移动应用程序&#xff0c;这种趋势将进一步推动Flutter的发展和普及。 作为一名前端开发工程师&#xff0c;学习Flutter框架是非常有必要的。因…

亲测微信小程序备案流程,微信小程序如何备案,微信小程序备案所需准备资料

微信小程序为什么要备案&#xff0c;微信官方给出如下说明&#xff1a; 1、若微信小程序未上架&#xff0c;自2023年9月1日起&#xff0c;微信小程序须完成备案后才可上架&#xff1b; 2、若微信小程序已上架&#xff0c;请于2024年3月31日前完成备案&#xff0c;逾期未完成备案…

CSP的理解与绕过

文章目录 前言CSP简介CSP如何工作CSP指令CSP指令值 例题[AFCTF 2021]BABY_CSP 前言 刚学习完xss&#xff0c;把xsss-labs靶场都通了打算试试水&#xff0c;遇到此题[AFCTF 2021]BABY_CSP&#xff0c;借此机会学习下CSP CSP简介 Content Security Policy (CSP)内容安全策略&am…

华为OD七日集训第1期复盘 - 按算法分类,由易到难,循序渐进,玩转OD(文末送书)

目录 一、活动内容如下第1天、逻辑分析第2天、字符串处理第3天、数据结构第4天、双指针第5天、递归回溯第6天、二分查找第7天、贪心算法 && 二叉树 二、可观测性工程1、简介2、主要内容 大家好&#xff0c;我是哪吒。 最近一直在刷华为OD机试的算法题&#xff0c;坚持…

macOS Sonoma 14beta 7(23A5337a)更新发布,附黑/白苹果系统镜像

系统介绍&#xff08;镜像请前往黑果魏叔官网下载&#xff09; 黑果魏叔8 月 31 日消息&#xff0c;苹果今日向 Mac 电脑用户推送了 macOS 14 开发者预览版 Beta 7 更新&#xff08;内部版本号&#xff1a;23A5337a&#xff09;&#xff0c;本次更新距离上次发布隔了 8 天。 …

运营超5000万公里,再签700辆订单,嬴彻卡车NOA引领商用车自动驾驶商业化

从主动安全到智能驾驶&#xff0c;商用车自动驾驶商业化进程已经明显提速。 8月29日&#xff0c;嬴彻科技举办以“奔跑吧 卡车NOA”为主题的第二届嬴彻科技日&#xff0c;宣布嬴彻卡车NOA&#xff08;导航辅助驾驶&#xff09;已经突破5000万公里&#xff0c;并实现安全运营零…

系统架构技能之设计模式-单件模式

一、开篇 其实我本来不是打算把系统架构中的一些设计模式单独抽出来讲解的&#xff0c;因为很多的好朋友也比较关注这方面的内容&#xff0c;所以我想通过我理解及平时项目中应用到的一 些常见的设计模式,拿出来给大家做个简单讲解&#xff0c;我这里只是抛砖引玉&#xff0c…

Debian 30 周年,生日快乐!

导读近日是 Debian 日&#xff0c;也是由伊恩-默多克&#xff08;Ian Murdock&#xff09;创立的 Debian GNU/Linux 通用操作系统和社区支持的 Debian 项目 30 周年纪念日。 不管你信不信&#xff0c;从已故的伊恩-默多克于 1993 年 8 月 16 日宣布成立 Debian 项目&#xff0c…

如何修复xinput1_4.dll丢失的问题?教你怎么快速修复xinput1_4.dll文件

在使用计算机的过程中&#xff0c;我们可能会遇到各种各样的错误和问题。其中之一就是xinput1_4.dll丢失的错误。这个错误会导致一些游戏或应用程序无法正常运行&#xff0c;给我们带来不便&#xff0c;但是不要担心&#xff0c;其实很简单&#xff0c;我们只要了解清楚xinput1…

15. Docker实战监控神器Uptime Kuma

目录 1、前言 2、什么是Uptime Kuma? 3、Docker部署Uptime Kuma 3.1、安装 3.2、访问 3.3、配置 3.4、集成飞书机器人 3.5、效果 1、前言 在利用Docker部署项目时&#xff0c;我们需要时刻知道已部署的容器的状态。且通常会把所有的站点监控配置到云平台上&#xff0c…

java 多线程

01.多线程类java.lang.Thread 这里继承Thread类的方法是比较常用的一种&#xff0c;如果说你只是想起一条线程。没有什么其它特殊的要求&#xff0c;那么可以使用Thread.&#xff08;笔者推荐使用Runable&#xff0c;后头会说明为什么&#xff09;。下面来看一个简单的实例&…