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:
Julien Lengrand-Lambert
2011-12-16 17:49:19 +01:00
parent 1892bd6945
commit 335108ecf6
3 changed files with 65 additions and 37 deletions

View File

@@ -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")