当前位置:网站首页>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)
边栏推荐
- A. Berland Poker & 1000 [simple mathematical thinking]
- ArrayList分析3 : 删除元素
- [vscode] convert tabs to spaces
- 【统信UOS】扫描仪设备管理驱动安装
- The third day of writing C language by Yabo people
- [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
- Baiwen.com 7 days Internet of things smart home learning experience punch in the next day
- How to deploy applications on kubernetes cluster
- TCP拥塞控制详解 | 3. 设计空间
- Redis core technology and practice - learning notes (VIII) sentinel cluster: sentinel hung up
猜你喜欢
[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
SQL injection database operation foundation
Introduction to SolidWorks gear design software tool geartrax
Talk about the design and implementation logic of payment process
Redis core technology and practice - learning notes (VI) how to achieve data consistency between master and slave Libraries
(9) Opencv Canny edge detection
How to purchase Google colab members in China
PHP MySQL create database
Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028
聊聊支付流程的設計與實現邏輯
随机推荐
Analyse ArrayList 3: suppression d'éléments
TCP congestion control details | 3 design space
PUT vs. POST for Uploading Files - RESTful API to be Built Using Zend Framework
How to read the source code [debug and observe the source code]
自动渗透测试工具核心功能简述
A. Berland Poker & 1000 [simple mathematical thinking]
聊聊支付流程的设计与实现逻辑
IntelliJ 2021.3 short command line when running applications
Applet with multiple tabs and Swipers + paging of each tab
win32:堆破坏的dump文件分析
Redis core technology and practice - learning notes (VII) sentinel mechanism
Detailed explanation of common network attacks
[combinatorics] recursive equation (the non-homogeneous part is an exponential function and the bottom is the characteristic root | example of finding a special solution)
Global and Chinese health care OEM and ODM market status survey and investment planning recommendations report 2022-2028
Assembly for unloading Loadfrom() loaded assembly - unloading the assembly loaded with assembly LoadFrom()
Module 9 operation
Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code
Y is always discrete and can't understand, how to solve it? Answer: read it several times
Vs2013 has blocked the installer, and ie10 needs to be installed
Leetcode 538 converts binary search tree into cumulative tree -- recursive method and iterative method