当前位置:网站首页>图像24位深度转8位深度
图像24位深度转8位深度
2022-07-03 17:55: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)
边栏推荐
- Line by line explanation of yolox source code of anchor free series network (5) -- mosaic data enhancement and mathematical understanding
- PHP MySQL Update
- 基于人脸识别的课堂考勤系统 tkinter+openpyxl+face_recognition
- i++与++i的区别:通俗易懂的讲述他们的区别
- Servlet specification Part II
- 互联网医院HIS管理平台源码,在线问诊,预约挂号 智慧医院小程序源码
- c# .net 工具生态
- 分布式的任务分发框架-Gearman
- The gbase 8A database does not support the DB2 function value (column_name, 0) cluster syntax
- Automata and automatic line of non-standard design
猜你喜欢

Research Report on market demand and investment planning for the development of China's office chair industry, 2022-2028

Analysis report on production and marketing demand and investment forecast of China's PVC industry from 2021 to 2026

How to install PHP on Ubuntu 20.04

SQL injection database operation foundation
![[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](/img/df/a034032e203e7935dafaf8a71cb6c8.jpg)
[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

How to purchase Google colab members in China

Talk about the design and implementation logic of payment process

PHP MySQL preprocessing statement

Type conversion, variable

MySQL grouping query
随机推荐
Introduction to PHP MySQL
SQL injection database operation foundation
[combinatorics] recursive equation (the non-homogeneous part is an exponential function and the bottom is the characteristic root | example of finding a special solution)
PHP processing - watermark images (text, etc.)
基于人脸识别的课堂考勤系统 tkinter+openpyxl+face_recognition
STM32实现74HC595控制
【统信UOS】扫描仪设备管理驱动安装
c# . Net tool ecosystem
Redis core technology and practice - learning notes (VI) how to achieve data consistency between master and slave Libraries
解决Zabbix用snmp监控网络流量不准的问题
A. Berland Poker &1000【简单数学思维】
ArrayList分析3 : 删除元素
Talk about the design and implementation logic of payment process
How to purchase Google colab members in China
Postfix 技巧和故障排除命令
Ml (machine learning) softmax function to realize the classification of simple movie categories
Draw some simple graphics with MFC
Line by line explanation of yolox source code of anchor free series network (6) -- mixup data enhancement
c# .net 工具生态
Redis core technology and practice - learning notes (VII) sentinel mechanism