從照片生成漂亮的直方圖? (generating nice looking histogram from photo?)


問題描述

從照片生成漂亮的直方圖? (generating nice looking histogram from photo?)

我目前正在尋找一種解決方案,用於從照片中生成“漂亮”的直方圖。我想有一個用於 linux 的命令行工具。我知道,imagemagick 可以生成直方圖,這不會那麼糟糕,但我想用直方圖標記軸。

也許有一個工具可以解決這個問題,或者我可以結合例如 imagemagick 和 gnuplot 來實現這個?

非常感謝,


參考解法

方法 1:

its late here so this answer is not fully complete but cimg c++ library has an example program to collect the data from the image: described here

This data could then be piped to gnuplot as you suggest, either directly in the code or via a shell script as midway down this page: http://t16web.lanl.gov/Kawano/gnuplot/intro/working‑e.html

Writing code might not be what you want to do, but the cimg example is very well documented and is only about 15 lines long. It might end up bein the quickest thing to do.

Anyway, bed time for me

方法 2:

Another alternative is matplotlib ‑‑ have a look here and here for examples of graphs that you can create. It does require writing a bit of code, but if you're familiar with Python, it's quite easy and straightforward. The real benefit is flexibility ‑‑ you can customize the appearance of your histograms to fit your particular purpose.

histogram in 10 lines of code

(by auroraTommpenkov)

參考文件

  1. generating nice looking histogram from photo? (CC BY‑SA 3.0/4.0)

#image-processing #imagemagick #gnuplot #histogram #photo






相關問題

在 matlab 中用 imread 讀取圖像文件會給出什麼樣的表示? (reading a image file with imread in matlab gives what kind of representation?)

使用 CRF 的圖像標記性能 (Image labeling performance using CRF)

Opencv:獲取圖像中的段大小並刪除小段 (Opencv: Get segments sizes in image and remove small segments)

將 PHP 頁面作為圖像返回 (Return a PHP page as an image)

我在哪裡可以找到有關雙三次插值和 Lanczos 重採樣的好讀物? (Where can I find a good read about bicubic interpolation and Lanczos resampling?)

從圖像中刪除白色背景 (Remove white backgrounds from images)

如何填充投影圖像的空白部分? (How to fill empty parts of a projected image?)

如何使圖像亮度均勻(使用 Python/PIL) (How to Make an Image Uniform Brightness (using Python/PIL))

圖像處理公式可生成類似通過 Mac 相機拍攝的照片的效果 (Image manipulation formula to generate effects like pictures taken via Mac's camera)

從照片生成漂亮的直方圖? (generating nice looking histogram from photo?)

使用 DjVu 工具進行背景/前景分離? (Using the DjVu tools to for background / foreground seperation?)

如何操縱跟踪器區域使其變成方形? (How can I manipulate the tracker area to make it into a square shape?)







留言討論