当前位置:网站首页>圖像24比特深度轉8比特深度
圖像24比特深度轉8比特深度
2022-07-03 17:56:00 【我是一個小稻米】
import os
import cv2
import numpy as np
labels_path = 'label_5_class_png_1024_1024'
labels_save_path = 'label_5_class_png_1024_1024_1'
// 獲得文件夾下的所有文件
label_names = os.listdir(labels_path)
for s in label_names:
label_path = os.path.join(labels_path, s)
label_save_path = os.path.join(labels_save_path, s)
// 讀取文件
label = cv2.imread(label_path)
// 24比特深度轉8比特深度
label = cv.cvtColor(label, cv.COLOR_BGR2GRAY)
// 保存文件
cv2.imwrite(label_save_path, label)
边栏推荐
- Ml (machine learning) softmax function to realize the classification of simple movie categories
- Enterprise custom form engine solution (XI) -- form rule engine 1
- win32:堆破坏的dump文件分析
- First day of rhcsa study
- IntelliJ 2021.3 short command line when running applications
- Servlet specification Part II
- How to read the source code [debug and observe the source code]
- [combinatorics] recursive equation (four cases where the non-homogeneous part of a linear non-homogeneous recursive equation with constant coefficients is the general solution of the combination of po
- 互联网医院HIS管理平台源码,在线问诊,预约挂号 智慧医院小程序源码
- Talk about the design and implementation logic of payment process
猜你喜欢
Investigation on the operation prospect of the global and Chinese Anti enkephalinase market and analysis report on the investment strategy of the 14th five year plan 2022-2028
[combinatorics] generating function (summation property)
TCP拥塞控制详解 | 3. 设计空间
(8) HS corner detection
Records of long objects and long judgments in the stream of list
微服务组件Sentinel控制台调用
How to purchase Google colab members in China
BFS - topology sort
(9) Opencv Canny edge detection
SQL injection database operation foundation
随机推荐
[combinatorics] recursive equation (four cases where the non-homogeneous part of a linear non-homogeneous recursive equation with constant coefficients is the general solution of the combination of po
Basic grammar of interview (Part 2)
Win32: analyse du fichier dump pour la défaillance du tas
How to install PHP on Ubuntu 20.04
Line by line explanation of yolox source code of anchor free series network (6) -- mixup data enhancement
[LINUX]CentOS 7 安装MYSQL时报错“No package mysql-server available“No package zabbix-server-mysql availabl
[Yu Yue education] family education SPOC class 2 reference materials of Shanghai Normal University
Solve the problem of inaccurate network traffic monitored by ZABBIX with SNMP
PHP MySQL inserts data
Web-ui automated testing - the most complete element positioning method
数学公式(测试)
Baiwen.com 7 days Internet of things smart home learning experience punch in the next day
List的stream中Long对象与long判等问题记录
[set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela
Deops入门
Introduction to PHP MySQL
Win32: dump file analysis of heap corruption
ArrayList analysis 3: delete elements
PHP MySQL where clause
[combinatorics] generating function (summation property)