INNER CODE UNIT · Python

gray

AllAlgorithms/python · classification/tools.py:16

        def gray(rgb): return numpy.dot(rgb[..., :3], [0.2989, 0.5870, 0.1140])
        gray = gray(image)
        image = gray
    hist, bins = numpy.histogram(image.ravel(), 256, [0, 256])
    return adapt(hist)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…