#!/usr/bin/env python
# -*- coding:utf-8 -*-
import cv2 as cv
import numpy as np
w_thre=50; #长宽最小阈值
h_thre=50;
def find_countours_center(frame,countours):
C=[]#放中心点
for i in range(np.array(contours, dtype=object).shape[0]):
# print(countours[i])
x_list = []
y_list = []
for j in range(np.array(countours[i]).shape[0]):#将一个闭合曲线里面的所有x,y轴坐标放在两个list里
x_list.append(countours[i][j][0][0])
y_list.append(countours[i][j][0][1])
if (max(x_list)-min(x_list))>w_thre or (max(y_list)-min(y_list)
Python基于openCV火焰识别
最新推荐文章于 2024-06-28 10:44:03 发布
该博客介绍了如何利用Python的OpenCV库进行火焰识别,通过实例展示了在视频截图中检测火焰的过程,揭示了相关技术和步骤。
摘要由CSDN通过智能技术生成