当前位置:网站首页>Image 24 bits de profondeur à 8 bits de profondeur
Image 24 bits de profondeur à 8 bits de profondeur
2022-07-03 17:56:00 【Je suis un petit riz.】
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'
// Obtenir tous les fichiers sous le dossier
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)
// Lire le fichier
label = cv2.imread(label_path)
// 24Rotation de la profondeur du BIT8Profondeur du BIT
label = cv.cvtColor(label, cv.COLOR_BGR2GRAY)
// Enregistrer le fichier
cv2.imwrite(label_save_path, label)
边栏推荐
- Solve the problem of inaccurate network traffic monitored by ZABBIX with SNMP
- Kotlin's collaboration: Context
- Redis core technology and practice - learning notes (VII) sentinel mechanism
- Discussion sur la logique de conception et de mise en oeuvre du processus de paiement
- [LINUX]CentOS 7 安装MYSQL时报错“No package mysql-server available“No package zabbix-server-mysql availabl
- Write a program to process a list container of string type. Find a special value in the container 9.27: and delete it if found. Rewrite the above procedure with deque container.
- Embedded-c language-7
- PHP returns 500 errors but no error log - PHP return 500 error but no error log
- 聊聊支付流程的设计与实现逻辑
- Postfix 技巧和故障排除命令
猜你喜欢

Talk about the design and implementation logic of payment process

AcWing 271. 杨老师的照相排列【多维DP】

How to deploy applications on kubernetes cluster

微服务组件Sentinel控制台调用

Redis core technology and practice - learning notes (VIII) sentinel cluster: sentinel hung up

Embedded-c language-7

win32:堆破壞的dump文件分析

Talk about the design and implementation logic of payment process

Draw some simple graphics with MFC

Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028
随机推荐
[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
[mathematical logic] equivalent calculus and reasoning calculus of predicate logic (individual word | predicate | quantifier | predicate logic formula | two basic formulas | proposition symbolization
Supervisor monitors gearman tasks
1146_ SiCp learning notes_ exponentiation
Enterprise custom form engine solution (XI) -- form rule engine 1
[tutorial] build your first application on coreos
Draw some simple graphics with MFC
OpenSSL的SSL/BIO_get_fd
Applet with multiple tabs and Swipers + paging of each tab
The gbase 8A database does not support the DB2 function value (column_name, 0) cluster syntax
First day of rhcsa study
SDNUOJ1015
Win32: analyse du fichier dump pour la défaillance du tas
QT learning diary 9 - dialog box
MySQL grouping query
Win32: dump file analysis of heap corruption
Design limitations of structure type (struct)
TCP congestion control details | 3 design space
How to deploy applications on kubernetes cluster
Introduction to SolidWorks gear design software tool geartrax