yolov5读取灰度图
时间: 2023-09-16 17:06:53 浏览: 109
读取灰度图像
4星 · 用户满意度95%
YOLOv5在读取灰度图时,会将图像的灰度值复制三次,使其变为三通道的图像。这是因为OpenCV在默认情况下会读取三个通道的图像,如果图像是灰度图,就会将图层复制三次,使其与RGB图像有相同的通道数。这样做的目的是为了保持代码的一致性,方便后续的处理和计算。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [YOLOv5 源码解析 —— 网络模型建立](https://blog.csdn.net/qq_55745968/article/details/124512331)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [yolov5读取单通道图像会怎样?](https://blog.csdn.net/mddCSDN/article/details/130508627)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文