Collect

processing.collect.get_pixel_occ(image)

Given an image, return a list of tuples of the form (pixel, number of occurrences)

:param image: The image to be analyzed :return: A list of tuples, where each tuple is a color and the number of times it appears in the image.

processing.collect.get_pixel_color(image, mode, x, y)

Get the pixel color at a given coordinate

:param image: The image to be processed :param mode: The mode parameter determines the format of the returned pixel :param x: The x-coordinate of the pixel :param y: The y-coordinate of the pixel :return: a tuple of RGB values.

processing.collect.set_occurences(image, index, sheet)

This function takes in an image and an index and writes the occurences of that index to the excel sheet

:param image: the image to be analyzed :param index: The index of the pixel in the list of pixels :param sheet: the sheet to write to

processing.collect.get_color_occurences(image1, image2)

Given two images, return the ratio of the number of pixels that are the same in both images

:param image1: The first image to compare :param image2: The image to compare to :return: The ratio of the two images.

processing.collect.get_color_average(image1, image2)

This function takes in two images and returns the average color of each image

:param image1: The first image to compare :param image2: The image to compare against image1 :return: The average color of the two images.

processing.collect.get_color_dominante(image1, image2)

Given two images, the function returns the dominant color of the images

:param image1: The first image to compare :param image2: The image to compare with :return: a tuple of three values. The first value is the dominant color of the first image. The second value is the dominant color of the second image. The third value is the similarity between the two dominant colors.


Última actualización: 12 de octubre de 2022
Creado: 12 de octubre de 2022