当前位置:网站首页>图像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)
边栏推荐
- A. Odd Selection【BruteForce】
- QT learning diary 9 - dialog box
- How to enforce parameters in PowerShell- How do I make parameters mandatory in PowerShell?
- WebView module manages the application window interface to realize the logical control and management operation of multiple windows (Part 1)
- 聊聊支付流程的设计与实现逻辑
- link preload prefetch
- Ml (machine learning) softmax function to realize the classification of simple movie categories
- [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
- SDNUOJ1015
- Research Report on market demand and investment planning for the development of China's office chair industry, 2022-2028
猜你喜欢

Wechat applet for the first time

Talk about the design and implementation logic of payment process

Micro service component sentinel console call

互联网医院HIS管理平台源码,在线问诊,预约挂号 智慧医院小程序源码

Classroom attendance system based on face recognition tkinter+openpyxl+face_ recognition

BFS - topology sort

Line by line explanation of yolox source code of anchor free series network (5) -- mosaic data enhancement and mathematical understanding
![AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]](/img/3d/6d61fefc62063596221f98999a863b.png)
AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]

How to install PHP on Ubuntu 20.04

PHP MySQL preprocessing statement
随机推荐
Managing multiple selections with MVVM - managing multiple selections with MVVM
PHP MySQL where clause
Website with JS doesn't work in IE9 until the Developer Tools is activated
Micro service component sentinel console call
[combinatorics] generating function (shift property)
Cloud primordial weekly | CNCF released the 2021 cloud primordial development status report, which was released on istio 1.13
Line by line explanation of yolox source code of anchor free series network (5) -- mosaic data enhancement and mathematical understanding
SSL / bio pour OpenSSL Get FD
Life perception 1
Leetcode Valentine's Day Special - looking for a single dog
[combinatorics] generating function (summation property)
Enterprise custom form engine solution (XI) -- form rule engine 1
win32:堆破坏的dump文件分析
PUT vs. POST for Uploading Files - RESTful API to be Built Using Zend Framework
List of financial products in 2022
1146_ SiCp learning notes_ exponentiation
link preload prefetch
Ml (machine learning) softmax function to realize the classification of simple movie categories
STM32 realizes 74HC595 control
AcWing 271. 杨老师的照相排列【多维DP】