腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(3187)
视频
沙龙
1
回答
opencv计数框,该框分为4个部分
、
、
、
,(x,y),(x+w,y+h),(0,0,255),2) if x <
img.shape
[1]/2: elif x <
img.shape
[1]/2*3: car_
浏览 5
提问于2022-06-08
得票数 -1
回答已采纳
1
回答
无法在Python中将图像重塑为2d数组
、
、
、
我正在尝试使用以下代码将图像重塑为一个长的2d数组(nrow * ncol,nband): new_shape = (
img.shape
[0] *
img.shape
[1],
img.shape
[2]- 1) print('Reshaped from {o} to {n}'.format(o=
img.shape
Traceback (most recent call last) <ipython-inp
浏览 30
提问于2019-04-15
得票数 0
1
回答
如何让bokeh图像像matplotlib一样绘制左上角的原点?
、
、
[0]), y_range=(0,
img.shape
[1]))plot2.image(image=[np.rot90(np.transpose(img))], x=0, y=0, dw=
img.shape
[0], dh=
img.shape
[1], palette="Spect
浏览 5
提问于2016-08-26
得票数 2
1
回答
我有一个Python脚本中的TypeError
我写了这段简短的代码:print("Ширина:" + str(
img.shape
[1])) for y in
im
浏览 15
提问于2021-06-05
得票数 0
回答已采纳
2
回答
如何有效地利用numpy制作脉冲噪声图像?
、
、
、
toImpulse(img, coef=1.2): # img - > 3dim numpy array, returns impulse image for i in range(
img.shape
[0]): sum_ = 0 max_ = np
浏览 5
提问于2020-05-30
得票数 1
回答已采纳
1
回答
图像缩放的双三次插值
、
、
、
、
这是消息来源:if x <
img.shape
[1] & y <
img.shape
[0]: new_w = int(math.ceil(float(
img.shape
[1]) * rate))new_h = int(math.ceil(float(
img.shape
[0]) * rate))
浏览 1
提问于2018-04-13
得票数 2
回答已采纳
1
回答
如何在javascript中使用
img.shape
()
、
、
、
导入cv2img = cv2.imread('/home/img/python.png', cv2.IMREAD_UNCHANGED)dimensions =
img.shape
图像中的高度、宽度、通道数width =
img.shape
[1]print('Image Dimension
浏览 5
提问于2022-02-26
得票数 0
1
回答
OpenCV:如何计算中心像素周围窗口的最小值?
、
、
f = np.asarray(
img.shape
) for j in range(
img.shape
[1]):0 begin_col = 0 end_col =
img.shape
浏览 1
提问于2016-06-02
得票数 1
回答已采纳
1
回答
如何检测图片中物体的宽度
、
、
、
我必须写程序来检测物体的宽度。我知道如果没有引用对象,它将以像素表示,但这对我来说已经足够了。背景将始终为白色。我有问题,我现在该怎么做。import numpy as npimport cv2def show_images(images): cv2.imshow("image_" + st
浏览 22
提问于2020-02-21
得票数 0
1
回答
如何创建一个自定义skimage.future.graph.rag,作为cut_normalized和ncut的输入?
、
、
所以我写了下面的代码out1 = color.label2rgb(labels1, img_i.reshape(
img.shape
[0],
img.shape
[1]), kind='avg') for ix in range(0
浏览 0
提问于2018-11-25
得票数 1
1
回答
如何使用python计算二值图像中的黑白像素
from matplotlib import pyplot as plt height, width =
img.shape
:File "C:/Python27/BnW.py", line 9, in <module> height, width =
img.shape
浏览 0
提问于2017-03-26
得票数 0
1
回答
python文件24到32位转换
、
、
(img.reshape(
img.shape
[0] *
img.shape
[1], 3), byteorder='big')])找到一个创建(w,h,4) numpy数组和复制读取图像的解决方案for ' frombuffer' by = re1.tobytes() #[0],
img.shape
[1], 4), dtype=n
浏览 3
提问于2017-12-24
得票数 0
1
回答
TypeError:片索引必须是整数或无或有__index__方法(Albumentations/NumPy)
、
、
、
、
max_width = 4891 A.RandomBrightness(p=0.2), A.Rand
浏览 12
提问于2021-06-02
得票数 0
回答已采纳
3
回答
设置轴距偏移图像
、
、
img[-2:,:] = 255img[:,-2:] = 255print('
img.shape
',
img.shape
) # axes = plt.gca()# axes.set_ylim([0,sz])plt.axis(img[-1:,:] = 255 img[:
浏览 0
提问于2019-08-22
得票数 0
回答已采纳
1
回答
numpy将数组的形状相乘以形成更大的数组
、
>>>
img.shape
>>>
img.shape
* 3>>> (
img.shape
[0] * 3,
img.shape
浏览 10
提问于2019-02-10
得票数 0
回答已采纳
1
回答
我不明白第一行的定义是什么,或者<Py_ssize_t>ceil的目的是什么?
cdef Py_ssize_t max_distance, offset 有人能帮助我理解第一行在创建变量之后的用途吗?
浏览 5
提问于2022-07-27
得票数 0
3
回答
如何从PNG图像中删除第四个通道
、
、
、
我正在从一个网址在OpenCV加载图像。有些图像是PNG格式,有四个通道。我正在寻找一种方法来删除第四个频道,如果它存在。def read_image_from_url(self, imgurl): arr = np.asarray(bytearray(req.read()), dtype=np.uint8)我不想更改cv2.imdecode(arr,-1),而是想检查加载
浏览 1
提问于2016-04-27
得票数 7
回答已采纳
1
回答
用'=‘操作符复制numpy数组。为什么起作用了?
、
import cv2print("
img.shape
: ", np.shape(img)) img = cv2.resize(img, (250,100))print("img2.shape:", img2.shape)
img.shape
: (3
浏览 2
提问于2019-09-25
得票数 0
回答已采纳
1
回答
在Python中使用PIL调整图像大小时,“in”对象不可订阅
、
、
当我试图编译我的代码时,我会收到这个错误。 我知道.size是一个数组,因为它将返回H和W的(1200,800) -我只想要其中之一。我看过语法示例,并尝试使用括号和什么也没有。另外,StackOverflow上这个问题的其他答案并不能解决我的问题。谢谢。
浏览 0
提问于2019-01-22
得票数 0
回答已采纳
1
回答
将图像顶部和底部10%的像素值更改为0 [OpenCV]
、
、
寻找做到这一点的最快方法: img[
img.shape
[0]:int(
img.shape
[0]*0.1)] = 0 img[int(
img.shape
[0])*0.9):] = 0 img是一个np.ndarray
浏览 25
提问于2021-02-25
得票数 -1
回答已采纳
点击加载更多
相关
资讯
Win10聚焦壁纸自动保存
Scikit-image,一个图像处理王者的 Python 库!
Python+OpenCV入门教程4:图像基本操作
可视化VIT中的注意力
图像的构成、创建、读取、访问
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券