当前位置:网站首页>图像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)
边栏推荐
- Embedded-c language-7
- Baiwen.com 7 days Internet of things smart home learning experience punch in the next day
- Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028
- Talk about the design and implementation logic of payment process
- PHP MySQL preprocessing statement
- OpenSSL的SSL/BIO_get_fd
- Talk about the design and implementation logic of payment process
- SDNUOJ1015
- Research on Swift
- Create a new file from templates with bash script - create new file from templates with bash script
猜你喜欢
![AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]](/img/3d/6d61fefc62063596221f98999a863b.png)
AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]

Redis core technology and practice - learning notes (VI) how to achieve data consistency between master and slave Libraries

Vs2013 has blocked the installer, and ie10 needs to be installed

Talk about the design and implementation logic of payment process

PHP MySQL create database
![How to read the source code [debug and observe the source code]](/img/40/a2fca67bcde3c468a739c6990325f4.jpg)
How to read the source code [debug and observe the source code]

Golang unit test, mock test and benchmark test

Research on Swift
![[combinatorics] recursive equation (summary of the solution process of recursive equation | homogeneous | double root | non-homogeneous | characteristic root is 1 | exponential form | the bottom is th](/img/f1/c96c4a6d34e1ae971f492f4aed5a93.jpg)
[combinatorics] recursive equation (summary of the solution process of recursive equation | homogeneous | double root | non-homogeneous | characteristic root is 1 | exponential form | the bottom is th

PHP MySQL inserts data
随机推荐
The third day of writing C language by Yabo people
Postfix tips and troubleshooting commands
Kotlin的协程:上下文
[combinatorics] generating function (linear property | product property)
Codeforces Round #803 (Div. 2) C. 3SUM Closure
[vscode] convert tabs to spaces
Kotlin's collaboration: Context
ArrayList分析3 : 删除元素
Keepalived setting does not preempt resources
Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028
Distributed task distribution framework gearman
List of financial products in 2022
c# . Net tool ecosystem
A. Berland Poker & 1000 [simple mathematical thinking]
Embedded-c language-7
Remote office tools sharing | community essay solicitation
Stm32h7 Hal library SPI DMA transmission has been in busy solution
[Yu Yue education] family education SPOC class 2 reference materials of Shanghai Normal University
WEB-UI自动化测试-最全元素定位方法
[Tongxin UOS] scanner device management driver installation