【问题标题】:How to plot a histogram of pixel values of a text present in an image? [closed]如何绘制图像中文本的像素值直方图? [关闭]
【发布时间】:2021-01-07 11:20:38
【问题描述】:

我有使用 rnn 识别的文本,这些在边界框内我想绘制它们像素值的直方图。

【问题讨论】:

  • 请展示您自己的努力来回答您的问题。
  • 我不知道如何解决这个问题。我不是在寻找确切的代码,而是一种接近的方法
  • 问之前有没有上网看?你发现了什么?
  • 您可以将此作为解决方案发布,我可以投票。谢谢!

标签: python image opencv histogram


【解决方案1】:

有很多方法可以做到这一点,一种简单的方法如下:

import matplotlib.pyplot as plt

image  # I assume the image is loaded as a numpy array

plt.hist(image.flatten())
plt.show()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-22
    • 1970-01-01
    • 2011-06-30
    • 2020-09-07
    • 1970-01-01
    • 1970-01-01
    • 2018-06-02
    • 1970-01-01
    相关资源
    最近更新 更多