mirror of
https://github.com/jlengrand/Tippy.git
synced 2026-03-10 08:51:16 +00:00
Adds histogram support to 3 channels images
compute_histogram support is available. hist2table support is available hist2image still to be performed. Function for 3c to 1c to be added quickly! Reported-by: Julien Lengrand-Lambert <julien@lengrand.fr> Signed-off-by: Julien Lengrand-Lambert <julien@lengrand.fr>
This commit is contained in:
@@ -23,12 +23,10 @@ import cv
|
||||
import tippy.statistics as st
|
||||
import tippy.display_operations as do
|
||||
|
||||
hist = st.Histogram()
|
||||
|
||||
img_name = "tippy/data/gnu.jpg"
|
||||
img = cv.LoadImage(img_name, cv.CV_LOAD_IMAGE_GRAYSCALE)
|
||||
hist.compute_histogram(img)
|
||||
img = cv.LoadImage(img_name, cv.CV_LOAD_IMAGE_COLOR)
|
||||
hist = st.Histogram(img)
|
||||
|
||||
hist_img = hist.hist2image()
|
||||
|
||||
do.display_single_image(hist_img, "Gray-Level histogram of the gnu image")
|
||||
do.display_single_image(hist_img[0], "Gray-Level histogram of the gnu image")
|
||||
|
||||
Reference in New Issue
Block a user