Skip to content

Instantly share code, notes, and snippets.

@TuringNPcomplete
Last active October 26, 2021 17:00
Show Gist options
  • Save TuringNPcomplete/8292a9adc39ffdedf6700c133078f460 to your computer and use it in GitHub Desktop.
Save TuringNPcomplete/8292a9adc39ffdedf6700c133078f460 to your computer and use it in GitHub Desktop.
Using a custom defined function for converting color image to grayscale
grayscale_avr, grayscale_w, grayscale_lu = [transf_RBG(reptile_arr, RBG_conv_met) for RBG_conv_met in ["Average",
"Weighted_average", "Luminosity"] ]
Dim_Imsshow([grayscale_avr, grayscale_w, grayscale_lu], suptitle = "Grayscale Images based on: Average,
Weighted Average, and Luminosity methods", titles = ["Average", "Weighted Average", "Luminosity"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment